Skip to main content

Block Production and Finality

Zenchain utilizes a hybrid consensus model combining two distinct mechanisms: RAGE (Random Assignment for Genesis Extension) for block production and GUARDIAN (GHOST-based Unified Ancestor Recursive Determination and Integrity Agreement Node) for finality. This approach leverages the strengths of both probabilistic and provable finality to ensure rapid block production and secure, irreversible consensus.

Block time is currently set to 6 seconds and block finality is achieved in about 30 seconds.

Hybrid Consensus

The hybrid consensus model on Zenchain splits the responsibilities of block production and finality to maximize both performance and security:

  • Probabilistic Finality: Achieved through RAGE, which allows for continuous block production, ensuring that the blockchain remains active and capable of processing transactions without stalling.
  • Provable Finality: Provided by GUARDIAN, which finalizes blocks through a voting process, guaranteeing that once a block is finalized, it is permanently part of the blockchain and cannot be reverted.

This dual mechanism allows Zenchain to produce blocks quickly while maintaining a secure and reliable agreement on the canonical chain.

Block Production: RAGE

RAGE is the block production mechanism that operates among validator nodes to determine the authors of new blocks:

  • Epochs and Slots: RAGE operates in sequential phases called epochs, each divided into a series of slots. At the beginning of each epoch, a randomness-based lottery determines which validators are eligible to produce blocks for each slot.
  • Block Production Lottery: Validators participate in a lottery for every slot to decide if they are the block producer candidate. Slots are approximately 6 seconds long, and due to the randomized selection, some slots may have multiple block producer candidates, while others may have none.
  • Multiple Validators per Slot: When multiple validators are eligible for the same slot, all produce a block and broadcast it to the network. The validator whose block propagates through the network first is typically accepted, depending on network latency and topology.
  • No Validators in Slot: If no validators qualify for block production in a slot, a secondary, round-robin selection mechanism ensures a block is still produced, preventing gaps in the blockchain.

Finality Gadget: GUARDIAN

GUARDIAN is Zenchain's finality gadget, running in parallel with RAGE to finalize blocks:

  • Voting Rounds: Validators participate in rounds of voting to finalize blocks. The process continues until over two-thirds of validators attest to a chain containing a particular block, finalizing all preceding blocks simultaneously.
  • Chain Agreement: Unlike block-level consensus, GUARDIAN finalizes chains, allowing rapid agreement on the state of the blockchain even after network disruptions.
  • Security and Fault Tolerance: GUARDIAN operates under a partially synchronous network model, achieving finality as long as two-thirds of validators are honest and can tolerate up to one-fifth Byzantine nodes in an asynchronous setting.

Fork Choice and Integration

The integration of RAGE and GUARDIAN creates a clear fork choice rule for Zenchain:

  • Fork Choice Rule: RAGE builds on the chain that GUARDIAN has finalized, ensuring that any forks created after the finalized head follow the chain with the most primary blocks.
  • Unified Approach: This strategy prevents the network from unknowingly following the wrong fork and avoids the stalling that can occur in purely provable finality systems, balancing rapid transaction processing with robust security guarantees.