This repository was archived by the owner on Jun 6, 2025. It is now read-only.
eth/protocols/snap: fix snap sync failure on empty storage range#623
Open
andicrypt wants to merge 2 commits intoaxieinfinity:masterfrom
Open
eth/protocols/snap: fix snap sync failure on empty storage range#623andicrypt wants to merge 2 commits intoaxieinfinity:masterfrom
andicrypt wants to merge 2 commits intoaxieinfinity:masterfrom
Conversation
* eth/protocols/snap: don't include empty snapshot slot slice This PR fixes the snapshot storage serving handler. In snap protocol the response is capped by the response size. Server can cutdown the response if the accumulated byte size exceeds the local hard limit. It means we can meet a special scenario that there is no storage slot included for a requested account, but we attach the proof for this account by mistake. So in the prover side, when it meets a empty storage response but with a valid proof proves there are some more slots left in the trie, then requestor will reject this response and disconnect with server. In this PR, if there is no storage slot served for the requested account, then no proof should be attached as well. * eth/protocols/snap: loosen restrictions for flaky tests * eth/catalyst: fix flaky test in catalyst
commit ethereum/go-ethereum@1cb3b6a In PR ethereum/go-ethereum@39fb82b, we ensure that if accumulated storage response exceeds hard limit cap (and being cutdown in size), the proof will not be attached, ensuring that the prover will not mislead more entries to requested. However, we now mishandle the normal scenario when the particular range requested does not contain any slots. This PR aims to fix this.
8b4156a to
32ba9c3
Compare
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
commit ethereum/go-ethereum@1cb3b6a
commit ethereum/go-ethereum@1cb3b6a
In the first PR, we ensure that if accumulated storage response exceeds hard limit cap (and being cutdown in size), the proof will not be attached, ensuring that the prover will not mislead more entries to requested. Additionally, we re-handle the normal scenario when the particular range requested does not contain any storage slots.