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

fix(witness): collect witness using sparse trie #13072

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

rkrasiuk
Copy link
Member

@rkrasiuk rkrasiuk commented Dec 2, 2024

Description

Closes #12859

@rkrasiuk rkrasiuk added C-bug An unexpected or incorrect behavior A-trie Related to Merkle Patricia Trie implementation labels Dec 2, 2024
@rkrasiuk rkrasiuk force-pushed the rkrasiuk/sparse-trie-witness branch 2 times, most recently from 815e86e to 28ce5a8 Compare December 3, 2024 16:32
@rkrasiuk rkrasiuk force-pushed the rkrasiuk/sparse-trie-witness branch from 28ce5a8 to 0e93c96 Compare December 3, 2024 16:33
@rkrasiuk rkrasiuk marked this pull request as ready for review December 3, 2024 16:34
@meyer9
Copy link
Contributor

meyer9 commented Dec 3, 2024

Verified this fixes the provided test case! I can open a PR with my test case if you want, but I wonder if we can fuzz it more generally:

  1. insert some random values
  2. generate witness inserting and deleting some of those values
  3. verify that we can compute the new state root with only the witness

We could probably utilize the sparse tree implementation to do 3. Let me know if this makes sense and I'll work on creating a test like this, otherwise, I can just add the more simple test.

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

@meyer9 if you could provide more test vectors that'd be helpful, but marking this a completed

@mattsse mattsse added this pull request to the merge queue Dec 4, 2024
Merged via the queue into main with commit 3091386 Dec 4, 2024
41 checks passed
@mattsse mattsse deleted the rkrasiuk/sparse-trie-witness branch December 4, 2024 15:00
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-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(trie): witness generation
3 participants