| Frame |
On-chain account |
Transaction-scoped execution context for Ifx bindings |
Analogous to a stack frame: locals live here for one “run,” then are cleared. PDA seed is "frame". Not application business state. |
| tape |
Frame.tape: Vec<u8> |
Contiguous byte buffer; records are appended in order |
From the Turing-machine tape metaphor: one sequential medium, write head moves forward. Replaces the temporary prototype field memory, which sounded like generic RAM or account data. |
| tape_len |
ifx_create_frame arg |
Fixed byte capacity of tape (1…65_535) |
Length of the physical tape allocated at create; no extend. |
| cursor |
Frame.cursor: u32 |
Next byte offset where append will write |
The tape write head. Monotonic within a session until reset. Distinct from Value.index (binding index). |
| payload_at |
Frame.payload_at: Vec<u16> |
payload_at[i] = byte offset of binding i’s payload in tape |
Indirection table: wire refs use small index, not byte offsets. “Payload” = typed value bytes; “at” = location in tape. |
| index (binding index) |
Value.index, logs $N |
0-based sequence number of append order |
First binding is 0. Stable handle for Expr::Value, RawCpiPatch.source, and debug logs. |
| index_count |
Frame.index_count: u16 |
Bindings appended since last reset |
Number of bindings used; next binding gets index index_count before increment. |
| generation |
Frame.generation: u64 |
Monotonic session counter |
0 at create; wrapping_add(1) on each ifx_reset_frame. Readable via LetBinding::FrameGeneration (tag 27). |
| index_cap |
Frame.index_cap: u16 |
Max bindings (payload_at.len()) fixed at create |
min(256, tape_len / 2). Hitting cap → IndexCapReached (independent of tape bytes). |
| record |
Tape layout |
One binding: [ty:1][payload:ty.size()] packed at cursor |
“Record” = one typed row on the tape (type tag + payload), not an account record. |
| ty / ValueType |
First byte of each record |
Primitive type tag (Bool, U64, …) |
Short for type; size is fixed per variant (see implementation.md §3). |
| payload |
Bytes after ty |
Little-endian value bytes |
Everything Expr and RawCpiPatch read for a binding (type comes from ty at payload_at[i] - 1 on chain). |
| authority |
Frame.authority |
Off-curve → public scratch; on-curve → private Frame (signer on writes) |
Gates reset / let / close when on-curve. frame-authority.md. |
| frame_id |
PDA seed (32 bytes) |
Salt with payer only at ifx_create_frame |
Not stored on-chain. After create, persist frame pubkey (+ tape_len); frame_id may be discarded. See design.md §4.1. |
| frame (address) |
Frame account pubkey |
Runtime identity for reset / let / assert / CPI / close |
Returned by planPublicFrame / planNewFrame as scratch.frame. No seeds re-check on non-create ix (by design). |
| payer |
PDA seed |
Frame rent payer at create |
Anchor #[account(init, payer = …)] convention; not required on later instructions. |