[][src]Module poseidon252::merkle_proof

Reference implementation for the gadget that builds a merkle opening proof

Structs

PoseidonBranch

The Poseidon structure will accept a number of inputs equal to the arity.

PoseidonLevel

Represents a Merkle-Tree Level inside of a PoseidonBranch. It stores the leaves as BlsScalar and the offset which represents the position on the level where the hash of the previous PoseidonLevel is stored in.

Functions

merkle_opening_gadget

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.

merkle_opening_scalar_verification

Provided a PoseidonBranch and a Merkle Tree root, verify that the path to the root is correct.