-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Description
This issue will be edited frequently to reflect the current status of the project.
What should I review now?
👇 👇 👇 👇
-- #27837 --
☝️ ☝️ ☝️ ☝️
The goal of this project is to enable complete blockchain rescan capability on prune nodes, allowing these storage-limited nodes to import new wallet descriptors and update existing ones at any time, as well as loading external and un-synced wallets with a birth-time older than 48 hours. This, in turn, enables the monitoring of new addresses/scripts and tracking balance changes without the need to repeatedly download the entire blockchain.
The first project milestone introduces the feature for prune nodes that construct and maintain a local block filters set database. The node will request and keep track of the missing historical blocks that match the wallet scripts filters set to subsequently perform the rescan.
The following sections are ordered by their PRs dependencies:
Net: Single Block Requests Tracking System and On Download Failure Retry Mechanism
- p2p: adaptive connections services flags #28170
- p2p: make block download logic aware of limited peers threshold #28120
- test: improve robustness of connect_nodes() #30118
- net: introduce block tracker to retry to download blocks after failure #27837
Indexes Stability and Performance Improvements
- index: make startup more efficient #27607
- index: prevent race by calling 'CustomInit' prior setting 'synced' flag #27720
- index: block filters sync, reduce disk read operations by caching last header #28955
- index: initial sync speedup, parallelize process #26966
Wallet Rescan (depends on the net section)
- wallet: improve IBD sync time by skipping block scanning prior birth time #27469
- Cache wallet filters' set and connect it to the current wallet rescan functionality. (Pending)
- Wallet: implement "rescan status" class to track the progress and retrieve it via an RPC command. (Pending)
- Wallet: introduce prune node rescan functionality. (Pending - depends on net changes)
Issues Solved By This Work
- Allow for rescan using block filters with pruned node #21267
- Make rescans faster #23727
- Use of a wallet shouldn't be blocked in prune mode ("wallet loading failed... beyond pruned data") #27188
- Allow getblockfrompeer to use any peer #27652
- Optimization: utilize 100% resources of a computer in long operations like rescan/initial block download #27939
- BIP157 / neutrino mode sparrowwallet/sparrow#1111 (comment)