Skip to content

server: Initial state protocol banning.#3686

Merged
davecgh merged 2 commits intodecred:masterfrom
davecgh:server_ban_multiple_initstate
May 6, 2026
Merged

server: Initial state protocol banning.#3686
davecgh merged 2 commits intodecred:masterfrom
davecgh:server_ban_multiple_initstate

Conversation

@davecgh
Copy link
Copy Markdown
Member

@davecgh davecgh commented May 2, 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.

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.

@davecgh davecgh added this to the 2.2.0 milestone May 2, 2026
@davecgh davecgh force-pushed the server_ban_multiple_initstate branch from 2b398b4 to b773d84 Compare May 2, 2026 05:03
Comment thread server.go Outdated
Comment thread server.go Outdated
@davecgh davecgh force-pushed the server_ban_multiple_initstate branch from b773d84 to be90a84 Compare May 4, 2026 06:13
@davecgh davecgh changed the title server: Iinitial state protocol banning. server: Initial state protocol banning. May 6, 2026
davecgh added 2 commits May 6, 2026 17:05
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.
@davecgh davecgh force-pushed the server_ban_multiple_initstate branch from be90a84 to d35de9c Compare May 6, 2026 22:06
@davecgh davecgh merged commit d35de9c into decred:master May 6, 2026
32 checks passed
@davecgh davecgh deleted the server_ban_multiple_initstate branch May 6, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants