Function: applySubtreeUpdate(uint256 newRoot, uint256[8] proof)
This updates the root of the offline Merkle tree given a valid proof that the new tree is the old tree with the expected notes inserted.
Inputs
newRootControl: Arbitrary.
Constraints: Must pass
subtreeupdatecircuit. Must not be past root hash.Impact: New root.
proofControl: Arbitrary.
Constraints: Must pass
subtreeupdatecircuit.Impact: None.
Branches and code coverage
Intended branches
Subtree update succeeds.
Negative behavior
Subtree update fails due
newRootbeing a past root.Subtree update fails due to circuit-verification failure.