Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-request]: Merkle trie properties #24

Open
bsamuels453 opened this issue Apr 17, 2023 · 2 comments
Open

[Feature-request]: Merkle trie properties #24

bsamuels453 opened this issue Apr 17, 2023 · 2 comments

Comments

@bsamuels453
Copy link
Contributor

Describe the desired feature or improvement

  1. How challenging would it be to create a generic set of merkle trie properties?
  2. Do merkle trie library interfaces have enough commonalities for this kind of test suite to be possible?
@bsamuels453
Copy link
Contributor Author

Constructs that could be tested:

  1. Merkle Mountain Ranges
  2. Merkle Multi-proofs
  3. Normal Merkle proofs

@bsamuels453
Copy link
Contributor Author

property ideas:

  1. Given a trie T and items to be added X and Y,
    a. assert root(T.add(x)) != root(T.add(y))
    b. assert root(T.add(x).add(y)) == root(T.add(y).add(x))
    c. assert root(T.add(x).add(x)) == root(T.add(x)) (or reverts)
  2. something to check that the value being proved is a leaf and not an intermediate node (I don't think this applies to merkle-patricia tries)
  3. everything from the guidance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant