SwiftSync -- Speeding up IBD with pre-generated hints (PoC)

Posted by rustaceanrob

Sep 8, 2025/15:09 UTC

The SwiftSync project, as detailed in the provided context, is a Rust-based binary designed to enhance the efficiency of syncing blockchain data. It incorporates modifications to the libbitcoinkernel library to facilitate this process. Specifically, these adjustments enable ProcessNewBlockHeaders for the pre-synchronization of block headers and the management of chain state. Additionally, the implementation requires the HaveCoin function on the ChainStateManager to construct a hintfile, which plays a crucial role in the Initial Block Download (IBD) process.

The IBD binary's operation is meticulously outlined, starting with the reading and parsing of a hintfile to identify a predetermined stop-hash. Following this, the system queries DNS to locate reachable nodes, establishes a connection to a peer for the synchronization of block headers up to the stop hash, and initiates multiple threads tasked with requesting batches of blocks. The process also includes updating an accumulator based on whether the output is included in the Unspent Transaction Output (UTXO) set, as indicated by the hint file. The binary concludes its task by verifying if the accumulator state is null after downloading all blocks, thereby determining the success or failure of the synchronization attempt.

Test results from running the binary on various computers have shown promising sync times, and there is an open invitation for others to test and provide feedback on the tool. Furthermore, there is ongoing development aimed at optimizing synchronization speeds through a forthcoming patch. This update intends to segment block hashes following a "work-stealing" methodology, which is expected to further enhance synchronization efficiency in the near future. For those interested in exploring the project or contributing to its development, more information can be found on GitHub at SwiftSync.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project.

Give Feedback