elements/src/rpc
Ava Chow 349632e022
Merge bitcoin/bitcoin#30807: Fix peers abruptly disconnecting from AssumeUTXO nodes during IBD
992f83bb6f test: add coverage for assumeUTXO honest peers disconnection (furszy)
6d5812e5c8 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 992f83bb6f
  naumenkogs:
    ACK 992f83bb6f
  mzumsande:
    ACK 992f83bb6f

Tree-SHA512: fef525d1cf3200c2dd89a346be9c82d77f2e28ddaaea1f490a435e180d1a47a371cadea508349777d740ab56e94be536ad8f7d61cc81f6550c58b609b3779ed3
2024-09-11 13:37:40 -04:00
..
blockchain.cpp Merge bitcoin/bitcoin#30807: Fix peers abruptly disconnecting from AssumeUTXO nodes during IBD 2024-09-11 13:37:40 -04:00
blockchain.h rpc, refactor: Prevent potential race conditions in dumptxoutset 2024-09-01 21:07:23 +02:00
client.cpp RPC: Add type parameter to dumptxoutset 2024-09-01 20:56:38 +02:00
client.h refactor: rpc: hide and rename ParseNonRFCJSONValue() 2023-03-23 18:18:46 +00:00
external_signer.cpp rpc: avoid copying into UniValue 2024-05-20 16:48:19 +00:00
fees.cpp [rpc, fees]: add more detail on the fee estimation modes 2024-08-02 15:40:43 +01:00
mempool.cpp rpc: clarify ALREADY_IN_CHAIN rpc errors 2024-08-05 15:45:58 +01:00
mempool.h rpc: Move mempool RPCs to new file 2022-03-11 17:46:58 +01:00
mining.cpp Merge bitcoin/bitcoin#30742: kernel: Use spans instead of vectors for passing block headers to validation functions 2024-09-03 15:40:40 -04:00
mining.h rpc: create rpc/mining.h, hoist default max tries values to constant 2020-06-01 15:08:36 +02:00
net.cpp refactor: remove warnings globals 2024-06-13 11:20:49 +01:00
node.cpp log: expand BCLog::LogFlags (categories) to 64 bits 2024-08-13 13:27:10 -06:00
output_script.cpp Merge bitcoin/bitcoin#22838: descriptors: Be able to specify change and receiving in a single descriptor string 2024-08-28 15:56:15 +01:00
protocol.h rpc: clarify ALREADY_IN_CHAIN rpc errors 2024-08-05 15:45:58 +01:00
rawtransaction.cpp Merge bitcoin/bitcoin#30524: doc: rpc: Use "output script" consistently (2/2) 2024-08-12 11:19:13 +01:00
rawtransaction_util.cpp Merge bitcoin/bitcoin#28307: rpc, wallet: fix incorrect segwit redeem script size limit 2024-06-04 21:39:49 -04:00
rawtransaction_util.h rpc: bugfix, incorrect segwit redeem script size used in signrawtransactionwithkey 2024-05-03 14:20:45 -03:00
register.h scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
request.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
request.h Merge bitcoin/bitcoin#28167: init: Add option for rpccookie permissions (replace 26088) 2024-06-27 17:35:08 -04:00
server.cpp scripted-diff: LogPrint -> LogDebug 2024-08-29 13:49:57 +02:00
server.h tidy: modernize-use-equals-default 2024-07-08 11:12:01 +02:00
server_util.cpp Introduce Mining interface 2024-06-18 18:47:51 +02:00
server_util.h Introduce Mining interface 2024-06-18 18:47:51 +02:00
signmessage.cpp util: move util/message to common/signmessage 2024-05-16 11:16:08 -04:00
txoutproof.cpp refactor: Use Txid in CMerkleBlock 2023-11-28 17:49:41 +01:00
util.cpp refactor: rpc: use uint256::FromHex for ParseHashV 2024-09-04 16:39:55 +01:00
util.h move-only: move warnings from common to node 2024-06-13 11:20:47 +01:00