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

Function batch_insert_no_update

pub fn batch_insert_no_update<Value, Leaf, let TreeHeight: u32, let SubtreeWidth: u32, let SubtreeHeight: u32>(
    start_snapshot: AppendOnlyTreeSnapshot,
    values_to_insert: [Value; SubtreeWidth],
    sorted_values: [Value; SubtreeWidth],
    sorted_values_indexes: [u32; SubtreeWidth],
    low_leaf_preimages: [Leaf; SubtreeWidth],
    low_leaf_membership_witnesses: [MembershipWitness<TreeHeight>; SubtreeWidth],
    new_subtree_sibling_path: [Field; TreeHeight - SubtreeHeight],
    merkle_hasher: fn(Field, Field) -> Field,
) -> AppendOnlyTreeSnapshot

Batch insert values into the indexed tree by creating a subtree of the values and inserting the subtree root. This function does not allow updating the values of existing leaves.

merkle_hasher must be the tree-specific sibling-pair hasher for the target indexed tree (e.g. nullifier_merkle_hash for the nullifier tree).