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

Ensure Clean State of Nodes After Commit in Besu-Verkle-Trie #3

Open
neotheprogramist opened this issue Nov 21, 2023 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@neotheprogramist
Copy link
Member

Description:
In the hyperledger/besu-verkle-trie repository, each node has a dirty flag indicating whether it has been modified since the last database write. This flag is crucial for determining whether commitments need to be recalculated. However, it has been observed that the CommitVisitor class does not appropriately reset this flag to clean for nodes that have been written to the database. This oversight could lead to unnecessary recalculations and affect the efficiency of the trie operations.

Expected Behavior:

  1. Testing: A new test case should be created to verify that the root node's dirty flag is set to clean after the commit() method is executed. This test will help in asserting the correct behavior of the node state post-commit.
  2. Code Modification: If the newly created test fails, it indicates a requirement for modifying the CommitVisitor implementation. The modification should ensure that once a node is stored in the database, its dirty flag is set to clean, indicating no further modifications are pending.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants