Connect with us

Crypto News

Coming Soon: An Easier Way To Bootstrap Your Node’s UTXO Set

Published

on

Yesterday marks coming up to the finishing line after almost four years of work. Assumeutxo was merged into the Bitcoin Core master branch by Andrew Chow yesterday. This is the first major non-consensus update to the Bitcoin reference implementation in quite a while, and is going to have a lot of interesting implications for users bootstrapping nodes.

To give a little context about the feature, I think it’ll be useful to give a little history lesson. When a Bitcoin Core node first turns on and starts syncing the blockchain it doesn’t actually validate the entire historical chain. It can, but it doesn’t by default, the reason being to save time and resources when bootstrapping. It validates the entire set of blockchain headers to make sure the proof-of-work is valid, but it doesn’t actually validate the signatures or other witness data for really old blocks. The logic is that for really old blocks, say five years old, it’s overkill to actually verify and run through the signature and other witness checks for those blocks. If someone was able to mine an invalid block five years ago spending coins without a valid signature, then Bitcoin is essentially broken.

Bitcoin Core used to skip validation on these old blocks with a hardcoded checkpoint, i.e. developers would literally just include the blockhash for a known valid block in the past directly into the validation code and Core would not check witness data for anything before that. It was a very hacky solution, and it was not possible for users to change this behavior without actually modifying the source code to the client themselves. In 2017 Greg Maxwell introduced the assumevalid function to deal with these issues. Instead of a hardcoded value in the source code, assumevalid was a setting that could be modified on startup where users could manually pass a blockhash themselves and decide which block to start validating witness data at. Core still hardcodes a default block for this feature, but the key difference is now users can easily override that without modifying sourcecode. Simply run “bitcoind –assumevalid=[theblockhash] and users can decide themselves what to validate or not. You can run it with assumevalid=0 to validate every single block since Genesis.

Assumeutxo brings a very similar functionality to handling the UTXO set. Everything your node does to verify the historical blockchain is done with the sole purpose of building the UTXO set. You can’t really know if a transaction is valid unless you know if the coin has been spent before, and the UTXO set is the cache a node builds up to keep track of all the coins that haven’t been spent. Users have put together many hacky tools in the last few years to simply skip ahead and start from a known good UTXO set from some point in time, most notably BTCPay Server. These are all very ugly hacks though that essentially boil down to copy and pasting the file directory holding the UTXO set. Now that functionality will be supported in Bitcoin Core proper.

The implementation James O’Beirne put together has implemented all the logic for importing and starting to use a UTXO snapshot, as well as tools to create one in the first place. Very much like assumevalid, assumeutxo will simply accept an existing snapshot file as an argument and load that into the user’s node and start running from there. This will add a massive amount of flexibility to node operators, both on the end user side as well as businesses.

Users can create a snapshot of their current UTXO set and store that somewhere; if their node ever crashes or any of the databases corrupt, they can simply grab that UTXO snapshot and restart their node from that blockheight instead of having to restart from the Genesis block. Users who have trusted relationships with each other can simply help one another start up a node from where things are now. No more blockchain syncing necessary at all. If you trust me, I can give you the current UTXO set from my node, and within a margin of a few hours worth of blocks you can have a node up and running in no time. Businesses who have to run multiple nodes for different reasons can spin them up much quicker and easier from UTXO snapshots.

Now, this isn’t quite ready to go live in the next Bitcoin Core release, but as James put it on Twitter the hurdle to cross to get to that point is literally five lines of code. All of the core logic and implementation is merged, all that needs to be done is change some flags so that Core will allow users to make use of assumeutxo when running their node on mainnet.

So, congratulations to James on the merge. Many Bitcoiners are looking forward to having more flexibility and control over their own node. 

​ After four years of work, James O’Beirne’s assumeutxo option to allow instant UTXO set bootstrapping for your Bitcoin node is merged into Bitcoin Core. 

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Crypto News

Zimbabwe Injects $50M in Forex Market to Stabilize Currency – News Bytes Bitcoin News

Published

on

By

The RBZ aims to increase foreign currency supply, reduce pressure on banks, and maintain currency stability through this intervention.

​ The RBZ aims to increase foreign currency supply, reduce pressure on banks, and maintain currency stability through this intervention. 

Continue Reading

Crypto News

Polymarket Bettors Predict 84% Chance of Trump-Harris Debate Before Election

Published

on

By

According to the blockchain-based prediction market Polymarket, there is an 84% likelihood that former President Donald Trump and current Vice President Kamala Harris will debate before the election. Trump has shown hesitation to debate Harris until her official nomination, citing significant confusion within the Democratic party. High Stakes: $142,846 Wager on Trump-Harris Debate Before Election […]

​ According to the blockchain-based prediction market Polymarket, there is an 84% likelihood that former President Donald Trump and current Vice President Kamala Harris will debate before the election. Trump has shown hesitation to debate Harris until her official nomination, citing significant confusion within the Democratic party. High Stakes: $142,846 Wager on Trump-Harris Debate Before Election 

Continue Reading

Crypto News

Salvadoran Basic Goods Basket Rose to Historic Highs in June

Published

on

By

The price of the Salvadoran basic goods basket, a group of foods and vegetables considered essential, rose to all-time high levels in June.

​ The price of the Salvadoran basic goods basket, a group of foods and vegetables considered essential, rose to all-time high levels in June. 

Continue Reading

Shadow Banned

Copyright © 2023 mesh news project // awake, not woke // news, not narrative // deep inside the filter bubble