3907 Commits

Author SHA1 Message Date
Eitan Seri-Levi
402a744819 Merge pull request #46 from eserilev/fix/record-il-satisfaction-on-envelope-import
fix(focil): record inclusion list satisfaction on envelope import
2026-05-19 00:02:34 -07:00
Eitan Seri-Levi
299ed09d7e Resolve merge confklicts 2026-05-18 23:12:53 +03:00
Devnet Bot
a4c1901d3b fix(focil): record inclusion list satisfaction on envelope import
The payload_inclusion_list_satisfaction map in fork choice was never being
populated. This meant should_extend_payload always returned false, causing
the Empty/Full tiebreaker to always favor Empty — resulting in payload
envelopes being orphaned even when they satisfied the inclusion list.

After importing a valid execution payload envelope, check whether its
transactions satisfy the cached inclusion list entries for that slot and
record the result in fork choice. This allows the tiebreaker to correctly
favor Full when the IL is satisfied.
2026-05-18 15:20:30 +00:00
Devnet Bot
49c67f2632 fix(focil): simplify IL gossip slot validation to match spec
Remove non-spec attestation deadline check that was incorrectly
rejecting ILs arriving in the first 1/3 of the slot. Per the heze
p2p-interface spec, ILs are valid when message.slot == current_slot
(with MAXIMUM_GOSSIP_CLOCK_DISPARITY allowance).

Also accept current_slot + 1 for clock disparity tolerance.
2026-05-17 19:39:23 +00:00
Eitan Seri-Levi
278111f4c4 Resolve merge conflicts 2026-05-17 12:13:00 +03:00
Eitan Seri-Levi
ac7fc2206a Resolve merge conflicts 2026-05-17 11:55:52 +03:00
Daniel Knopik
1a68631180 Gloas payload cache (#9209)
In Gloas, beacon blocks are imported into fork choice immediately - the payload envelope and data columns arrive
separately. KZG commitments moved from the column sidecar into the execution payload bid, so the existing
`DataAvailabilityChecker` (which assumes block and data are coupled) can't be used for Gloas.


  * Introduced `PendingPayloadCache` to keep track of payload and data columns per block root.
* Added gossip column verification
* Added support for Gloas data column reconstruction
* Payload envelope verification simplified: removed `MaybeAvailableEnvelope`, `ExecutedEnvelope`, `EnvelopeImportData`

Not yet implemented (tracked with TODOs):
- Proper lookup sync for Gloas columns arriving before blocks
- Partial column merging for Gloas
- Moving `load_gloas_payload_bid` disk reads off the async runtime
- Backfill/range sync for Gloas

Based on @eserilev's PR and work in progress. See also #9202 for verification.


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

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

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

Co-Authored-By: Daniel Knopik <107140945+dknopik@users.noreply.github.com>

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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-05-13 07:03:34 +00:00
Eitan Seri-Levi
9101ddc69d ignore-ws-check flag doesnt allow the node to start outside the weak subjectivity period (#9290)
Using the `ignore-ws-check` doesn't actually let you start up a node thats outside the weak subjectivity period


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-05-13 04:20:08 +00:00
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
f5e4a66d89 More cleanup 2026-05-09 19:37:49 +03:00
Eitan Seri-Levi
03453a92d6 update 2026-05-09 19:12:55 +03:00
Eitan Seri-Levi
1b2cf3ba01 Many fixes 2026-05-09 18:58:08 +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
Devnet Bot
2356bdd256 chore: cargo fmt + fix clippy warnings 2026-05-06 16:08:52 +00:00
Devnet Bot
39b6f58bc2 feat(focil): retry envelope on transient EL errors
When engine_newPayloadV6 fails with a transient error (e.g. Besu's
ConcurrentModificationException), queue the envelope for retry instead
of permanently rejecting it. Matches Lodestar's behavior of retrying
on the next BlockImported event.

- Add RetryEnvelope variant to ReprocessQueueMessage
- On BlockImported, immediately dispatch any pending retry envelopes
- Fallback timeout of 1 slot in case no block arrives
- Max 3 retries per envelope to prevent infinite loops
- Only retry non-penalizing EL errors (transient failures)
2026-05-06 14:29:10 +00:00
Devnet Bot
732ab9628f fix(focil): use fork choice head_hash for IL production
In ePBS/Gloas, the execution payload is delivered via envelope, not
embedded in the beacon block. produce_inclusion_list was trying to
extract parent_hash from the beacon block's execution payload (which
doesn't exist), causing every IL fetch to fail.

Use cached_head.head_hash() which correctly tracks the execution
block hash through fork choice, including envelope imports.
2026-05-06 13:16:32 +00:00
Devnet Bot
732da6c8d6 fix(focil): skip engine_isInclusionListSatisfiedV1 call
Besu does not implement this method. Lodestar handles IL satisfaction
checking via the il_transactions param in newPayloadV6 instead of a
separate engine call. Skip the call and assume satisfied for now.
2026-05-06 13:16:32 +00:00
Devnet Bot
eb36f0edc2 fix(focil): engine API interop fixes for Besu
- Force engine_newPayloadV6 for Heze blocks (Besu supports V6 but
  capability detection was falling through to broken V5 path)
- Pass parentHash to engine_getInclusionListV1 (was sending empty
  params, Besu/Lodestar expect the parent block hash)
2026-05-06 13:16:32 +00:00
Devnet Bot
0aa7e43e85 wip: early envelope reprocessing and is_heze_fork plumbing 2026-05-06 13:16:05 +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
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
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
6a9b013a26 Focil stuff 2026-05-04 13:40:12 +03: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
4caa4a1c55 gloas genesis fix 2026-05-01 13:19:01 +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
fa87ff23a9 fix payload v5 2026-05-01 10:31:07 +02:00
Josh King
c32b89c902 fix: tighten genesis block fallback to match empty body root only 2026-04-30 17:27:37 +02:00
Josh King
78f22be80c fix: fallback to empty genesis block for external genesis states 2026-04-30 17:12:28 +02:00
Eitan Seri-Levi
313e2d946c Fmt 2026-04-30 16:22:17 +02:00
Eitan Seri-Levi
e75eb4758c fix claude dummy 2026-04-30 16:08:10 +02:00
Eitan Seri-Levi
4e3a3c1d7e \engine_getInclusionListV1 fix 2026-04-30 15:40:00 +02:00
Eitan Seri-Levi
49fba11d8d is_inclusion_list_satisfied logic 2026-04-30 15:24:49 +02:00
Eitan Seri-Levi
c9c5a9e7ab should_extend_payload fix 2026-04-30 15:14:02 +02:00
Eitan Seri-Levi
2585096de6 FMT 2026-04-30 15:03:42 +02:00
Eitan Seri-Levi
79c855a1c4 linting 2026-04-30 15:02:35 +02:00
Eitan Seri-Levi
7918dc2a0d Constants 2026-04-30 13:49:26 +02:00
Eitan Seri-Levi
12d31dbfbf heze block prod 2026-04-30 13:10:11 +02:00
Eitan Seri-Levi
0fe75382da fmt 2026-04-30 13:05:30 +02:00
Eitan Seri-Levi
b4ac2eefda il inclusion list inclusive 2026-04-30 12:53:51 +02:00
hopinheimer
5360e76696 fix genesis_block init in tests 2026-04-30 12:52:17 +02:00
Eitan Seri-Levi
8559bf0e10 update il cache with is timely 2026-04-30 12:42:34 +02:00
Eitan Seri-Levi
f567674871 Fork choice changes 2026-04-30 12:03:59 +02:00
Eitan Seri-Levi
9a5feb67c6 Engine api changes 2026-04-30 11:51:23 +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
Eitan Seri-Levi
71fb4c7346 Add new field 2026-04-30 11:20:50 +02: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