This repository implements Merkle Proof and Merkle Mountain Ranges Proof verification using gnark. It includes 2 circuits designed to verify the validity of a proof for either of the structures.
Merkle Tree: circuit in merkle_tree.go
and test in merkle_tree_test.go
.
MMR: standard Go functionality in mmr.go
, this is an adaptation of this Rust implementation. Circuit implementation and accompanying test in mmr_circuit.go
and mmr_circuit_test.go
respectively.
This runs the main
function in main.go
. (Currently empty)
go mod tidy
go run .
This runs all tests in the files ending with _test.go
.
go test
Gnark: https://github.com/Consensys/gnark/
Gnark-crypto: https://github.com/Consensys/gnark-crypto
Read the introduction blog here.
Functionality available for circuit design, reference here.