Repository navigation
fix(ibd): track eviction cooldowns by network identity - #1212
Merged
reardencode merged 2 commits intoOct 25, 2026
Merged
Conversation
| pub addr_buckets: HashMap<usize, rbitcoin_net::peer::AddrTokenBucket>, | ||
| /// Process-local stall/relative-slow kick counts (not persisted). | ||
| pub addr_strikes: HashMap<SocketAddr, u8>, | ||
| pub addr_strikes: HashMap<NetAddr, u8>, |
Contributor
There was a problem hiding this comment.
Nit: addr_strikes is never removed. Cooldown expiry does not drop it, and dial failures now insert one entry per onion or I2P. Those keys outlive addrman eviction for the rest of the process.
Contributor
Author
There was a problem hiding this comment.
Fixed in c09af01. Cooldown expiry now also removes strikes when an identity is absent from addrman and has no active cooldown. Retained addresses keep their strike history across expiry and successful redials. Added a regression covering onion/I2P eviction and retained IPv4/IPv6 escalation, plus the missing changelog fragment.
reardencode
requested changes
Oct 25, 2026
reardencode
left a comment
Owner
There was a problem hiding this comment.
Plz address grok's nits above
reardencode
approved these changes
Oct 25, 2026
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.
Problem
IBD recorded eviction cooldowns and strikes using
PeerSlot.addr. Onion peers use a synthetic0.0.0.0:<port>socket there, so different onions on port 8333 shared strike accounting while their actual identities remained eligible for redial.Replacement and fallback checks also consulted cooldowns only for socket-address targets.
Fix
Use
NetAddrconsistently for cooldown and strike accounting across:Successful connections clear cooldowns without resetting strike history. IPv4/IPv6 behavior is preserved.