Commit Graph

7692 Commits

Author SHA1 Message Date
hopinheimer
757873200b Fix stale beacon_state_root in test helpers (#9289)
Test helpers `add_attested_block_at_slot` and `add_attested_blocks_at_slot` accepted `state_root` argument which was computed before applying the block.


  


Co-Authored-By: hopinheimer <knmanas6@gmail.com>
2026-05-12 06:24:18 +00:00
Eitan Seri-Levi
f968c7e5bb Dont penalize payload envelope peers after gossip verification (#9283)
We got in a little bit of trouble in devnet-3. After gossip verifying an envelope and before importing it, we got the following error

```
May 07 08:04:24.383 WARN  Execution payload envelope rejected           reason: "EnvelopeProcessingError(WithdrawalsRootMismatch { state: 0x852d38aaecc9f4e2e309919f74020c7bbcf050fea4a20edf3304f171e44ee9d5, payload:
```

The envelope had already passed gossip verification checks and was correctly propagated to the network, we should not penalize peers for doing this. This caused our node to isolate itself from the rest of the network. This PR removes peer penalties for any envelope that passes gossip validation


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-05-12 01:59:54 +00:00
Shane K Moore
2208e17937 chore: remove builder_index from produce_block_v4 (#9267)
Part of #8828 for the stateful path and helps align gloas `produceBlockV4` with beacon-APIs [PR](https://github.com/ethereum/beacon-APIs/pull/580)


  - Plumb `include_payload` query through the handler. Ignored for now since stateless mode isn't wired up yet
- Add `execution_payload_included` metadata field + `Eth-Execution-Payload-Included` header per spec. Both `false` until stateless lands
- Drop the `{builder_index}` segment from the envelope GET URL since no longer included in spec


Co-Authored-By: shane-moore <skm1790@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-05-11 15:27:41 +00:00
Eitan Seri-Levi
6058760903 Merge pull request #39 from eserilev/fix-envelope-lookup-stall
fix: only require parent envelope when bid references parent's payload
2026-05-08 14:42:46 +03:00
Eitan Seri-Levi
7aec7a768e fix: only require parent envelope when bid references parent's payload
The previous check triggered ParentEnvelopeUnknown for any block whose
parent didn't have its envelope received, even when the block's bid
didn't actually reference that parent's payload (e.g. building on
grandparent's execution state).

This caused a permanent stall when an envelope was rejected (e.g.
WithdrawalsRootMismatch from a buggy proposer): the parent's
payload_received stayed false, and all subsequent child blocks would
trigger infinite lookup retries for the broken envelope.

Fix: only require the parent's envelope if the block's bid
parent_block_hash matches the parent's execution_payload_block_hash,
meaning this block directly depends on the parent's payload.
2026-05-08 11:37:22 +00:00
Eitan Seri-Levi
6743600f49 Merge pull request #38 from eserilev/fix-optimistic-fcu-gloas 2026-05-08 13:01:29 +03:00
Eitan Seri-Levi
b53a969c30 fix: use execution_payload_block_hash for Pending payload status in fcU
When gloas envelopes are imported optimistically (EL returns SYNCING),
the payload status is Pending. Previously, Pending used
execution_payload_parent_hash for the head_hash in forkchoiceUpdated,
which tells geth to stay at the parent — never advancing.

Fix: use execution_payload_block_hash (the bid's committed hash) for
Pending status, same as Full. This tells geth to sync to the new head,
which is the purpose of optimistic sync. Geth will validate it and
transition from SYNCING to VALID on subsequent newPayload calls.

Also re-enables backfill sync for gloas with a dedicated
import_historical_gloas_block_batch that properly handles RangeSyncBlock::Gloas
variants (storing envelopes alongside blocks).
2026-05-08 08:53:25 +00:00
chonghe
1b921a64e6 Fix execution integration test CI failure (#9277)
Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
2026-05-08 08:12:38 +00:00
Eitan Seri-Levi
daa3759523 Merge pull request #37 from eserilev/fix-range-sync-node-unknown
fix: remove premature on_valid_payload_envelope_received + disable backfill for GLOaS
2026-05-07 18:40:10 +03:00
Eitan Seri-Levi
c52cee9d95 Allow optimistic payload verification for GLOaS envelopes
Remove the OptimisticSyncNotSupported check in into_executed_payload_envelope.
When the EL returns SYNCING (optimistic) for a payload envelope's newPayload
call, the envelope import should proceed rather than being rejected. This
commonly occurs after range sync imports blocks that the EL hasn't yet
validated - subsequent envelopes arriving via gossip would be rejected because
the EL is still catching up.

The downstream import path already handles optimistic status correctly:
- fork choice marks the payload as received regardless of EL status
- the payload_verification_status is propagated to SSE events/metrics
- if the payload is later found invalid, the normal invalidation mechanism
  handles it (same as for blocks)
2026-05-07 14:53:36 +00:00
Eitan Seri-Levi
f818612795 fix: remove premature on_valid_payload_envelope_received + disable backfill for GLOaS
1. Remove on_valid_payload_envelope_received call before process_block
   in chain segment import. The block isn't in fork choice yet, so it
   always fails with NodeUnknown. import_envelope_from_range_sync
   handles this correctly after process_block.

2. Disable backfill sync when GLOaS is scheduled. Backfill calls
   into_available_block which panics on GLOaS RangeSyncBlock variant.
   Backfill for GLOaS is not yet implemented.
2026-05-07 14:26:04 +00:00
Eitan Seri-Levi
e906208ae0 Update 2026-05-07 16:43:32 +03:00
Eitan Seri-Levi
def1a6cacc fix: store envelope for DuplicateFullyImported + fix load_parent
Two fixes for GLOaS range sync:

1. DuplicateFullyImported: persist envelope for blocks that are already
   in fork choice (e.g. post-checkpoint-sync blocks between finalized
   and head).

2. load_parent: if parent envelope isn't in store, check if parent is
   already in fork choice. If it is, the parent was already imported
   and validated — proceed without requiring the envelope in store.
   This handles the case where PayloadEnvelopesByRange doesn't return
   envelopes for all blocks (fewer envelopes than blocks).
2026-05-07 13:26:53 +00:00
Eitan Seri-Levi
083f62c418 Merge pull request #36 from eserilev/fix/load-parent-envelope-fork-choice-fallback
fix: check fork choice before requiring parent envelope in store (load_parent)
2026-05-07 16:14:26 +03:00
Eitan Seri-Levi
5a93cbdf77 debug + fix: store envelope for DuplicateFullyImported blocks
After checkpoint sync, blocks between the finalized checkpoint and head
are already in fork choice but their envelopes aren't in the store.
When range sync downloads these blocks, they get skipped as
DuplicateFullyImported without persisting the envelope. The next new
block then fails load_parent because it can't find its parent's envelope.

Fix: persist the envelope in the DuplicateFullyImported path, same as
the existing WouldRevertFinalizedSlot path.
2026-05-07 12:59:42 +00:00
Eitan Seri-Levi
3ff03ecd89 Merge branch 'gloas-parent-envelope-unknown-lookup' into glamsterdam-devnet-2 2026-05-07 12:37:41 +03:00
Eitan Seri-Levi
be178899cd Merge branch 'gloas-parent-envelope-unknown-lookup' of https://github.com/eserilev/lighthouse into gloas-parent-envelope-unknown-lookup 2026-05-07 12:37:26 +03:00
Eitan Seri-Levi
d8e359a7b6 Prevent chain stall 2026-05-07 12:37:03 +03:00
Lion - dapplion
7148bfcdd1 Implement beacon_blocks_by_head (#9237)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-05-07 02:41:01 +00:00
Lion - dapplion
31e5f308c3 Generalise reconstruct_historic_states for ranged replay (#9222)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-05-06 02:25:46 +00:00
Mac L
3351db1ba8 Remove TestRandom (#9006)
We  have a legacy `TestRandom` trait which generates random types for testing and fuzzing.
This function overlaps with `arbitrary` which is used very commonly in the ecosystem.


  Remove `TestRandom` and generate random type instances using `Arbitrary`.


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

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-05-05 06:35:57 +00:00
Pawan Dhananjay
4b314d8e79 Remove libssl dependency for cargo udeps (#9263)
N/A


  libssl download seems to be failing on [CI](https://github.com/sigp/lighthouse/actions/runs/25346412432/job/74316275231?pr=9126).
This was originally added to unblock CI in https://github.com/sigp/lighthouse/pull/6777, but we may not need this anymore.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-05-05 02:05:06 +00:00
jking-aus
d9be76afe7 fix: payload_attestation_data when no block received for slot (#9225)
Addresses issue #9220

The `payload_attestation_data` endpoint returns 400 when no block has been received for the requested slot. This causes the VC to log at CRIT level for what is expected behaviour per spec: validators should simply not submit a payload attestation when no block has been seen.


  - Return 404 (Not Found) instead of 400 from `payload_attestation_data` when no block exists for the slot. This is consistent with other beacon api endpoints.
- Downgrade the VC log from `crit` to `debug` when a 503 is received, since this is an expected no-op per spec.
- Add `BlockNotFound` rejection type to `warp_utils`.
- Add a test asserting the 404 response for an empty slot.


Co-Authored-By: Josh King <josh@sigmaprime.io>

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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-05-04 23:39:33 +00:00
Eitan Seri-Levi
2d68396a08 FIX CHECKPOINT SYNC 2026-05-04 17:27:38 +03:00
Eitan Seri-Levi
a6144def54 Merge branch 'unstable' into gloas-parent-envelope-unknown-lookup 2026-05-04 16:01:26 +02:00
Eitan Seri-Levi
22da18f640 Merge remote-tracking branch 'origin/gloas-range-sync' into glamsterdam-devnet-2 2026-05-04 16:51:06 +03:00
Eitan Seri-Levi
3dea23c6ba Conflicts 2026-05-04 16:50:56 +03:00
Eitan Seri-Levi
e0048b5206 Another hack 2026-05-04 16:50:35 +03:00
Eitan Seri-Levi
8341b44105 Merge 2026-05-04 16:33:31 +03:00
Eitan Seri-Levi
fff72716ba hacky fix 2026-05-04 16:33:03 +03:00
Eitan Seri-Levi
75d4333776 Hack for checkpoint sync 2026-05-04 15:46:48 +03:00
Eitan Seri-Levi
36aee54be2 Merge remote-tracking branch 'origin/gloas-range-sync' into glamsterdam-devnet-2 2026-05-04 14:58:45 +03:00
Eitan Seri-Levi
3d23f9be0d Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-range-sync 2026-05-04 14:58:16 +03:00
Eitan Seri-Levi
3015fa4842 Merge branch 'gloas-range-sync' of https://github.com/eserilev/lighthouse into gloas-range-sync 2026-05-04 14:58:07 +03:00
Eitan Seri-Levi
6af1a927b8 Actually do something with the responses... 2026-05-04 14:57:49 +03:00
Eitan Seri-Levi
9cf155a0dd Implement gloas proposer preference vc duty (#9208)
Allow for the vc to submit its proposer preferences to the network


  


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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-05-04 11:33:09 +00:00
Eitan Seri-Levi
1e78564752 Merge branch 'unstable' of https://github.com/sigp/lighthouse into glamsterdam-devnet-2 2026-05-04 13:29:09 +03:00
Mac L
ee61aee659 Unblock CI by temporarily ignoring hickory-proto audit failures (#9257)
Two audit failures for `hickory-proto` which is used upstream in `libp2p-dns` and `libp2p-mdns`

- https://rustsec.org/advisories/RUSTSEC-2026-0118.html
- https://rustsec.org/advisories/RUSTSEC-2026-0119.html

Tracking Issue: https://github.com/sigp/lighthouse/issues/9258


  Since RUSTSEC-2026-0118 does not even have any non-patched versions available and RUSTSEC-2026-0119 requires a major version bump I think we would need to wait on a release from libp2p in both cases.
So for now, add an ignore for each so we can at least unblock CI


Co-Authored-By: Mac L <mjladson@pm.me>
2026-05-03 11:10:19 +00:00
Eitan Seri-Levi
d6e3b006ea fix 2026-05-01 22:18:15 +02:00
Eitan Seri-Levi
7e502a5e65 Fix 2026-05-01 18:23:33 +02:00
Eitan Seri-Levi
e2171419df Merge branch 'unstable' of https://github.com/sigp/lighthouse into glamsterdam-devnet-2 2026-05-01 18:04:19 +02:00
jking-aus
330348ea14 fix: prevent duplicate column reconstruction dispatch (#9250)
Fixes a flaky CI failure in `data_column_reconstruction_at_deadline` where 2 `column_reconstruction` events are emitted instead of the expected 1.


  - Change `queued_column_reconstructions` from `HashMap<Hash256, DelayKey>` to `HashMap<Hash256, Option<DelayKey>>`, where `None` indicates reconstruction was already dispatched.
- On dispatch (`ReadyColumnReconstruction`), set the entry to `None` instead of removing it. This prevents a subsequent gossip column from inserting a fresh reconstruction request into the now-vacant slot.
- Prune stale `None` entries on each dispatch to keep the map bounded.


Co-Authored-By: Josh King <josh@sigmaprime.io>
2026-05-01 12:44:25 +00:00
Eitan Seri-Levi
7af3e813fe Merge branch 'glamsterdam-devnet-2' of https://github.com/sigp/lighthouse into glamsterdam-devnet-2 2026-05-01 12:04:23 +02:00
Eitan Seri-Levi
d787d9062b Merge branch 'gloas-payload-cache' into glamsterdam-devnet-2 2026-05-01 11:24:26 +02:00
Eitan Seri-Levi
47bcd0b347 Fix TODO 2026-05-01 11:12:18 +02:00
Michael Sproul
8b8124d4a4 Avoid 0x00 block hashes in fcU (#9233)
- Avoid sending 0x00 block hashes for the safe and finalized block hashes post-Gloas.
- Add code to check this inside the mock EL, which will be reached in all Gloas beacon chain tests


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-05-01 09:12:11 +00:00
Eitan Seri-Levi
cbe7bec40d Update beacon_node/beacon_chain/src/pending_payload_cache/mod.rs 2026-05-01 11:10:49 +02:00
Eitan Seri-Levi
5ce7c59f5e Rename validate_full_data_columns_with_commitments 2026-05-01 11:10:15 +02:00
Eitan Seri-Levi
2120ebba9b smol refactor 2026-05-01 10:54:50 +02:00
Eitan Seri-Levi
8510bb462d smol cleanup 2026-05-01 10:51:05 +02:00