snarkVM
snarkVM copied to clipboard
[Feature] Support `program_owner` as an operand.
[NO NEW COMMITS ARE ALLOWED AS OF 5/27/25]
This PR:
- adds the owner
Addressto theDeploymentand 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::ProgramOwnerto programs. - accounts for program editions in
partially_verified_transactionsto handle upgrades.
Operand::ProgramOwner
- A program can reference its owner and other owners with the syntax
program_ownerandcredits.aleo/program_ownerrespectively. - The operand is only available in a constructor and finalize scope.
- Programs deployed before
ConsensusVersion::V5do not have a program owner, includingcredits.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.ownerorthis.owneror enforcing<this_program.aleo>/ownerto unify operands over program metadata.