Skip to content

Golang Implementation of Streaming Merkle Root, Proof, and Verify (single leaf) from Luke Champine's paper

License

Notifications You must be signed in to change notification settings

10d9e/fastmerkle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastmerkle

Golang Implementation of Streaming Merkle Root, Proof, and Verify (single leaf) from Luke Champine's paper: Streaming Merkle Proofs within Binary Numeral Trees @ https://eprint.iacr.org/2021/038.pdf

Usage

import "github.com/jlogelin/fastmerkle"

func main() {
  blkstream := [][]byte{[]byte("a"), []byte("b"), []byte("c")}
  root := MerkleRoot(blkstream)
  fmt.Printf("Merkle root: %x\n", root)
}

Benchmark

The following root node calculation benchmark was run on an Apple M1 Pro 32 GB.

Parameters:

  • 33554432 elements
  • sha256 hash
Project Execution Time
fast-merkle 8.320988875s
cbergoon/merkletree 26.294219875s
wealdtech/go-merkletree 30.399641917s
txaty/go-merkletree 2m 37s

About

Golang Implementation of Streaming Merkle Root, Proof, and Verify (single leaf) from Luke Champine's paper

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages