refactor(lee): migrate ChainedCall/Message program reference from ProgramId to AccountId

Chained-call and public-transaction dispatch now address the target
program directly by AccountId instead of routing through ProgramId and
converting internally, closing the gap that blocked PDA-addressed
program invocation. The field is named program_account_id (not
account_id) to stay unambiguous next to the account_ids list it sits
beside in the same structs.

Execution/PDA-derivation logic that fundamentally needs the RISC0 image
id (self_program_id, caller_program_id, env::verify, PDA seed
derivation) stays ProgramId-typed, recovering it from the dispatched
AccountId via the existing bijection where needed.
This commit is contained in:
Marvin Jones
2026-08-22 16:58:27 -04:00
parent b9168967cc
commit b9152f58c0
80 changed files with 355 additions and 311 deletions
@@ -48,7 +48,7 @@ fn main() {
let chained_call_greeting: Vec<u8> = b"Hello from tail call".to_vec();
let chained_call_instruction_data = risc0_zkvm::serde::to_vec(&chained_call_greeting).unwrap();
let chained_call = ChainedCall {
program_id: hello_world_program_id(),
program_account_id: hello_world_program_id().into(),
instruction_data: chained_call_instruction_data,
pre_states,
pda_seeds: vec![],
@@ -60,7 +60,7 @@ fn main() {
this
};
let chained_call = ChainedCall {
program_id: hello_world_program_id(),
program_account_id: hello_world_program_id().into(),
instruction_data: chained_call_instruction_data,
pre_states: vec![pre_state_for_chained_call],
pda_seeds: vec![PDA_SEED],