This implements an incremental merkle tree class in Python and the necessary backend SNARK circuits to verify the proofs.
The hash used for the merkle tree is LongsightF5p5, where 5 rounds with exponent of 5.
This is because 152 rounds are needed to meet the difficulty level outline in the MiMC paper, and 29*5 is... nearly there. This means that hashing the leaf, then proving a merkle path 29 entries long is about the same cost as two full hashes at 152 rounds each, rather than 30 hashes at 152 rounds each.
This implements an incremental merkle tree class in Python and the necessary backend SNARK circuits to verify the proofs.
The hash used for the merkle tree is LongsightF5p5, where 5 rounds with exponent of 5.
This is because 152 rounds are needed to meet the difficulty level outline in the MiMC paper, and 29*5 is... nearly there. This means that hashing the leaf, then proving a merkle path 29 entries long is about the same cost as two full hashes at 152 rounds each, rather than 30 hashes at 152 rounds each.