bitcoin/src/kernel
Andrew Chow 10c4a4613f
Merge bitcoin/bitcoin#27469: wallet: improve IBD sync time by skipping block scanning prior birth time
82bb7831fa wallet: skip block scan if block was created before wallet birthday (furszy)
a082434d12 refactor: single method to append new spkm to the wallet (furszy)

Pull request description:

  During initial block download, the node's wallet(s) scans every arriving block looking for data that it owns.
  This process can be resource-intensive, as it involves sequentially scanning all transactions within each
  arriving block.

  To avoid wasting processing power, we can skip blocks that occurred before the wallet's creation time,
  since these blocks are guaranteed not to contain any relevant wallet data.

  This has direct implications (an speed improvement) on the underlying blockchain synchronization process
  as well. The reason is that the validation interface queue is limited to 10 tasks per time. This means that no
  more than 10 blocks can be waiting for the wallet(s) to be processed while we are synchronizing the chain
  (activating the best chain to be more precise).
  Which can be a bottleneck if blocks arrive and are processed faster from the network than what they are
  processed by the wallet(s).

  So, by skipping not relevant blocks in the wallet's IBD scanning process, we will also improve the chain
  synchronization time.

ACKs for top commit:
  ishaanam:
    re-ACK 82bb7831fa
  achow101:
    re-ACK 82bb7831fa
  pinheadmz:
    ACK 82bb7831fa

Tree-SHA512: 70158c9657f1fcc396badad2c4410b7b7f439466142640b31a9b1a8cea4555e45ea254e48043c9b27f783d5e4d24d91855f0d79d42f0484b8aa83cdbf3d6c50b
2023-05-26 21:35:28 -04:00
..
bitcoinkernel.cpp b-cs: Define G_TRANSLATION_FUN in bitcoinkernel.cpp 2022-04-26 16:30:53 -04:00
blockmanager_opts.h refactor, blockstorage: Replace stopafterblockimport arg 2023-05-10 19:07:46 +02:00
chain.cpp wallet: skip block scan if block was created before wallet birthday 2023-05-25 10:45:38 -03:00
chain.h interfaces, refactor: Add more block information to block connected notifications 2022-07-18 13:39:55 -05:00
chainparams.cpp scripted-diff: Remove unused chainparamsbase includes 2023-05-09 15:49:19 +02:00
chainparams.h refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
chainstatemanager_opts.h refactor, validation: Add ChainstateManagerOpts db options 2023-02-10 04:39:11 -04:00
checks.cpp refactor: Replace std::optional<bilingual_str> with util::Result 2023-05-24 08:55:47 -04:00
checks.h refactor: Replace std::optional<bilingual_str> with util::Result 2023-05-24 08:55:47 -04:00
coinstats.cpp Avoid dereferencing interruption_point if it is nullptr 2023-05-02 20:19:28 +02:00
coinstats.h Use DataStream where possible 2023-01-26 10:44:05 +01:00
context.cpp Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
context.h Adapt to libsecp256k1 API changes 2022-12-13 15:08:24 -05:00
cs_main.cpp kernel: add missing include 2023-02-22 15:46:21 +00:00
cs_main.h refactor: add kernel/cs_main.* 2023-01-05 09:05:14 +00:00
mempool_entry.h refactor: Move txmempool_entry.h --> kernel/mempool_entry.h 2022-11-30 10:37:57 +00:00
mempool_limits.h refactor: mempool: add MemPoolLimits::NoLimits() 2022-10-05 13:07:11 +01:00
mempool_options.h doc: Fix comment syntax error 2023-01-30 10:26:02 +00:00
mempool_persist.cpp refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
mempool_persist.h refactor: Move fs.* to util/fs.* 2023-03-23 12:55:18 +01:00
validation_cache_sizes.h validationcaches: Use size_t for sizes 2022-08-03 12:03:28 -04:00