diff options
author | Ava Chow <github@achow101.com> | 2024-09-11 13:37:40 -0400 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-09-11 13:37:40 -0400 |
commit | 349632e022da22a457a85650360b5be41fa500dc (patch) | |
tree | bd72a7ad365a8911789923191921235d381af599 /src/eccryptoverify.cpp | |
parent | f6298a878f4f764838895a0028b4d5304e7c605e (diff) | |
parent | 992f83bb6f4b29b44f4eaace1d1a2c0001d43cac (diff) | |
download | bitcoin-master.tar.xz |
Merge bitcoin/bitcoin#30807: Fix peers abruptly disconnecting from AssumeUTXO nodes during IBDHEADmaster
992f83bb6f4b29b44f4eaace1d1a2c0001d43cac test: add coverage for assumeUTXO honest peers disconnection (furszy)
6d5812e5c852c233bd7ead2ceef051f8567619ed assumeUTXO: fix peers disconnection during sync (furszy)
Pull request description:
Because AssumeUTXO nodes prioritize tip synchronization, they relay their local
address through the network before completing the background chain sync.
This, combined with the advertising of full-node service (`NODE_NETWORK`), can
result in an honest peer in IBD connecting to the AssumeUTXO node (while syncing)
and requesting an historical block the node does not have. This behavior leads to
an abrupt disconnection due to perceived unresponsiveness from the AssumeUTXO
node.
This lack of response occurs because nodes ignore `getdata` requests when they do
not have the block data available (further discussion can be found in #30385).
Fix this by refraining from signaling full-node service support while the
background chain is being synced. During this period, the node will only
signal `NODE_NETWORK_LIMITED` support. Then, full-node (`NODE_NETWORK`)
support will be re-enabled once the background chain sync is completed.
Thanks mzumsande for a post-#30385 convo too.
Testing notes:
Just cherry-pick the second commit (bb08c22) on master.
It will fail there, due to the IBD node requesting historical blocks to the snapshot
node - which is bad because the snapshot node will ignore the requests and
stall + disconnect after some time.
ACKs for top commit:
achow101:
ACK 992f83bb6f4b29b44f4eaace1d1a2c0001d43cac
naumenkogs:
ACK 992f83bb6f4b29b44f4eaace1d1a2c0001d43cac
mzumsande:
ACK 992f83bb6f4b29b44f4eaace1d1a2c0001d43cac
Tree-SHA512: fef525d1cf3200c2dd89a346be9c82d77f2e28ddaaea1f490a435e180d1a47a371cadea508349777d740ab56e94be536ad8f7d61cc81f6550c58b609b3779ed3
Diffstat (limited to 'src/eccryptoverify.cpp')
0 files changed, 0 insertions, 0 deletions