Commit 27353a0
EchoBT
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 identity1 parent 7dc4e3f commit 27353a0
File tree
6 files changed
+1684
-12
lines changed- crates
- consensus/src
- distributed-db/src
- network/src
6 files changed
+1684
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
0 commit comments