项目作者: miguelmota

项目描述 :
Solidity example comparing Merkle Tree vs Merkle Mountain Range tree gas usage.
高级语言: Solidity
项目地址: git://github.com/miguelmota/solidity-mt-vs-mmr.git
创建时间: 2021-04-04T05:45:29Z
项目社区:https://github.com/miguelmota/solidity-mt-vs-mmr

开源协议:MIT License

下载


Solidity Merkle Tree vs Merkle Mountain Range Tree

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

Build

  1. npm run build

Test

  1. npm test

Output:

  1. Test
  2. append gas used: 0 62737
  3. append gas used: 1 47749
  4. append gas used: 2 47749
  5. [...]
  6. append gas used: 97 47737
  7. append gas used: 98 47749
  8. append gas used: 99 47749
  9. total append gas used: 4789660
  10. commit gas used: 165686
  11. proof verification gas: 51394
  12. MerkleTree (2279ms)
  13. append gas used: 0 161462
  14. append gas used: 1 143226
  15. append gas used: 2 120016
  16. [...]
  17. append gas used: 97 153076
  18. append gas used: 98 128382
  19. append gas used: 99 181064
  20. total append gas used: 15233642
  21. commit gas used: 42050
  22. proof verification gas: 93479
  23. MerkleMountainRange (3849ms)
  24. 2 passing (6s)

License

MIT