Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article explores Avalanche's consensus mechanism. The article is somewhat long because it explains each component in sequence, making the mechanism easier to understand.
Overview
Avalanche Consensus is a scalable, robust distributed protocol designed to address blockchain consensus challenges. Its design combines the strengths of two traditional approaches: classical consensus and Nakamoto consensus. This enables fast transaction finality, high throughput, and low energy consumption by eliminating proof of work (PoW).
Classical consensus (PBFT, etc.)
It is characterized by fast, deterministic finality. However, because all participants must communicate with one another to reach agreement, communication overhead grows rapidly with the number of participants, creating substantial scalability challenges. It is primarily used in permissioned networks with restricted participation.
Nakamoto consensus (Bitcoin, etc.)
Proof of work (PoW) enables permissionless networks that anyone can join freely. However, because consensus is probabilistic, transaction finality takes considerable time (multiple block confirmations). The substantial energy consumption associated with PoW is also a major challenge. See the following article for more information about PoW.
Mechanism
At the core of Avalanche Consensus is a distinctive process in which participating nodes (validators) repeatedly poll small, randomly selected groups of nodes (subsamples) to reach network-wide agreement.
The process is as follows.
- Sampling and querying
A node seeking to validate a transaction randomly samples a small number of validators and asks whether they support that transaction.
The whitepaper calls this communication a Query.
- Updating preferences If at least a specified number () of validators give the same answer, the node updates its preference to the majority opinion.
- Accumulating consecutive successful polls
The node repeatedly executes this process of sampling and updating preferences.
When majority support for the same choice is confirmed consecutively, its consecutive-success counter (
consecutiveSuccesses) increases. If another choice gains majority support, or no majority is formed, the counter resets. - Acceptance and finality Once the consecutive-success counter reaches a predetermined threshold (), the transaction is finally accepted (Accept) and reaches finality.
Key characteristics and benefits
- Fast finality Transactions reach finality in one to two seconds. This supports use cases requiring immediacy, such as payments.
- High throughput Because consensus does not require all participants to communicate with one another and subsampling keeps message overhead constant, the network can process thousands of transactions per second.
- High energy efficiency without PoW It does not consume substantial computing resources like proof of work (PoW). When there are no transactions to process, the protocol becomes quiescent (Quiescent), reducing unnecessary energy consumption.
- Decentralization and robustness through a leaderless design The absence of a designated leader in consensus eliminates a single point of failure, improving decentralization and fault tolerance.
- Flexible parameter configuration Parameters such as the sampling majority threshold () and consecutive successful polls required for acceptance () can be adjusted to the network's desired security level.
Through this approach, Avalanche Consensus addresses the scalability challenges faced by existing blockchains and is expected to support applications ranging from decentralized finance (DeFi) to enterprise use cases.
Big picture
Avalanche Consensus is based on the protocol family known as Snow. This collection of protocols progressively refines and applies one core mechanism: repeated subsampled voting. Its evolution can be understood as establishing a basic protocol for making a single decision, then determining how to apply it to blockchains, and finally how to optimize it.

Evolution of the foundational protocols (Slush → Snowflake → Snowball)
This stage establishes a method for the network to safely select exactly one of several conflicting choices.
- Slush
- Role The simplest model demonstrating the core functionality of subsampling.
- Mechanism Repeatedly queries a small number of nodes and aligns its preference with the majority opinion.
- Limitation It lacks Byzantine fault tolerance because it does not retain past voting history.
- Snowflake
- Role Introduces Byzantine fault tolerance to Slush.
- Added functionality
Adds a consecutive-success counter.
Records how many consecutive times the same choice obtains majority support and accepts that choice once the count reaches a specified threshold (
β). - Limitation Because the counter resets when the preference changes, decisions may be delayed when opinions are closely divided.
- Snowball
- Role Further strengthens Snowflake for more stable decision-making.
- Added functionality
Adds a persistent confidence counter (
preferenceStrength). Accumulates total support for each choice and selects the one with the greatest confidence as its current preference (preference). The final decision uses a consecutive-success counter, as in Snowflake. - Result This completes a robust, efficient protocol for resolving a single conflict.
Application to blockchains (Avalanche (DAG) and Snowman)
The completed Snowball protocol is then applied to actual blockchain structures.
- Avalanche (DAG)
- Role Applies Snowball to a directed acyclic graph (DAG).
- Conflict target Conflict Set (for example, double-spend transactions using the same UTXO). An independent Snowball instance runs for each Conflict Set.
- Characteristic Batches votes. A vote for one vertex also counts as a vote for all its ancestors, allowing multiple conflicts to be processed efficiently in one query.
- Snowman
- Role Applies Snowball to a linear chain requiring a total ordering of transactions. Used on the C-Chain and P-Chain.
- Conflict target Blockchain forks (multiple child blocks sharing the same parent). A Snowball instance runs at each fork point to select exactly one chain to accept.
Performance optimization (Snowman++)
Finally, practical issues encountered on chains running Snowman are addressed to improve performance.
- Snowman++
- Role Performs congestion control in Snowman.
- Problem Because anyone can propose blocks in Snowman, unnecessary forks proliferate during network congestion, increasing time to finality.
- Added functionality The soft proposer mechanism. At each block height, a small number of validators (proposers) eligible to propose blocks are deterministically selected in advance. Proposers propose blocks within their assigned time windows. This substantially reduces conflicts. To ensure liveness, any validator eventually becomes eligible to propose a block if designated proposers fail to do so.
Summary
| Protocol | Main role / core functionality introduced | Conflict target |
|---|---|---|
| Slush | Basic subsampling model | Two colors (abstract choices) |
| Snowflake | Introduces a consecutive-success counter for Byzantine fault tolerance | Two colors (abstract choices) |
| Snowball | Introduces a confidence counter to stabilize decisions | Multiple colors (abstract choices) |
| Avalanche | Applies Snowball to a DAG and batches votes | Conflict Set (group of transactions) |
| Snowman | Applies Snowball to a linear chain | Block forks |
| Snowman++ | Adds soft proposers to Snowman to control congestion | Block forks |
Snow
Avalanche Consensus is based on the protocol family collectively known as Snow. Snow is not a single algorithm but a collection of progressively refined protocols: Slush, Snowflake, and Snowball.
Metastability and subsampling
The Snow protocols are based on metastability and a mechanism for achieving it called repeated subsampled voting.
Metastability
The consensus process is described using the following two states.
- Metastable state An uncertain state in which network opinion is balanced between conflicting transactions and no final agreement has been reached.
- Stable state A state in which the network has reached agreement by accepting one conflicting transaction, making its decision probabilistically extremely difficult to reverse.
Snow aims to transition the network efficiently from this metastable state to a stable state.
Repeated subsampled voting
To achieve this transition, Snow repeatedly queries small groups of nodes (subsamples) rather than the entire network. Each node polls a small number of randomly selected nodes and updates the transaction it prefers based on the result (the majority opinion). Repeating the process amplifies a slight bias toward one opinion through a positive feedback loop, rapidly converging the network on a single state (the stable state).
Core components and parameters
Conflict Sets
The actual target of Snow's decision-making is not an individual transaction but a Conflict Set. This is a set of mutually exclusive transactions that cannot all be valid simultaneously. A typical example is two transactions attempting to spend the same UTXO (double-spending). These transactions form one Conflict Set, and consensus aims to accept exactly one of them.
Stake-weighted sampling
The k nodes to query are not selected uniformly at random.
They are sampled with probability proportional to the amount of AVAX staked by each node.
This provides resistance to Sybil attacks, in which an adversary cheaply creates many nodes (identities) to exert undue influence on network decisions.
It links the economic cost of staking to influence over decision-making.
Main parameters and trade-offs
Snow's behavior is primarily controlled by three parameters affecting the trade-off between safety (Safety: conflicting transactions cannot both be accepted) and liveness (Liveness: the process does not stall, and transactions eventually get accepted or rejected).
k(Sample Size) The number of nodes queried in one poll. Increasingkmakes sampling results more accurately reflect network-wide opinion, improving safety but increasing communication overhead.α(Alpha / Quorum Size) The minimum vote count required to constitute a majority (α > k/2). Bringingαcloser tokincreases confidence in decisions and improves Byzantine fault tolerance (improved safety). However, missing responses due to network delays or other causes make it harder to form a majority, increasing the risk of stalled decisions (reduced liveness).β(Beta / Decision Threshold) The number of consecutive successful polls required to accept a transaction. Increasingβrequires more evidence (consecutive majority support) before acceptance, dramatically reducing the probability of an incorrect decision (improved safety). However, it increases the time required to reach finality (higher latency).
In avalanchego, these parameters are defined in snow/consensus/snowball/parameters.go.
// avalanchego/snow/consensus/snowball/parameters.go
// Parameters required for snowball consensus
type Parameters struct {
// K is the number of nodes to query and sample in a round.
K int `json:"k" yaml:"k"`
// Alpha is used for backwards compatibility purposes and is only referenced
// during json parsing.
Alpha *int `json:"alpha,omitempty" yaml:"alpha,omitempty"`
// AlphaPreference is the vote threshold to change your preference.
AlphaPreference int `json:"alphaPreference" yaml:"alphaPreference"`
// AlphaConfidence is the vote threshold to increase your confidence.
AlphaConfidence int `json:"alphaConfidence" yaml:"alphaConfidence"`
// Beta is the number of consecutive successful queries required for
// finalization.
Beta int `json:"beta" yaml:"beta"`
// ConcurrentRepolls is the number of outstanding polls the engine will
// target to have while there is something processing.
ConcurrentRepolls int `json:"concurrentRepolls" yaml:"concurrentRepolls"`
// OptimalProcessing is used to limit block creation when a large number of
// blocks are processing.
OptimalProcessing int `json:"optimalProcessing" yaml:"optimalProcessing"`
// Reports unhealthy if more than this number of items are outstanding.
MaxOutstandingItems int `json:"maxOutstandingItems" yaml:"maxOutstandingItems"`
// Reports unhealthy if there is an item processing for longer than this
// duration.
MaxItemProcessingTime time.Duration `json:"maxItemProcessingTime" yaml:"maxItemProcessingTime"`
}Consensus process
Without conflicts
When the network has no conflicting transactions, such as double-spends, consensus progresses rapidly.
- An honest node A receives a new transaction Tx1.
- Node A prefers Tx1 and sends queries to
Knodes. - The other honest nodes receiving the queries also know only Tx1, so they all respond in support of Tx1.
- Node A receives
Kresponses (K >= Alpha), constituting a successful poll. After repeating this processBetatimes, Tx1 is accepted very quickly.
With conflicts
When a Conflict Set {Tx1, Tx2} exists (a double-spend), Snow's conflict resolution mechanism comes into play.
- Different nodes initially receive conflicting transactions Tx1 and Tx2, so the network begins with divided preferences (a metastable state).
- When node A, which prefers Tx1, runs a poll, random sampling may produce at least
αresponses supporting Tx1. - Based on this result, node A updates its internal counters for Tx1.
- If a node that previously preferred Tx2 is among those queried, it may subsequently switch its preference to the majority opinion, Tx1.
- This increases the proportion of nodes across the network that prefer Tx1.
- As this process repeats and more nodes prefer Tx1, the likelihood that Tx1 forms a majority in subsequent polls also increases. As a result, support for one transaction continues to grow.
- Eventually, all honest nodes accept one transaction (Tx1 in this example), and the conflicting Tx2 is rejected.
Key properties
Probabilistic safety
Instead of guaranteeing deterministic safety, Snow provides probabilistic safety: consensus is overturned only with a negligibly small probability (epsilon).
This failure probability ε is a function of K, Alpha, Beta, and the proportion f of Byzantine nodes in the network. By adjusting the parameters, it can be set to an astronomically small value.
"Unlike classical consensus protocols, ... we adopt an ε-safety guarantee that is probabilistic." — Avalanche Consensus Whitepaper
High scalability
Each node communicates with a constant number K of peers in a single poll, regardless of the total number n of nodes in the network.
This limits communication overhead to O(K) (O(1) with respect to n), so performance hardly degrades as the number of nodes grows.
"each node requires O(1) communication overhead per round... whereas classical consensus protocols... require O(n) communication per round" — Avalanche Consensus Whitepaper
Leaderless
Snow has no designated leader. All nodes participate in the protocol on equal terms, eliminating the risk that the failure of a specific node stops the entire system (a single point of failure) and improving decentralization and robustness (fault tolerance).
Quiescence
This is an especially important property compared with PoW. When there are no transactions to process, the Snow protocol pauses. In other words, nodes do not run polls and consume very few CPU or network resources. This achieves high energy efficiency.
"Unlike blockchains that rely on proof-of-work, they are quiescent and green." — Avalanche Consensus Whitepaper
Slush
Slush is the most basic algorithm in the Snow protocol family. Although the protocol itself does not provide Byzantine fault tolerance, it is an important model for understanding how Avalanche's core mechanisms, metastability and subsampling, work.
Mechanism
Slush models the process by which the entire network agrees on one of several conflicting choices (represented as colors in the whitepaper for illustration).
- Initial state Each node starts in an uncolored state, without a preference for either color.
- Initiating a poll When a node receives a new transaction from a client (corresponding to red, for example), it updates its state to red and begins the polling process.
- Sampling and querying
The node randomly samples
knodes from the network and sends queries asking which color they currently prefer. - Updating the state
It receives responses from
knodes and tallies the results. If support for one color (for example, blue) reaches at leastαvotes, the node switches (flips) its state to the majority color (blue). - Decision
This polling and updating process is repeated for a predetermined, fixed number
mof rounds. The color preferred by the node at the end ofmrounds becomes its final decision.
Relying on a fixed number m makes Slush structurally simple, but it is also a weakness.
It works in networks containing only correct nodes, but determining an optimal m is difficult when Byzantine nodes are present.
"Slush makes progress under any network configuration... since random perturbations in sampling will cause one color to gain a slight edge and repeated samplings afterwards will build upon and amplify that imbalance."
Slush can make progress toward consensus even when the opinion of the entire network is evenly divided (for example, 50–50). This is triggered by a slight imbalance in votes arising probabilistically from random sampling. Once a choice gains even a slight advantage, it becomes more likely to be selected as the majority in subsequent samples. As this process repeats, the initial small imbalance is amplified, eventually causing the entire network to converge on one opinion.
Implementation
Slush is a conceptual model and is not used directly in avalanchego.
However, its logic is incorporated as a component of the more advanced Snowflake and Snowball protocols.
The implementation is in the snow/consensus/snowball/ directory, with variants for binary and n-ary decisions.
Binary decisions
The simplest implementation reaches agreement between two choices (0 and 1 in the code).
The preference field holds the current preference, which is unconditionally overwritten with the new choice when RecordSuccessfulPoll is called.
// avalanchego/snow/consensus/snowball/binary_slush.go
type binarySlush struct {
preference int
}
func (sl *binarySlush) Preference() int {
return sl.preference
}
func (sl *binarySlush) RecordSuccessfulPoll(choice int) {
sl.preference = choice
}N-ary decisions
This implementation handles three or more choices.
Each choice is represented by an ids.ID, and the basic logic is the same as in binarySlush.
// avalanchego/snow/consensus/snowball/nnary_slush.go
type nnarySlush struct {
preference ids.ID
}
func (sl *nnarySlush) Preference() ids.ID {
return sl.preference
}
func (sl *nnarySlush) RecordSuccessfulPoll(choice ids.ID) {
sl.preference = choice
}This Slush logic is embedded as a struct in binary_snowflake.go, as shown below, demonstrating that Snowflake builds on Slush.
// avalanchego/snow/consensus/snowball/binary_snowflake.go
type binarySnowflake struct {
// wrap the binary slush logic
binarySlush
// ... (Snowflake specific fields)
}Lack of Byzantine fault tolerance
Slush's critical weakness is its lack of Byzantine fault tolerance. Malicious nodes (Byzantine nodes) need not follow the protocol exactly and can strategically manipulate their responses to disrupt consensus.
If network opinion begins to favor a particular choice, Byzantine nodes can prevent a majority from forming by deliberately continuing to respond with the conflicting choice. This can keep the network indefinitely in a metastable state (opinions remain balanced), preventing it from reaching a final decision.
"The Slush protocol does not provide a strong safety guarantee in the presence of Byzantine nodes. In particular, if the correct nodes develop a preference for one color, a Byzantine adversary can attempt to flip nodes to the opposite so as to keep the network in balance, preventing a decision." (The Slush protocol does not guarantee strong safety in the presence of Byzantine nodes. In particular, if correct nodes increasingly prefer one color, a Byzantine adversary can attempt to flip nodes to the opposite color, maintaining the network in a balanced state and preventing a decision.)
To address this issue, the next protocol, Snowflake, was devised.
Snowflake
Snowflake extends Slush by adding Byzantine fault tolerance. It retains Slush's core subsampling mechanism while adding a counter to each node for tracking its preference, improving robustness against attacks from malicious nodes.
Core mechanism
Slush's weakness is that each node does not remember previous poll results. Consequently, Byzantine nodes could easily reverse honest nodes' preferences and disrupt consensus by deliberately returning conflicting opinions.
Snowflake addresses this problem by giving each node a state variable called consecutiveSuccesses (number of consecutive successes).
This counter records the number of times a particular choice has received consecutive majority support.
The introduction of this counter changes the protocol's operation as follows.
- Incrementing the counter If the majority choice in a poll matches the node's current preference, increment the counter.
- Resetting the counter
If the majority choice differs from the node's preference, switch the preference to the new choice and reset the counter to 1.
This counts as the first successful poll for the new preference.
If a poll fails to form a majority of at least
αvotes, support for any choice is considered insufficiently firm, and the counter resets to zero. - Decision (finalization)
Once the counter reaches the predetermined threshold
β(beta), the node accepts (Accept) its current preference as its final decision. Once this state is reached, thefinalizedflag is set, and the node's decision cannot subsequently be reversed.
Snowflake augments Slush with a single counter that captures the strength of a node’s conviction in its current color.
The whitepaper explains that Snowflake extends Slush by adding a single counter to record the strength of support for the node's current preference.
Implementation
Snowflake's logic is implemented in the snow/consensus/snowball/ directory.
There are binary_snowflake.go for binary decisions and nnary_snowflake.go for n-ary decisions. Here we focus on the easier-to-understand binary_snowflake.
// avalanchego/snow/consensus/snowball/binary_snowflake.go
// binarySnowflake is the implementation of a binary snowflake instance
type binarySnowflake struct {
// wrap the binary slush logic
binarySlush
// alphaPreference is the threshold required to update the preference
alphaPreference int
// ...
// confidence is the number of consecutive successful polls for a given
// alphaConfidence threshold.
confidence []int
// finalized prevents the state from changing after the required number of
// consecutive polls has been reached
finalized bool
}The binarySnowflake struct incorporates the functionality of binarySlush by embedding it as a field and adds the new confidence field (corresponding to the consecutive-success counter) and finalized flag.
Next, consider RecordPoll, which contains the core logic.
// avalanchego/snow/consensus/snowball/binary_snowflake.go
func (sf *binarySnowflake) RecordPoll(count, choice int) {
if sf.finalized {
return // Do nothing if already finalized
}
// [alphaPreference] is the minimum number of votes required to change the preference.
// Fewer votes constitute an unsuccessful poll.
if count < sf.alphaPreference {
sf.RecordUnsuccessfulPoll() // Reset the confidence counter to zero
return
}
// If the majority choice differs from the current preference,
// reset the previous confidence.
if choice != sf.Preference() {
clear(sf.confidence)
}
// Invoke Slush logic to update the preference.
sf.binarySlush.RecordSuccessfulPoll(choice)
// terminationConditions is a list of {alphaConfidence, beta} pairs.
// This allows multiple decision conditions to be configured.
for i, terminationCondition := range sf.terminationConditions {
// If the vote count does not reach [alphaConfidence], the threshold for this
// confidence level, it cannot satisfy any stricter subsequent conditions either,
// so clear the corresponding counters and all subsequent ones, then exit.
if count < terminationCondition.alphaConfidence {
clear(sf.confidence[i:])
return
}
// Increment the counter if the threshold is reached.
sf.confidence[i]++
// Check whether the counter has reached the decision threshold [beta].
if sf.confidence[i] >= terminationCondition.beta {
sf.finalized = true // Accept
return
}
}
}
func (sf *binarySnowflake) RecordUnsuccessfulPoll() {
clear(sf.confidence)
}This implementation shows the following:
- If a poll's vote count is below
alphaPreference, it is considered unsuccessful, and theconfidencecounter resets to0. - If a choice different from the node's own preference (
Preference) gains a majority, the counter also restarts from0. - When support for the same choice continues and the
confidencecounter reachesbeta, thefinalizedflag becomestrueand the decision is finalized.
Improvements over Slush and limitations
Snowflake introduces the following important improvements over Slush.
- Introduction of state
Whereas Slush retains almost no state between rounds, Snowflake retains a history of past poll results in the form of a
confidencecounter. This constitutes the protocol's state and brings consistency to decision-making. - Dynamic termination conditions
Whereas Slush terminates after a fixed number
mof rounds, Snowflake continues operating until theconfidencecounter reachesβ. This determines when to terminate according to the state of the network. - Byzantine fault tolerance
Because the
confidencecounter must accumulate, Byzantine nodes cannot easily overturn honest nodes' decisions even if they temporarily form a majority. The source explains that resetting accumulatedconfidencerequires consistently forming a majority for a conflicting choice, which is difficult in a network dominated by honest nodes.
However, Snowflake also has limitations.
The confidence counter is transient; even a single poll in which a conflicting choice receives at least alphaPreference votes completely resets the accumulated confidence.
When opinions in the network are closely divided, repeated accumulation and resetting of confidence may delay finality.
Snowflake’s notion of state is ephemeral: the counter gets reset with every color flip.
The whitepaper makes the above observation. It highlights the transient nature of Snowflake's state: the counter resets each time the preference changes. To address this issue, Snowball was devised to retain past preference history more persistently.
Snowball
Snowball is an algorithm that further refines Snowflake to construct a more robust consensus mechanism. It addresses Snowflake's problem of an easily reset counter by introducing a mechanism that records past voting history more persistently.
Core mechanism
Snowball improves robustness by separating decision-making into two phases: accumulating long-term confidence and making a short-term final decision.
- Confidence counter (
preferenceStrength) Each node maintains apreferenceStrengthcounter recording the confidence associated with each conflicting choice. If a choice obtains at leastalphaPreferencevotes in a poll, increment its confidence counter regardless of the current preference. This counter does not reset when the preference changes, retaining a long-term history of support. - Preference (
preference) The node selects the choice with the highestpreferenceStrengthas its current preference (preference). This enables it to determine a more stable preference based on accumulated historical support rather than temporary sampling bias. - Final decision process (Snowflake logic)
Final acceptance (Accept) is handled by the Snowflake instance that forms a component of Snowball.
Snowflake maintains its own
preference(independent of Snowball'spreference) and compares it with the majority choice in the poll. If the two match, it increments the consecutive-success counter (confidence). Once this counter reaches thresholdβ, that choice is finally accepted.
This two-stage mechanism separates short-term fluctuations in opinion (changes to Snowflake's preference) from long-term confidence accumulation (Snowball's preferenceStrength), allowing more stable decision-making across the system.
Implementation
The avalanchego implementation is in the snow/consensus/snowball/ directory.
The struct and methods in binary_snowball.go clearly illustrate this two-stage mechanism.
// avalanchego/snow/consensus/snowball/binary_snowball.go
type binarySnowball struct {
// wrap the binary snowflake logic
binarySnowflake
preference int
preferenceStrength [2]int
}The binarySnowball struct includes all the functionality and fields of binarySnowflake, and adds its own preference and a preferenceStrength array that records confidence.
RecordPoll method
RecordPoll processes poll results.
// avalanchego/snow/consensus/snowball/binary_snowball.go
func (sb *binarySnowball) RecordPoll(count, choice int) {
// Parameter [alphaPreference] is the threshold for updating long-term confidence.
if count >= sb.alphaPreference {
// Increment the confidence [preferenceStrength] for the majority [choice].
sb.preferenceStrength[choice]++
// If the confidence of [choice] exceeds that of the conflicting choice,
// update Snowball's [preference].
if sb.preferenceStrength[choice] > sb.preferenceStrength[1-choice] {
sb.preference = choice
}
}
// Call RecordPoll on the embedded Snowflake instance.
// Internally, the [alphaConfidence] parameter is used
// to update the consecutive-success counter [confidence] for final decisions.
sb.binarySnowflake.RecordPoll(count, choice)
}This code shows the division of responsibilities: alphaPreference determines Snowball's long-term preference, while alphaConfidence, used within Snowflake, governs the short-term final decision process.
This allows flexible configurations, such as a simple majority increases long-term confidence, but a stricter condition (for example, 80% support) is required to finalize a decision.
Preference method
This method illustrates how Snowball's and Snowflake's preference values are used separately.
// avalanchego/snow/consensus/snowball/binary_snowball.go
func (sb *binarySnowball) Preference() int {
// If Snowflake has finalized, its decision is final,
// so prioritize Snowflake's preference.
if sb.Finalized() {
return sb.binarySnowflake.Preference()
}
// If it has not yet finalized, return Snowball's own
// preference based on long-term confidence.
return sb.preference
}The logic normally exposes a stable preference based on long-term confidence, but once Snowflake becomes finalized, its decision takes precedence.
This guarantees that the finalized decision is returned even in the probabilistically rare case where Snowball's preference differs from Snowflake's final decision.
Improvements over Snowflake
- Persistence of state
Snowflake's counter resets when the preference changes, but Snowball's
preferenceStrengthcontinues accumulating, so historical voting information is not lost. - Stability of decisions
Even a slight difference in
preferenceStrengthhelps stabilize the preference, reducing frequent changes caused by transient sampling bias and allowing consensus to progress more efficiently.
Snowball's robust decision-making mechanism is used in Avalanche Consensus, which has a DAG (directed acyclic graph) structure, as the core mechanism for selecting exactly one transaction to accept from a group of conflicting transactions (a Conflict Set).
DAG
A DAG (Directed Acyclic Graph) is a type of data structure in graph theory.
https://www.summit.io/blog-posts/what-is-a-dag
It has the following two characteristics.
- Directed Each edge in the graph has a direction, indicating a relationship from one vertex (node) to another.
- Acyclic No path (cycle) exists that starts at any vertex, follows edges, and returns to that same vertex.
https://dailycoin.com/directed-acyclic-graph-vs-blockchain/
Whereas a blockchain records transactions in a single linear chain, a DAG records them in a web-like graph structure. This enables multiple transactions to be processed simultaneously and in parallel, potentially improving throughput.
The role of the DAG in Avalanche
Unlike many other DAG-based projects, Avalanche does not use the DAG structure itself to form consensus. The DAG's main roles in Avalanche are to improve the efficiency and security of the Snowball consensus process.
"In effect, Avalanche executes multiple Snowball (one from the Snow family) instances with the aid of a Directed Acyclic Graph (DAG). The DAG serves to piggyback multiple instances, reducing the cost from O(logn) to O(1) per node and streamlining the path where there are no conflicting transactions."
As the whitepaper states above, the DAG assists the execution of multiple Snowball instances and reduces their cost.
Voting efficiency: transitive voting
An important feature of Avalanche's DAG is that one vote applies to multiple targets.
- Structure Each vertex contains multiple transactions and references one or more parent vertices (Parents). These dependencies between vertices form the graph.
- Mechanism A yes vote for a vertex (child) also counts as a yes vote for all of its ancestors (parents, grandparents, and so on).
This allows a single query to vote in a batch for all transactions contained in a vertex and its ancestor tree (in practice, the many Conflict Sets to which they belong). This batching greatly reduces communication overhead per transaction.
Enhanced security
The DAG structure also helps protect previous decisions.
"The DAG intertwines the fate of transactions, similar to the Bitcoin blockchain. This renders past decisions difficult to undo without the approval of correct nodes."
As the whitepaper points out, interdependence among transaction acceptance states makes previous decisions difficult to reverse. An attacker attempting to get a transaction improperly accepted would need honest nodes to agree not only on that transaction but also on many subsequent transactions that depend on it, increasing the difficulty of the attack.
Interaction with Snowball
In Avalanche Consensus, a separate Snowball instance runs for each Conflict Set. The DAG efficiently combines votes for these numerous Snowball instances.
A node responds yes to a query about vertex V only when the following conditions are met.
- Every transaction contained in vertex
Vis currently preferred within its respective Conflict Set. - Every transaction contained in every ancestor vertex reachable by following parents from vertex V is currently preferred within its respective Conflict Set.
Under this strict condition, a vertex with an ancestor that has lost support to a conflicting transaction cannot receive network support while that conflict remains unfavorable.
Differences from other DAG projects
Unlike in other projects, Avalanche's DAG is not a record of voting results.
Confidence (confidence) accumulates only from the fact that a Snowball poll obtained at least α votes (a chit), not from the structure of the DAG (such as the number of descendants).
"Unlike other cryptocurrencies that use graph vertices directly as votes, Avalanche only uses a DAG for the purpose of batching queries in the underlying Snowball instances. Because confidence is built by collected chits, and not by just the presence of a vertex, simply flooding the network with vertices attached to the rejected side of a subgraph will not subvert the protocol."
The whitepaper makes clear that Avalanche's DAG is a tool for batching votes, not a direct determinant of confidence. This prevents an attacker from manipulating voting results simply by adding many vertices containing invalid transactions to the DAG.
Implementation in avalanchego
Vertex definition
The Vertex interface defined in snow/consensus/avalanche/vertex.go represents a DAG vertex.
Its Parents() method returns references to parent vertices, forming the graph structure.
// avalanchego/snow/consensus/avalanche/vertex.go
type Vertex interface {
choices.Decidable
// Returns the vertices this vertex depends on
Parents() ([]Vertex, error)
// ... (other methods)
}Engine implementation
snow/engine/avalanche/transitive.go contains the main logic of the Avalanche consensus engine.
This engine maintains and verifies the DAG and coordinates consensus with Snowball instances (implemented as the Consensus interface in snow/consensus/avalanche).
Snowman
Snowman is a member of the Snow protocol family, specifically designed for consensus on a linear chain. It is used in Avalanche's C-Chain (EVM) and P-Chain and guarantees a total ordering of transactions (Total Order). This is essential for executing smart contracts, where state transitions depend on the preceding state.
Overview
Whereas DAG-based Avalanche Consensus provides a partial ordering of transactions, Snowman manages blocks in a linear chain. Snowman applies the Snowball protocol to a linear chain, optimizing conflict handling for that structure.
- Definition of a conflict Conflicts in Snowman arise as blockchain forks. If multiple different blocks with the same parent block (and thus at the same height) are proposed, they form a Conflict Set. Consensus aims to select exactly one of these blocks to accept.
- Voting target Votes target blocks rather than individual transactions.
Core mechanism
Snowman's implementation is characterized by the vote aggregation algorithm in topological.go. A blockchain is a graph structure (DAG) with directed relationships from parents to children, and Snowman uses this structure to aggregate received votes efficiently.
Cascading votes and Kahn's algorithm
A yes vote for a block also counts as a yes vote for all of its ancestor blocks.
To aggregate these votes efficiently, the RecordPoll method uses an approach similar to Kahn's topological sorting algorithm.
Kahn's topological sorting algorithm
This algorithm arranges the vertices of a DAG (directed acyclic graph) into a linear sequence according to their dependencies (topological order).
Here, in-degree refers to the total number of edges pointing to a given vertex.
In Snowman's context, the blockchain is considered a graph with edges directed from child blocks to parent blocks.
Therefore, a block's in-degree corresponds to the number of direct child blocks for which it is the parent.
The algorithm operates as follows.
- First, add all vertices with
in-degreezero (leaf blocks without child blocks) to a queue. - Remove one vertex from the queue and append it to the result list.
- Remove from the graph the edges pointing from that vertex to its parent vertices.
- Removing an edge decreases the parent vertex's
in-degreeby one. Add any vertex whosein-degreebecomes zero (a parent block whose child blocks have all been processed) to the queue. - Repeat steps 2 through 4 until the queue is empty.
Once this process is complete, the resulting list contains vertices arranged in reverse dependency order (from children toward parents). Snowman uses this to aggregate votes efficiently from leaf blocks toward the root.
Snowman applies this idea by aggregating votes from the tips of the chain (blocks with no descendants, corresponding to an in-degree of zero) back toward their parent blocks.
Vote aggregation in the RecordPoll method takes place in the following steps.
- Building the dependency graph and calculating in-degrees (
calculateInDegree) First, identify all ancestor blocks reachable by followingParent()from blocks that received votes, and construct a dependency graph of the blocks to process. Next, calculate the number of child blocks for each block in this graph as its in-degree. This corresponds to the number of incoming edges in Kahn's algorithm. At the same time, record how many votes each block received from its direct child blocks. - Propagating votes from leaves (
pushVotes) Blocks with an in-degree of zero (blocks at the tips of the graph, or blocks whose child votes have all been aggregated) are treated as leaves. Begin processing at these leaf blocks and propagate their aggregated votes to their parents. A parent block receiving votes decreases its in-degree by one. If this reduces a parent's in-degree to zero, add it to the processing queue as a new leaf. - Applying votes to Snowball instances (
vote) By repeating this process toward the root of the graph, efficiently calculate each block's total votes from its entire descendant tree. Ultimately, only blocks whose total votes reach at leastαare considered successful, andRecordPollis called on the Snowball instance (sb) associated with that block. This updates the preference (preference) at each fork point.
This algorithm achieves high efficiency by allowing a single poll to update the state of numerous fork points throughout the chain at once.
Example
- Voting and constructing the dependency graph
First, construct a dependency graph of the relevant blocks based on votes received from the network.

Suppose a chain fork like the one above exists, and Block D, Block E, and Block C receive one vote each.
From these votes, recursively follow parent blocks to construct a processing graph containing all relevant blocks. At the same time, calculate the number of direct children (in-degree) of each block.

Block D: in-degree = 0, votes = 1Block E: in-degree = 0, votes = 1Block C: in-degree = 1 (child: E), votes = 1Block B: in-degree = 1 (child: D), votes = 0Block A: in-degree = 2 (children: B, C), votes = 0
- Propagating votes from leaves
Next, propagate votes from blocks with an in-degree of zero (leaves) to their parent blocks.

2-1. Initial leaves
Because Block D and Block E have an in-degree of zero, begin processing with them.
- Block D (votes: 1) -> Propagate votes to its parent Block B.
- The votes for Block B become 0 + 1 = 1.
- The in-degree of Block B becomes 1 - 1 = 0, making it a new leaf.
- Block E (votes: 1) -> Propagate votes to its parent Block C.
- The votes for Block C become 1 + 1 = 2.
- The in-degree of Block C becomes 1 - 1 = 0, making it a new leaf.
Total votes and in-degree of each block at this point
- Block D: votes = 1
- Block E: votes = 1
- Block B: votes = 1, in-degree = 0 <- New leaf
- Block C: votes = 2, in-degree = 0 <- New leaf
- Block A: votes = 0, in-degree = 2
2-2. Next leaves Continue processing with the new leaves Block B and Block C.
- Block B (votes: 1) -> Propagate votes to its parent Block A.
- The votes for Block A become 0 + 1 = 1.
- The in-degree of Block A becomes 2 - 1 = 1.
- Block C (votes: 2) -> Propagate votes to its parent Block A.
- The votes for Block A become 1 + 2 = 3.
- The in-degree of Block A becomes 1 - 1 = 0, making it a new leaf.
**Final total votes for each block (including descendant votes)**
- `Block D`: 1 vote
- `Block E`: 1 vote
- `Block B`: 1 vote
- `Block C`: 2 votes
- `Block A`: 3 votes3. Applying votes to Snowball instances
Finally, update the state of the Snowball instance associated with each block based on the aggregated vote totals.

- Suppose
α = 2. Block A(3 votes >= α) ->RecordPollis called onBlock A's Snowball instance (sb). Of the fork choicesBvsC,Cmay become preferred because it has more total votes (Cdescendant votes: 2 >Bdescendant votes: 1).Block C(2 votes >= α) ->RecordPollis called onBlock C's Snowball instance (sb).Block B(1 vote < α) ->RecordPollis not called, and the counter may be reset.Block DandBlock Eare likewise compared withα.
In this way, a single network poll efficiently updates the preferences at each fork point throughout the chain.
Optimization with OracleBlock
Snowman can further optimize consensus by handling a special type of block called OracleBlock.
// avalanchego/snow/consensus/snowman/oracle_block.go
type OracleBlock interface {
Options(context.Context) ([2]Block, error)
}OracleBlock is implemented when the VM knows in advance that there are only two choices for the next block.
For example, in the Platform VM, after a proposal block proposing an operation such as adding a validator, a choice must be made between accepting a Commit block to finalize the proposal or an Abort block to cancel it.
Because the VM knows in advance that the next block is limited to either Commit or Abort, Snowman handles this situation using OracleBlock.
Ordinarily, forks that may have three or more choices use a general-purpose data structure (snowball.Tree) capable of handling any choice.
When there are only two choices, however, a simpler and more efficient Snowball instance specifically designed for binary decisions can be used.
This reduces computational and management overhead in the consensus process, speeding up processing.
Implementation
Snowman's implementation in avalanchego is located in the snow/consensus/snowman/ directory.
Block interface
Blocks handled by Snowman satisfy the Block interface, which reflects the characteristics of a linear chain.
// avalanchego/snow/consensus/snowman/block.go
type Block interface {
snow.Decidable
Parent() ids.ID
Height() uint64
// ...
}The decisive difference from a DAG Vertex, which has multiple parents, is that Parent() returns a single ID.
In DAG-based Avalanche Consensus, the Parents() method of the Vertex interface returns a slice of multiple parent IDs ([]Vertex).
This allows a graph structure with dependencies on multiple preceding transactions to be represented.
In contrast, Snowman's Block interface returns only one ID via Parent(), guaranteeing a linear chain structure in which each block has exactly one parent.
snowmanBlock and snowball.Consensus
The snowmanBlock struct in topological.go manages the state of each block.
The key point is that it contains an sb field of type snowball.Consensus.
// avalanchego/snow/consensus/snowman/snowman_block.go
type snowmanBlock struct {
// ...
sb snowball.Consensus
children map[ids.ID]Block
}This sb field is a Snowball instance used to decide which of the child blocks sharing this block as their parent (that is, the conflicting forked blocks) should be accepted.
Every newly added child block is added as a choice to this Snowball instance.
Choosing between Snowman and Avalanche (DAG)
- Snowman (linear chain) Suitable for VMs that require a total ordering of transactions. It is used by the EVM (C-Chain), where all participants must perform state transitions in the same order, and by the Platform VM (P-Chain), where additions and removals to the validator set must be managed in a strict order.
- Avalanche (DAG) It was suitable when transactions had no dependencies and parallel processing could improve throughput. It was previously used by the UTXO-based X-Chain, but following the Cortina upgrade, the X-Chain now also operates on Snowman++ (a linearized DAG), enabling simpler operation while incorporating the benefits of Avalanche Consensus.
This distinction gives Avalanche the flexibility to offer a consensus model suited to application requirements.
Snowman++
Snowman++ is an enhanced version of the Snowman consensus protocol that adds a congestion control mechanism.
This feature is introduced through a wrapper VM called proposerVM, without requiring code changes to existing Snowman-based VMs.
It aims to improve performance and stability on chains where blocks are produced frequently, such as the C-Chain.
Congestion control
In networking, congestion refers to a situation where a large volume of data (in this case, transactions and block proposals) exceeds processing capacity, causing communication delays and bottlenecks.
In the context of Avalanche Consensus, this occurs when many validators propose blocks simultaneously, creating numerous forks (conflicts) across the network and reducing consensus efficiency.
Congestion control broadly refers to mechanisms that detect congestion and adjust data transmission volume to alleviate network congestion and stabilize overall system performance. Snowman++ controls this congestion by temporarily restricting which nodes may propose blocks.
Congestion control by reducing conflicts
In Snowman Consensus, any validator can propose a new block at any time. If the network is congested and several validators propose different blocks at almost the same time, many forks (conflicts) arise. As conflicts increase, the time required for the network to agree on which chain to accept (time-to-finality) increases, causing worse latency.
To address this issue, Snowman++ introduces a soft proposer mechanism that temporarily restricts which nodes can propose blocks. This reduces the occurrence of conflicts themselves and shortens the time to finality.
Implementation: proposerVM
Snowman++ is implemented by proposerVM in vms/proposervm/vm.go. This VM wraps the original VM (for example, the EVM, called the Inner VM) and mediates its interactions with the consensus engine.
Block structure (proposervm.Block)
proposerVM adds a Snowman++ header to a block produced by the Inner VM and treats it as a proposervm.Block with a new block ID.
postForkBlock is the standard block after Snowman++ activation.
// vms/proposervm/block/block.go
// postForkBlock is a block that is verified after the fork. It is signed by a
// validator that is allowed to propose at the specified time.
type postForkBlock struct {
InnerBlock []byte `serialize:"true"`
PChainHeight uint64 `serialize:"true"`
Timestamp uint64 `serialize:"true"`
Proposer ids.NodeID `serialize:"true"`
proposerSig [bls.SignatureLen]byte
}InnerBlockThe byte data of the block produced by the original VM.PChainHeightThe P-Chain block height referenced to determine the proposer list.TimestampThe block's creation time. Used to verify the time window.ProposerThe NodeID and signature of the validator that produced this block.
A time window (Submission Window) is the specific period during which each selected proposer (block proposer) is permitted to propose a block in Snowman++.
Specifically, a time slot is assigned to each proposer based on the timestamp of the parent block, as follows.
-
Assumptions
- Proposer list
[P1, P2, P3, ...] - Duration of each time window (
WindowDuration) 5 seconds
- Proposer list
-
Permitted proposal times for each proposer
- P1
Parent block timestamp +
0 secondsto+5 seconds - P2
Parent block timestamp +
5 secondsto+10 seconds - P3
Parent block timestamp +
10 secondsto+15 seconds - ...
- P1
Parent block timestamp +
A proposer cannot propose a block before its own window begins.
This mechanism has two main purposes.
- Reducing conflicts Rather than allowing all validators to propose blocks simultaneously, designated proposers propose them in sequence, preventing disorderly competition among block proposals. This lowers the probability of multiple blocks being produced at the same height (a fork), controlling congestion.
- Guaranteeing liveness Even if none of the designated proposers produce a block, for example because they are offline, any validator can propose a block after the final proposer's window ends. This ensures the chain continues progressing without stalling under the protocol's liveness assumptions.
Proposer selection
The proposer selection logic is implemented in vms/proposervm/proposer/windower.go.
Windower deterministically computes the proposers for the following process.
- Retrieve
PChainHeightfrom the parent block's header and obtain the subnet's validator list at that height from the P-Chain. - Using a seed computed from the parent block height and chain ID, shuffle the validator list weighted by stake.
- Select the first
maxWindows(normally six) validators from the shuffled list as proposers.
Because every node can compute the same result, the network does not need to reach a separate consensus about who the next proposer is.
Intercepting BuildBlock
One of proposerVM's most important functions is intercepting BuildBlock calls from the consensus engine.
// vms/proposervm/vm.go
func (vm *VM) BuildBlock(ctx context.Context) (snowman.Block, error) {
// ... (Pre-fork logic is omitted for clarity)
// In post-fork, we can only build a block if we are the proposer.
// Pre-calculating the P-Chain height and the timestamp here avoids
// re-calculating them inside shouldBuild.
pChainHeight, err := vm.ctx.ValidatorState.GetCurrentHeight(ctx)
if err != nil {
return nil, fmt.Errorf("failed to get current P-Chain height: %w", err)
}
parentID := vm.lastAcceptedID
now := vm.Clock.Time()
delay, should, err := vm.delay(ctx, parentID, pChainHeight)
if err != nil {
return nil, err
}
if !should {
return nil, errProposerNotAllowedToPropose
}
time.Sleep(delay)
// ...
// The innerVM builds the block
innerBlk, err := vm.ChainVM.BuildBlock(ctx)
if err != nil {
return nil, err
}
// We are building a block on top of the last accepted block
return vm.buildBlock(parentID, pChainHeight, now.Unix(), innerBlk)
}- The consensus engine calls
proposerVM.BuildBlock(). proposerVMcallsvm.delay()to check whether the local node is an eligible proposer in the current time window. If not, it returnserrProposerNotAllowedToProposeand aborts block production.- If the node is eligible, it calls
vm.ChainVM.BuildBlock()(the Inner VM's BuildBlock) to produce the original block (innerBlk). - Inside
vm.buildBlock(), wrapinnerBlkinpostForkBlock, attach a header containing the timestamp and the node's signature, and return it to the consensus engine.
This mechanism controls block production according to the proposer list.
Soft proposers and liveness guarantees
The mechanism is called a soft proposer mechanism because it includes a fallback when the proposers do not produce blocks.
- Each proposer is assigned a sequential time window of
WindowDuration(for example, five seconds). - After the final proposer's window ends (after
maxWindows * WindowDuration), any validator is permitted to propose a block.
This guarantees liveness under the protocol's assumptions, allowing the chain to continue progressing even when designated proposers cannot produce blocks, for example because they are offline.
Effects of Snowman++
C-Chain mainnet data shows that the number of rejected blocks per minute decreased dramatically after Snowman++ was activated. This indicates that the proposer mechanism suppresses unnecessary forks, allowing the network to agree efficiently on a single chain without wasted polling.
This stabilized transaction time to finality and improved overall network performance and user experience.
Demo
https://tedyin.com/archive/snow-bft-demo
The demo website above allows you to observe how Avalanche Consensus works.
Parameters and execution buttons are located near the bottom of the screen. The parameters are as follows.
Consensus parameters
These parameters form the core of the Snowball protocol.
n(Number of Nodes) The total number of nodes participating in the network (squares in the demo), fixed at400. A larger value simulates a larger and more distributed network. A characteristic of Snow is that its performance is relatively insensitive ton(it is scalable).k(Sample Size) The number of nodes that each node randomly queries for their opinions in one poll. A node sends queries only to theseknodes rather than the entire network (nnodes). This value is set much smaller thannand is an important parameter for communication efficiency. In the demo, whenever a node runs a poll,kother nodes are randomly selected and their colors (opinions) are tallied.alpha(Quorum Size / α) The minimum number of votes needed to constitute a majority in a poll. When a node queriesknodes, the poll is considered successful if one of the returned opinions (colors) receives at leastalphavotes. The node may update its preference to the successful color. To ensure safety,alphais normally set greater thank/2.
Simulation parameters
These parameters control the behavior and appearance of the demo. They are not parameters of the actual protocol itself.
nodesPerTickThe number of nodes that run polls during one simulation tick (the smallest unit of time). Increasing this value simulates more nodes running polls simultaneously (in parallel), accelerating consensus. In the actual network, nodes run polls asynchronously and independently, so this parameter approximates that parallelism.maxInactiveTicksThe maximum number of ticks before a node resumes polling after not running polls for a consecutive period. This mechanism maintains the demo's liveness. In the actual network, nodes continue polling as long as unfinalized transactions exist. Since the demo can randomly pause a node's activity, this parameter controls when it resumes.simulationSpeedThe simulation speed. Moving this slider adjusts how quickly one tick progresses. Increasing the value displays the overall consensus process more quickly.
Each square in the demo represents a node, and its color represents the choice (transaction) that the node currently prefers. Color intensity represents confidence (Confidence) or the number of consecutive successes (Conviction) for that choice. A darker color indicates that the node is more confident that its choice should be accepted.
Explaining the graph

By default, the network starts in a neutral state as shown above. Pressing the Run button at the bottom of the screen causes it to converge on either blue or orange.

This graph shows the simulation results of the Snowball consensus process over time. It illustrates how nodes in the network reach agreement between two conflicting choices, A (orange) and B (blue).
The graph visualizes how an initially divided network eventually agrees on choice B by repeatedly sampling randomly and following the majority. Initially, support for both choices is small, but once support for B gains the advantage, it gradually spreads throughout the network, eventually reaching a stable state in which the entire network prefers B.
- X-axis (time)
Represents elapsed simulation time in units called ticks.
Shows changes between ticks
0and460. - Y-axis (number of nodes)
The central
0line represents the neutral state, where opinions are evenly divided. The positive direction (upper side) shows the number of nodes supporting choice B. The negative direction (lower side) shows the number of nodes supporting choice A. - Legend (color intensity)
The
dinA(d-X)andB(d-X)refers to decision (Decision) or depth (Depth). The source states that smallerXvalues are darker. This represents the value of the consecutive-success counter (consecutiveSuccesses) or confidence counter (preferenceStrength) in Snowflake/Snowball.- Lighter colors (closer to
d-1) The node has only recently begun supporting the choice and has a low counter value. - Darker colors (closer to
d-15) The node has repeatedly obtained poll results in which the choice was the majority and has a high counter value. This means its support for that choice has become firm.
- Lighter colors (closer to
- Initial state (ticks 0–150)
Immediately after the simulation starts, the network is neutral.
A few nodes supporting choice A (orange) appear, but their number stagnates at approximately
-50nodes. No darker regions (such asA(d-10)) appear, indicating that support forAdid not strengthen. Meanwhile, the number of nodes supporting choice B (blue) begins to increase gradually. At this stage, most of the area is still light blue (B(d-1)), indicating that each node's support has not yet become firm. - Turning point and growing support (ticks 150–300)
Around tick 150, the number of nodes supporting B begins to increase significantly.
This is because the proportion of nodes supporting B in the network exceeded a threshold, making B more likely to form a majority in subsequent random samples.
During this period, darker blue regions (
B(d-5),B(d-10)) begin to appear. This indicates that many nodes are repeatedly obtaining poll results in which B is the majority, increasing their counters. - Toward a final decision (ticks 300–460)
Support for B continues increasing until almost every node in the network (400 nodes) supports B.
The darkest blue region (
B(d-15)) also expands significantly, suggesting that many nodes are approaching or have completed their final decision (finalization). Meanwhile, the number of nodes supporting A decreases to nearly zero.
Example
The conflicting colors and consensus process shown in the demo abstract the transaction and block acceptance processes that occur daily on the actual Avalanche network. Here we apply this explanation to a scenario on the C-Chain, where smart contracts run.
The C-Chain is EVM (Ethereum Virtual Machine) compatible and uses an account-based model. Conflicts primarily arise as different blocks branching from the same parent block (forks).
Simple block fork (two choices)
This is the most basic scenario represented in the demo as blue vs. orange.
Two block proposers (validators), Alice and Bob, produce and propose new blocks (at height N+1) almost simultaneously, both children of the same parent block (height N).
However, the order and contents of the transactions in their respective blocks differ.
- Block A (orange)
The proposer is Alice.
Contains transactions in the order
[Tx1, Tx2]. - Block B (blue)
The proposer is Bob.
Contains transactions in the order
[Tx2, Tx1].
Blocks A and B branch from the same parent block but contain different contents, so they conflict. The network needs to choose exactly one block to extend the canonical chain.
-
Initial state Some nodes in the network receive
Block Afirst and prefer orange, while others receiveBlock Bfirst and become blue. This corresponds to the orange and blue regions coexisting on either side of the zero line on the demo graph's Y-axis. At this point, each node has low counter values. -
Polling and growing support Each validator queries
krandomly selected nodes, asking Which do you prefer,Block AorBlock B? Suppose one poll happens to sample many nodes supportingBlock B(blue), and their number exceedsalpha. The polling node increments its confidence counter (preferenceStrength) forBlock B. This counter does not reset. If the confidence counter forBlock Bexceeds that forBlock A, the node's preference (preference) switches toBlock B.Because the node now prefers
Block BandBlock Bwas again the majority, the consecutive-success counter increments (the blue becomes darker in the demo). This counter resets when the preference changes.Nodes that previously preferred
Block Amay also switch toBlock Bbased on poll results. As this process repeats, the proportion of nodes supportingBlock Bgradually increases. This corresponds to the gradual expansion of the blue region in the demo graph. -
Final decision Eventually, the overwhelming majority of nodes in the network prefer
Block B. When a node's consecutive-success counter forBlock Breaches thresholdβ,Block Bis accepted (Accepted) and reaches finality. At the same time, the conflictingBlock Ais rejected (Rejected).
Complex fork (three or more choices)
The Snowball protocol can handle forks involving three or more choices, not just two.
In addition to Alice and Bob, Carol proposes a new block extending the same parent block (height N).
- Block A (orange)
Alice is the proposer. Contains
[Tx1, Tx2]. - Block B (blue)
Bob is the proposer. Contains
[Tx2, Tx1]. - Block C (green)
Carol is the proposer. Contains only
[Tx3].
These three blocks conflict at the same Block Height.
Representing this scenario in the demo produces a competition between three colors: orange, blue, and green.
-
Initial state The network starts with a mixture of nodes supporting orange, blue, and green.
-
Polling and growing support Each node runs polls using random sampling, just as before. Suppose one poll of
ksamples receives three votes forBlock A, six forBlock B, and one forBlock C(k=10). Ifalpha=5,Block Bis the majority.The polling node increments the confidence counter for
Block B(blue). If the confidence counter forBlock Bexceeds the counters for the other blocks, the node's preference switches toBlock B. If the node prefersBlock BandBlock Bis again the majority, the consecutive-success counter also increments. -
Final decision Repeating this process allows random fluctuations to make one block dominant, even if the three choices are initially closely balanced. Support for that block expands until the network eventually accepts just one block (for example,
Block B) and rejects the remainingBlock AandBlock C. Each node makes this final decision when its consecutive-success counter forBlock Breachesβ.
Thus, Snowman uses the Snowball mechanism to resolve forks that arise on account-based chains such as the C-Chain and determine a single canonical chain.
Parameter summary
The Snowball and Snowman protocols use two kinds of counters and two main parameters to combine long-term, stable decision-making with short-term final decisions (finality).
| Component | Name (avalanchego) | Role | Characteristics |
|---|---|---|---|
| Parameter | Alpha (α) |
Determining poll success | If a choice receives at least α votes from the k samples, the poll is considered successful. |
| Parameter | Beta (β) |
Final decision threshold | Once the consecutive-success counter reaches this value, the choice is finally accepted (Accept). |
| Counter | Confidence counter (preferenceStrength) |
Determining the long-term preference | Records the cumulative number of successful polls (receiving at least α votes) for each choice. |
| Counter | Consecutive-success counter (confidence) |
Short-term final decision | Records the number of consecutive successful polls for the currently preferred choice. |
Consensus proceeds as follows.
- Each poll
The node sends queries to
knodes. It tallies the returned votes and checks whether any choice (for example,X) received at leastαvotes. - Processing when
αis reached If the poll succeeds (Xreceives at leastαvotes), first update the confidence counter. IncrementpreferenceStrength[X]. This counter does not reset. Next, compare the updated confidence counters. IfpreferenceStrength[X]exceeds that of every other choice, set (or maintain) the node's preference (preference) toX. Finally, update the consecutive-success counter. If the current preference matches the successful choiceX, incrementconfidence. If this success causes the preference to switch from another choice toX,confidenceis reset to1. - Processing when
αis not reached If no choice reachesαvotes, the poll is considered unsuccessful. The confidence counter is not updated. The consecutive-success counter is reset to0. - Final decision through
βAs steps 2 and 3 repeat, when the consecutive-success counter for a choice reachesβ, that choice is finally accepted (Accepted) and reaches finality.
Comparison with other consensus mechanisms
PoW vs. Snow
In blockchains, the consensus mechanism that establishes agreement across the entire network is one of the most important factors determining performance, security, and decentralization. Here we compare Nakamoto consensus, which uses proof of work (PoW) in Bitcoin, with Snow consensus, which uses proof of stake (PoS) in Avalanche, and explain their differences.
PoW and PoS are not consensus algorithms
The first important point is that neither PoW nor PoS is itself a consensus algorithm. They are Sybil control mechanisms that prevent Sybil attacks, in which malicious attackers cheaply generate large numbers of identities to take over the network.
- PoW It imposes an economic cost on attacks by requiring physical resources in the form of computing power (hash power).
- PoS It imposes an economic cost on attacks by requiring the network's native tokens (stake) as collateral.
These mechanisms are prerequisites for restricting which nodes can participate in consensus and weighting their influence. Actual consensus is reached through a separate set of rules (the consensus algorithm) combined with these mechanisms.
- Bitcoin (Nakamoto consensus) PoW + longest-chain rule
- Avalanche PoS + Snow protocol family
Consensus process
Bitcoin (PoW + longest-chain rule)
- Block production (mining)
Nodes called miners assemble unconfirmed transactions from the network into blocks.
They then repeatedly perform a large number of computations, varying a value called the
nonce, until the hash of the block meets the network's target. This is PoW. - Block propagation The first miner to find a hash satisfying the condition broadcasts (gossips) the block to the network. Other nodes verify that the block is valid and append it to the end of their chain.
- Conflict resolution If multiple miners discover blocks at almost the same time, the chain temporarily branches (forks). This conflict is resolved using the longest-chain rule, which considers the chain with the greatest accumulated computational work (cumulative PoW) valid. The shorter chain is discarded, and transactions it contained return to an unconfirmed state unless included in the surviving chain.
For more details about PoW, see the following article.
Avalanche (PoS + Snow protocols)
- Proposing a block (or transaction) Validators propose new transactions or blocks to the network.
- Voting through subsampling
Each validator randomly samples
knodes from the other validators, weighted by stake. It then sends queries asking which proposed choice they prefer. - Updating preferences and deciding
If a poll produces a majority of at least
αvotes, the node updates its preference to reflect the majority opinion. Repeating this process accumulates counters according to Snowflake or Snowball logic. When a counter reaches thresholdβ, the choice is accepted (Accept) and reaches finality. Conflicting choices are rejected (Reject).
Comparing characteristics
| Characteristic | Bitcoin (PoW + longest chain) | Avalanche (PoS + Snow) |
|---|---|---|
| Sybil control | Proof of work (PoW) | Proof of stake (PoS) |
| Energy consumption | High. Mining (computation) is continuously required, even without transactions. | Low. Computational load is small. The protocol becomes quiescent when there are no transactions. |
| Conflict resolution | Longest-chain rule (select the chain with the greatest cumulative work) | Repeated voting through Snowball (select the choice supported by the network majority) |
| Finality | Probabilistic and slow. The probability of reversing an accepted block decreases exponentially with time. Six block confirmations (about 60 minutes) are generally regarded as safe. | Probabilistic and fast. Once a transaction is accepted (Accept), it immediately becomes probabilistically extremely difficult to reverse. Finality typically takes one to two seconds. |
| Throughput | Low (about 7 TPS). Limited by block size and the block production interval. | High (thousands of TPS). Per-node communication is O(1), and parallel processing is possible. |
| Leadership | Probabilistic leader (the miner who solves PoW becomes a temporary leader) | Leaderless. All validators participate on equal terms. |
| Participant anonymity | Full anonymity, as characterized by the source. | Participants must be validators and are identified through their stake. |
| Liveness guarantees | If the network partitions, the chain progresses in each partition, but global consensus stalls. | Liveness is guaranteed for virtuous (nonconflicting) transactions. Liveness may intentionally not be guaranteed for rogue (conflicting) transactions. |
Nakamoto consensus solved the groundbreaking problem of distributed agreement in an open, permissionless network by combining the computational cost of PoW with the longest-chain rule. However, this comes at the cost of high energy consumption, low throughput, and slow finality.
In contrast, Snow consensus adopts PoS as its Sybil control mechanism and reaches consensus through the entirely different approach of subsampling. This dramatically improves energy efficiency and achieves fast finality and high throughput while maintaining decentralization through a leaderless structure. However, the design accepts the trade-off that safety is probabilistic rather than deterministic and that liveness is intentionally not guaranteed for malicious transactions. These differences in design philosophy produce fundamental differences in their performance and characteristics.
AvalancheGo processing flow
The following AvalancheGo GitHub documentation summarizes how a single blockchain operates on the Avalanche network, including its main components and message flow.
Overview
graph LR
A[P2P] --> B[Chain Router]
B --> C[Handler]
C --> D[Consensus Engine]
D --> E[Consensus Logic]
D --> F[VM]
D --> G[DB]
D --> I[Sender]
F --> G
I --> A
I --> B
The diagram above shows how messages from the external peer-to-peer network (P2P) pass through the Chain Router, Handler, and Consensus Engine, where they are processed. The Consensus Engine works with Consensus Logic (Snowball/Snowman algorithms), the VM (Virtual Machine), and the DB (database) to verify and accept blocks. When new messages need to be sent, it sends them back to the external network via the Sender.
Component details
Avalanche's Primary Network consists of three blockchains: the X-Chain, C-Chain, and P-Chain. All three use the Snowman consensus protocol.
Before the Cortina upgrade, the X-Chain used DAG-based Avalanche Consensus.
- X-Chain Asset management
- C-Chain Creation and execution of smart contracts
- P-Chain Validator coordination and staking
These chains are verified by a set of validators. The Primary Network is a special L1 that validates these three chains. There are two kinds of nodes: validators, which participate in consensus and earn rewards, and non-validators, which serve as API nodes.
Each blockchain consists of multiple components, including a VM, database, consensus engine, Sender, and Handler.
P2P (Peer-to-Peer)
This is the lowest layer, responsible for communication between nodes.
- Outbound messages (
OutboundMsgBuilder) A message builder used when a node sends messages to other nodes. Messages are classified into the following categories.- Handshake Version verification for nodes joining the network.
- State Sync Messages for efficiently synchronizing new nodes with the latest state.
- Bootstrapping Messages for new nodes to download historical blocks and construct the chain locally.
- Consensus Query and voting messages for consensus after a node has caught up with the latest state.
- App VM-level application-specific messages. A typical example is mempool gossiping, which propagates transactions through the network.
- Network layer (
Network) Provides two main functions:Send(sending to specific nodes) andGossip(sending to an unspecified set of nodes). Establishes and maintains connections between nodes over TLS-encrypted channels.
Router (ChainRouter)
ChainRouter directs all messages arriving from the network.
It checks the ChainID included in each message, determines whether it is addressed to the X-Chain, C-Chain, or another chain, and forwards it to the corresponding blockchain's Handler.
Besides routing, timeout management is another important responsibility. When the Sender sends a message requiring a response from another node (such as a query), it requests that ChainRouter set a timeout for this request. If a response reaches the router within the specified period, the router cancels the timeout. If the time expires without a response, the timeout fires and the router sends the Handler a failure notification indicating no response was received. Thanks to this mechanism, the Handler need not concern itself with whether individual peers respond and always receives a success or failure outcome. It can also adjust settings according to network conditions, such as automatically increasing timeouts when network communication slows down.
Handler (Handler)
The Handler organizes and temporarily holds network messages passed from ChainRouter so that the consensus engine can process them easily.
It uses two different queues depending on the message type. Messages such as State Sync, Bootstrapping, and Consensus, whose processing order matters and which must wait for each operation to finish, are placed in the synchronous queue (Sync Queue). Meanwhile, messages that can be handled asynchronously without waiting for other operations, such as App messages (including transaction gossip), are placed in the asynchronous queue (Async Queue).
The Handler removes messages from these queues in sequence, analyzes their contents, and invokes the appropriate processing methods on the consensus engine.
Sender
The Sender receives instructions from the consensus engine, constructs outbound messages for other nodes, and sends them to the network layer.
The Sender wraps network-layer functionality, but its most important additional feature is timeout registration. Whenever it sends a message requiring a response, such as a query, it requests ChainRouter to set a timeout. If the peer does not respond, it is treated as a failure. A node that repeatedly fails to respond may receive a penalty that temporarily suspends communication with it (addition to the benchlist).
Consensus Engine
The Consensus Engine is the central component responsible for blockchain decision-making.
When producing a new block, it requests the VM to build the block and instructs the Sender to poll the network based on the Snow protocols (Snowman or Avalanche) to decide whether to accept it. After receiving votes from other nodes, it makes the final decision to accept (Accept) or reject (Reject) the block.
Blockchain Creation
The Manager is responsible for initializing and launching all blockchains at node startup. It first starts the Primary Network's P-Chain, then the C-Chain, X-Chain, and chains belonging to custom subnets.
If the creation of a new blockchain on the P-Chain is agreed upon while the node is running, the Manager detects the transaction, dynamically initializes the new chain's components (Handler, Engine, and so on), and starts its launch process.
Frosty
https://arxiv.org/pdf/2404.14250
This paper tackles two challenges for the Snowman consensus protocol used by Avalanche blockchains: rigorous safety proofs and strong liveness guarantees.
Background
Snowman is highly scalable because each node only needs a constant amount of communication, but its theoretical foundations faced two major challenges.
- Difficulty of proving safety Because Snowman relies on probabilistic sampling, mathematically proving its safety has been considered very difficult. The original Avalanche whitepaper analyzed only the simpler Snowball protocol.
- Vulnerability to liveness attacks
If the number of Byzantine nodes in the network exceeds a certain bound (
O(√n)), the network may be vulnerable to liveness attacks that intentionally delay consensus. This occurs when Byzantine nodes continually prevent honest nodes from forming a majority.
The paper proposes specific approaches to solving these two problems in an environment with f < n/5 Byzantine nodes and proves their effectiveness.
f < n/5 means the number f of malicious Byzantine nodes is less than one-fifth (20%) of the total number n of validators in the network.
Proposal
Safety proof using Snowflake+
To address the challenge of proving safety, the paper first proposes Snowflake+, an improved version of the Snowflake protocol.
Differences between Snowflake and Snowflake+
Original Snowflake used the same threshold α both for switching a node's preference and for finalizing a decision.
Snowflake+ separates it into two distinct thresholds.
α1A relatively low threshold (for example, slightly above a simple majority). Used for a node to switch its preference (preference).α2A relatively high threshold (for example, 80% or greater support). Used for a node to increment itsconfidencecounter for a final decision.
Separating these thresholds makes the protocol's state transitions clearer and facilitates mathematical analysis.
The paper analyzes the behavior of Snowflake+ in detail using probability theory (particularly the binomial distribution) and presents the first rigorous proof that Snowman is probabilistically safe in a synchronous network (an idealized network with bounded message delays).
Frosty liveness module
To address the vulnerability to liveness attacks, a module called Frosty is integrated into Snowman.
Frosty's core mechanism
Frosty takes a hybrid approach, using different protocols during normal operation and during attacks. This switching is managed in units called epochs.
- Even-numbered epochs (normal operation) The network operates using Snowman, which is fast and communication-efficient.
- Odd-numbered epochs (when an attack is detected)
If nodes cannot finalize blocks for a certain period (
γrounds), they determine that a liveness attack is occurring. They then exchange certificates called Epoch Certificates (ECs) and switch to an odd-numbered epoch. During odd-numbered epochs, the network temporarily falls back to a quorum-based protocol (Tendermint is used as an example in the paper). Although this protocol requires more communication, it can mathematically guarantee block acceptance under its assumptions as long asf < n/3Byzantine nodes are present. After reliably accepting a specified number of blocks, the network returns to Snowman in an even-numbered epoch.
See the following article for more information about Tendermint.
Ensuring safety across epochs
A mechanism called a Starting Certificate (SC) is introduced to transition safely between the different protocols.
- Broadcasting
prefWhen transitioning to an odd-numbered epoch, each node broadcasts its currentpref(its most preferred chain). - Forming a Starting Certificate
After collecting
prefvalues from at least two-thirds of all nodes, a Starting Certificate (SC) is formed. - Selecting a safe chain (
Pref*(C)) From theprefvalues included in the SC, computePref*(C)as the longest common chain supported by at least half. - Starting the quorum-based protocol
The protocol executed in the odd-numbered epoch is required to start from this
Pref*(C).
This prevents the odd-numbered epoch from producing a fork that conflicts with previously accepted blocks, ensuring safety across epochs.
Reducing latency with Error-driven Snowflake+
The paper also proposes an optimization called Error-driven Snowflake+.
It monitors multiple {α2, β} pairs simultaneously.
- Pair with high
α2and lowβWhen the network is healthy (few Byzantine nodes), reaching a highα2threshold (for example, 90% support) is easy. In return, setting the required number of consecutive successesβlow (for example,β=3) allows blocks to be accepted with very low latency. - Pair with low
α2and highβEven when network conditions are poor, reaching a lowα2threshold (for example, 70% support) may be possible. In return,βis set high (for example,β=12) to ensure safety.
This mechanism enables the network to reach consensus at a speed suited to its conditions.
Conclusion
The paper is significant because it provides the first rigorous safety proof for Snowman while also achieving strong liveness guarantees by integrating the Frosty module.
- Safety
By introducing
Snowflake+, it proves Snowman's safety in a synchronous network withf < n/5Byzantine nodes. - Liveness
The Frosty module guarantees that the chain continues progressing even when subjected to a liveness attack by
f < n/3Byzantine nodes, under the stated protocol assumptions.
This greatly strengthens Snowman's theoretical foundations and demonstrates that it is a robust consensus protocol capable of withstanding large-scale attacks while maintaining speed and scalability. This research is an important result that laid the foundations for subsequent extensions to partially synchronous networks, such as "Snowman for partial synchrony" and "Frosty for partial synchrony."
Snowman⋄
https://arxiv.org/pdf/2501.15904
This paper proposes Snowman⋄ (Snowman Diamond), a concrete modification intended to let the Snowman consensus protocol operate safely in more realistic network environments.
Challenges
Earlier analyses of Snowman's safety relied on two assumptions.
- Synchronous network assumption Previous research assumed a synchronous network in which message delays always had a predetermined upper bound Δ (delta). This is an idealized model that simplifies protocol design by allowing strict timeouts, but it cannot always be guaranteed in real internet environments.
- Lockstep execution assumption It assumed unrealistic synchronization in which all honest nodes execute sampling rounds at the same time.
On the real internet, message delays are unpredictable (asynchrony), and each node proceeds at its own pace. In such an environment, malicious nodes could potentially threaten safety and disrupt consensus by manipulating message delivery timing to repeatedly overturn honest nodes' opinions.
Proposed approach
The paper proposes Snowman⋄ to overcome these challenges. Its core logic is Snowflake⋄, a refinement of Snowflake that maintains safety even during asynchronous periods or non-lockstep execution by introducing a locking mechanism.
Two thresholds and the locking mechanism
Snowflake⋄ combines flexibility and safety by using two kinds of thresholds according to confidence in the decision.
α1(AlphaPreference): A relatively low threshold (for example, slightly above a simple majority). Defines the vote count required for a node to switch its preference (preference).α2(AlphaConfidence): A relatively high threshold (for example, 80% or greater support). Defines the vote count required for a node to lock on its preference and strengthen that decision.
The locking mechanism uses these two thresholds.
- Locking condition
If a node receives at least the higher threshold
α2of votes for its current preference (for example, red), it locks on red. This signifies that network support for that choice has become strong. - Unlocking condition
A node locked on red must meet a stricter condition to switch its preference to the conflicting choice (blue).
It is not enough for blue merely to obtain at least the lower threshold
α1of votes. To unlock, blue must receive at least the higher thresholdα2of votes, together with evidence that the voting nodes have been locked on blue for a specified period (at least2Δin the paper).
With this mechanism, a locked state cannot easily be overturned unless comparably strong and sustained support forms on the opposing side. This greatly improves resistance to attacks involving adversarial message scheduling.
Safety proof
The paper mathematically proves that this locking mechanism preserves safety even in partially synchronous networks.
- Formation of a stable core Once at least 75% of honest nodes lock on the same choice (for example, red), they form a stable core that is difficult to disrupt.
- Difficulty of leaving the core
In this state, for an honest node in the core to unlock and switch to blue, it must obtain at least
α2votes from nodes that have been locked on blue for at least2Δ. However, because at least 75% of honest nodes are locked on red, the probability of forming such a majority sample becomes astronomically small (calculated as< 1.18 × 10^-20in the paper).
- Eventual consensus As a result, the majority's locked state, once formed, is probabilistically guaranteed not to be overturned, and the entire network eventually converges on that choice under the stated assumptions. This proof also holds during the asynchronous period before GST (Global Stabilization Time), establishing safety under partial synchrony.
Extending Snowflake⋄ to Snowman⋄
The paper first proves the locking mechanism for Snowflake⋄, a simple protocol for reaching agreement between two choices (0 or 1).
It then applies this provably safe mechanism to the more complex setting of blockchains, producing Snowman⋄.
Snowman⋄ solves the problem of choosing a single block from many alternatives by decomposing it into numerous binary decision problems. This technique is called binary decomposition (Binary Decomposition).
Specifically, it works as follows.
- Using block hashes Each block handled by Snowman⋄ has a unique hash value (a 256-bit number).
- Resolving conflicts bit by bit
When multiple blocks conflict, Snowman⋄ compares their hashes one bit at a time from the beginning.
- First bit If the first bit of every conflicting block hash is the same, that bit is considered settled and the protocol proceeds to the next bit.
- First conflicting bit
Suppose the
ith bit ofBlock A's hash is0, while theith bit ofBlock B's hash is1. This is the first point at which opinions differ. - Applying Snowflake⋄
For this
ith bit, run a provably safe Snowflake⋄ instance as a binary decision problem of whether to accept0or1.
- Selecting a block By repeating this process, a single hash value is eventually selected. The block with that hash becomes the block the network should accept.
In other words, Snowman⋄ ensures overall safety by decomposing the complex problem of blockchain consensus into many simple binary decision problems solvable using the safe Snowflake⋄ protocol. The change from Snowflake⋄ is the introduction of this binary decomposition mechanism; the locking mechanism itself is retained unchanged.
Frosty for partial synchrony
https://arxiv.org/pdf/2506.09823
This paper proposes a concrete approach for integrating a new version of the Frosty liveness module, capable of operating under partial synchrony, into the Snowman⋄ consensus protocol. This allows the chain to continue accepting blocks safely without stalling, even under large-scale Byzantine attacks within the stated assumptions.
Challenges
In earlier research, Frosty guaranteed liveness by switching from Snowman to a quorum-based protocol such as Tendermint when a liveness attack was detected. However, this switching process assumed a synchronous network in which message delays always had an upper bound.
In a partially synchronous network, there are asynchronous periods in which messages may be delayed indefinitely, leading to the following problems.
- Safety problems If an epoch transition occurs while the network is asynchronous, nodes may disagree about the last accepted block. Starting a quorum-based protocol in this state risks accepting a different fork that conflicts with a block previously accepted by an honest node.
- Liveness problems If the asynchronous period is prolonged, nodes may incorrectly conclude that they are under a liveness attack and switch unnecessarily and frequently to a slower quorum-based protocol, degrading performance.
Proposed approach
To solve these problems, the paper adapts Frosty's mechanism for partially synchronous networks. Its core logic is a new handshake protocol that mathematically guarantees safety across epochs.
Core mechanism
Frosty's most important feature is a mechanism for transitioning safely from Snowman⋄ in normal operation (even-numbered epochs) to Simplex during an attack (odd-numbered epochs). The key to this safe transition is the Starting Certificate (SC).
Simply switching to Simplex risks disregarding blocks that were close to being accepted by Snowman⋄ and creating a new fork from an older block. To prevent this, the entire network must agree during the transition on which chain Simplex should inherit and use as its starting point.
Safe transition using the Starting Certificate (SC)
- Expressing a preference (
Starting Vote) Each node that determines that chain progress has stalled due to a liveness attack signs a Starting Vote, declaring I currently consider this chain (mypref) correct, and sends it to the network. - Collecting votes and creating a certificate (
Starting Certificate) Each node collects Starting Votes from other nodes. Once votes have been gathered from the high threshold of at least four-fifths of all validators, the node combines them into a Starting Certificate (SC). This certifies that the overwhelming majority of the network expressed their preferred chains at the time of transition. - Identifying the chain to inherit (
Pref(C)) The node creating the SC identifies the longest common chain supported by at least half of the collectedprefvalues (the chains preferred by the individual nodes). This is calledPref(C). The safety of Snowman⋄ guarantees that previously accepted blocks are included inPref(C). - Starting Simplex safely
Finally, the Simplex protocol beginning in the odd-numbered epoch is required to use
Pref(C)as its starting block (base point). This prevents Simplex from producing a chain that conflicts with past decisions, completing the safe transition.
Simplex protocol
Simplex is a simple quorum-based Byzantine fault-tolerant (BFT) consensus protocol. Its simplicity makes it suitable as a fallback mechanism to guarantee liveness in more complex protocols such as Frosty.
Node membership and quorums
The protocol assumes n static nodes, of which f are faulty or malicious (Byzantine), with n = 3f + 1.
The quorum size is defined as 2f + 1 so that any two quorums share at least one honest node.
This prevents the network from becoming completely divided between conflicting opinions.
Protocol flow
Simplex progresses in units called rounds, each of which has a single deterministically selected leader.
-
Block proposal The leader of round
icalls theBuildBlockmethod of theBlockBuilderinterface to build a new blockbfrom the VM. This block containsProtocolMetadatarepresenting the state of the consensus protocol.gotype BlockBuilder interface { // BuildBlock blocks until some transactions are available to be batched into a block... BuildBlock(ctx Context, metadata ProtocolMetadata) (Block, bool) // ... } type ProtocolMetadata struct { Version uint8 Epoch uint64 Round uint64 Seq uint64 // a.k.a. block height Prev []byte // digest of the previous block }The leader broadcasts block
bto all other nodes. -
Stage 1 voting (Vote) Each node verifies the first block
bit receives from the leader in roundi. If valid, it creates a voting message<vote, i, H(b)>containing the block's hashH(b), signs it, and broadcasts it. -
Notarization Each node collects voting messages from other nodes.
If it collects signed votes for the same block
bfrom a quorum (at least2f + 1) before timerTexpires, it combines them to form a Notarization.What is notarization? A notarization is cryptographic proof that a block has been confirmed by a majority (quorum) of the network. Once a block is notarized, honest nodes no longer vote for other blocks in that round, improving safety. It is an intermediate consensus step on the path toward final acceptance (Finalization).
This notarization proves that block
bwas supported by a majority of the network. TheNotarizationis recorded in a Write-Ahead Log (WAL) in preparation for crash recovery.What is a Write-Ahead Log (WAL)? A WAL is a mechanism for ensuring system fault tolerance. Before performing an important action that changes its state (in this case, recognizing block b as notarized), the node persistently writes a log of that operation to disk. Consequently, even if the node unexpectedly crashes, it can read the WAL when restarting, accurately restore its pre-crash state, and resume the protocol safely.
If timer
Texpires without any block receiving enough votes, the node votes for an empty block (Empty Block,⊥). It then collects a quorum of votes for the empty block and records an Empty Notarization in the WAL. -
Stage 2 voting (Finalization) A node receiving a notarization for block
bcreates a finalization message<finalize, i, H(b)>, signs it, and broadcasts it to give the block final approval. -
Block acceptance (Finalize) A node collecting finalization messages for block
bfrom a quorum (at least2f + 1) combines them into a Finalization Certificate (FinalizationCertificate). With this certificate, blockbis fully accepted, persisted through theStorageinterface, and passed to the application (VM).
type Storage interface {
// ...
// Index persists the given block to stable storage and associates it with the given sequence.
Index(seq uint64, block Block, certificate FinalizationCertificate)
}Liveness guarantees and resource efficiency
- Timeouts and empty blocks If a leader is faulty or malicious and does not propose a block, or votes fail to reach a quorum because of a network partition, each node times out and votes for an empty block. This allows rounds to progress and leadership to pass to the next leader. This mechanism guarantees liveness for the protocol as a whole under its network assumptions.
- Avoiding unnecessary block production
Rather than constantly producing blocks, the protocol is optimized so that a leader proposes a block only when the VM (application layer) notifies the consensus layer through
BlockBuilder'sWaitForPendingBlockthat pending transactions exist. This saves resources by preventing the continuous production of unnecessary empty blocks during quiet periods on the network.
Dynamic membership changes (reconfiguration)
Simplex supports validator-set changes (reconfiguration) during protocol execution by introducing the concept of epochs.
- Epochs
Each round is associated with an epoch number.
When a block whose
Blockinterface methodEndsEpoch()returnstrueis accepted, its sequence number (block height) becomes the new epoch number, and a new epoch begins. - Parallel instances When an epoch changes, nodes retain the Simplex instance for the old epoch for some time, continuing to respond to messages from other nodes that have not yet caught up. At the same time, they launch a new Simplex instance for the new epoch.
- Synchronization Lagging nodes can obtain a series of blocks and certificates that triggered epoch changes, called an Epoch Change Series (ECS), from other nodes, safely verify the latest validator set, and catch up with the current epoch.
This design allows Simplex to operate safely even in environments where validators change dynamically, as in real blockchains, rather than assuming static membership.
Why is this mechanism safe?
The safety of this epoch transition process is based on the properties of Snowman⋄ proved in "Snowman for partial synchrony."
In Snowman⋄, once an honest node accepts a block B, it is probabilistically guaranteed that subsequently (until transition to the next odd-numbered epoch), at least three-fourths of honest nodes continue to retain a chain containing B as their pref.
Meanwhile, forming a Starting Certificate requires votes from four-fifths of all nodes.
Because fewer than one-fifth of nodes are Byzantine, the certificate contains votes from at least 3/5 of all nodes that are honest.
The source emphasizes that adding 3/4 (the proportion of honest nodes supporting block B) and 3/5 (the minimum proportion of honest nodes participating in the SC) exceeds 1 (3/4 + 3/5 = 27/20 > 1).
This is presented as showing that there must be an overlap between honest nodes that voted in the SC and honest nodes supporting block B.
The source argues that, because of this overlap, a majority of votes included in the SC necessarily support a chain containing the previously accepted block B.
Therefore, the longest common chain supported by at least half, calculated as Pref(C), is guaranteed to include all previously accepted blocks, preserving safety across epochs.
Other improvements
- Epoch Certificate (EC)
A certificate for proposing an epoch change when nodes determine that they are stuck.
It is formed by collecting
stuckmessages from at least one-fifth of all nodes. - Additional decision conditions
To make epoch-change decisions progress smoothly, a new finality condition is added that also uses information about
final(the last accepted block) returned in queries.
Conclusion
The paper proposes an approach for integrating a concrete mechanism (Frosty) that guarantees liveness on top of the theory of safety under partial synchrony established in "Snowman for partial synchrony."
This makes Snowman Consensus a more robust protocol.
- Normal operation (even-numbered epochs) Operates using fast, low-cost Snowman⋄.
- During attacks (odd-numbered epochs) Preserves safety while switching to a quorum-based protocol such as Simplex to guarantee liveness.
- Network environment Performs the above operations in a partially synchronous network, closer to the real internet environment.
Concrete example of Frosty in action
Let's deepen our understanding of how Frosty recovers a chain from a liveness attack through an example.
Assumptions
- Network
Total number of validators:
n = 100 - Byzantine nodes
f = 19(satisfying the paper's assumptionf < n/5) - Honest nodes
81 - Protocols
- Even-numbered epochs Snowman⋄
- Odd-numbered epochs Simplex
Step 1: A liveness attack occurs (even-numbered epoch)
The network is currently in epoch 0, operating with the fast Snowman⋄ protocol.
The chain has been accepting blocks smoothly through block Blk_100 at Block Height 100.
However, 19 Byzantine nodes now coordinate to launch a liveness attack.
- Attack
At Block Height 101, honest nodes propose two conflicting forks,
Blk_AandBlk_B. To divide honest nodes, the Byzantine nodes respond withBlk_Ato some nodes andBlk_Bto others. - Result
Honest nodes cannot collect
αvotes for either block, and theirconfidencecounters keep resetting. Consequently, the network enters a stalled state in which no new blocks are accepted.
Step 2: Initiating an epoch transition
If honest nodes cannot accept a new block for a specified period (γ rounds), they determine that they are under a liveness attack.
- Detecting the stall
Honest node
V1notices that its last accepted block has remainedBlk_100forγrounds. - Sending a
stuckmessageV1signs the message(stuck, epoch=0, final=Blk_100), declaring I am stuck atBlk_100, and broadcasts it to all other nodes. - Forming an Epoch Certificate (EC)
Other honest nodes likewise detect the stall and send
stuckmessages. Once a node collects at leastn/5 = 20stuckmessages from distinct nodes, an Epoch Certificate (EC) is formed. This formally triggers the transition to epoch 1.
Step 3: Identifying a safe chain (handshake for epoch 1)
Each node entering epoch 1 first forms a Starting Certificate (SC) in order to start the Simplex protocol safely.
- Broadcasting
prefDue to the attack, many honest nodes provisionally prefer (pref) eitherBlk_AorBlk_B, but neither has yet been accepted (final). Each node signs and broadcasts a message such as(start, epoch=1, pref=...Blk_A)containing its currentpref(for example,V1prefers the chain ending atBlk_A). - Forming a Starting Certificate and computing
Pref(C)A node collects at least4n/5 = 80startmessages and forms a Starting Certificate (SC). This SC includes votes supporting bothBlk_AandBlk_B, but the longest chain they share isBlk_100, before the attack began. In this example, the longest common chain supported by at least half of the votes included in the SC,Pref(C), is therefore the chain ending atBlk_100.
Step 4: Block acceptance through Simplex (odd-numbered epoch)
Preparations are now complete for the Simplex protocol executed in epoch 1.
- Starting Simplex
The Simplex protocol starts from
Pref(C), that is,Blk_100. - Block proposal by the leader
According to the Simplex rules, a leader (for example,
V2) is deterministically selected to propose a block at Block Height 101.V2proposes a new blockBlk_Sas a child ofBlk_100. This block contains unconfirmed transactions that accumulated during the stalled period. - Quorum voting and acceptance
Because Simplex is quorum-based, Byzantine nodes cannot prevent block acceptance under the condition
f < n/5and the protocol's network assumptions. Honest nodes vote forBlk_S, and the source describesBlk_Sbeing accepted when votes from at least four-fifths of nodes are collected. This process repeats until a prescribed number of blocks (for example,μblocks) have been accepted.
Step 5: Returning to normal operation
After Simplex advances the chain and restores liveness, the network returns to the fast Snowman⋄ protocol.
- Transition to epoch 2 Once the prescribed number of blocks has been accepted, the network automatically moves to epoch 2 and resumes operation using Snowman⋄.
In this way, Frosty detects a liveness attack, temporarily switches to a robust protocol to resolve the chain's stall, and returns to normal operation while preserving safety.
Countermeasures against malicious leaders
If a Simplex leader is malicious, it may attempt the following disruptive actions.
- Not proposing blocks Deliberately refrains from proposing a block when it is the leader's turn, attempting to delay chain progress.
- Proposing invalid blocks Proposes a block containing invalid transactions or conflicting with previously accepted blocks.
Simplex addresses these attacks as follows.
Countermeasure against withholding proposals (timeout)
Each round (view) has a time limit for the leader to propose a block. If the leader fails to propose a valid block within this period, other validators determine that the round has timed out. After the timeout, a dummy block (empty block) is accepted in that round, as described in the source, and the protocol proceeds to the next round. Leadership then passes to the next validator.
This prevents one malicious leader from indefinitely halting the chain. The protocol continues progressing (with empty rounds in between), and when an honest leader's turn eventually arrives, a block containing valid transactions can be accepted.
Countermeasure against invalid proposals (rejection through voting)
Even if a malicious leader proposes an invalid block, honest validators verify it and determine that it is invalid. Honest validators do not vote for invalid blocks. Consequently, the invalid block cannot gather the quorum (at least four-fifths) of votes required for acceptance, as described in this example, and is not accepted. In this case, too, the timeout mechanism eventually takes effect, the round fails (or an empty block is accepted, as described in the source), and leadership passes to the next leader.
References
- https://build.avax.network/docs/quick-start/avalanche-consensus
- https://cdn.prod.website-files.com/5d80307810123f5ffbb34d6e/6009805681b416f34dcae012_Avalanche%20Consensus%20Whitepaper.pdf
- https://github.com/ava-labs/avalanchego
- https://tedyin.com/archive/snow-bft-demo
- https://github.com/ava-labs/avalanchego/blob/master/snow/README.md
- https://crypto.unibe.ch/talks/20250605-consensus+avalanche-web.pdf
- https://github.com/ava-labs/avalanchego/blob/master/vms/proposervm/README.md
- https://gyuho.dev/consensus-systems/nakamoto-bitcoin-vs-snow-avalanche/
Conclusion
This article covered Avalanche's consensus mechanisms.
I write about various other topics as well, so feel free to read my other articles.





