Skip to content
Open
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
6 changes: 6 additions & 0 deletions crates/blockchain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ impl BlockChainServer {
let parent_root = signed_block.message.block.parent_root;
let proposer = signed_block.message.block.proposer_index;

// Never process blocks at or below the finalized slot — they are
// already part of the canonical chain and cannot affect fork choice.
if slot <= self.store.latest_finalized().slot {
return;
}
Comment on lines +319 to +321
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think avoiding processing block from an already finalized slot is good, but we should discard the non-canonical children of this block to avoid processing them/leaving them as pending/marking them as invalid.


// Check if parent state exists before attempting to process
if !self.store.has_state(&parent_root) {
info!(%slot, %parent_root, %block_root, "Block parent missing, storing as pending");
Expand Down
Loading