diff --git a/lee/state_machine/core/src/program/mod.rs b/lee/state_machine/core/src/program/mod.rs index 59be7ef50..e8c6c6796 100644 --- a/lee/state_machine/core/src/program/mod.rs +++ b/lee/state_machine/core/src/program/mod.rs @@ -23,8 +23,12 @@ pub const MAX_NUMBER_CHAINED_CALLS: usize = 10; pub type ProgramId = [u32; 8]; -/// TODO: This is a temporary conversion; will be removed once `Program` to `Account` -/// migration is complete. +/// Derives the `AccountId` under which a program's data is stored, directly from its +/// `ProgramId`, by reinterpreting the 8 little-endian `u32` words as 32 raw bytes. +/// +/// A 1:1, information-preserving mapping (both types are exactly 32 bytes) rather than a +/// hash — `ProgramId` is already content-derived (RISC0's `image_id`), so no extra domain +/// separation is needed just to use it as a `HashMap` key. impl From for AccountId { fn from(program_id: ProgramId) -> Self { let bytes: Vec = program_id