Skip to content

feat: ensure attestation source slot does not exceed target#1486

Open
zemse wants to merge 6 commits into
ReamLabs:masterfrom
zemse:leanspec-1166
Open

feat: ensure attestation source slot does not exceed target#1486
zemse wants to merge 6 commits into
ReamLabs:masterfrom
zemse:leanspec-1166

Conversation

@zemse

@zemse zemse commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What was wrong?

Ream already uses source from the head chain for voting. But we are missing:

  1. source.slot <= target.slot sanity guard in produce_attestation_data
  2. running the new consensus vector

Closes #1448.

How was it fixed?

  • sanity guard added in produce_attestation_data
  • per-validator attestation checks in validate_checks
  • existing run_attestation_pipeline validation replaced with store.on_gossip_attestation because validate_checks depend on voting state recorded in attestation_signatures.
  • is_aggregator is added to ForkChoiceStep::Attestation type which is used in the test vector
  • validator_id is set to 0 to enable the store to become aggregator
  • enable devnet5 fork_choice suite filtered to test_honest_vote_sources_from_head_chain_not_store vector introduced in lean spec upstream.
Click to see screenshot of tests

Devnet 5 test vector passing:
Screenshot 2026-07-02 at 12 26 03 AM

Devnet 4 tests remain unaffected:
Screenshot 2026-07-02 at 12 04 40 AM

To-Do

@KolbyML

KolbyML commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

can you rebase this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source attestation votes from the head chain's justified checkpoint

2 participants