Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

doubledup/merkle-proof-optimisation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merkle proof optimisation

To run the tests, install foundry and run forge test from the root of this repository.

To get an estimate of the gas consumption of each test, see the output from forge test. Each passing test produces a line ending in (gas: _). Alternatively, run forge snapshot and view the results.

Changing the leaves used

  • Update the leaves & leafIndex in the test data generator, optionally changing the leafEncoding if necessary.
  • Ensure pnpm is installed and run the test data generator from its directory with cd test/data/ && pnpm start && cd -.
  • Use the output of the test data generator to update the following variables in the tests:
    • At the top level of the contract:
      • leafIndex
      • leaves
    • Within each test case:
      • expectedRoot
      • proof
      • hashSides (for the test that uses this)
  • Run forge test or forge snapshot as before.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published