Skip to content

fix: restore genesis_block bid population for ef-tests#9246

Merged
jking-aus merged 2 commits intosigp:glamsterdam-devnet-2from
jking-aus:fix-ef-tests-genesis-block
Apr 30, 2026
Merged

fix: restore genesis_block bid population for ef-tests#9246
jking-aus merged 2 commits intosigp:glamsterdam-devnet-2from
jking-aus:fix-ef-tests-genesis-block

Conversation

@jking-aus
Copy link
Copy Markdown
Member

Summary

  • Restores genesis_block() to populate the Gloas block body with state.latest_execution_payload_bid (required by alpha-7 spec test vectors)
  • Restores the body_root fixup in initialize_beacon_state_from_eth1() so state and block roots stay consistent
  • The fork choice from_anchor fix (reading latest_block_hash when bid hashes are zero) remains intact for Kurtosis/external genesis compatibility

Context

PR #9244 simplified genesis_block() to return an empty block for Kurtosis interop, but the alpha-7 ef-tests expect the bid in the genesis block body. Both paths are needed:

  • Lighthouse-generated genesis (ef-tests): bid in block body, body_root fixup in state
  • External genesis (Kurtosis): fork choice reads latest_block_hash from state when bid is all-zeros

Test plan

  • ef-tests-ubuntu CI job passes (fork_choice_get_head, fork_choice_ex_ante, etc.)
  • Other fork choice tests unaffected

The alpha-7 spec tests expect the Gloas genesis block body to contain
the execution payload bid from state. Restores the genesis_block()
function and body_root fixup that were removed in PR sigp#9244.

The fork choice from_anchor fix (reading latest_block_hash when bid
hashes are zero) remains for Kurtosis/external genesis compatibility.
@jking-aus jking-aus merged commit 6177213 into sigp:glamsterdam-devnet-2 Apr 30, 2026
37 checks passed
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.

1 participant