For the complete documentation index, see llms.txt.
aztec-nr - noir_aztec::protocol::blob_data

Function compute_tx_effect_hash

pub fn compute_tx_effect_hash(
    tx_effect: TxEffect,
    array_lengths: TxEffectArrayLengths,
) -> Field

Hash committing to the full contents of a tx's effects.

The hash is structured rather than flat: each variable-length field is hashed on its own first, and this hash is taken over those sub-hashes plus the small scalar fields inline. Proving a single field (e.g. one note hash) therefore only requires the preimage of that field's sub-hash, with the other sub-hashes as opaque witnesses.

Each sub-hash preimage is that field's slice of the blob encoding (see create_tx_blob_data), over the actual runtime length, so no new serialization format is introduced. The tx start marker binds the revert code, every array count and the total blob field count; the transaction fee is small enough to inline. The tx hash is bound at the leaf level instead (see compute_tx_effect_leaf).