node,ingress_limit: operational hardening — rate limits and opening TTL (closes #22)#33
Merged
Merged
Conversation
…ue 22) - New ingress_limit: sliding-window global and per-peer caps, LRU-capped peer table. - Node.handleReceive rate limit before alloc/copy/decode; ingressRateKey for UDP endpoints. - Config.ingress and outbound_opening_ttl_ms; prune stale opening handshakes on receive. - allocOpeningPingHandshake takes now_ms for created_ms (API change). - Tests for limiter, per-peer cap, and outbound expiry. Closes #22.
- PumpOpts.egress_limiter and pumpOnceEx; pumpOnce delegates with empty opts. - PumpResult enum for stable return type across pumpOnce/pumpOnceEx. - ingress_limit module doc: same limiter for outbound counting. - Node module doc: cross-reference pumpOnceEx egress. - Test: per-peer egress cap blocks second reply to same UDP source.
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.
Implements #22 (timeouts / rate limits / basic abuse controls).
Inbound (ingress_limit.zig)
Node
Tests
Not covered (follow-ups)