Accounts and PDAs
The registers PDA, the authority PDA, and how accounts are indexed.
A plan touches two program-derived accounts of its own, plus the pool of accounts its steps reference. All are passed to the single execute instruction.
The two PDAs
| Account | Seeds | Writable | Purpose |
|---|---|---|---|
| registers PDA | ["registers", owner] | yes | The owner's register file: 8 u64 slots that carry captured values between steps. Created once via init_registers, writable during execute. |
| authority PDA | ["authority", payer] | yes | The PDA signer the VM uses when a step is marked signed, so a step can act with program-derived authority. Derived from the payer. |
| payer | signer | yes | Your wallet. Its signature propagates to every inner CPI in the plan. |
| pooled accounts | interned by index | per step | Every distinct pubkey your steps reference, deduplicated and listed after the three fixed accounts. Marked writable if any step needs it writable. |
The PTBVM program id, on devnet:
A2kR2uTGLYfCqimqF4piRDh7aHfLRDf4gBg8LvmfMLrzAccount ordering in execute
The compiled instruction lays out its keys in a fixed order: the registers PDA (writable), the authority PDA (writable), the payer (signer, writable), then every pooled pubkey in intern order. A pooled account is marked writable if any step that references it needs it writable.