[codex] fix gossip rate limit bounds#1485
Open
jjyr wants to merge 1 commit into
Open
Conversation
babd37f to
771db35
Compare
771db35 to
27fc94c
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
PolicyRejectedMessageso sustained abuse reaches the gossip ban pathRoot Cause
The inbound limiter was keyed by
(peer, channel_outpoint, is_node1), but remote peers controlchannel_outpoint. When the tracked-key cap was reached, the limiter evicted an older key and admitted the new one, so unique bogus outpoints could keep feeding pending gossip work.The delayed outbound queue was capped by item count only. Large delayed
GetBroadcastMessagesResultandQueryBroadcastMessagesResultpayloads could still accumulate with unclear memory bounds.Validation
cargo nextest run -p fnn --features rocksdb -E 'test(test_channel_update_limiter_rejects_new_keys_when_full) | test(test_delayed_outbound_queue_rejects_peer_byte_budget_overflow) | test(test_delayed_outbound_queue_rejects_global_byte_budget_overflow) | test(test_rate_limited_channel_update_from_no_channel_peer_triggers_disconnect_and_temp_ban)'cargo nextest run -p fnn --features rocksdb -E 'test(test_channel_update_limiter_prunes_idle_keys_before_accepting_new_key) | test(gossip_policy)'cargo fmt --all -- --checkCARGO_BUILD_JOBS=1 cargo clippy -p fnn --features rocksdb --lib -- -D warnings