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

test(trie-db): add checks for tree mask invariant #12080

Closed
wants to merge 7 commits into from

Conversation

fgimenez
Copy link
Member

@fgimenez fgimenez commented Oct 25, 2024

Ref: #12129

The invariant checked is: for each branch node in trie nodes with path, for each position with 1 in its tree mask, there must be branch nodes in trie updates at paths path-position.

For instance, for branch node at path 0x01 with tree mask 0100000001010101, in trie updates we must have branch nodes at paths 0x010, 0x012, 0x014, 0x016, 0x01e (the mask indicates child nibbles but it goes from the right to left)

@fgimenez fgimenez added C-test A change that impacts how or what we test A-trie Related to Merkle Patricia Trie implementation labels Oct 25, 2024
@fgimenez fgimenez changed the title test(trie-db): add checks for tree mask invariant in storage trie fuzz tests test(trie-db): add checks for tree mask invariant Oct 28, 2024
@fgimenez fgimenez requested a review from gakonst as a code owner October 29, 2024 08:19
@fgimenez fgimenez force-pushed the fgimenez/test-tree-mask branch from b5e5e72 to 1fee6a0 Compare October 29, 2024 11:10
@fgimenez
Copy link
Member Author

fgimenez commented Nov 7, 2024

Closing for now, will reopen once we focus on #12129

@fgimenez fgimenez closed this Nov 7, 2024
@fgimenez fgimenez deleted the fgimenez/test-tree-mask branch November 7, 2024 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-trie Related to Merkle Patricia Trie implementation C-test A change that impacts how or what we test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant