ZeroSync purifies synchronization to the Bitcoin network

Wallets will soon be able to synchronize instantly with the Bitcoin network thanks to the company ZeroSync and its “STARK proof” system.

Bitcoin Node

Before diving into the heart of the matter, let’s remember that a node is software (Bitcoin core) which validates bitcoin transactions. Its role is to reject any block that contains an invalid transaction.

Approximately every ten minutes, a block of (valid) transactions is propagated to all the nodes which relay it step by step.

There are different types of knots. There are essentially “Full nodes”THE “pruned nodes” and those that interest us more particularly: the “light nodes”. They are also called SPV nodes for Special Payment Verification.

Complete knots (full nodes) are nodes which keep in memory all the utxos and data found in each block. They require a lot of disk space (at least 600 GB currently), bandwidth (5 GB per day) and computing power.

The pruned knot (pruned node) assumes that it is not necessary to keep all data to verify transactions. Only a few hundred blocks (a few hundred MB) and all utxos (5 GB) are kept in memory.

By the way, a pruned node must still initially download all the blocks. We are talking about IBD (Initial Block Download) in the jargon. It is only afterwards that he can prune.

Reminder about UTXOs

A utxo is a script. In short, a small piece of code that links a quantity of bitcoin (a number) to a public key.

This public key corresponds to a private key necessary to unlock the bitcoins. That is to say, link them to another public key (or “bitcoin address”, it’s the same thing).

The sum of all utxos corresponds exactly to all the bitcoins in circulation. Each transaction concretely results in the disappearance of one or more utxos replaced by one or more new utxos.

All nodes maintain an identical compilation of all utxos. It is updated as soon as a new block is propagated to the network. Without the complete list of utxos, a node cannot verify anything.

There are currently 129 million utxos. Each node (complete or pruned) must store all of these utxos to know at any time who has the right to spend which bitcoins.

LightNode

This type of SPV “node” is found in wallets. They do not participate in the transaction verification process since they do not store block history or utxos.

Only block headers are downloaded during initial synchronization. This means, for example, downloading the chapter titles of a book rather than the entire text. Their function is simply to check how many bitcoins are linked to the addresses in your wallet.

The problem being that SVP nodes need to communicate with full nodes to probe the blocks. However, these nodes can be malicious and collect your wallet addresses as well as your IP addresses. Hence the interest in connecting your wallet via the Tor browser (VPN).

Using your own full node avoids this potential loss of privacy. No risk of revealing information about your addresses and therefore your bitcoin balance.

In short, lightweight nodes are only 64 megabytes (80 bytes per block header multiplied by ~808,000 blocks). The description of their mechanism can be found in the white paper.

These nodes cleverly use the so-called Merkle tree structure which “concatenates” all the transactions in a block. There is nothing extraordinary about a Merkle tree. It is simply a structure that hashes transactions in pairs. The resulting hashes are hashed pairwise again until only one hash remains called the Merkle root.

And the fact is that these Merkle trees are sufficient to check whether a transaction has been included in a Bitcoin block.

Why are SPV nodes so important?

A full or pruned node requires downloading all the blocks. This can take hours or even days depending on the region (600 GB, etc.).

With SPV proofs, knowing the root of the Merkle tree of each block is enough to verify transactions and know the balance of its bitcoin addresses. However, this root represents less than 0.0001% of the data contained in a block!

Which brings us to the innovation of the ZeroSync company with “ZK proofs” (zero knowledge proof). These improve the SVP proof by compressing the headers into a single proof.

In short, in the same way that we compress transactions into a root of a Merkle tree, ZeroSync compresses headers into another Merkle tree. This process makes it possible to synthesize all the headers into a short and light piece of data: the proof.

This proof makes it possible to quickly ensure that a given block header does indeed exist. And as said above, a header is used to certify that a specific transaction is in a block.

This data frugality greatly accelerates the synchronization of wallets with the Bitcoin network. The first step of ZeroSync is therefore completed. The goal now is to extend this system to full nodes to get rid of the need to verify all 600 GB of blocks during IBD.

Let’s end by reminding that ultimately, downloading and verifying all the blocks could become prohibitive in terms of bandwidth and memory. This is a threat to decentralization that should never be taken for granted.

The innovations of ZeroSync are welcome, especially since they do not require any modification of the protocol.

Receive a summary of the news in the world of cryptocurrencies by subscribing to our new service newsletter daily and weekly so you don’t miss anything of the Tremplin.io essentials!

Similar Posts