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): narrow the range of keys for sparse trie fuzz #11937

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Oct 21, 2024

Basically this:

updates in proptest::collection::vec(
proptest::collection::hash_map(
// Having only the first 3 nibbles set, we narrow down the range of keys
// to 4096 different hashes. It allows us to generate collisions more likely
// to test the sparse trie updates.
arbitrary_with::<Nibbles, _, _>(SizeRange::new(3..=3)),
any::<Vec<u8>>(),
1..100,
),
1..100,
)

Allows us to have more updates and deletions in the trie.

@shekhirin shekhirin added C-test A change that impacts how or what we test A-trie Related to Merkle Patricia Trie implementation labels Oct 21, 2024
@shekhirin shekhirin marked this pull request as ready for review October 21, 2024 17:01
@shekhirin shekhirin marked this pull request as draft October 21, 2024 17:16
@shekhirin shekhirin marked this pull request as ready for review October 21, 2024 17:19
Copy link
Member

@rkrasiuk rkrasiuk left a comment

Choose a reason for hiding this comment

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

great

@rkrasiuk rkrasiuk added this pull request to the merge queue Oct 21, 2024
Merged via the queue into main with commit bddd320 Oct 21, 2024
38 checks passed
@rkrasiuk rkrasiuk deleted the alexey/sparse-trie-fuzz branch October 21, 2024 19:19
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.

2 participants