Is the UTXO set computed from scratch by new full nodes?

5

When a new full node joins the network, does he, by default, compute the UTXO set from scratch from the blockchain so far; or does he simply trust the UTXO set he received is valid?

relG

Posted 2016-11-02T15:39:30.733

Reputation: 250

Answers

4

The UTXO set cannot be validated, except by going through all blocks in history.

The P2P protocol does not even have a way to stream the UTXO set from one node to another, so yes, full nodes will always download and verify full blocks, and rebuild the UTXO set from it.

There are various ideas (some of which are very old) to make blocks commit (= contain a hash) to the UTXO set, or a related data structure. That way one could synchronize the UTXO set for a state in the past (which means a trust in miners), and fully verify going forward from there.

Pieter Wuille

Posted 2016-11-02T15:39:30.733

Reputation: 54 032

I'm not sure what exactly "synchronize blocks" means here. One interpretation I can think of is that a new full node downloads the blockchain from several places and comparesrelG 2016-11-03T17:14:29.577

No, it just downloads them and verifies the transactions in them.Pieter Wuille 2016-11-03T17:17:06.207

1

Yes, the UTXO set is generated by each node for themselves.

The UTXO set is not shared between nodes, it results from updating the node's database with the transactions included in the blocks of the blockchain.

Murch

Posted 2016-11-02T15:39:30.733

Reputation: 41 609