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
[p2p] Reduce addr blackholes #21528
[p2p] Reduce addr blackholes #21528
Commits on Jul 30, 2021
-
[net_processing] Introduce SetupAddressRelay
Idempotent function that initializes m_addr_known for connections that support address relay (anything other than block-relay-only). Unused until the next commit.
Configuration menu - View commit details
-
Copy full SHA for 2fcaec7 - Browse repository at this point
Copy the full SHA 2fcaec7View commit details -
[test] Update p2p_addr_relay test to prepare
Use an init param to make clear whether a getaddr message should be sent when the P2PConnection receives a version message. These changes are in preparation for upcoming commits that modify the behavior of a bitcoind node and the test framework.
Configuration menu - View commit details
-
Copy full SHA for 6653fa3 - Browse repository at this point
Copy the full SHA 6653fa3View commit details -
[net_processing] Defer initializing m_addr_known
Use SetupAddressRelay to only initialize `m_addr_known` as needed. For outbound peers, we initialize the filter before sending our self announcement (not applicable for block-relay-only connections). For inbound peers, we initialize the filter when we get an addr related message (ADDR, ADDRV2, GETADDR). These changes intend to mitigate address blackholes. Since an inbound peer has to send us an addr related message to become eligible as a candidate for addr relay, this should reduce our likelihood of sending them self-announcements.
Configuration menu - View commit details
-
Copy full SHA for 1d1ef2d - Browse repository at this point
Copy the full SHA 1d1ef2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 201e496 - Browse repository at this point
Copy the full SHA 201e496View commit details -
[net_processing] Remove RelayAddrsWithPeer function
Now that we have a simple boolean stored on the field, the wrapper function is no longer necessary.
Configuration menu - View commit details
-
Copy full SHA for c061599 - Browse repository at this point
Copy the full SHA c061599View commit details -
[test] Test that we intentionally select addr relay peers.
This test checks that we only relay addresses with inbound peers who have sent us an addr related message. Uses a combination of GETADDR and ADDR to verify when peers are eligible.
Configuration menu - View commit details
-
Copy full SHA for 0980ca7 - Browse repository at this point
Copy the full SHA 0980ca7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3893da0 - Browse repository at this point
Copy the full SHA 3893da0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f7250b - Browse repository at this point
Copy the full SHA 3f7250bView commit details