Commit Graph

7498 Commits

Author SHA1 Message Date
Michael Sproul
b7920318e7 Revert botched attestation changes 2026-05-19 17:54:06 +10:00
Michael Sproul
9fe6f3f68c Merge branch 'payload-attestation-committee-cache' into fc-compliance 2026-05-19 16:53:43 +10:00
Michael Sproul
c30dd6f9c3 Update comment 2026-05-19 15:53:16 +10:00
Michael Sproul
9929ea0da9 Remove outdated Pending/Full comment 2026-05-19 15:50:41 +10:00
Michael Sproul
dc4c4d31dc Update cache size comment 2026-05-19 15:49:40 +10:00
Michael Sproul
b5a093d2ed Merge remote-tracking branch 'origin/unstable' into payload-attestation-committee-cache 2026-05-19 15:43:12 +10:00
Lion - dapplion
398efc3acc Use dedicated cache for HTTP API route (#9318)
- PR https://github.com/sigp/lighthouse/pull/9305 wants to store PTCs in the committee cache.

BUT the http API route wants to use the committee cache and insert historical committees (i.e. given state at epoch 1000, compute and store the committee for epoch 900).

If we want a single cache to serve both use cases we need to:
- Have entries in the committee cache that have no PTC: Makes reading PTCs from the cache not deterministic
- Compute historical PTC: A bunch of complicated code that's useless

Instead we can add a separate cache for the API, very simple one, that caches committees only. And have the one in the beacon chain compute and cache PTCs always.

### Performance impact

Slightly additional memory cost for users of the `beacon/states/committees` route. Caching is almost equivalent, except for queries of recent committees that may already exist in the beacon chain's committee cache.

### AI disclousure

This PR was written by hand 90%. Claude fixed some warp type issues


  


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-05-19 05:12:17 +00:00
Michael Sproul
fd0852a8e5 Remove outdated SPRP hint (#9312)
While working on this code in another branch I noticed we had this messy, complicated and incorrect code about SPRP (slots-per-restore-point), which is no longer a relevant concept since the introduction of hot state diffs.

In the name of simplicity, I've removed any kind of hinting here in favour of a simple out of bounds error. The benefit of adding complex hinting code (which is not tested) to such a function is not worth it IMO. Users will work it out (or ask) if we just tell them their request is out of bounds.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-05-19 01:35:31 +00:00
Michael Sproul
a3bf75e9a1 Improve error handling 2026-05-19 10:58:26 +10:00
dapplion
8ec0c4fe7e Check that PTCs exist when inserting into the cache 2026-05-19 10:28:32 +10:00
Michael Sproul
4f2b393edb Remove future slot rejection 2026-05-18 13:53:14 +10:00
Michael Sproul
26098446db Merge branch 'payload-attestation-committee-cache' into fc-compliance 2026-05-18 12:57:19 +10:00
Michael Sproul
0fa823af1b Rename func for clarity 2026-05-18 12:09:48 +10:00
Michael Sproul
bd1a9ea2df Handle Gloas fork boundary epoch 2026-05-18 12:06:04 +10:00
Michael Sproul
9a0c3f859d Add basic test for fork boundary case 2026-05-18 09:53:37 +10:00
Michael Sproul
fd56cc81c6 Restore whimsy 2026-05-14 22:49:52 +10:00
Michael Sproul
c03c045f8b Fix non-canonical payload attestation processing 2026-05-14 22:30:24 +10:00
Michael Sproul
c65ed44d50 Clean up 2026-05-14 14:55:54 +10:00
Michael Sproul
d4eb6e4727 Refactor WIP 2026-05-14 14:37:24 +10:00
Michael Sproul
c87522411c Pass make lint-full 2026-05-14 13:24:01 +10:00
Michael Sproul
90fcc51216 Update committee cache to carry PTC 2026-05-14 13:23:51 +10:00
Michael Sproul
a795451cf9 Revert changes to payload attestation verif 2026-05-14 12:45:32 +10: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
Michael Sproul
715d6bfa0c All tests bar invalid_message passing, changes might be dubious 2026-05-13 09:26:27 +10: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
Michael Sproul
e9ae5babc8 Passing 3/6 compliance tests, but a bit sketchy 2026-05-12 15:31:06 +10:00
Michael Sproul
e0ba04d198 Put back irrelevant status with caveat comment 2026-05-12 12:09:01 +10: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
Michael Sproul
d77c23bcfb Reject future attestations with an error 2026-05-12 11:47:46 +10:00
Michael Sproul
14a4de41e0 Move payload status validation prior to mutations! 2026-05-12 11:47:16 +10: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
Michael Sproul
df9399e957 Fix more issues (mainly payload attestation application) 2026-05-11 22:04:24 +10: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
Michael Sproul
ed4de4ee52 Simplify handlers 2026-05-07 18:06:51 +10:00
Michael Sproul
6e2a27cc71 Use makefile rather than script 2026-05-07 18:04:15 +10:00
parithosh
8eed94e64a ef_tests: wire fork-choice compliance suites
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 15:17:03 +10: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
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
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
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
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
Sayan Mallick
5384ab8d67 Update CI: warp runnner to use snapshot and use warm (#9217)
Update the ci workflow to use warpbuild snapshot image and test suit uses `Swatinew/rust-cache` to utilize warpbuild cache


  


Co-Authored-By: lemon <snyxmk@gmail.com>
2026-05-01 00:05:17 +00: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