Skip to content

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

Merged
PhilWindle merged 5 commits into
merge-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 into
merge-train/spartanfrom
nikita/disallow-req-resp-connections

Conversation

@deffrian

@deffrian deffrian commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

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
github-merge-queue Bot pushed a commit that referenced this pull request Apr 10, 2026
BEGIN_COMMIT_OVERRIDE
fix(stdlib): use bigint arithmetic in GasFees.mul() for non-integer
scalars (#22383)
fix(node-lib): reuse existing fileStore in snapshot sync instead of
recreating (#22375)
fix: gate req/resp data protocols for unauthenticated peers (#22406)
fix(p2p): use per-batch ops array in AztecDatastore.batch() (#22357)
chore(pipeline): spartan config (#21285)
chore: add claude skill to send txs (#22439)
feat(pipeline): minimize deadzone w cross slot attesting (#21435)
fix(p2p): avoid 32-bit overflow in attestation pool block position key
(#22412)
fix(prover-client): increment retry count on timeout re-enqueue to
prevent infinite loop (#22355)
fix: remove redundant p2pClient.start() call (#22438)
chore: add kubectl binary to spartan .gitignore (#22454)
END_COMMIT_OVERRIDE
critesjosh pushed a commit that referenced this pull request Apr 14, 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
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