Skip to content

Commit 7dc4e3f

Browse files
author
EchoBT
committed
feat(consensus): Add stake-based governance with bootstrap period
Implements a sophisticated governance system for chain modifications: - 50%+ stake threshold required for consensus after bootstrap - Bootstrap period (block < 7,175,360) allows subnet owner to execute actions without stake verification while validators join - Owner hotkey: 5GziQCcRpN8NCJktX343brnfuVe3w6gUYieeStXPD1Dag2At Security features: - Proposal system with timeout (24h) and min voting period (1h) - Double-voting prevention - Rate limiting (max 10 proposals/day/validator) - Signature verification on all votes - BootstrapSyncPolicy for trusted sync during bootstrap New modules: - stake_governance.rs: Core governance engine - governance_integration.rs: PBFT and metagraph integration Also adds: - RateLimited error type in core/error.rs - sign_bytes() method in core/crypto.rs
1 parent 11cfe4a commit 7dc4e3f

File tree

7 files changed

+2076
-0
lines changed

7 files changed

+2076
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/consensus/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ async-trait = { workspace = true }
1212

1313
serde = { workspace = true }
1414
serde_json = { workspace = true }
15+
bincode = { workspace = true }
1516

1617
tracing = { workspace = true }
1718
anyhow = { workspace = true }

0 commit comments

Comments
 (0)