Cointime

Download App
iOS & Android

Boost Your Bitcoin Node Sync With UTXO Snapshots

From lopp net blog by Jameson Lopp

The recent Bitcoin Core v28 release added support for a new feature that has been under development for 5 years. First proposed in 2019 by James O’Beirne, AssumeUTXO enables full nodes to defer verification of old blockchain history by loading a recent snapshot of the UTXO set at a specific block height and syncing to chain tip from that point. This allows wallets and other software using the full node to start receiving and sending transactions within minutes of the node being started instead of having to wait hours or days for it to sync and validate the chain from the genesis block.

When you use AssumeUTXO, the node starts syncing from the snapshot to the chain tip, then the node downloads and verifies the old blockchain history in the background until it eventually verifies its initial UTXO state at the loaded snapshot, allowing it to ultimately obtain the same trustless security as a node that doesn’t use AssumeUTXO.

How to Use UTXO Snapshots

  1. Download a UTXO Snapshot file. You can find one for block height 840,000 on my site or from this torrent: magnet:?xt=urn:btih:596c26cc709e213fdfec997183ff67067241440c&dn=utxo-840000.dat&tr=udp%3A%2F%2Ftracker.bitcoin.sprovoost.nl%3A6969
  2. Download Bitcoin Core v28 or later.
  3. Run Bitcoin Core: bitcoind -daemon
  4. Wait for the block headers to finish syncing (should only take 1 or 2 minutes)
  5. Load the snapshot via: bitcoin-cli loadtxoutset /path/to/utxo-snapshot-height-840000.dat
  6. Wait for the command to finish (this will take tens of minutes depending upon the speed of your machine)
  7. Once the command finishes, your node's sync progress will jump forward to the block height of the snapshot and continue syncing normally from there.
  8. After it reaches chain tip, the node will start performing a sync from genesis in the background, but the node will be usable during that time.

Frequently Asked Questions

  1. Does it matter where I get the snapshot dat file from? No; Bitcoin Core will only load a snapshot with an aggregate UTXO set hash that matches one that's hard coded into Core.
  2. Can I create my own snapshots and load them? You can generate snapshots with the dumptxoutset RPC command or with this utility script. However, you won't be able to load a snapshot unless it's at one of the block heights hard coded into Core. At time of writing, the only supported height is 840,000.
  3. Can I use this to sync a pruned node? Yes.
  4. Can I use this to sync a node with indexes enabled? Yes, though it won't make building the indexes any faster - they still have to be generated linearly from genesis.

How Much Faster Does the Node Sync?

I ran two syncs of Bitcoin Core v28 on my benchmark machine with full default settings. One sync ran entirely from genesis while the other loaded the snapshot as soon as it started syncing.

It took 10 minutes for the node to load the snapshot, then it took 84 minutes to finish syncing to chain tip. On the other hand, it took 659 minutes to perform a full sync from genesis.

So we can see that the speedup is quite significant!

Is It Worth the Trouble?

You'll want to weigh some trade-offs when decided if you want to sync your node from a snapshot.

  1. How much of a rush are you in to be able to use your node?
  2. How fast is your node hardware? If it's really fast and can sync from genesis in less than a day, perhaps it's not worth the extra steps to load a snapshot. Something like a Raspberry Pi would likely find much greater benefit from loading a snapshot.

While I only expect that more technically savvy node operators who are comfortable operating on the command line will take advantage of this feature right now, it can certainly be worth the extra steps in order to get an order of magnitude speedup!

Perhaps in the future, Bitcoin Core could offer a bundled download that includes a recent snapshot that gets automatically loaded on startup so that less sophisticated users can also take advantage of this functionality.

Comments

All Comments

Recommended for you

  • Spot gold continues to fall

    spot gold continues to decline, with the decline expanding to 2%, at $3315.49 per ounce.

  • BTC breaks through $93,500

    the market shows BTC has broken through $93,500, now trading at $93,506.58, with a 24-hour increase of 6.12%. The market is fluctuating greatly, please manage your risks.

  • U.S. strategic Bitcoin reserves may announce details in the coming weeks

    Trump signed an executive order in early March this year proposing to establish a national strategic reserve of Bitcoin and other tokens, and requested the Treasury Secretary to submit an evaluation report on the legality and feasibility of the plan within 60 days. With less than two weeks remaining until the 60-day deadline set by Trump's executive order, this means that more details about the US Bitcoin reserve will soon be disclosed. Market expectations for this may be one of the important catalysts for the recent rebound in cryptocurrency. In addition, any comments questioning the independence of the Federal Reserve have also had a positive spillover effect on Bitcoin.

  • Bitcoin's market share once rose to 64.67%, but now fell back to 64.30%

    On April 23rd, data, the Bitcoin dominance (BTC.D) briefly rose to 64.67% this morning, reaching a new high since February 2021, and is currently back at 64.30%. The high Bitcoin dominance indicates the quietness of the altcoin market, but it may also suggest that a bottom reversal is imminent. Based on historical data, when Bitcoin dominance surged above 60% in November last year, altcoins started a small bull market. In 2019 and 2021, Bitcoin dominance reached highs above 70%, followed by a broad and spectacular uptrend.

  • Spot gold breaks $3,500/ounce for the first time, setting a new record high

    spot gold soared, breaking through the $3500 per ounce integer mark for the first time, rising 2.14% intraday, and rising more than $870 year-to-date. 

  • BTC falls below $88,000

    market shows BTC has fallen below $88,000, now trading at $87,996.01, with a 24-hour increase of 0.68%. The market is fluctuating greatly, please be prepared for risk control.

  • Spot gold hits a new all-time high again, breaking through $3,450/ounce

    spot gold continued yesterday's upward trend, breaking through the $3450/ounce mark for the first time, rising 0.76% during the day, and accumulating over $820 in gains for the year. 

  • BTC breaks through $88,000

    market shows that BTC has broken through $88,000, now trading at $88,011.16, with a 24-hour increase of 1.23%. The market is volatile, please manage the risk.

  • BTC breaks through $88,000

    the market shows BTC breaking through $88,000, now reported at $88,059, a 24-hour increase of 4.25%, with significant market fluctuations, please manage risks.

  • BitradeX Partners with NVIDIA for Deep Collaboration, Leveraging GPU Power to Lead the AI Trading Revolution

    BitradeX has announced its partnership with NVIDIA through the NVIDIA Developer Program, entering into a deep collaboration to optimize its core AI trading model, ARK Trading Model, with NVIDIA’s A100 and H100 GPU clusters. This collaboration has significantly enhanced ARK's decision-making speed and precision, reducing decision latency from 2.1 milliseconds to just 0.07 milliseconds. This deep partnership marks a technological breakthrough for BitradeX, propelling the industry into the "AI Quantification 2.0 Era" and offering users a more efficient trading experience in the global financial market.