Skip to content

hashcloak/merkle_trees_gnark

Repository files navigation

Merkle Tree functionality using gnark

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.

Run

This runs the main function in main.go. (Currently empty)

go mod tidy
go run  .

Run tests

This runs all tests in the files ending with _test.go.

go test

Gnark Resources

Gnark: https://github.com/Consensys/gnark/

Gnark-crypto: https://github.com/Consensys/gnark-crypto

Introduction blog

Read the introduction blog here.

Circuit Frontend API

Functionality available for circuit design, reference here.

About

Merkle Tree functionality using gnark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages