[][src]Function poseidon252::merkle_proof::merkle_opening_gadget

pub fn merkle_opening_gadget(
    composer: &mut StandardComposer,
    branch: PoseidonBranch,
    proven_leaf: Variable,
    proven_root: BlsScalar
)

Provided a kelvin::Branch, a &mut StandardComposer, a leaf value and a root, print inside of the constraint system a Merkle Tree Proof that hashes up from the searched leaf in kelvin until the root of the tree constraining each level hashed on the process.

branch_length controls how much padding should be added to the branch to make it the correct length.

NOTE: The root of the Branch (root of the Merkle tree) will be set as Public Input so we can re-use the circuits that rely on this gadget.