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

AccountSeedsWritablePurpose
registers PDA["registers", owner]yesThe 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]yesThe PDA signer the VM uses when a step is marked signed, so a step can act with program-derived authority. Derived from the payer.
payersigneryesYour wallet. Its signature propagates to every inner CPI in the plan.
pooled accountsinterned by indexper stepEvery distinct pubkey your steps reference, deduplicated and listed after the three fixed accounts. Marked writable if any step needs it writable.
Both PDAs are derived from the PTBVM program id. Seeds are UTF-8 strings followed by the 32-byte owner or payer key.

The PTBVM program id, on devnet:

A2kR2uTGLYfCqimqF4piRDh7aHfLRDf4gBg8LvmfMLrz

Account 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.