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

REFACTOR: Addition of StemNodes to capture SuffixExtensions #8

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

thomas-quadratic
Copy link
Contributor

PR description

This is a major refactoring that solves several problems:

  • Ready to generate proof data: StemNodes capture the suffix-extensions from the specs, with its intermediate commitments.
  • Root hashes can be tested against testnet: they are coherent with go-verkle and rust-verkle.
  • Trie can be stored/retrieved from database: StoredVerkleTrie makes it transparent to work with a Trie that is not completely loaded in memory and looks for nodes in the database when needed.
  • Put key-value returns the old value : this is helpful for rollbacks and trie-logs.

Fixed Issue(s)

Currently, there was branch or leaf nodes (and null). The logic of suffix and extensions was all included in hash visitor.
This includes commiting to 1, stem, left values commitment and right values commitment.
However, the subcommitments will be useful in proofs.

Another reason to refactor is that path-extensions are only allowed at StemNodes, like in the current specifications.
Before, path-extensions could be done anywhere.

Another feature is support for StoredVerkleTrie. StoredNodes are now behaving correctly and can be retrieved recursively.

Finally, minor feature is that put returns the old value, which is helpful for trie-logs

Signed-off-by: Thomas Zamojski <[email protected]>
Copy link

github-actions bot commented Nov 9, 2023

  • I thought about the changelog.

Copy link
Contributor

@matkt matkt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matkt matkt merged commit b2ce2f2 into hyperledger:main Nov 10, 2023
5 checks passed
dragan2234 pushed a commit to dragan2234/besu-verkle-trie that referenced this pull request Jan 22, 2024
…ger#8)

Currently, there was branch or leaf nodes (and null). The logic of suffix and extensions was all included in hash visitor.
This includes commiting to 1, stem, left values commitment and right values commitment.
However, the subcommitments will be useful in proofs.

Another reason to refactor is that path-extensions are only allowed at StemNodes, like in the current specifications.
Before, path-extensions could be done anywhere.

Another feature is support for StoredVerkleTrie. StoredNodes are now behaving correctly and can be retrieved recursively.

Finally, minor feature is that put returns the old value, which is helpful for trie-logs

Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Dragan Pilipovic <[email protected]>
dragan2234 pushed a commit to dragan2234/besu-verkle-trie that referenced this pull request Jan 22, 2024
…ger#8)

Currently, there was branch or leaf nodes (and null). The logic of suffix and extensions was all included in hash visitor.
This includes commiting to 1, stem, left values commitment and right values commitment.
However, the subcommitments will be useful in proofs.

Another reason to refactor is that path-extensions are only allowed at StemNodes, like in the current specifications.
Before, path-extensions could be done anywhere.

Another feature is support for StoredVerkleTrie. StoredNodes are now behaving correctly and can be retrieved recursively.

Finally, minor feature is that put returns the old value, which is helpful for trie-logs

Signed-off-by: Thomas Zamojski <[email protected]>
Signed-off-by: Dragan Pilipovic <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants