Commit Graph

3961 Commits

Author SHA1 Message Date
Eitan Seri-Levi
188f8271ec revert uneeded changes 2026-04-28 16:33:47 +02:00
dapplion
11684b0da0 Complete envelope-lookup functionality and tests
Implementation:
- payload_envelope_verification: implement the AvailabilityPending branch
  in the envelope import flow. Previously returned
  InternalError("Pending payload envelope not yet implemented") for any
  envelope whose data columns hadn't yet been received, blocking the
  end-to-end RPC import path. New `import_pending_execution_payload_envelope`
  marks the payload as received in fork choice and persists the envelope to
  the store; columns are still expected to arrive separately (gossip /
  engineGetBlobs / reconstruction) and persist their own ops.

- sync manager: short-circuit `handle_unknown_parent_envelope` when the
  parent's payload was received between gossip-verification and the trigger
  reaching sync. No lookup is created; the trigger is treated as a no-op.

- gossip→sync hook: when a Gloas envelope is imported via the gossip path,
  emit `SyncMessage::GossipEnvelopeImported { block_root }` so any lookups
  awaiting that parent envelope unblock without depending on the in-flight
  RPC response landing first. Closes the review-flagged race where a
  gossip-imported envelope left child lookups pinned.

Tests (3 new):
- envelope_already_received_skips_lookup — trigger after envelope already
  in fork choice creates zero lookups.
- happy_path_unknown_parent_envelope — end-to-end RPC import path: lookups
  complete, head advances to the gossip block.
- happy_path_unknown_parent_envelope_via_gossip — pending envelope-only
  lookup unblocked by a concurrent gossip import via the new sync hook.

Existing tests updated:
- bad_peer_envelope_rpc_failure / bad_peer_wrong_envelope_response now
  expect the lookup to retry and succeed (mirroring `bad_peer_*` tests for
  blocks/blobs/columns), reflecting the now-working import path.
2026-04-28 15:49:29 +02:00
Eitan Seri-Levi
82dde267b5 range sync 2026-04-28 15:39:40 +02:00
dapplion
7e50d47082 Add bad-peer and crypto-fail envelope-lookup tests
- bad_peer_wrong_envelope_response — peer responds with a different block_root
  than requested; request items raise UnrequestedBlockRoot, both lookups drop.
- crypto_on_fail_with_bad_envelope_signature — signature corruption rejected
  in gossip verification, peer scored with lookup_envelope_processing_failure.

Rename the four already-landed tests to match the existing happy_path /
bad_peer / envelope_* / crypto_on_fail_with_* naming.
2026-04-28 15:25:17 +02: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
dapplion
4dc34c6854 Add gloas parent-envelope-unknown lookup tests
Wires the lookup test rig for Gloas:
- Capture per-block execution payload envelopes from the external harness
  and serve them to peers via a new `network_envelopes_by_root` map.
- Handle `RequestType::PayloadEnvelopesByRoot` in `simulate_on_request` and
  `Work::RpcPayloadEnvelope` in the simulator processor branch.
- Allow `TestRig` callers to override the genesis validator count and
  bump initial balances to `max_effective_balance_electra` post-Electra,
  which Gloas committee-selection requires for genesis init to converge.

Adds four tests for the parent-envelope-unknown flow (each verified
red/green by stubbing the corresponding source path):

- `creates_envelope_and_child_lookups` — `UnknownParentEnvelope` produces
  exactly one envelope-only lookup for the parent root and one child
  lookup awaiting that envelope.
- `idempotent_triggers` — repeated triggers for the same parent merge
  into the existing envelope lookup; no duplicate lookups are created.
- `issues_payload_envelopes_by_root_rpc` — the envelope-only lookup
  dispatches a `PayloadEnvelopesByRoot` RPC for the parent block_root.
- `drops_cascade_on_rpc_error` — when the envelope RPC errors, the
  envelope lookup is dropped and the awaiting child cascades with it.

The end-to-end happy path (envelope arrives → child unblocks → block
imports → head advances) is gated on
`process_execution_payload_envelope` supporting `AvailabilityPending`,
which today returns `InternalError("Pending payload envelope not yet
implemented")`. That gap is independent of this PR's lookup machinery.
2026-04-28 14:59:06 +02:00
dapplion
f44c9e6b84 Simplify reconstruction test assertion
Replace `assert_event_journal_contains_at_least_ordered` helper with an
inline drain that just counts the gossip + reconstruction events. The
helper was carrying around `WORKER_FREED` bookkeeping and a strict
prefix-match for one caller; counting the two relevant work types until
both thresholds are met is the same check with much less code.
2026-04-28 14:59:06 +02:00
dapplion
aaf3f1d5f9 Fix beacon-chain and network test failures under FORK_NAME=gloas/fulu
- block_verification: skip ParentEnvelopeUnknown check when parent is the
  proto-array anchor. The anchor's `payload_received` is intentionally
  false per spec (never added to `store.payloads`), but no envelope is
  expected for it; without this exception the check rejects every
  post-anchor gloas block.

- network tests: disable `engineGetBlobs` in the TestRig harness. Under
  real crypto the mock EL's blob fetch raced the gossip path, importing
  via a spawned task that the test didn't await -- leaving `head_root()`
  unchanged when the assertion ran. The tests are designed to exercise
  the gossip + data-column path; the engine fetch was incidental.

- network tests: relax `data_column_reconstruction_at_deadline` to allow
  trailing duplicate reconstruction work items. The reprocess queue
  removes its dedup entry on dispatch, so a column processed during an
  in-flight reconstruction can dispatch a second one. The second is a
  no-op via `reconstruction_started`, so accept >= 1 trailing event.
2026-04-28 14:59:06 +02: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
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
c61b512bc4 Merge branch 'unstable' into gloas-parent-envelope-unknown-lookup 2026-04-28 00:09:59 +02: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
269e474f49 Resolve merge conflicts 2026-04-25 17:14:57 +09: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
ca59cf453e Merge conflicts' 2026-04-23 02:34:34 +09:00
Eitan Seri-Levi
755b8d8510 resolve merge conlfict 2026-04-23 02:15:26 +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
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
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
Eitan Seri-Levi
20f0c7bf4b Merge branch 'unstable' into gloas-parent-envelope-unknown-lookup 2026-04-05 14:37:53 +09: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
Eitan Seri- Levi
2ed5e0f6fb merge conflicts 2026-04-03 09:26:40 -07:00
Eitan Seri-Levi
34e5f89537 Apply suggestion from @eserilev 2026-04-03 17:42:41 +09:00
Eitan Seri-Levi
3112792435 Apply suggestion from @eserilev 2026-04-03 17:42:22 +09:00
Eitan Seri- Levi
e7dd95131d Resolve merge conflicts 2026-04-03 01:40:40 -07: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
b333841229 update 2026-04-03 01:04:34 -07:00
Eitan Seri- Levi
f897215684 refactor awaiting_parent field and some metrics 2026-04-03 01:02:57 -07:00