snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

[Feature] Support `program_owner` as an operand.

Open d0cd opened this issue 7 months ago • 0 comments

[NO NEW COMMITS ARE ALLOWED AS OF 5/27/25]

This PR:

  • adds the owner Address to the Deployment and enforces that it exists and is well-formed after the migration height.
  • requires the constructors exist in all programs after the migration height.
  • introduces Operand::ProgramOwner to programs.
  • accounts for program editions in partially_verified_transactions to handle upgrades.

Operand::ProgramOwner

  • A program can reference its owner and other owners with the syntax program_owner and credits.aleo/program_owner respectively.
  • The operand is only available in a constructor and finalize scope.
  • Programs deployed before ConsensusVersion::V5 do not have a program owner, including credits.aleo.

Open Items

  • [ ] Discussion. Can the Merkle root of the transaction be cached?
  • [x] Implementation. Hold process lock over the duration of check_transaction.
  • [ ] Discussion. Consider program.owner or this.owner or enforcing <this_program.aleo>/owner to unify operands over program metadata.

d0cd avatar May 18 '25 14:05 d0cd