Commit Graph

3801 Commits

Author SHA1 Message Date
Jimmy Chen
819bd9a41b Fix Gloas SSZ/JSON decoding for FullBlockContents and PublishBlockRequest 2026-04-28 17:11:35 +02:00
dapplion
85b6c4d93f Fix post_beacon_pool_payload_attestations_valid for Gloas
PR #9178 added this Gloas-only test using ApiTester::new() which
produces a phase0 chain even under FORK_NAME=gloas, so
head.beacon_state.get_ptc(...) errored with IncorrectStateVariant.
After switching to new_with_hard_forks() three further issues
surfaced:

1. The slot clock is left at head_slot + 1 by the harness setup, so
   a payload attestation for head_slot fails gossip propagation as a
   PastSlot. Rewind the clock to head_slot in
   make_valid_payload_attestation_message.

2. With VALIDATOR_COUNT = 32 and 32 slots/epoch, a slot's committees
   often hold only a single validator. The PTC for that slot then
   has one distinct validator regardless of PTCSize. The original
   test chained JSON and SSZ sub-tests on the same harness with
   ptc_offset 0 and 1 and asserted both gossip-published, but the
   second message is a duplicate (same slot/validator) and is
   silently dropped as PriorPayloadAttestationMessageKnown — so the
   second recv() hangs forever. Split the SSZ variant into its own
   test with its own harness so the two don't collide in the
   ObservedPayloadAttesters cache.

3. Switching the JSON test to new_with_hard_forks() so the chain
   actually reaches Gloas under FORK_NAME=gloas (same fix as the
   sibling tests added in #8415 and #9100).

Verified locally: full Gloas suite 197/197 passed (350s).
2026-04-28 14:03:00 +02:00
dapplion
f583e1886c Merge remote-tracking branch 'upstream/unstable' into claude/gloas-http-tests-fix-151c7b 2026-04-28 11:11:23 +02: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
dapplion
2cfe5ff380 Fix get_validator_duties_early after #8415 merge
PR #8415 added Gloas-only payload-timeliness-committee assertions to
test_get_validator_duties_early but kept the test using
ApiTester::new() (default mainnet spec). With FORK_NAME=gloas this
produces a phase0 chain, so post_validator_duties_ptc returns 500
with BeaconStateError(IncorrectStateVariant).

Two issues fixed:

1. Switch the test wrapper to ApiTester::new_with_hard_forks() so the
   chain is actually at Gloas under FORK_NAME=gloas. This is the same
   pattern already used by get_validator_duties_ptc and
   get_validator_payload_attestation_data.

2. Compute dependent_root using
   ChainSpec::proposer_shuffling_decision_slot rather than the
   hardcoded "(current_epoch - 1).end_slot()" formula. Post-Fulu the
   proposer shuffling decision slot moved to the end of epoch N - 2,
   so the cache is now keyed by that root. The old formula matched
   the legacy cache key and silently passed on phase0 chains.

Verified locally with FORK_NAME=gloas (195/195) and FORK_NAME=fulu
(195/195).
2026-04-27 10:10:51 +02:00
dapplion
20ba83abbf Merge remote-tracking branch 'upstream/unstable' into claude/gloas-http-tests-fix-151c7b 2026-04-27 09:44:14 +02:00
dapplion
e6b5b441a5 Fix Gloas http-api-tests failures
Two tests fail under FORK_NAME=gloas; only the first surfaces in CI
because nextest aborts on the first failure.

1. status_tests::node_health_el_online_and_not_synced

   The test simulates "EL online but not synced" via
   mock_el.server.all_payloads_syncing(true), expecting the head to
   become optimistic so the endpoint returns 206. In Gloas, blocks
   don't carry execution payloads — the payload arrives via an
   envelope, so newPayload is never called during block import and
   the head is never marked optimistic. The endpoint correctly
   returns 200. Skip the test for Gloas, matching the existing
   pattern on el_error_on_new_payload.

2. tests::get_validator_payload_attestation_data

   Two issues stacked:
   - The test used ApiTester::new() (default phase0 spec) so the
     chain wasn't actually at the Gloas fork even with
     FORK_NAME=gloas. Switch to new_with_hard_forks(), which uses
     test_spec() and respects FORK_NAME.
   - produce_payload_attestation_data requires
     head.slot == request_slot, but the harness leaves the slot
     clock at head_slot + 1 with no block produced for that slot.
     Rewind the slot clock to the head slot in the test helper.

Full Gloas http-api suite: 193 tests run: 193 passed.
2026-04-27 09:17:25 +02: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
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
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
37433b926a Merge branch 'unstable' into gloas-http-tests 2026-04-23 01:14:08 +09: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
Eitan Seri-Levi
332db26672 Revert test issue 2026-04-22 16:16:35 +09: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
81a3114cb8 unblock some tests 2026-04-22 09:58:01 +09:00
Michael Sproul
d8b328f3eb Add TODO about consensus block value 2026-04-21 18:07:52 +10:00
Michael Sproul
2021055121 Gloas HTTP API tests passing 2026-04-21 17:52:59 +10: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
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
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
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
Mac L
7c2dcfc0d6 Refactor timestamp_now (#9094)
#9077


  Where possible replaces all instances of `validator_monitor::timestamp_now` with `chain.slot_clock.now_duration().unwrap_or_default()`.
Where chain/slot_clock is not available, instead replace it with a convenience function `slot_clock::timestamp_now`.
Remove the `validator_monitor::timestamp_now` function.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-04-09 08:41:02 +00:00
cui
fb5a0434d7 Fix graffiti calculator test mock commit fallback (#9087)
Co-Authored-By: Weixie Cui <cuiweixie@gmail.com>
2026-04-09 05:54:14 +00:00
CATS
b95f99f130 feat(execution_layer): log more detail when JWT auth fails (#9051)
Co-Authored-By: CATS <dev@yaksha3.ai>

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>
2026-04-09 05:54:10 +00:00
Mark Liu
8681e8e06e Reduce slow test runtimes to under 60s (#9012)
Co-Authored-By: Mark Liu <mark@prove.com.au>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-04-09 05:36:49 +00:00
Eitan Seri-Levi
2749e18d0e Gloas serve post block state for finalized/justified state requests (#9092)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-04-08 18:44:19 +00:00
Jimmy Chen
27af0ed82c Add test for protocol registration completeness (#8920)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-04-03 16:35:08 +00:00
Michael Sproul
65c2e01612 Gloas fork choice redux (#9025)
Co-Authored-By: hopinheimer <knmanas6@gmail.com>

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

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

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

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

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

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

Co-Authored-By: Daniel Knopik <107140945+dknopik@users.noreply.github.com>
2026-04-03 08:35:02 +00:00
Eitan Seri-Levi
99f5a92b98 Automatically pass spans into blocking handles (#8158)
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-01 02:13:20 +00:00
chonghe
03385d698d Update blob_delay_ms to track data columns seen (#9024)
* #7477


  Use the last seen data column as the time for `blob_delay_ms`, the metric name remains unchanged


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

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

Co-Authored-By: Tan Chee Keong <tanck2005@gmail.com>
2026-04-01 00:58:52 +00:00
Daniel Knopik
62c016660f Emit SSE: execution_payload (#9065)
Emit `execution_payload` on successful import of an execution payload.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-04-01 00:58:49 +00:00
Daniel Knopik
037b263f17 Emit SSE: execution_payload_gossip (#9063)
Emit `execution_payload_gossip` on successful gossip verification of an execution payload. This is done as last step inside the verification function.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-03-31 15:16:40 +00:00
Eitan Seri-Levi
f6f37652a8 Gloas get payload envelope beacon API (#9038)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Mac L <mjladson@pm.me>
2026-03-31 10:44:12 +00:00
Daniel Knopik
2b224c59f7 Add Gloas SSE event boilerplate (#9053)
Implement boilerplate for new SSE events as specified in
- https://github.com/ethereum/beacon-APIs/pull/588

While that one is not merged yet, I believe the SSE events might be utilized in Dora already.


  Implement the boilerplate, i.e. subscription tracking and publish queues. A PR to implement to fully implement already implementable events will follow.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-03-31 06:16:34 +00:00
Lion - dapplion
bc5d8c9f90 Add range sync tests (#8989)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-03-31 05:07:22 +00:00
Michael Sproul
991dc92d8f Check ChainSpec consistency with upstream config.yaml (#9008)
Closes:

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


  - Commit `config.yaml` for minimal and mainnet to `consensus/types/configs`. For now we omit any auto-downloading logic, to avoid the hassles of dealing with Github rate limits etc on CI. Unfortunately these files are NOT bundled inside the spec tests.
- Fix the values of `min_builder_withdrawability_delay` for minimal and mainnet. These discrepancies aren't caught by the current spec tests, because the spec tests are missing data: https://github.com/ethereum/consensus-specs/pull/5005. Will be fixed in the next release/when we update to nightly.
- Fix the blob schedule for `minimal`, which should be empty, NOT inherited from mainnet.
- Keep `SECONDS_PER_SLOT` for now because the Kurtosis tests fail upon their complete removal. We will be able to completely remove `SECONDS_PER_SLOT` soon.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-03-30 06:43:57 +00:00
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