server: Initial state protocol banning.#3686
Merged
davecgh merged 2 commits intodecred:masterfrom May 6, 2026
Merged
Conversation
2b398b4 to
b773d84
Compare
jholdstock
reviewed
May 4, 2026
davecgh
commented
May 4, 2026
b773d84 to
be90a84
Compare
jholdstock
approved these changes
May 4, 2026
dajohi
approved these changes
May 6, 2026
jrick
approved these changes
May 6, 2026
The required method for requesting and sending the initial state was changed to getinitstate and initstate in protocol version 8. However, that wasn't strictly enforced at the time to ensure any straggling implementations had a chance to catch up. Now that there have been multiple protocol versions since that time and new consensus changes that would fork any old nodes from the network anyway, this adds hard enforcement of that rule. Peers are now banned for sending the old getminingstate/miningstate messages when they have negotiated to at least protocol version 8.
The expected protocol for the initial state messages is that only a single request and response will be sent per connection. All honest peers on the network follow this rule, however it is not strictly enforced. This adds logic to strictly enforce that rule by banning any peers that violate it.
be90a84 to
d35de9c
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 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.
The required method for requesting and sending the initial state was changed to
getinitstateandinitstatein protocol version 8. However, that wasn't strictly enforced at the time to ensure any straggling implementations had a chance to catch up.Now that there have been multiple protocol versions since that time and new consensus changes that would fork any old nodes from the network anyway, this adds hard enforcement of that rule.
Further, the expected protocol for the initial state messages in general is that only a single request and response will be sent per connection. All honest peers on the network follow this rule, however it is not strictly enforced.
This adds logic to strictly enforce those rules by banning any peers that violate them.