Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Solidity example comparing Merkle Tree vs Merkle Mountain Range tree gas usage.

License

Notifications You must be signed in to change notification settings

miguelmota/solidity-mt-vs-mmr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidity Merkle Tree vs Merkle Mountain Range Tree

Solidity example comparing Merkle Tree vs Merkle Mountain Range tree gas usage.

Build

npm run build

Test

npm test

Output:

  Test
append gas used: 0 62737
append gas used: 1 47749
append gas used: 2 47749
[...]
append gas used: 97 47737
append gas used: 98 47749
append gas used: 99 47749
total append gas used: 4789660
commit gas used: 165686
proof verification gas: 51394
    ✓ MerkleTree (2279ms)

append gas used: 0 161462
append gas used: 1 143226
append gas used: 2 120016
[...]
append gas used: 97 153076
append gas used: 98 128382
append gas used: 99 181064
total append gas used: 15233642
commit gas used: 42050
proof verification gas: 93479
    ✓ MerkleMountainRange (3849ms)

  2 passing (6s)

License

MIT