Skip to content

Commit c5ab23b

Browse files
CopilotSteake
andauthored
Implement BFT finality gadget with equivocation detection and slashing (#115)
* Initial plan * Implement BFT finality gadget with equivocation detection and slashing Co-authored-by: Steake <530040+Steake@users.noreply.github.com> * Add finality integration tests and comprehensive documentation Co-authored-by: Steake <530040+Steake@users.noreply.github.com> * Fix security issues: overflow protection, proper error handling, and stake counting Co-authored-by: Steake <530040+Steake@users.noreply.github.com> * Add implementation summary documentation for finality gadget Co-authored-by: Steake <530040+Steake@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
1 parent 4fa6238 commit c5ab23b

9 files changed

Lines changed: 1467 additions & 2 deletions

File tree

crates/bitcell-consensus/src/block.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Block structures
22
33
use bitcell_crypto::{Hash256, PublicKey, Signature};
4+
use crate::finality::{FinalityVote, FinalityStatus};
45
use serde::{Deserialize, Serialize};
56

67
/// Block header
@@ -58,6 +59,13 @@ pub struct Block {
5859

5960
/// Proposer signature
6061
pub signature: Signature,
62+
63+
/// Finality votes collected for this block
64+
pub finality_votes: Vec<FinalityVote>,
65+
66+
/// Finality status of this block
67+
#[serde(default)]
68+
pub finality_status: FinalityStatus,
6169
}
6270

6371
impl Block {

0 commit comments

Comments
 (0)