Skip to main content

Consensus and Voting Process


Overview of Validator Role

Validators are the backbone of Centive Network's fault detection and consensus mechanism. Their primary responsibility is to ensure the fairness and reliability of the network by verifying nodes' contributions and monitoring for any faults. Validators serve as the decentralized authority responsible for validating node performance and voting on whether a node has fulfilled its contribution obligations.

Key Responsibilities of Validators

  • Monitor Contributions: Validators review the performance of nodes to ensure they meet the required contribution commitments.
  • Vote on Faults: When nodes are flagged for faults, validators participate in a consensus process to determine if penalties are necessary.
  • Maintain Network Integrity: Validators play a key role in maintaining the overall security and reliability of the network by slashing faulty nodes when necessary.

Commit-Reveal Voting Mechanism

To prevent manipulation and ensure a fair consensus, Centive Network employs a commit-reveal voting mechanism for validators. This mechanism ensures that votes are kept secret until all validators have submitted their votes, making it impossible for validators to influence each other or game the system.

How Commit-Reveal Works

  1. Commit Phase: During this phase, validators submit a hash of their vote along with a random salt value. This hash is known as the commitment and is stored on-chain.
  2. Reveal Phase: Once the commit phase is complete, validators reveal their actual vote and the salt they used during the commit phase. This process ensures that the original vote can be verified against the hash without revealing the vote early.

The commit-reveal process ensures that validators cannot influence each other’s votes, resulting in a fair and unbiased voting process.

Commit-Reveal Hash

The vote commitment is calculated using a hash function:

Vote Commit Hash=H(vs)\text{Vote Commit Hash} = H(v \oplus s)

Where:

  • vv is the actual vote (e.g., true or false for a fault).
  • ss is the salt used by the validator to create a unique hash.

By hashing the vote and salt together, the validator's vote remains secret until the reveal phase.


Commit and Reveal Phases

The commit-reveal voting process is split into two distinct phases: the commit phase and the reveal phase. Each phase plays a critical role in ensuring a transparent and secure consensus process.

Commit Phase

During the commit phase, validators submit their vote as a hash, ensuring their decision remains hidden. Validators cannot change their vote after committing, which prevents any influence from other participants.

  • Duration: Validators have a fixed time (e.g., 12 hours) to submit their commitment.
  • Security: Votes are protected using cryptographic hashing, making it impossible to deduce a validator's vote from the commitment alone.

Reveal Phase

In the reveal phase, validators disclose their original vote along with the salt they used to hash their vote. This phase ensures transparency by allowing the network to verify the vote's integrity.

  • Verification: The network checks that the revealed vote matches the original commitment by re-hashing the vote and salt and comparing it to the stored commitment hash.
  • Penalties: Validators who fail to reveal their vote on time or provide an invalid reveal may face penalties.

Consensus Rules

The consensus process in Centive Network revolves around validators reaching an agreement on whether a node has met its contribution obligations. This process includes specific rules for voting, thresholds for consensus, and penalties for incorrect votes.

Consensus Thresholds

A consensus is reached when the majority of validators agree on a decision. The required threshold can vary depending on the DePIN service, but typically:

  • Majority Rule: More than 50% of the votes must align for consensus to be reached.
  • Supermajority Rule: For critical decisions, a higher threshold, such as 66% or 75%, may be required.

Consensus Equation

The formula for determining the consensus threshold is as follows:

Consensus=UpvotesTotal Votes×100\text{Consensus} = \frac{\text{Upvotes}}{\text{Total Votes}} \times 100

If the consensus exceeds the required threshold, the decision is validated.


Fault Handling

Fault handling is a critical aspect of the Centive Network. When a node fails to meet its contribution obligations or exhibits malicious behavior, validators are responsible for investigating and voting on the issue.

Steps in Fault Handling

  1. Fault Detection: APM agents or E2E tests detect an issue in the node's performance.
  2. Reporting: The fault is reported to validators for review.
  3. Consensus Process: Validators vote on whether the node is guilty of the fault.
  4. Resolution: Based on the consensus, the node may be penalized or slashed.

Example

If a storage node is consistently unable to retrieve data when requested, validators will receive a report. They will review the fault and vote on whether the node has failed to meet its obligations.


Validator Penalties (Slashing)

Slashing is an essential mechanism in Centive Network to ensure that validators act in good faith and participate honestly in the voting process. Validators who vote incorrectly or fail to reveal their vote are penalized through slashing.

Slashing Process

  1. Vote Penalty: Validators who vote incorrectly or fail to meet the commit-reveal deadlines are penalized.
  2. Slashing Amount: The slashing amount is determined based on the severity of the infraction and the validator’s stake.

Slashing Equation

The amount of a validator's stake that can be slashed is calculated as follows:

Slashing Amount=min(Secured Amount,Penalty Amount)\text{Slashing Amount} = \min \left(\text{Secured Amount}, \text{Penalty Amount}\right)

Where:

  • Secured Amount\text{Secured Amount} represents the total amount of tokens staked by the validator.
  • Penalty Amount\text{Penalty Amount} represents the predetermined slashing penalty for incorrect voting.