Major Improvement of Initial Block Download (IBD) (2024)

When a Bitcoin node joins the network, it must synchronize with network by downloading the entire block chain (which is roughly 550 gigabytes now). This process, known as Initial Block Download (IBD), can be time-consuming and resource-intensive.

During the download, there could be a high usage for the network and CPU (since the node has to verify the blocks downloaded), and the client will take up an increasing amount of storage space .

This lengthy process can discourage new users from running full nodes

Major Improvement of Initial Block Download (IBD) (2)

Various improvment emerged as a solution to streamline this IBD process, we will go through most of them starting from Bitcoin’s early release 0.3.2, which introduced checkpoints, up to release 0.14.0, featuring AssumeUTXO.

Before diving in, let’s take a quick look at a graph that maps out the major updates to the IBD process in Bitcoin Core, which we’ll be discussing in this article.

Major Improvement of Initial Block Download (IBD) (3)

The most naive approach for IBD is downloading the entire block data (transactions, headers, and all) sequentially.

This means that nodes would start from the very first block created (the genesis block) and download every block in order up to the current one.

This approach has a flaw: a peer could easily generate a chain with low difficulty, mine millions of blocks, send you these fake blocks, and keep you busy with verification for an extended period with a wrong chain.

Major Improvement of Initial Block Download (IBD) (4)

Note: This scenario specifically occurs if the node is eclipsed by the same attacker

To address this, the “Headers-First Sync” approach was introduced, where nodes download block headers before any block data.

In Bitcoin Core 0.10.0, headers-first synchronization was intoduced, the idea is to first synchronizes only the block headers which are 80 bytes each and allow the node to pre-filter orphaned blocks and dead sidechains, before downloading all the blocks data.

Bitcoin Core now uses ‘headers-first synchronization’. This means that we first ask peers for block headers and validate those. In a second stage, when the headers have been discovered, we download the blocks. However, as we already know about the whole chain in advance, the blocks can be downloaded in parallel from all available peers.

From Bitcoin Core version 0.10.0 release

This will help us fix the problem with a dishonest peer feeding us a fake chain and wasting our resources in validation. we can now just compare header chains from mutliple peers to detect dishonest nodes and ensure integrity.

Major Improvement of Initial Block Download (IBD) (5)

Before we delve into the latest solutions for enhancing the IBD process, let me give you a brief history of significant improvements aimed at reducing the IBD challenges in previous Bitcoin releases.

Note: I won’t cover every detail of each release as some of them are self-explanatory. Instead, we’ll focus on recent updates such as assumeValid and assumeUTXO.”

Another Note: I might share an illustration about checkpoints later on. Stay tuned here for more insights and updates.

Major Improvement of Initial Block Download (IBD) (6)

Bob, with a high-RAM modern computer, can optimizes his Bitcoin node’s setup by increasing the -dbcache setting instead of keeping it with default value of 450Mb, this allows Bitcoin core to take more memory.

This is Benenficial because it directly impacts the amount of data the node can keep in RAM, rather than relying on slower disk I/O (Input/Output) operations

Major Improvement of Initial Block Download (IBD) (7)

Explain more pls :

Faster Access: Data stored in RAM is accessed much faster than data stored on a disk. By increasing dbcache, you allow more data (like blocks and transactions) to be stored in RAM.. This means the node can process transactions and blocks quicker because it doesn't have to wait for the data to be read from or written to the disk.

Reduced Disk I/O: Disk I/O operations are significantly slower than memory operations and can become a bottleneck, especially during the initial block download (IBD) when the node is processing a large volume of data. High disk I/O can slow down the synchronization process and also wear out the disk faster. By keeping more data in RAM with a higher dbcache, you reduce the reliance on disk I/O, speeding up the sync process and reducing disk wear.

A significant portion of the initial block download time is spent verifying scripts/signatures. To speed up more IBD, Bitcoin Core 0.14.0 introduced a feature called “Assume Valid”

This lets your Bitcoin software skip checking signatures for some blocks if you tell it that you already trust those blocks to be valid.

Major Improvement of Initial Block Download (IBD) (8)

So If someone who starts a new full node for the first time knows about any valid blocks, they can then provide the highest-height one of those blocks to Bitcoin Core 0.14.0 and the software will skip verifying signatures in the blocks before the assumed valid block.

💡 All blocks after the assumed valid block will still have their signatures checked normally.

Example:

The default assumed valid block in Bitcoin Core 0.14.0 is #453354, 16 Februrary 2017, with hash 00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90

  • -assumevalid= 00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90
Major Improvement of Initial Block Download (IBD) (9)

AssumeValid Performace

It has been reported that synchronization using AssumeValid only took around 2/3 of the time with 0.14.0 (with AssumeValid feature) than with Bitcoin Core 0.13.2.

bitcoin.stackexchange

A test of the speed of the previous release (Bitcoin Core 0.13.2) compared to the speed of this Bitcoin Core 0.14.0 release was performed using Amazon EC2 virtual private servers, type t2.xlarge with four cores and 16 GB memory. All Bitcoin Core settings were left at their defaults.

  • Bitcoin Core 0.13.2 took 1 day, 12 hours, and 40 minutes to complete IBD
  • Bitcoin Core 0.14.0 took 0 days, 6 hours, and 24 minutes to complete IBD
Major Improvement of Initial Block Download (IBD) (10)

[DRAFT]

[Soon]

Utreexo optimizes Bitcoin’s storage by using Merkle trees to validate transactions.

Nodes don’t need to store the UTXO set anymore

Major Improvement of Initial Block Download (IBD) (11)

Let’s see how Bitcoin works today without Utreexo.

Say we have four UTXOs, A, B, C, and D.

Now Alice wants to send some bitcoins to Bob.

She creates a tx that spends UTXO A and creates a new UTXO E.

In the current Bitcoin protocol nodes will Update their UTXO set to {E, B, C, D}

Major Improvement of Initial Block Download (IBD) (12)

Instead of storing the UTXO set {A, B, C, D}

Nodes store a Merkle tree summarizing this set, The Merkle tree might look something like this:

Major Improvement of Initial Block Download (IBD) (13)

* A, B, C, and D are the hashes of the UTXOs,*

A Bitcoin node only needs to store the root of this tree, HASH(ABCD).

When Alice creates her transaction, she also generates a Merkle proof for UTXO A.

Major Improvement of Initial Block Download (IBD) (14)

here’s a graph explaining the full process of updating the Merkle Tree.

For the exact algorithms, this gist is a good resource

Major Improvement of Initial Block Download (IBD) (15)

https://gist.github.com/kcalvinalvin/a790d524832e1b7f96a70c642315fffc#file-utreexo-algorithms-md

Major Improvement of Initial Block Download (IBD) (2024)

FAQs

How long does it take to download Bitcoin blockchain? ›

When Bitcoin Core daemon first starts, it will begin to download the block chain. This step will take at least several days, and it may take much more time on a slow Internet connection or with a slow computer. During the download, Bitcoin Core will use a significant part of your connection bandwidth.

Why run a BTC node? ›

Bitcoin nodes are not just important – they are the very network itself. Nodes verify transactions and blocks while enforcing the rules of the protocol. If a transaction doesn't follow the rules, it will be rejected. Nodes cooperate to achieve network consensus on which transactions are valid.

How do I speed up Bitcoin blockchain download? ›

You can in most cases increase the speed by setting the dbcache to more memory for the qt client to sync a lot faster. The dbcache parameter specifies how much memory the qtclient is able to use for caching. For me it took the sync down from days to hours.

Can you make money with a BTC node? ›

While mining nodes can earn rewards in the form of Bitcoins by creating new blocks, full nodes are responsible for verifying and confirming transactions without receiving any financial reward. This separation of tasks contributes to the security and efficiency of the entire network.

How much does it cost to run a Bitcoin node? ›

Cost and best practices for running Bitcoin nodes in AWS in 2024! Running a full Bitcoin node in AWS will cost about $3.70/day. A pruned Bitcoin node will cost about $0.93/day.

Is running a Bitcoin node the same as mining? ›

A full node maintains a complete and updated copy of the blockchain and validates transactions and blocks. Mining nodes include these capabilities but also participate in the mining process.

How long does Bitcoin blockchain processing take? ›

On average, it takes 10 minutes to mine a block (a mined block is the same as a confirmation). This is why it takes 60 minutes on average to send Bitcoin from one wallet address to another. However, higher-quality providers might be able to process your transaction in ten or twenty minutes.

Why does blockchain take so long to send Bitcoin? ›

It takes some time for the transactions to get confirmed on the blockchain and depending on the fees you selected, it may take from 1 minute to several hours. Network congestion also has a big impact on how long you need to wait. If many people are doing transactions right now, it will increase the waiting time.

How long does it take to sync the Bitcoin blockchain? ›

After deployment, your BTCPay Server needs to sync the entire blockchain and validate all the consensus rules. Depending on your machine specifications, bandwidth and number of altcoins you added, this process may take between 1-5 days.

How long does it take to solve a Bitcoin blockchain? ›

It takes the network about 10 minutes to mine one block, so it takes about 10 minutes to mine 3.125 bitcoins.

Top Articles
What Does A Drone Sound Like | Discovery Of Tech
You Need More Than $2.2 Million To Be Considered Rich In The U.S.—But Some Say ‘Well-Being’ Is The Most Important Measure Of Wealth, Study Finds
Swissport Ess
Here’s how much Tim Ballard made during final months with Operation Underground Railroad
Courses In Touch
Honey Huxxlee Leaks
When His Eyes Opened 3001
‘White Horse’ by Chris Stapleton - Lyrics & Meaning | Holler
Nana Shirts Svg
Verap Applicant Portal
Do You Need Planning Permission to Change a Staircase?
866-392-8015
Login.northlane.com Balance
Trib Live High School Sports Network
German American Bank Owenton Ky
John Deere S100 Vs Cub Cadet Xt1
Thule Racks & Gear - Rack Attack
Wild West 2013-12 - PDF Free Download
Aultman.mysecurebill
Nacitiprepaid
Munis Self Service Cumberland County
Contact | Claio
Fox 17 Football Blitz
Transcript: ‘How to Supercharge Your Writing With AI Tools’
Barbie Showtimes Near Cmx Hollywood 16 & Imax
Crazy Stupid Love 123Movies
Dance Monkey Roblox Id
Shiawassee County 911 Active Events
Kelly Motorcycle Blue Book
Gina Wilson All Things Algebra Unit 3 Homework 2
Enduring Word John 15
UCSC Silicon Valley Extension
Pnc Park Morgan Wallen Map
Craigslist Free En Dallas Tx
Shane Gillis Girlfriend: All About His Dating History, Career & More |Pudelek
Best Cheap Rwd Cars
Guide To Install Yuzu Mods Using The Yuzu Mod Downloader
Welcome to SportsLine! - SportsLine.com
Jacob I. Taylor, M.D., MPH - Urology Clinics of North Texas
Learning The ABCs Of AI Can Bolster Your Career
Star Wars Episode 4 Rotten Tomatoes
Box Csun
Friv4School Unblocked
Gogoanime Bleach Tybw
Indiana Wesleyan University Sharepoint
U-Haul Moving & Storage At Valley Blvd
Cringe Valorant Matching Names
The Voice Season 22 Wiki
676 Fl Oz To Gallons
Fhnb Pay Calendar
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 6626

Rating: 4.6 / 5 (46 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.