Commit Graph

7458 Commits

Author SHA1 Message Date
Josh King
aa6fdb8d6a fix: tighten genesis block fallback to match empty body root only 2026-04-30 17:28:09 +02:00
jking-aus
6177213a3d Merge pull request #9246 from jking-aus/fix-ef-tests-genesis-block
fix: restore genesis_block bid population for ef-tests and add fallback for external genesis for kurtosis
2026-04-30 17:02:50 +02:00
Josh King
22a207ffa8 fix: fallback to empty genesis block for external genesis states 2026-04-30 15:26:20 +02:00
Josh King
98d858d942 fix: restore genesis_block bid population for ef-tests
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 #9244.

The fork choice from_anchor fix (reading latest_block_hash when bid
hashes are zero) remains for Kurtosis/external genesis compatibility.
2026-04-30 14:21:02 +02:00
Eitan Seri-Levi
0fe75382da fmt 2026-04-30 13:05:30 +02:00
hopinheimer
5360e76696 fix genesis_block init in tests 2026-04-30 12:52:17 +02:00
Josh King
0078b6be89 fix: gloas from genesis
- Fix forkchoice update sending zero-hash head to EL at genesis by reading
  latest_block_hash from state when the genesis bid hashes are all zeros
- Simplify genesis block construction — the genesis block body is empty per
  spec, remove the incorrect bid-copying logic and body root override in
  initialize_beacon_state_from_eth1
2026-04-30 12:52:01 +02:00
Eitan Seri-Levi
effcd08223 Gloas proposer preferences alpha 7 (#9239)
We yolo'd to alpha 7. We're just changing the proposer preference to include dependent root, instead of checkpoint root. This way we can actually construct it within the VC without needing a view of fork choice.


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-30 09:36:45 +00:00
Michael Sproul
8bb14d6f3d Gloas HTTP API tests passing (#9154)
Get the Gloas HTTP API tests passing, partly through fixes and partly through disabling tests that don't fit the Gloas paradigm.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-30 08:15:26 +00:00
Eitan Seri-Levi
728356ad03 Submit ptc votes that we produce to the ptc op pool (#9231)
We are not submitting ptc votes that we produce to our lcoal ptc op pool. So when we are the block producer we don't include our own ptc votes!


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-30 06:43:14 +00:00
chonghe
8d77b1c08d Remove test_logger feature (#9125)
- #9107


  Remove all instances of `test_logger` in the code


Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
2026-04-30 04:57:47 +00:00
Jimmy Chen
04b2589807 Import execution payload envelope locally during HTTP API publication (#9226)
Fixes a bug where a proposer votes payload missing on its own block.

The payload is published to the network but never imported locally. This PR adds gossip verification and import when a payload is sent to the http API


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-29 15:43:30 +00:00
Michael Sproul
f406e9c3fb Update proposer boost calculation (#9215)
Closes:

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


  - Calculate the proposer index on the canonical chain (from canonical head) at `slot` and plumb it through to fork choice so it can be used to determine whether or not to apply the proposer boost. We use the proposer cache to handle state advances and avoid duplicate work.
- Update our FC tests to use `block.message().proposer_index()` (always pass), we are not attempting to test this feature in those tests. The EF tests use the correct canonical proposer idnex via `on_block`, except for invalid blocks which just auto-pass this check (these blocks get rejected by other checks in `on_block` anyway).


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-04-29 12:19:44 +00:00
Lion - dapplion
0e427ab77b Add Gloas bid inclusion (#9221)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-04-29 12:02:12 +00:00
jking-aus
16132a3694 Spec v1.7.0-alpha.6 and Gloas genesis (#9190)
Co-Authored-By: Josh King <josh@sigmaprime.io>

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-04-29 08:23:24 +00:00
Eitan Seri-Levi
e8c865dcc6 Gossip reprocessed payload envelopes that are timely (#9210)
Payloads from the reprocess queue should be gossiped after import if they are still timely. In devnets this happens frequently since there are many cases where the envelope arrives before the block


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-28 21:50:07 +00:00
Eitan Seri-Levi
6258eadc91 Gloas publish data columns during local block building (#9182)
Make sure we are publishing columns during local block production


  


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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-04-28 13:19:47 +00:00
Eitan Seri-Levi
4415cf0506 Gloas filter conflicting voluntary exits (#9183)
Parent envelope execution requests can invalidate voluntary exits. We should filter out any conflicting voluntary exits during block production to avoid triggering failures.

Spec change: https://github.com/ethereum/consensus-specs/pull/5176


  


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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-04-28 12:45:03 +00:00
Jimmy Chen
d8790f6677 Add payload attestation to op pool and pack into block (#9180)
Store gossip-verified `PayloadAttestationMessage`s in the operation pool and pack them into the block body at during block production.

Built on top of #9145.


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-28 10:49:28 +00:00
Mac L
e35a671303 Fix validator manager compilation (#9187)
Currently, running `cargo check -p validator_manager` fails due to missing features. Although the `validator_manager` will almost always be called through the Lighthouse binary which will enable the required features, it is still good hygiene to ensure all workspace crates can compile standalone.


  Add the `lighthouse` feature to the `eth2` dependency in `validator_manager`


Co-Authored-By: Mac L <mjladson@pm.me>
2026-04-28 08:59:07 +00:00
Jimmy Chen
280e2f1d53 Wire up ePBS SSE events and fix envelope availability (#9199)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-28 08:59:01 +00:00
Jimmy Chen
919c996c18 Fix spurious re-org logs on ePBS payload status changes (#9191)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-28 08:15:10 +00:00
Mac L
949c027dfd Add method to Hash256 to display shortened hashes (#9118)
#6689


  Inspired by the initial implementation of #9108, credit to @chong-he.
This adds an extension trait to `Hash256` and add a `short` method to provide smaller formatted hashes for logging.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-04-28 07:01:13 +00:00
Eitan Seri-Levi
028b5a42a9 Add payload attestation validator duty (#9178)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-27 15:13:35 +00:00
hopinheimer
6ab48a76f0 Gloas PayloadAttestation gossip verification (#9145)
Co-Authored-By: hopinheimer <knmanas6@gmail.com>

Co-Authored-By: hopinheimer <48147533+hopinheimer@users.noreply.github.com>

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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-27 09:51:20 +00:00
Shane K Moore
fae7941b2d Gloas ptc duties beacon node response (#8415)
Co-Authored-By: shane-moore <skm1790@gmail.com>

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

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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-04-26 15:25:00 +00:00
Eitan Seri-Levi
276c4d5ff3 Gloas set AttestationData.index (#9100)
For gloas `attestation.data.index` should be set to 1 if we are attesting to a block whose slot is not the attestation duty slot and slot payload_status is `FULL`


  


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-04-26 13:40:22 +00:00
Eitan Seri-Levi
6323cd3827 Fix builder exit signature batch verification logic and small refactor (#9173)
We had a bug when performing batch builder exit signature verification. The EF spec tests cover this case, but the EF tests only calls  individual signature verification (which is a separate code path). This PR unifies the two code paths. We should probably spend some time reviewing EF test code coverage and make sure we don't have separate code paths that do similar things.


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-25 23:51:02 +00:00
hopinheimer
df764ffa9a Re-issue ForkchoiceUpdate based on updated PayloadStatus (#9102)
Co-Authored-By: hopinheimer <knmanas6@gmail.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-04-25 08:04:09 +00:00
Daniel Knopik
8a384ff445 Cell Dissemination (Partial messages) (#8314)
- https://github.com/ethereum/consensus-specs/pull/4558
- https://eips.ethereum.org/EIPS/eip-8136


  


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-23 18:52:28 +00:00
Pawan Dhananjay
e086628efe Avoid lint and fmt for agents (#9166)
N/A


  Do not make the AI agent always fmt and lint. This takes way too long and the agents I work with take this too literally sometimes and run lint after incomplete changes just wasting time.

I feel its not a big ask to run fmt and lint yourself and/or run it in some local configs instead of global ones.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-04-23 12:50:15 +00:00
Eitan Seri-Levi
82dc8b4edc Ensure payload envelope streamer always serves canonical envelopes after the split slot (#9085)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-23 11:32:26 +00:00
Eitan Seri-Levi
cfc748309f At the fork transition ensure we build ontop of the correct parent block hash (#9160)
When producing a block at the fork, treat parent payload status as full

I've been testing on kurtosis and this fixes an issue where we cant propose a block at the fork.

This is a screenshot of the fix. The envelope shows missing because we are missing an SSE event, but the envelope is in fact being imported and the chain is progressing just fine
<img width="652" height="748" alt="image" src="https://github.com/user-attachments/assets/7764a68c-33fb-4987-a691-0af71f0bea02" />


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-22 15:43:17 +00:00
Mac L
5a13e37456 Fix audit failure for rustls-webpki (#9161)
Another `rustls-webpki` audit failure: https://rustsec.org/advisories/RUSTSEC-2026-0104


  Bump `rustls-webpki` to the latest (unaffected) version.
As with the previous `rustls-webpki` vulns, we add an ignore for our older version required by warp 0.3.
This ignore will be resolved by https://github.com/sigp/lighthouse/pull/9001


Co-Authored-By: Mac L <mjladson@pm.me>
2026-04-22 12:07:59 +00:00
Michael Sproul
4de08f1b4a Remove more mentions of "pending"/"full" states (#9156)
Just a little naming cleanup (no semantic changes) to remove mentions of pending and full states that were still lurking.

This hopefully helps Claude forget about the concept (it defaults to naming variables `pending_state`s without this change).


  


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-04-22 02:03:13 +00:00
Eitan Seri-Levi
7731b5f250 Gloas engine api updates (#9150)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-21 07:36:22 +00:00
Michael Sproul
02c2841db0 Revert Gloas API changes from 9092 (#9151)
This reverts commit 2749e18d0e, from:

- #9092

We no longer need those changes since the abolition of pending/full states.


  


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-04-21 07:23:07 +00:00
Michael Sproul
cf3d5e285e Gloas spec v1.7.0-alpha.5 and beacon_chain tests (#8998)
Fix database pruning post-Gloas


  - Fix DB pruning logic (and state summaries DAG)
- Get the `beacon_chain` tests running with `FORK_NAME=gloas` 🎉


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>

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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-04-21 06:29:15 +00:00
Michael Sproul
c028bac28d Fix slasher OOM (#9141)
Fix a vulnerability in the slasher whereby it would OOM upon processing an invalid attestation with an artificially high `validator_index`. This fix has already been made available to affected users on the `slasher-fix` branch.


  - Prevent attestations from being passed to the slasher prior to signature verification. This was unnecessary, as they would later be passed on successful validation as well.
- Add a defensive cap on the maximum validator index processable by the slasher. The cap is high enough that it shouldn't be reached for several years, and will quickly result in warning logs if forgotten.
- Add a regression test that confirms that the issue is fixed.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-04-20 00:59:42 +00:00
Michael Sproul
9b08e1ad63 Fix total_effective_balance=0 in PreEpochCache (#9106)
Fix a **consensus fault** in `PreEpochCache` 🙀

Fortunately it's only reachable on a network with `total_active_balance=0`, i.e. a network that's already completely dead. As such this PR is not time-sensitive in any way.


  Add the floor on `total_effective_balance` when converting from `PreEpochCache` to `EpochCache`. An alternative would be to add the floor inside `PreEpochCache::get_total_active_balance`, however that would be redundant, as the only place this function is called outside this file is in single-pass epoch processing:

176cce585c/consensus/state_processing/src/per_epoch_processing/single_pass.rs (L461-L462)

The `set_total_active_balance` call already handles the floor.

A regression test is included.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-04-20 00:59:39 +00:00
Shane K Moore
b561b59549 Gloas - add get_payload_attestation_endpoint (#8497)
Co-Authored-By: shane-moore <skm1790@gmail.com>

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

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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-17 14:01:25 +00:00
Pawan Dhananjay
4cb3ffed8d Rust 1.95 lints (#9142)
N/A


  Adds lints for rust 1.95. Mostly cosmetic.
1. .zip(a.into_iter()) -> .zip(a) . Also a few more places where into_iter is not required
2. replace sort_by with sort_by_key
3. move if statements inside match block.
4. use checked_div instead of if statements. I think this is debatable in terms of being better, happy to remove it if others also feel its unnecessary


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-04-16 23:50:20 +00:00
Shane K Moore
794718e96b Gloas vc ptc duty (#8338)
Co-Authored-By: shane-moore <skm1790@gmail.com>

Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
2026-04-16 10:23:18 +00:00
Lion - dapplion
a9f43f9934 Add mixed V17/V29 execution payload invalidation test (#9089)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-04-16 06:19:57 +00:00
Jimmy Chen
e0922badbe Prefix VC root spans with lh_ so they get exported to tracing backend (#9129)
The tracing exporter uses a `PrefixBasedSampler` that only samples root spans whose name starts with `lh_`. Rename the VC root spans to include the prefix so their traces are exported.

Thanks @lmnzx for pointing this out!


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-16 00:07:58 +00:00
Mac L
30446b9f3a Bump rustls-webpki to unblock CI (#9130)
New audit failure from `RUSTSEC-2026-0098`


  Bump `rustls-webpki` to an unaffected version, add an ignore for the old version used by `warp` 0.3


Co-Authored-By: Mac L <mjladson@pm.me>

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-04-16 00:07:54 +00:00
YoungWoo Yang
d3c13c4cf0 Gloas: envelope peer penalties and REJECT/IGNORE mapping (#8981)
Closes #8949


  Implements peer penalties and REJECT/IGNORE message propagation for `SignedExecutionPayloadEnvelope` gossip handling, completing follow-up work from #8806.

Feedback on the error classification would be appreciated.

### Key Implementation Details

- Maps all 15 `EnvelopeError` variants to REJECT/IGNORE based on [Gloas p2p spec](https://github.com/ethereum/consensus-specs/blob/master/specs/gloas/p2p-interface.md#execution_payload)
- Follows `ExecutionPayloadError` handling pattern from block gossip (`penalize_peer()` method)
- Uses explicit variant matching (rather than catch-all `_`) for type safety
- Applies `LowToleranceError` penalty for protocol violations (invalid signatures, mismatches, etc.)
- Ignores without penalty for spec-defined cases (unknown block root, prior to finalization) and internal errors


Co-Authored-By: 0u-Y <yyw1000@naver.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@gmail.com>
2026-04-14 16:41:56 +00:00
Eitan Seri-Levi
b40a178111 Gloas bid and preference verification (#9036)
Gossip verify and cache bids and proposer preferences. This PR also ensures we subscribe to new fork topics one epoch early instead of two slots early. This is required for proposer preferences.


  


Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
2026-04-14 16:39:59 +00:00
Barnabas Busa
8c8facd0cd Add missing beacon API config/spec values (#9112)
Co-Authored-By: Barnabas Busa <busa.barnabas@gmail.com>
2026-04-13 01:02:50 +00:00
chonghe
c615210fef Truncated Display impl for ExecutionBlockHash (#9108)
- #6689


  The intention is to only modify the INFO logs that's emitted regularly to reduce the verbosity. But I understand that this change will affect other display in the logs too that uses the `ExecutionBlockHash` display. So would love some feedbacks about the change.


Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>

Co-Authored-By: Mac L <mjladson@pm.me>
2026-04-09 12:00:53 +00:00