Consensus & validators
NeutronX uses CometBFT, a BFT consensus with instant finality. A block is final as soon as validators holding more than 2/3 of the stake vote for it. There are no rollbacks or forks after that.
How a block is accepted
- Proposal. The proposer offers a block. Proposers take turns, and validators with more stake are picked more often.
- Prevote. Validators check the block and vote for it.
- Precommit. Once more than 2/3 of the stake is reached, validators vote a second time and attach oracle prices to the vote (a vote extension).
- Commit. After more than 2/3 of precommits the block is final.
If the proposer misses its timeout, a new round starts with another proposer.
When things go wrong
| Situation | What happens |
|---|---|
| More than 2/3 of stake online | Blocks are produced at the normal pace, ~0.84 s |
| More than 1/3 of stake offline | The network stops and waits. Nothing is lost: once validators return, block production continues from the same block |
| An attempt to create a conflicting block | Only possible if at least 1/3 of the stake signs double votes. Such votes are provable and punished |
Validators
- Weight. Voting weight equals the validator's stake: its own and delegated. The active set holds up to 60 validators.
- Duties:
- sign blocks;
- publish oracle prices through vote extensions in every block.
- Commission:
- from 5% to 20%;
- it can change by no more than 1% per day.
- How to delegate NTX is covered in Staking.
Penalties
| Violation | Penalty |
|---|---|
| Double signing | Slash of 5% of stake and permanent removal from the set |
| Downtime: fewer than 5% of the last 10,000 blocks signed | Slash of 1% of stake, jail for 10 minutes |
| Oracle price more than 5% away from the median | Slash of 0.01% of stake, at most once per block. 3 violations within 1,000 blocks mean jail if the set has at least 5 validators |
A slash reduces the validator's whole stake, delegations included. A jailed validator does not sign blocks or earn rewards until it sends MsgUnjail after the term ends.