Consensus
Consensus is the process by which the majority of nodes on a blockchain network agree on the current state of the network, including which transactions to finalize and commit to the chain's permanent history. This process prevents malicious or faulty nodes from altering the network incorrectly.
Validator nodes
To participate in consensus, validators must stake SUI tokens on the network. Sui uses delegated proof-of-stake (DPoS) to determine which validators operate the network and their voting power. Validators are incentivized to participate in good faith through a share of transaction fees, staking rewards, and slashing of stake and staking rewards in case of misbehavior.
Epochs
An epoch is a duration of time where the Sui validators and their stakes do not change. An epoch is about 24 hours on both Mainnet and Testnet. At an epoch boundary, reconfiguration might occur and can change the set of validators participating in the network and their voting power. Conceptually, reconfiguration starts a new instance of the Sui protocol with the previous epoch's final state as genesis and the new set of validators as the operators. Besides validator set changes, tokenomics operations such as staking and un-staking, and distribution of staking rewards are also processed at epoch boundaries.
Quorums
A quorum is a set of validators whose combined voting power is greater than two-thirds (>2/3) of the total during a particular epoch. For example, in a Sui instance operated by 4 validators that all have the same voting power, any group containing 3 validators is a quorum.
The quorum size of >2/3 ensures Byzantine fault tolerance (BFT). A validator commits a transaction only if the transaction is accompanied by cryptographic signatures from a quorum. Sui calls the combination of the transaction and the quorum signatures on its bytes a certificate. The policy of committing only certificates ensures Byzantine fault tolerance: if >2/3 of the validators faithfully follow the protocol, they are guaranteed to eventually agree on both the set of committed certificates and their effects.
Write requests
A validator can handle 2 types of write requests: transactions and certificates. At a high level, a client:
-
Communicates a transaction to a quorum of validators to collect the signatures required to form a certificate.
-
Submits a certificate to a validator to commit state changes on that validator.