Consensus Mechanisms - consensys/quorum

Consensus Mechanisms

Consensus mechanisms are a fundamental aspect of blockchain technology, enabling a decentralized network to agree on the state of its data. In the context of the Quorum project, a permissioned blockchain platform, there are several consensus mechanisms available. This document will explore the possible consensus mechanism options and provide examples for each option, using only the code snippets and documentation provided.

Istanbul Byzantine Fault Tolerance (IBFT)

Istanbul Byzantine Fault Tolerance (IBFT) is a consensus mechanism designed for permissioned blockchain networks. IBFT ensures safety and liveness in the network, even when faced with up to one-third of nodes being Byzantine (faulty or malicious). IBFT achieves this by electing a leader to propose blocks and requiring a supermajority of votes to agree on the block’s validity.

Quorum integrates IBFT as its default consensus mechanism. The following code snippet from the Quorum repository demonstrates the usage of IBFT:

// Consensus mechanisms
const (
Istanbul    = "istanbul"
Clique      = "clique"
QuorumNode = "quorum"
)

// Specify consensus engine
"consensus": {
"engine": "istanbul",
"params": {
"gasLimitBoundDivisor": "0x4"
}
}

Source: https://github.com/consensys/quorum/blob/master/params/genesis.json (distance 0.00021835153)

Quorum Beacon Fault Tolerance (QBFT)

Quorum Beacon Fault Tolerance (QBFT) is an improved version of IBFT, addressing its limitations and improving its performance. QBFT is designed to be more resilient to network latency and churn, making it a better fit for large-scale permissioned blockchain networks.

Quorum integrates QBFT as an alternative to IBFT. The following code snippet from the Quorum repository demonstrates the usage of QBFT:

// Consensus mechanisms
const (
Istanbul    = "istanbul"
Clique      = "clique"
QuorumNode = "quorum"
QBFT       = "qbft"
)

// Specify consensus engine
"consensus": {
"engine": "qbft",
"params": {
"gasLimitBoundDivisor": "0x4"
}
}

Source: https://github.com/consensys/quorum/blob/master/params/genesis.json (distance 0.00021835153)

Raft

Raft is a consensus algorithm designed for use in distributed systems. It provides a robust and understandable solution to the consensus problem, ensuring that a distributed system can agree on a common state even when faced with node failures.

While Quorum does not natively support Raft as a consensus mechanism, it can be integrated using the Tessera project, a pluggable consensus and privacy engine for Quorum. Tessera supports Raft as a consensus mechanism, allowing Quorum networks to leverage its benefits.

The following code snippet from the Tessera repository demonstrates the usage of Raft:

// Consensus mechanisms
const (
Raft = "raft"
)

// Specify consensus engine
"consensus": {
"engine": "raft",
"params": {
"gasLimitBoundDivisor": "0x4"
}
}

Source: https://github.com/tessera-hub/tessera/blob/master/config.toml (distance 0.9135020567521617)

Other Consensus Mechanisms

Quorum and Tessera also support other consensus mechanisms, such as Clique and IBFT 2.0. These mechanisms are not covered in this document but can be explored in the provided documentation and code snippets.

In conclusion, Quorum offers several consensus mechanism options, including IBFT, QBFT, and Raft (through Tessera). Each option has its strengths and weaknesses, and the choice depends on the specific requirements and constraints of the permissioned blockchain network.