Repository navigation
Forward-port #923 (getrawaddrman keeps a colliding address in its bucket) to master - #925
Merged
Merged
Conversation
…n, test flake) (#923) * addrman: keep a colliding entry in its derived bucket positions() derives each entry's getrawaddrman slot with Core's formulas and moved a collision to the next free slot of the flat table. From a bucket's last position that is the next bucket's first, so a /16's tried entries could be reported in nine buckets where Core's formula allows eight. one_group_still_spans_several_tried_buckets caught it about once in a hundred runs (random slot key). A taken slot now moves to the next free position in its own bucket, wrapping within it, as Core keeps every entry in its formula's bucket. Only a full bucket spills into the next one with room. One u64 mask per bucket replaces the union-find. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs: note the getrawaddrman bucket fix for 0.6.1 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit e63aa21)
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.
Brings #923 (
e63aa210), merged intorelease/0.6for 0.6.1, back tomaster, cherry-picked with-x.getrawaddrmanmoved an address whose derived slot was taken to the next free slot of the whole table. From a bucket's last position, that put it in a bucket Core's formulas never give it. One /16 could then show 9 tried buckets where Core allows 8, which madenet::addrman::tests::one_group_still_spans_several_tried_bucketsfail intermittently. A colliding address now stays in its own bucket. Only a full bucket sends it on.node/src/net/addrman.rsis identical onmasterandrelease/0.6, so the change applies unchanged: the patch'sgit patch-idequals that of #923's code change.Release notes
The
CHANGELOG.mdbullet and thedocs/release-notes/0.6.1-pre.mdsection stay onrelease/0.6. They come tomasterwith the 0.6.1 cut, as with #910 and #921.Verified
Ran locally on this branch:
cargo clippy --all-targets --all-features --locked -- -D warnings;cargo test --test e2e --no-run --locked --features e2e;nodelib suite (2133 passed, including the 23net::addrmantests);addrman_rpcs_report_a_hand_added_address_everywhere.On
release/0.6, #923 passed CI and a Devin review before merging.🤖 Generated with Claude Code