Diamante Consensus Protocol (DCP)

Consensus is hugely important in a decentralized payment system. It distributes the monitoring and approval of transactions across many individual nodes (computers) instead of relying on one closed, central system. Nodes are run by organizations or individuals, and the goal is for all nodes to update the ledger in the same way, ensuring each ledger reaches the same state. Consensus is vital for the security of the blockchain, allowing nodes to agree on something safely and preventing double-spend attacks.

The Diamante network reaches consensus using the Diamante Consensus Protocol (DCP), which is a construction of the Federated Byzantine Agreement (FBA). FBA differs from other well-known consensus mechanisms like Proof of Work (which relies on a node’s computational power) and Proof of Stake (which relies on a node’s staking power) by instead relying on the agreement of trusted nodes.

In DCP, each participating Diamante Core node (also called a validator or validator node) decides what set of other nodes they want to trust. The flexibility of user-defined trust allows for open network membership (meaning anyone can become a Core node) and decentralized control (meaning no central authority dictates whose vote is required for consensus).

There are no monetary rewards for being a validator on the Diamante network. Instead, users are encouraged to become a validator because they are then contributing to the security and resiliency of the network, which benefits the products and services built on Diamante.

There are three desired properties of consensus mechanisms: fault tolerance, safety, and liveness.

  • Fault tolerance: The system can continue operating despite node failures or malfunctions.
  • Safety: No two nodes ever agree on different values, guarantees nodes will produce the same block.
  • Liveness: A node can output a value without the participation of any misbehaving nodes.

Consensus mechanisms can typically only prioritize two out of three of these properties. DCP prioritizes fault tolerance and safety over li

The Diamante Consensus Protocol (DCP) is the cornerstone of the Diamante blockchain network, ensuring reliable, secure, and decentralized consensus among participating nodes. Consensus is fundamental to any decentralized system, as it replaces the centralized authority with a distributed network of nodes that collectively agree on the state of the ledger. This consensus mechanism is vital for preventing double-spend attacks, maintaining the integrity of transactions, and ensuring trustless operation across the network

Unlike traditional consensus mechanisms like Proof of Work (PoW), which rely on computational power, or Proof of Stake (PoS), which depends on the staking of assets, DCP leverages the Federated Byzantine Agreement (FBA). This approach emphasizes trust relationships between nodes, allowing them to independently select their trusted peers while still achieving global consensus. The result is a system that is energy-efficient, scalable, and resistant to centralization.

The uniqueness of DCP lies in its flexibility and decentralization. Nodes, also referred to as validators, are operated by individuals or organizations and are free to choose their quorum sets-groups of other nodes they trust to reach agreement. This open membership model ensures that no single entity can dominate the consensus process, fostering a truly decentralized ecosystem.

DCP prioritizes two key properties of consensus mechanisms—fault tolerance and safety—over liveness. This means the network can withstand node failures and guarantees consistent ledger states, though at times it may sacrifice immediate progress to ensure these guarantees. By adopting this approach, DCP provides a robust framework for secure and reliable transactions, even in adversarial conditions.

Validator nodes in the Diamante network do not receive monetary rewards. Instead, participation is driven by the desire to contribute to the security and resilience of the network, benefiting the applications and services built on top of it. This aligns incentives towards a sustainable and cooperative blockchain environment.

DCP Components

  1. Quorum Set
  2. Each Diamante Core node selects a set of trusted nodes, known as the quorum set. Nodes define their trust relationships, allowing decentralized control and open network membership. A well-configured quorum set is essential for the resilience and security of the network.

    Key considerations for quorum sets:

    • Include nodes operated by diverse organizations to reduce the risk of centralized trust.
    • Regularly update quorum sets to reflect network changes and maintain reliability.
  3. Thresholds and Quorum Slices

  4. A threshold is the minimum number of nodes in a quorum set required to agree for consensus. Combinations of agreeing nodes that meet this threshold are called quorum slices.

    Example:

    • Node B's quorum set: [A, C, D]
    • Threshold: 2
    • Valid quorum slices: [A, C], [C, D], [A, D]

    Thresholds must be configured carefully to balance fault tolerance and performance. A high threshold improves security but may reduce the network’s ability to reach consensus during node failures.

  5. Node Blocking Sets

  6. A blocking set is a group of nodes that can prevent consensus if they fail or act maliciously. For instance, if a node requires three out of four quorum members to agree, any two members could form a blocking set.

    To minimize the impact of blocking sets:

    • Diversify quorum sets to avoid dependencies on a single group of nodes.
    • Monitor network health to identify and address failing nodes.
  7. Quorum

  8. A quorum is a set of nodes sufficient to reach an agreement, where each node belongs to at least one quorum slice. Quorums form the basis of the DCP’s decentralized consensus, ensuring that decisions reflect a broad consensus across the network.

  9. Statements

  10. Nodes express opinions about transaction sets using statements. These statements evolve during the consensus process as nodes interact with their quorum sets.

    Statements represent the various stages of agreement, such as proposing a transaction set, accepting a candidate block, or confirming the final ledger state.

Federated Voting in DCP

DCP employs a federated voting system to achieve consensus. A node evaluates the network’s state through its quorum set and processes statements in three stages:

  1. Vote: A node acknowledges a statement but does not yet consider it safe to act on.
  2. Accept: A node adopts a statement if:
    • All nodes in a quorum slice vote for or accept it.
    • A blocking set accepts it.
  3. Confirm:A node finalizes the statement, ensuring no other statement can be confirmed instead.

Transition Rules:

  • Vote for a statement if consistent with previous votes.
  • Accept a statement if supported by the quorum slice or blocking set.
  • Confirm a statement if all nodes in a quorum slice accept it.

Federated voting ensures that consensus is achieved in a decentralized and fault-tolerant manner. By relying on quorum slices and thresholds, the DCP avoids single points of failure and maintains network integrity.

Stages of Consensus

  1. Protocol

  2. The nomination protocol selects candidate transaction sets for inclusion in the ledger. Nodes stop nominating new sets once they confirm a candidate but continue accepting previously nominated statements.

    Key Features:

    • Convergence: All nodes eventually agree on a candidate set through iterative voting and acceptance.
    • Parallel Processes: Nodes can start the ballot protocol while the nomination process continues in the background.

    The nomination protocol ensures that the network converges on a single set of transactions for the next ledger, forming the basis for the subsequent ballot protocol.

  3. Ballot Protocol

  4. The ballot protocol ensures unanimous confirmation and application of nominated transaction sets. It operates in two steps:

    1. Prepare: Verifies that a node’s quorum slice is ready to commit to a specific value. This step ensures that the value aligns with the network’s state and prevents conflicts.
    2. Commit: Confirms that the quorum slice commits the agreed value, finalizing the ledger update.
    3. By separating preparation and commitment, the ballot protocol provides a robust mechanism for validating and applying transaction sets.