Consensus
The following section provides an overview of the consensus model of Venom.
Venom's consensus protocol provides four key functions to the network:
- Ensuring a reliable agreement on the current state of the blockchain is reached.
- Verifying the validity of all transactions included in a block.
- Updating the blockchain state consistently and on all layers of the network (Masterchain, Workchains, Shardchains).
Let's take a look at the different components of Venom's consensus mechanism to gain a better understanding of it.
Venom's consensus mechanism uses a hybrid protocol that combines a Proof-of-Stake (PoS) mechanism with Byzantine fault tolerance (BFT) algorithms. This approach ensures that transactions are secure and tamper-proof and that validators can reliably agree upon the state of the blockchain. The combination of PoS with BFT also increases the resistance of the network against malicious parties and sybils trying to attack the blockchain.
This also ensures fast finality, meaning transactions are irreversibly confirmed in a fast manner.
For more information, please see:
The validators of the Venom blockchain stake their $VENOM tokens, demonstrating a vested interest in the network's security and liveness. Validators are then selected via PoS consensus which makes them eligible to propose candidate blocks and to vote on block proposals by other validators.
The Byzantine fault-tolerant (BFT) algorithm is used in this process to ensure consensus is reached reliably.
Venom differentiates between three tiers of validator sets:
- Overall Validator Set: List of all validators selected to participate in the validation process, weight-sorted based on their staked tokens.
- Masterchain Validator Set: Only validators with the largest stake in the network are allowed to generate Masterchain blocks. Masterchain validators are chosen from the overall validator set.
- Shardchain Validator Set: Validators chosen from the overall validator set that are responsible for processing of blocks on a specific Shardchain.
A round-robin role transfer system is utilized to avoid a similar group of validators monopolizing consensus. The transfer system ensures that validators take turns in generating blocks.
The selected set of validator nodes is responsible for proposing, validating, and committing blocks through a series of rounds. A block can only be committed to the blockchain once the defined voting threshold of 2/3 of validator nodes is reached. If this threshold is not reached within a specified time period, the block is skipped which triggers the next round.
📝Definition Consensus algorithms can be divided into two categories:
- Algorithms with probabilistic finality (allows multiple chains at the same time)
- Algorithms with deterministic finality (does not allow for forks)
Venom's consensus protocol is powered by an algorithm with deterministic finality. This ensures that transactions reach finality at the commitment stage. Deterministic finality is an important aspect of the security and integrity of the Venom network as it provides a safeguard against altering transactions once recorded.
In combination with BFT algorithms, the probability of forks occurring is almost 0 and can only happen if the majority of validators act maliciously.
Venom's consensus protocol consists of four distinct components:
- Election: Selection of validators from the overall validator set;
- Block Generation: Creation and verification of blocks by validators;
- Consensus: Validators reaching consensus on the state of the blockchain;
- Message Passing Protocol: Messages passing between validators.
For more details on the consensus components, please take a look at the following section: