Page MenuHomePhabricator

Merge #15486: [addrman, net] Ensure tried collisions resolve, and allow feeler connections to existing outbound netgroups
ClosedPublic

Authored by nakihito on Jun 9 2020, 19:21.

Details

Reviewers
jasonbcox
deadalnix
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rABC6411602e25af: Merge #15486: [addrman, net] Ensure tried collisions resolve, and allow feeler…
Summary

20e6ea259b222b10f066f22695a5f56c52071f63 [addrman] Improve collision logging and address nits (Suhas Daftuar)
f71fdda3bc2e7acd2a8b74e882364866b8b0f55b [addrman] Ensure collisions eventually get resolved (Suhas Daftuar)
4991e3c813c9848d3b3957ea3ad433f02fca9e81 [net] feeler connections can be made to outbound peers in same netgroup (Suhas Daftuar)
4d834018e368c3481a5421891395f64aa9002185 [addrman] Improve tried table collision logging (Suhas Daftuar)

Pull request description:

The restriction on outbound peers sharing the same network group is not intended to apply to feeler connections, so fix this.

This fixes an issue where a tried table collision with an entry to a netgroup we already have an outbound connection to could cause feelers to stop working, because the tried collision buffer (`m_tried_collisions`) would never be drained.

Also, ensure that all entries don't linger in `m_tried_collisions` by evicting an old entry if its collisions is unresolved after 40 minutes.

Tree-SHA512: 553fe2b01b82cd7f0f62f90c6781e373455a45b254e3bec085b5e6b16690aa9f3938e8c50e7136f19dafa250ed4578a26227d944b76daf9ce4ef0c75802389b6

Backport of Core PR15486

This PR was in response to https://github.com/bitcoin/bitcoin/issues/15484, but I did not find the issue mentioned here in my debug log while running master.

Test Plan
ninja
ninja check-all

Event Timeline

Owners added a reviewer: Restricted Owners Package.Jun 9 2020, 19:21
nakihito requested review of this revision.Jun 9 2020, 19:21

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

jasonbcox requested changes to this revision.Jun 9 2020, 19:38
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/addrman.h
185 ↗(On Diff #21182)

//! seconds (40 minutes)

This revision now requires changes to proceed.Jun 9 2020, 19:38
This revision is now accepted and ready to land.Jun 18 2020, 21:07