Skip to content

Commit 27353a0

Browse files
author
EchoBT
committed
feat(security): add stake-weighted PBFT, merkle sync verification, and hotkey rate limiting
- Add stake_weighted_pbft.rs: PBFT with stake-weighted voting (50%+ stake required) - Add merkle_verification.rs: cryptographic verification for state sync data - Update p2p_sync.rs: reject entries failing merkle verification - Update protection.rs: rate limiting by hotkey (prevents peer_id bypass) - Add double-vote prevention (first vote wins) - Add hotkey blacklisting with automatic disconnect Security fixes for: 1. Votes now weighted by validator stake, not count 2. State sync entries verified against merkle root 3. Double-voting prevented in consensus 4. Rate limits tied to cryptographic identity
1 parent 7dc4e3f commit 27353a0

File tree

6 files changed

+1684
-12
lines changed

6 files changed

+1684
-12
lines changed

crates/consensus/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
pub mod governance_integration;
2929
pub mod pbft;
3030
pub mod stake_governance;
31+
pub mod stake_weighted_pbft;
3132
pub mod state;
3233
pub mod types;
3334

3435
pub use governance_integration::*;
3536
pub use pbft::*;
3637
pub use stake_governance::*;
38+
pub use stake_weighted_pbft::*;
3739
pub use state::*;
3840
pub use types::*;

0 commit comments

Comments
 (0)