Repository navigation
A full pending queue no longer blocks peers the auto-accept rules would take - #45
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ld take handleRequest and processRelayedRequest dropped any new peer when the pending queue was full, before the mutual / shared-network / trusted-agent / trust-auto-approve rules ran. The check was there to keep over-cap spam away from the control hook; the hook is gone (#44) and the check is not: a node with trust-auto-approve on, or with a mutual request outstanding, refused peers it would have trusted without queueing them. The caps are still enforced where a request is actually queued, so over-cap spam with nothing to auto-accept is neither queued nor trusted, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TeoSlayer
force-pushed
the
fix/pending-full-skips-auto-accept
branch
from
October 7, 2026 13:06
73c5a2e to
7522138
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.
Summary
When the pending-handshake queue was full (256 entries, or 16 from one source),
handleRequestandprocessRelayedRequestdropped every new peer before the auto-accept rules ran. A node withtrust-auto-approveon, a mutual request outstanding, a shared network or an allow-listed peer refused handshakes it would have accepted without queueing anything.The early check existed to keep over-cap spam from reaching the control hook. The hook was removed in #44; the check stayed.
Changes
Test Plan
go build ./...,go vet ./...,go test ./... -count=1TestFullPendingQueueDoesNotBlockAutoAccept: auto-approve (direct and relayed) and a mutual relayed request are trusted with the queue full; with no auto-accept rule the peer is still not queued. The first three subtests fail onmain.TestPreChecksHandleAlreadyTrustedAndOverCap,TestHandleRequestPendingQueueFullRejects, the per-source flood test) pass unchanged.🤖 Generated with Claude Code