Merkle Tree circuit

Inputs

Let 𝑂(𝜏, 𝜄) be the path of the merkle tree 𝜏 represented by the root hash 𝑅 with the index 𝜄.

Pseudocode namezk-SNARK input typeDescription
leafPublicAn output of Pedersen hash function 𝐶 such that 𝐶 = 𝘏1(𝑘∥𝑟)
path_elements[levels]PublicPath elements to prove the existence of the current leaf represented by𝑂(𝜏, 𝜄).
path_index[levels]PublicA path index 𝜄 from the merkle tree.

Outputs

Pseudocode namezk-SNARK input typeDescription
rootPublicA value of current merkle root 𝑅.