cmd/utils: disable snap protocol for fast node#2234
Merged
zzzckck merged 1 commit intobnb-chain:developfrom Mar 21, 2024
Merged
cmd/utils: disable snap protocol for fast node#2234zzzckck merged 1 commit intobnb-chain:developfrom
zzzckck merged 1 commit intobnb-chain:developfrom
Conversation
zlacfzy
previously approved these changes
Mar 21, 2024
zlacfzy
previously approved these changes
Mar 21, 2024
zzzckck
previously approved these changes
Mar 21, 2024
buddh0
reviewed
Mar 21, 2024
buddh0
reviewed
Mar 21, 2024
cmd/utils/flags.go
Outdated
| cfg.EnableTrustProtocol = true | ||
| } | ||
|
|
||
| // A node without trie is not able to provide snap data, so it should disable snap protocol. |
Contributor
There was a problem hiding this comment.
if disable
fast node can do snap sync?
Contributor
Author
There was a problem hiding this comment.
If you meant when a node starts with a fast node, which does full sync, then later on becomes a full node and does snap sync again, will it work? I'm not entirely sure, my intuition is that it doesn't work.
80daa47 to
e6280a1
Compare
e6280a1 to
8430242
Compare
zzzckck
approved these changes
Mar 21, 2024
buddh0
approved these changes
Mar 21, 2024
This was referenced Mar 21, 2024
Closed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR adds a logic check such that if the node is fast node (i.e.
--tries-verify-modeis notlocal), then it will disable the snap protocol by default.Rationale
When serving snap data (i.e.
AccountRange,StorageRange,TrieNodes), access to a complete state trie is necessary. However, for fast nodes, since they only store the snapshot, they can't service these requests. Disabling this snap protocol by default may help reduce network calls and processing time for the nodes in general.