Skip to content
Merged
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 src/lean_spec/subspecs/containers/state/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ def process_attestations(
# This prevents votes about unknown or conflicting forks.
if (
source.root != self.historical_block_hashes[source.slot]
and target.root != self.historical_block_hashes[target.slot]
or target.root != self.historical_block_hashes[target.slot]
):
continue
Comment on lines 461 to 465
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

This bug fix corrects critical validation logic, but there appears to be no test coverage for this specific check. Consider adding tests that verify attestations are properly rejected when:

  1. The source root doesn't match the historical block hash at the source slot
  2. The target root doesn't match the historical block hash at the target slot
  3. Both roots don't match (edge case)

These tests would help prevent similar bugs in the future and validate that the fix works correctly.

Copilot uses AI. Check for mistakes.

Expand Down
Loading