AVAX (Avalanche): From Snowflake to Avalanche, an Innovator of Consensus

2022-08-01 21:38:08

In the blockchain industry, consensus is an unavoidable topic. Let’s pause and think: how do computers agree with each other? How can we prevent individual nodes from doing evil? How can a blockchain make sure that the information being communicated is correct? All these concerns are addressed by the consensus mechanism of blockchains. Meanwhile, people have also been exploring more rational consensus mechanisms to solve the trust issues of decentralization.

 

The history of consensus mechanisms

When it comes to decentralized networks, there used to be two typical consensus mechanisms: 1) the classic consensus protocol, and 2) the Nakamoto Consensus.

 

The classic consensus protocol follows the way humans reach consensus. In our everyday life, when a group of people need to make a decision, everyone will have to vote on the proposal, expressing their approval or disapproval. The same applies to the classic consensus protocol. When a transaction is initiated, each validator (computer) will decide to accept or reject the transaction via voting.

 

The classic consensus protocol comes with obvious pros and cons. In addition, it allows for fast confirmations through simple voting. But at the same time, as it needs to prevent malpractices like fraud and deception, participants cannot remain anonymous, and all of them require information about other participants, which limits, to a large extent, the mass adoption of classic consensus protocols. Moreover, this also means that such protocols cannot offer permissionless, free access. Therefore, in an open blockchain environment, classic consensus protocols do not work.

 

In 2008, Satoshi Nakamoto designed the Nakamoto Consensus using technologies such as PoW (proof of work) and peer-to-peer networks, which has become the second category of widely used consensus protocols. The advantage of using the Nakamoto Consensus is that it can run in an open network, and validators can freely access or exit the network, but this is achieved at the expense of performance. As such, although the Bitcoin network has been running smoothly for well over a decade, poor performance has always been a challenge.

 

Subsequently, although new consensus mechanisms kept popping up, they were merely modified versions of the classic protocol and the Nakamoto Consensus. Back in 2015, Team Rockets released a paper titled Snowflake to Avalanche: A Novel Metastable Consensus Protocol Family for Cryptocurrencies, in which a new consensus mechanism by the name of the “Avalanche Protocol” was proposed.

 

The Avalanche Consensus: From Snowflake to Avalanche

On Avalanche, not all validators are required to vote. Instead, a group of validators is randomly selected as the sample to inquire about the current state of the blockchain. Subsequently, if a validator noted that the result of most validators in the sample differs from his own, he will modify his result to comply with the majority in the sample. Following that, another random sample will be selected to repeat the same process. On Avalanche, all validators keep on repeating the process of sampling, modifying the state, and re-sampling, until almost all nodes reach an agreement.

 

Suppose that two contradictory double-spending transactions occurred in the network, some validators received Transaction A, while others received Transaction B. At this point, the system will ask a random sample of nodes, and if most nodes suggested that they received Transaction A, those who answered Transaction B will change the received transaction to Transaction A. Then, after constant selection and adjustment for dozens or even hundreds of rounds, all Avalanche validators will agree that the transaction they received is A.

 

In extreme cases where half of the nodes received Transaction A and half of them received Transaction B, the network would have to go through hundreds of sampling rounds to reach a consensus. That said, as such harsh conditions are rare, a transaction is often confirmed within several rounds, which take about 1 to 2 seconds.

 

The model shown at https://tedyin.com/archive/snow-bft-demo/#/snow offers a neat visual illustration of the Avalanche Consensus. After setting up the parameters, we can clearly see the communication between the nodes in the network, which resembles fragmented snowflakes. Initially, they collapse randomly. Finally, the snowflakes (nodes) collapse in large amounts, which results in an avalanche. The word “avalanche” is a vivid description of how this all-new protocol reaches consensus.

 

Avalanche integrates the advantages of both the classic protocol and the Nakamoto Consensus: it features superior performance and processes thousands of transactions while enabling fast confirmation. In addition, it is also sufficiently decentralized and allows thousands of nodes to join the network.

 

A unique three-chain structure

Unlike other public chains, Avalanche comes with three built-in blockchains at the very beginning: the transaction chain (X-Chain), the platform chain (P-Chain), and the contract chain (C-Chain).

 

In particular, X-Chain is based on the DAG (directed acyclic graph) architecture of the Avalanche Consensus. The chain is mainly used to exchange assets. In other words, it is a platform where AVAX assets are created and traded.

 

The DAG Structure

 

As a linear blockchain implementing the Snowman Consensus and responsible for running EVMs, C-Chain is mainly used for smart contracts. It should be noted that the Snowman Consensus is a consensus model constructed by Avalanche by combining the Avalanche Protocol with the linear transaction validation method. Therefore, the Snowman Consensus differs from the Avalanche Consensus in that the former is built for linear blockchains and is ultimately ordered, while the latter is a DAG-based system, with a more orderless state.

 

A Linear Blockchain

 

P-Chain, another linear blockchain based on the Snowman Consensus, is used for tasks such as creating validators, adding delegators, and creating subnets. With P-Chain, developers can create their own subnets, which do not share the network load with the mainnet. If a subnet also validates transactions on P-Chain, then it could benefit from the security of the mainnet. In the meantime, subnets are interoperable with each other, as well as the mainnet, which resembles the interconnected chains in the Cosmos ecosystem.

 

Through a new consensus mechanism and a unique three-chain structure, Avalanche has found a new direction for blockchain development. It strives to build an efficient, scalable, customizable, and secure blockchain platform. At the moment, many developers are already building apps on Avalanche, and you can always explore these DApps in CoinEx Wallet if you are interested.

 

Users can now manage AVAX and experience Avalanche-powered DApps within CoinEx Wallet. Download the wallet at https://wallet.coinex.com/download and try out the new features!

 

[More Information]

Avalanche website: https://www.avax.network/

Market cap ranking: https://coinmarketcap.com/currencies/avalanche/

Avalanche whitepaper:https://assets.website-files.com/5d80307810123f5ffbb34d6e/6008d7bbf8b10d1eb01e7e16_Avalanche%20Platform%20Whitepaper.pdf

Avalanche consensus whitepaper:https://assets.website-files.com/5d80307810123f5ffbb34d6e/6009805681b416f34dcae012_Avalanche%20Consensus%20Whitepaper.pdf

Buy AVAX: https://www.coinex.com/info/AVAX

Manage AVAX: https://wallet.coinex.com/download