Avalanche Consensus Explained

pothu
3 min readApr 10, 2022

--

Avalanche consensus is a whole new class of consensus. Consensus refers to how nodes in a network agree on what transactions have happened and in what order. Without consensus there is no way to ensure that the state one validator believes is true will be shared by the other nodes.

Most chains use either classical consensus or Nakamoto consensus. In classical consensus, every node talks to every other node to broadcast their choices. Classical consensus is very efficient for small numbers of nodes, but the networking overhead increases rapidly as the number of nodes increases. This means that it can’t scale to support large decentralized networks.

Nakamoto consensus is the consensus model that bitcoin uses. Here miners work and distribute their results. This model is scalable to a large number of users without compromising on performance, but the performance is terrible to begin with.

Avax consensus takes aspects of both classical and Nakamoto consensus and builds upon them. It combines the benefits of classical consensus and Nakamoto consensus.

Avalanche consensus works by random subsampling. Only a fixed number of nodes are chosen to do the work for the entire network. Because nodes communicate with a small, fixed number of peers in each subsampling round, the messaging complexity of a single round is O(1). In simpler terms, it’s fast af no matter how many nodes there are. One really great property of Avalanche consensus is that it’s computationally efficient. This means you can run Avalanche on cheap hardware. You don’t need specialized mining rigs. Some users have even run validator nodes on Raspberry Pis. Because hardware demands are so low, the protocol has minimal environmental impact.

Avalanche’s consensus method has many advantages:

Avalanche consensus is probabilistic. It’s possible that a node could only sample nodes with the minority preference and come to the wrong conclusion. BUT the protocol is parametrizable. We can make the probability of that happening arbitrarily small. Like < .0000000001% chance. Because of this high degree of certainty, Avalanche has finality. Once transactions are decided, they’re locked in forever. There are no reorgs on Avalanche.

Avalanche’s consensus protocol is quiescent. The protocol only runs when there’s work that needs doing. There’s no “wasted” computation like there is in proof-of-work systems.

Avalanche can use any form of Sybil protection. To run multiple validators, you need to have lots of stake, which we take to be a scarce resource. Avalanche Consensus is configurable. It’s actually a whole new family of consensus protocols, so there isn’t one true implementation.

Avax’s consensus model is really cutting edge. In simulation and in practice, we can execute 4500 transactions per second with decisions finalizing in 1–2 seconds.Look at this comparison between Avalanche and other leading blockchains:

--

--

pothu

Multi-chain maxi. Follow me to learn about NFTs, DeFi, and Crypto.