Skip to content

fix: gate req/resp data protocols for unauthenticated peers#22406

Merged
PhilWindle merged 5 commits intomerge-train/spartanfrom
nikita/disallow-req-resp-connections
Apr 9, 2026
Merged

fix: gate req/resp data protocols for unauthenticated peers#22406
PhilWindle merged 5 commits intomerge-train/spartanfrom
nikita/disallow-req-resp-connections

Conversation

@deffrian
Copy link
Copy Markdown
Collaborator

@deffrian deffrian commented Apr 8, 2026

When p2pAllowOnlyValidators is enabled, unauthenticated peers were excluded from gossipsub, but could still freely query block data and transactions through req/resp protocols (BLOCK, BLOCK_TXS, TX) with no authentication check.

This adds an authentication gate in ReqResp.streamHandler() that rejects unauthenticated peers on all protocols except those needed for the handshake flow (PING, STATUS, AUTH, GOODBYE)

Ref: A-698

@PhilWindle PhilWindle merged commit 8150494 into merge-train/spartan Apr 9, 2026
12 checks passed
@PhilWindle PhilWindle deleted the nikita/disallow-req-resp-connections branch April 9, 2026 09:12
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.

2 participants