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?
2 Answers
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.
-
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 compares– relGCommented Nov 3, 2016 at 17:14
-
No, it just downloads them and verifies the transactions in them. Commented Nov 3, 2016 at 17:17
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.