-
Notifications
You must be signed in to change notification settings - Fork 776
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
Snap sync: use zero-element proof for checking validity of final, empty range result #3047
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
91a9a94
Use no-elements proof for final check in account fetcher
scorbajio 64274ed
Use no-elements proof for final check in storage fetcher
scorbajio a00dcb4
Check inputs after zero element proof code section
scorbajio 14d6a88
Cleanup
scorbajio 1d4932c
Reject peer if zero-element proof fails
scorbajio 519da70
Add tests for zero-element proof
scorbajio f77de8e
Merge branch 'master' into snap-sync-no-element-proof
scorbajio 5db599b
Merge branch 'master' into snap-sync-no-element-proof
ScottyPoi 51f0dc4
Merge branch 'master' into snap-sync-no-element-proof
scorbajio cbaecea
Merge branch 'master' into snap-sync-no-element-proof
holgerd77 eb707f8
Merge branch 'master' into snap-sync-no-element-proof
scorbajio 4705a49
Merge branch 'master' into snap-sync-no-element-proof
scorbajio 1747af4
Remove proofTrie usage
scorbajio 4561489
Use hashing function in static version of verifyRangeProof
scorbajio 60c21ab
Include useKeyHashing in call to fromProof so that hashing function i…
scorbajio cbefeb7
Use appliedKey for hashing function instead of the function directly …
scorbajio eed0750
Pass in hashing function for use in static proof verification calls
scorbajio 11aef80
Merge branch 'master' of github.com:ethereumjs/ethereumjs-monorepo in…
scorbajio bba8397
Fix static range proof verification errors
scorbajio 34d0385
Use custom hashing function from opts if available
scorbajio 886ce05
Merge branch 'master' into snap-sync-no-element-proof
scorbajio 1dba9d4
Add test to check if zero element range proof verification fails with…
be27dc8
Check if parameters are as expected for zero-element proof
bd7d285
Fix linting issues
6f850ce
Merge branch 'master' into snap-sync-no-element-proof
holgerd77 34a7c12
Merge branch 'master' into snap-sync-no-element-proof
holgerd77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new, but has to do with an all elements proof 🤔 (looks correct to me, but maybe add a test 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is actually not new, I've only moved it bellow where zero-element proof checking happens. It was previously like this:
The reason I did that was because zero-element proof checking was failing when I was passing in just the
root
,firstKey
, andproof
, withnull
forlastKey
and empty arrays forkeys
andvalues
, as such:The error resulting from this was confusing a zero-element request to be a failed all-elements request: