HyperSync Consensus
HyperSync is the consensus protocol powering Vexidus. It uses weighted leader rotation with Byzantine fault tolerance, where validators take turns proposing blocks based on stake weight and performance score.
How It Works
- Leader selection uses
blake3(block_height + validator_set_hash)seeded randomness - Weight =
stake * performance_score(0.5-1.0 range) - Leader proposes block containing up to 10,000 transactions
- Block is gossiped to all peers via GossipSub (QUIC transport, TLS 1.3)
- Validators verify proposer signature (Ed25519) and execute transactions
- Block finalized after gossip consensus
Block Production
- 12-second block intervals (configurable via
--block-time) - Pressure-aware micro-blocks: 2s normal, 1s high load, 500ms extreme
- Up to 10,000 transactions per block (configurable via
--max-txs-per-block) - Failover blocks: Non-leader validators produce empty blocks to maintain chain continuity
Validator Economics
| Parameter | Value |
|---|---|
| Minimum stake | 1,000 VXS |
| Unbonding period | 21 days |
| Max active validators | 100 (configurable) |
| Epoch duration | 300 seconds |
| Commission range | 0-50% |
Block Rewards
~65M VXS emitted over 10 years (~4% of total supply):
| Period | Annual Emission | Per-Block (at 12s) |
|---|---|---|
| Year 1-2 | 13M VXS/yr | ~4.94 VXS |
| Year 3-5 | 6.5M VXS/yr | ~2.47 VXS |
| Year 6-10 | 3.9M VXS/yr | ~1.48 VXS |
| Year 11+ | 0 | 0 |
Transaction Fees
- 100% of fees go to the block proposer (no burn -- fixed supply)
- Gas price: 10 nanoVXS per gas unit (configurable via
--gas-price) - Typical transfer cost:
0.00021 VXS ($0.0002 at $1/VXS)
No Slashing -- Jailing Instead
Vexidus does not slash validator stake. Misbehaving validators are jailed (removed from rotation after consecutive missed blocks). This protects delegators from losing funds while still incentivizing uptime.
- Jailing threshold: 50 consecutive missed blocks
- Jail duration: 5 minutes cooldown
- Unjail: Submit
vex_unjailafter cooldown expires - Upgrade grace period: 100 blocks (~200s) after upgrade halt -- prevents jailing validators for upgrading
Bad actors lose opportunity cost (missed rewards) and reputation, not principal.
Reputation Scoring
Validator reputation uses a 7-factor, 100-point scoring system that affects leader selection weight and future reward multipliers.
| Factor | Weight | Measures |
|---|---|---|
| Uptime | 25 pts | Block production consistency |
| Commission fairness | 15 pts | Reasonable rates, stability |
| Self-stake | 15 pts | Skin in the game |
| Governance participation | 15 pts | Upgrade voting activity |
| Tenure | 10 pts | Time active on network |
| Delegator trust | 10 pts | Stake attracted from others |
| Reliability | 10 pts | Historical jail count, missed blocks |
Reputation Grades
| Grade | Score Range |
|---|---|
| A+ | 95-100 |
| A | 90-94 |
| B | 75-89 |
| C | 55-74 |
| D | 35-54 |
| F | 0-34 |
New validators start at score 50 (neutral, "unproven"). A validator doing everything right reaches 80+ in ~7 days and 90+ in ~30 days.
Consensus Security
- Byzantine Fault Tolerance: Tolerates up to 1/3 malicious validators
- Block Proposer Signatures: Every block is Ed25519-signed by its proposer. Invalid signatures result in instant peer banning.
- PeerGuard: Per-peer scoring system with replay detection (200-hash ring buffer), rate limiting, and validator allowlisting. Score drops to 0 = permanent ban.
- Validator Set from State: No self-adding. Validators loaded from on-chain staking state only.
P2P Transport
- QUIC: TLS 1.3 + multiplexing over UDP. Replaced TCP+Noise+Yamux.
- GossipSub: Explicit peers for small networks, flood_publish enabled.
- Bulk Sync: Custom SyncCodec with 64MB response limit, 60s timeout, batch size 10.
- Bundle TTL: 120s default. Mempool rejects expired bundles on add, skips on drain.
Block Commit Pipeline
begin_block()
|
execute bundles + rewards
|
commit_block() (WriteBatch -- atomic)
|
recompute_state_root()
|
flush()
All block writes (accounts, validators, blocks, explorer indexes, intent status) are buffered during block scope and committed atomically via RocksDB WriteBatch. Crash-safe -- no partial state.
CLI Flags
| Flag | Default | Description |
|---|---|---|
--validator-key <path> | none | Ed25519 signing key for block/vote signing |
--block-time <secs> | 12 | Block production interval |
--max-txs-per-block <N> | 10000 | Maximum transactions per block |
--min-validators <N> | 1 | Minimum validators required |
--gas-price <N> | 10 | Base gas price in nanoVXS/gas |
--reject-unsigned-bundles | false | Reject unsigned transaction bundles |
--no-leader-check | false | Disable leader rotation (solo testnet only) |