Consensus
Consensus uses a similar consensus mechanism to most PoS blockchains geared towards decentralized subnets. Consensus mimics the concept of routing tables in a P2P network, where each node can recognize all other nodes or have access to the knowledge of all other nodes. Meaning, consensus requires that each node gets a score regardless of its in-subnet roles or tasks. The validator must submit scores on each node, and every other node attests to them. Subnets should be designed in such a way that scores are deterministic and attesting requires 100% accuracy.
66% Consensus
To receive rewards, the subnet must pass the required attestation rate of 66%.
Elected Subnet Validator Node
On each epoch, a Validator classified subnet node is randomly elected to be the validator to submit consensus data from each subnet. This elected subnet validator node submits a score on each node in its subnet. Subnets can optionally pass through miscellaneous data that the subnet can utilize.
Note
The election happens in the subnet slot.
The elected validator calls validate
to submit consensus data
validate
to submit consensus datapub fn validate(
origin: OriginFor<T>,
subnet_id: u32,
data: Vec<SubnetNodeData>,
args: Option<BoundedVec<u8, DefaultValidatorArgsLimit>>,
)
Attestors
Each other Validator classified subnet nodes can attest to the validator's consensus submission.
Attestors call attest
to attest to the elected validators' consensus data
attest
to attest to the elected validators' consensus datapub fn attest(
origin: OriginFor<T>,
subnet_id: u32,
)
Penalties
Elected Validator
The elected validator can increase its penalty score by not achieving a 66% attestation ratio or by not submitting its consensus data.
Slashing
The elected validator is slashed for not achieving a 66% attestation ratio or for not submitting consensus data.
Nodes
Nodes can have penalties increased if the validator doesn't submit them in its consensus data, and its attestation rate is at least 66%.
Each node's score is used as a percentage of the sum of scores for their portion of emissions. See Incentives for more information.
Last updated