In traditional blockchains, the user has a choice to make: they can join the network immediately, and only partially-validate blocks; or they can initialize a fully-validating node by downloading and independently validating the entire blockchain. Partially-validating nodes (aka "light nodes") are convenient, but compromise one of the core values that distinguish blockchains from their centralized counterparts in the first place. "Full nodes" are preferable in terms of security and network health, but impose heavy demands on the user's time and resources.
Sia's Utreexo-based consensus enables a new type of node: one that can join the network and immediately begin fully-validating blocks. In fact, these nodes can be initialized from a state checkpoint anywhere in the chain history, and can prune blocks such that their resource requirements remain minuscule indefinitely.
In theory, any blockchain node can be initialized using a state checkpoint; in practice, this is infeasible because their checkpoints are dozens or hundreds of GB in size, if not larger. And even if you could acquire such a checkpoint, how would you validate its contents? An attacker could insert an extra UTXO and double-spend you.
But in Sia, the State is extremely compact: small enough to send in an HTTP response or a p2p message. As for validation, the state is committed to in the block header, greatly increasing the cost of any attack. This commitment also gives us content-addressing for free!
Here's what it looks like to "instant sync" on Sia:
- You acquire the hash of the checkpoint you want to initialize from. You might get this from a friend, or more commonly, from a trusted explorer like SiaScan. For maximum security, you could get it by syncing the full header chain from a Sia peer, which would take a minute or two on a fast connection. Let's say you use the hash
0000000000000000449595f4598b6125823cd381afb0e5059d230a12adc4dde5
. - You connect to a Sia peer and ask it to send you the checkpoint for
...adc4dde5
. The peer responds with two pieces of data: a block, and its parent state. You verify that the block's hash is...adc4dde5
, and that the block header commits to the parent state. All of this takes less than a second. - You initialize your blockchain database with the received block and state. You are now capable of fully validating any blocks that build on top of
...adc4dde5
. In particular, if that block is not the current tip, you can sync the remainder of the blockchain by requesting blocks from peers. If your checkpoint was a day old, that will take around one minute. Once you reach the tip block, you can send and receive transactions, rent storage, become a host, or all of the above!
There is one major caveat here: If you have an existing wallet with transaction history, you can't use instant syncing to jump past that history. That is, if you first received some siacoins in block 300,000, the latest checkpoint you can instant-sync to is block 300,000. After that, you need to download and apply every block in the chain. That's because every block changes the Merkle proofs for your UTXOs; if you skipped straight to block 500,000, you wouldn't be able to spend that UTXO. (In fact, you wouldn't even know that it exists!)