mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-07-07 04:30:47 +02:00
bf0d257c11net: un-default the OpenNetworkConnection()'s proxy_override argument (Eugene Siegel)5a3756d150test: add a regression test for private broadcast v1 retries (Vasil Dimov)ab35a028edtest: make reusable filling of a node's addrman (Vasil Dimov)2333be9cbctest: make reusable starting a standalone P2P listener (Vasil Dimov)2ffa81fac4test: make reusable SOCKS5 server starting (Vasil Dimov)32d072a49fdoc: add release notes for #35319 (Vasil Dimov)d01b461f71net: ensure no direct private broadcast connections (Vasil Dimov)fd230f942dnet: use the proxy if overriden when doing v2->v1 reconnections (Vasil Dimov) Pull request description: This PR includes https://github.com/bitcoin/bitcoin/pull/35319 and on top of that adds a regression functional test. The functional test exercises the relevant code paths without modifying non-test code. To do that it does: * Add a bunch of IPv4 addresses to the node's addrman (they will be added without P2P_V2 flag). * Get them to report P2P_V2 in their service flags and connect to each one, so that the flags in addrman are updated to contain P2P_V2. * Get one successful connection to a Tor peer (.onion) so that bitcoind assumes the configured Tor proxy works and is indeed a proxy to the Tor network. This will make it open private broadcast connections also to IPv4 addresses via that proxy. * Start some private broadcast connections. * Remember the destination IPv4 address of the first connection and get it to fail the v2 transport. * Wait for a subsequent connection also through the Tor proxy to the same IPv4 and expect it to be v1, i.e. the v2->v1 downgrade retry. The test fails without the fix - the v1 retry never arrives to the Tor proxy. And passes with the fix. The fix is in the first commit here and in https://github.com/bitcoin/bitcoin/pull/35319, can remove it by `git showfd230f942d| git apply -R`. ACKs for top commit: Crypt-iQ: reACKbf0d257c11andrewtoth: ACKbf0d257c11instagibbs: ACKbf0d257c11sedited: utACKbf0d257c11Tree-SHA512: 11e89be36577199e0312e5e63efeac04e295faaba1cf1c13a30e683d35f473c8dbb419d1897b0333c2e993c10637adecafcf90fe08c812065c793cbc903744c9