-
Notifications
You must be signed in to change notification settings - Fork 38.7k
p2p: periodically clear m_addr_known #20561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This behavior was apparently inadvertently broken in 5400ef6; without this change our daily self-announcements frequently go unsent, because our address is still in the peer's rolling bloom filter (for potentially many days, depending on addr traffic).
|
Concept ACK on resetting on relay. Your second commit seems to be identical to #19763 (unclear what the status is there, but there was some interesting discussion earlier). |
10ed228 to
65273fa
Compare
|
I was aware of this issue, but I was never sure whether it's intended or not... Even if non-clearing somehow gave us extra security, it was probably a side-effect, because it was never documented. At most what an attacker gets here is easier noticing when we roll the filter precisely. ACK 65273fa |
|
Code review ACK 65273fa |
|
utACK 65273fa |
65273fa Clear m_addr_known before our periodic self-advertisement (Suhas Daftuar) Pull request description: We use a rolling bloom filter to track which addresses we've previously sent a peer, but after bitcoin#7125 we no longer clear it every day before our own announcement. This looks to me like an oversight which has the effect of reducing the frequency with which we actually self-announce our own address, so this reintroduces resetting that filter. ACKs for top commit: naumenkogs: ACK 65273fa laanwj: Code review ACK 65273fa sipa: utACK 65273fa Tree-SHA512: 602c155fb6d2249b054fcb6f1c0dd17143605ceb87132286bbd90babf26d258ff6c41f9925482c17e2be41805d33f9b83926cb447f394969ffecd4bccfa0a64f
Summary: ``` This behavior was apparently inadvertently broken in 5400ef6; without this change our daily self-announcements frequently go unsent, because our address is still in the peer's rolling bloom filter (for potentially many days, depending on addr traffic). ``` Backport of [[bitcoin/bitcoin#20561 | core#20561]]. Ref T1696. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Maniphest Tasks: T1696 Differential Revision: https://reviews.bitcoinabc.org/D10859
We use a rolling bloom filter to track which addresses we've previously sent a peer, but after #7125 we no longer clear it every day before our own announcement. This looks to me like an oversight which has the effect of reducing the frequency with which we actually self-announce our own address, so this reintroduces resetting that filter.