aztec-nr - noir_aztec::hash

Function compute_public_bytecode_commitment

pub fn compute_public_bytecode_commitment(packed_public_bytecode: [Field; 3000]) -> Field

Computes the public bytecode commitment for a contract class. The commitment is hash([(length | separator), ...bytecode]).

@param packed_bytecode - The packed bytecode of the contract class. 0th word is the length in bytes. packed_bytecode is mutable so that we can avoid copying the array to construct one starting with first_field instead of length. @returns The public bytecode commitment.