Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion consensus/fast_confirmation/benches/fcr_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const SCENARIOS: &[Scenario] = &[
fn block_root_at(slot: u64) -> Hash256 {
let mut preimage = [0u8; 16];
preimage[..8].copy_from_slice(b"fcr-root");
preimage[8..].copy_from_slice(&(slot + 1).to_le_bytes());
preimage[8..].copy_from_slice(&slot.to_le_bytes());
Hash256::from_slice(&hash_fixed(&preimage))
}

Expand Down
5 changes: 3 additions & 2 deletions consensus/fast_confirmation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
//! 2. **Cached spec helpers**: `is_one_confirmed` still reads as
//! `support > compute_safety_threshold`, but `get_attestation_score` is backed by a
//! precomputed chain score cache. The FFG predicates compute `compute_honest_ffg_support`
//! internally; their call sites are short-circuited, so the O(V) FFG sweep only runs near
//! epoch boundaries (and at most a couple of times) rather than every slot.
//! internally; their call sites short-circuit on most slots, so the O(V) sweep runs only in the
//! first slots after an epoch boundary (while the confirmed block still trails the previous
//! epoch), and at most once per `get_latest_confirmed` call (memoized), not every slot.
//!
//! 3. **Vote-root balance aggregation** (`optimizations::RootBalanceMap`): before ancestor
//! lookups, validators with the same vote root (or root+epoch) are collapsed into one
Expand Down
Loading