Commit Graph

7495 Commits

Author SHA1 Message Date
Eitan Seri-Levi
5efaf85c90 Gloas new payload v5 (#9037)
Use the new payload v5 engine api for gloas. This is required for ePBS devnets

In a separate PR we can implement the full engine api spec changes for glamsterdam
https://github.com/ethereum/execution-apis/blob/main/src/engine/amsterdam.md


  


Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
2026-03-30 04:52:08 +00:00
Mac L
a5e748f808 Use yaml_serde in place of deprecated serde_yaml (#9040)
`serde_yaml` is now deprecated. The API-compatible `yaml_serde` should be used instead.


  Replace `serde_yaml` with `yaml_serde`. This is purely mechanical as the API is 1-to-1.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-03-29 18:39:20 +00:00
Michael Sproul
e1a2cfe202 Merge remote-tracking branch 'origin/stable' into unstable 2026-03-26 16:51:14 +11:00
Michael Sproul
12f5ab04f3 Load the state corresponding to head payload status yay 2026-03-26 16:03:55 +11:00
dapplion
ac5357532b Source head_payload_status from get_head, not hardcoded Pending
Thread head_payload_status from get_head() return through to
CanonicalHead::new(). In restore_from_store, call get_head() on the
loaded fork choice to get the correct status. Removes Pending defaults.
2026-03-25 23:19:54 -05:00
dapplion
ea1e99b2f7 Add TODO for head_payload_status initialization (re: #8998) 2026-03-25 23:09:11 -05:00
dapplion
c7670ede02 Cleanup and spec parity fixes
- Add missing payload attestation slot check: spec returns early when
  data.slot != block.slot (PTC votes only for assigned block)
- Remove dead ignored tests (need mock EL Gloas support to run)
- Remove unused new_with_gloas and inspect_queued_payload_attestations
- Remove gloas entries from bin.rs (not part of this PR)
- Collapse nested if in payload attestation error handling (clippy)
- Rename env -> envelope in load_parent
- Add TODO(gloas) for parent_head_hash in re-org path
- Remove head_payload_status from ForkchoiceUpdateParameters (lives on
  CachedHead, sourced from get_head return)
2026-03-25 23:07:45 -05:00
dapplion
e676c33c92 Merge sigp/unstable into gloas-walk-always 2026-03-25 22:02:08 -05:00
dapplion
93f987f3cf Remove head_payload_status from ForkchoiceUpdateParameters
head_payload_status is internal fork choice state, not an EL
forkchoiceUpdated parameter. It already lives on CachedHead — source
it directly from get_head() return in recompute_head_at_slot instead
of threading through ForkchoiceUpdateParameters.

Also add TODO(gloas) for parent_head_hash in re-org path (V29 nodes
don't carry execution_status).
2026-03-25 21:16:06 -05:00
Michael Sproul
bd34bb1430 Remove schema migrations for v28 and earlier (#9031)
With LH v8.1.3 supporting Fulu-on-Gnosis, we no longer need these DB migrations. All Lighthouse nodes running in prod will soon be updated to LH v8.0.0+ and schema v28+.

This PR helps with Gloas fork choice changes, by allowing us to avoid updating old schema migrations when adding V29 for Gloas:

- https://github.com/sigp/lighthouse/pull/9025


  


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-26 02:10:34 +00:00
dapplion
bc28e63585 Revert "Fix arithmetic lint in committee_cache (saturating_sub)"
This reverts commit bb3e9e12d2.
2026-03-25 20:42:18 -05:00
dapplion
bb3e9e12d2 Fix arithmetic lint in committee_cache (saturating_sub) 2026-03-25 20:38:15 -05:00
dapplion
a34b7c99dc Fix CI: collapse nested if, ignore payload attestation test
- Collapse nested if in build_children_index (clippy::collapsible_if)
- Ignore payload_attestation_for_previous_slot_is_accepted_at_next_slot
  — test uses pre-Gloas blocks (V17) but on_payload_attestation requires
  V29 nodes. Needs mock EL Gloas block support.
2026-03-25 20:33:17 -05:00
Michael Sproul
176cce585c Release v8.1.3 v8.1.3 2026-03-26 12:21:13 +11:00
Michael Sproul
7ca91b8ef4 Bump c-kzg 2026-03-26 12:18:01 +11:00
Michael Sproul
dfd715b65e Bump libp2p 2026-03-26 12:17:53 +11:00
dapplion
f31a93697e Fix test review issues
- Remove wrong latest_message assertions from payload attestation test
  (on_payload_attestation writes to PTC bitfields, not vote tracker)
- Fix corrupted comment: "votes.gloas_enabled() to the genesis block"
  → "votes to the genesis block"
- Fix http_api test fallback string: "n/a" → "irrelevant" to match
  production code
- Add issue link to #[ignore] test
- Add comment explaining head_payload_status as u8 cast
2026-03-25 20:08:43 -05:00
dapplion
e7f027badd O(n) children index, fix load_parent for gloas blocks
- Build parent->children index once per find_head call, replacing O(n)
  scans in filter_block_tree and get_node_children with O(1) lookups.
- Skip zero block_hash in is_parent_block_full check — default/zero
  hashes don't indicate a real payload relationship.
- Fall back to block state_root for genesis when envelope not stored.
- Store execution payload envelope in EF test harness during
  on_execution_payload step.
2026-03-25 19:38:54 -05:00
Michael Sproul
d58df3a656 Make proposer_index mandatory in on_block 2026-03-26 11:07:38 +11:00
Michael Sproul
f1b261f336 Safeguard attestation index check 2026-03-26 11:00:08 +11:00
Michael Sproul
a69a848590 Remove expect 2026-03-26 10:48:18 +11:00
Michael Sproul
9f1f68c3ee Add back AttestationFromBlock 2026-03-26 10:39:57 +11:00
dapplion
fdf2fd2267 Simplify reorg weight logic, TODO(gloas) for payload-aware version
Remove V17/V29 branching in beacon_chain reorg weight computation.
Use total weight for both pre and post-GLOAS, which is correct for
pre-GLOAS and conservative for post-GLOAS. The payload-aware version
will be needed when reorg logic is enabled for GLOAS.
2026-03-25 18:38:59 -05:00
Michael Sproul
e77651ac06 Revert changes in load_parent 2026-03-26 10:27:20 +11:00
Michael Sproul
c7c82f83d4 Merge remote-tracking branch 'origin/gloas-walk-always' into gloas-walk-always 2026-03-26 10:26:55 +11:00
dapplion
84679b1c07 Remove redundant invalid-node check from filter_block_tree
The children filter already skips invalid nodes, so a valid parent
whose only children are invalid becomes a leaf and gets rejected by
node_is_viable_for_head. The top-level check was redundant.
2026-03-25 18:22:51 -05:00
Michael Sproul
2323b86ffa Merge remote-tracking branch 'origin/unstable' into gloas-walk-always 2026-03-26 10:07:46 +11:00
Michael Sproul
66f71b3f22 Remove unused params 2026-03-26 10:01:33 +11:00
dapplion
324c61d2e2 Implement get_filtered_block_tree and fix remaining test failures
- Add get_filtered_block_tree/filter_block_tree matching the spec's
  recursive viability pre-filter for get_head
- Skip invalid execution status nodes in the filter (they aren't in
  store.blocks in the spec)
- Fix attestation_score for V17 nodes: fall back to weight() for
  Empty/Full since pre-Gloas has no payload separation
- Include head_payload_status in ForkChoiceView so CachedHead updates
  when payload status changes
- Update votes test: branch with incompatible finalized leaf is now
  correctly excluded by the recursive filter
- Update execution_status test_03: stored weights no longer include
  proposer boost

All 30 proto_array/fork_choice tests pass.
All 9 EF fork_choice test suites pass.
2026-03-25 17:47:49 -05:00
dapplion
93ef1e395c Include head_payload_status in ForkChoiceView comparison
The early exit check in recompute_head_at_slot compared only
head_block_root and checkpoints. When on_execution_payload changed
the payload status from Empty to Full without changing the head root,
the CachedHead was not updated. Add head_payload_status to
ForkChoiceView so the change is detected.
2026-03-25 17:47:49 -05:00
dapplion
e943888ee7 Fix test_03: update weight assertions for spec-parity boost
Proposer boost is no longer baked into node.weight() — it is applied
on-the-fly in the walk's get_weight via is_supporting_vote. Update
the expected weights in test_03 to reflect pure attestation scores.
2026-03-25 17:47:49 -05:00
dapplion
9f56fd0751 Review fixes: cache should_apply_proposer_boost, improve error context
- Compute should_apply_proposer_boost once before the walk instead of
  per-child per-level
- Clear previous_proposer_boost in apply_score_changes
- Use correct node root in get_ancestor_node error messages
- Add comment explaining is_supporting_vote slot comparison behavior
2026-03-25 17:47:49 -05:00
dapplion
845831ce56 Align GLOAS fork choice with spec
- Move proposer boost from apply_score_changes to get_weight, matching
  the spec's structure where get_weight adds boost via is_supporting_vote
- Implement is_supporting_vote and get_ancestor_node spec functions
- Fix should_extend_payload: return true when proposer_boost_root is zero
- Compute record_block_timeliness from time_into_slot instead of hardcoding false
- Fix anchor block_timeliness to [true, true] per get_forkchoice_store spec
- Add equivocating_attestation_score for is_head_weak monotonicity
- Use payload-aware weight in is_parent_strong
- Add with_status helper on IndexedForkChoiceNode
- Simplify find_head_walk to return IndexedForkChoiceNode directly
2026-03-25 17:47:49 -05:00
Eitan Seri-Levi
c7055b604f Gloas serve envelope rpc (#8896)
Serves envelope by range and by root requests. Added PayloadEnvelopeStreamer so that we dont need to alter upstream code when we introduce blinded payload envelopes.


  


Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-03-25 06:45:24 +00:00
Michael Sproul
cec5ce179d Undo botched optimisation 2026-03-25 14:12:46 +11:00
Michael Sproul
8b448864f0 Re-do head_payload_status 2026-03-25 14:05:11 +11:00
Michael Sproul
c841603003 Fix compilation issues 2026-03-25 13:43:30 +11:00
Michael Sproul
81b96a59d2 More spec compliance 2026-03-25 13:03:34 +11:00
Michael Sproul
e5facc2faf Bump yamux 2026-03-25 10:22:24 +11:00
Michael Sproul
5d6f787a06 Bump quinn 2026-03-25 10:22:24 +11:00
Michael Sproul
52e397f8c1 Refactoring fork choice to look more like the spec 2026-03-24 15:58:54 +11:00
Lion - dapplion
91c25794fe Schedule Fulu fork for Gnosis mainnet (#9007)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-24 03:50:14 +00:00
Michael Sproul
c451ae763c Use BTreeMap for state.validators pending updates (#9017)
Closes:

- https://github.com/sigp/lighthouse/issues/9003


  Milhouse `List`s use a map in front of the binary tree to cache updates. Ever since we adopted Milhouse, we've been using `VecMap`, which is essentially `Vec<Option<T>>`. Turns out, when you've got 2M indices and only 2 non-`None` entries (changes), this is inefficient.

Milhouse is generic in the choice of map (`U: UpdateMap`) and has always supported `BTreeMap`, so this PR switches us over to `BTreeMap`. In previous benchmarks (years ago) it had been slower than `VecMap`, but now it is vastly superior.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-24 01:43:19 +00:00
Alleysira
7ffc637eef fix(network): set ENR nfd to zero bytes when next fork is unknown (#9009)
Fixes #8996


  When no next fork is scheduled, the `nfd` field in the ENR was set to the current fork digest via
`.unwrap_or_else(|| ctx.fork_context.current_fork_digest())`.

According to the [spec](1baa05e711/specs/fulu/p2p-interface.md (L636-L637)), `nfd` should be zero-valued bytes when the next fork is unknown.


Co-Authored-By: Alleysira <1367108378@qq.com>

Co-Authored-By: Alleysira <56925051+Alleysira@users.noreply.github.com>

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-03-23 22:07:37 +00:00
hopinheimer
ce714710e9 passing ef tests ft. @dapplion 2026-03-23 14:40:41 -04:00
hopinheimer
cb35ba6869 Merge branch 'unstable' of github.com:sigp/lighthouse into fix-gloas-ef-tests 2026-03-23 14:40:04 -04:00
antondlr
e21053311d Scrap redundant docker builds on releases (#8999)
Our release workflow is pretty inefficient and slow. This PR aims to consolidate and cut down on duplicate tasks.


  1) We now run the whole build process both on pushing to the `stable` branch and pushing a version tag.
A quick win is to not fire off separate builds.

~~2) The Docker release workflow could re-use the binaries being built instead of doing its own cross-compilation. ~~
we won't take this on _right now_


Co-Authored-By: antondlr <anton@sigmaprime.io>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-23 06:25:06 +00:00
Eitan Seri-Levi
b3d5185893 Carry forward withdrawals from the current BeaconState when a parent envelope is missed (#9014)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
2026-03-22 21:46:39 +00:00
Michael Sproul
de77da6437 Merge remote-tracking branch 'origin/release-v8.1' into backmerge-audit 2026-03-22 14:06:45 +11:00
Michael Sproul
8f9c1ca9ca Bump rustls and ignore unpatched version due to Warp (#9010)
Fix the cargo-audit failure caused by:

- https://rustsec.org/advisories/RUSTSEC-2026-0049

We can't fix it completely yet because `warp 0.3` is keeping us on an old version of `rustls`.

Mac's PR here will fix it:

- https://github.com/sigp/lighthouse/pull/9001


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-21 09:45:20 +00:00