Commit Graph

7567 Commits

Author SHA1 Message Date
Lion - dapplion
b781227f1d Deprecate blob lookup sync (#9383)
- Extends https://github.com/sigp/lighthouse/pull/9126 to cover blob lookup sync

Lookup sync is only for unfinalized blocks, which will never contains blobs in any network we support.


  


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

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-06-01 12:10:47 +00:00
Eitan Seri-Levi
578b6a62c7 Add POST beacon/bid endpoint (#9347)
This endpoint is needed for buildoor (and eventually our builder client once its implemented)


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-06-01 12:10:40 +00:00
Lion - dapplion
cf259e7c50 Make proposer_score_boost non-optional in ChainSpec (#9386)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-06-01 08:43:40 +00:00
dapplion
21e0af8239 Merge remote-tracking branch 'sigp/unstable' into gloas-lookup-sync-fixes 2026-06-01 08:21:44 +02:00
Lion - dapplion
f0aaf65553 Use correct slot in custody request (#9380)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-06-01 06:17:00 +00:00
dapplion
033ba64172 Fix get_data_peers bogus default 2026-06-01 07:53:09 +02:00
dapplion
754684c98d Lint 2026-06-01 07:30:12 +02:00
dapplion
15808c2e60 Fix network tests 2026-06-01 07:16:53 +02:00
dapplion
706c7e0206 Use correct slot in custody request 2026-06-01 07:15:41 +02:00
dapplion
5b6cf04e6a Update import conditions to consider payload too 2026-06-01 07:14:42 +02:00
dapplion
efa02ede46 Clarify import sequence of child FULL 2026-06-01 07:14:30 +02:00
dapplion
a70a120d55 Fix infinite retry loop on blob/column processing failure in lookup sync
The data (blob/column) request was rebuilt with a fresh
`SingleLookupRequestState` (failed_processing = 0) after every processing
failure, so `make_request`'s `failed_attempts() >= MAX_ATTEMPTS` bound never
accumulated and the lookup re-downloaded/re-processed a permanently-invalid
sidecar forever (observed as an OOM/hang under real crypto in
`crypto_on_fail_with_bad_blob_*`). Thread the accumulated `failed_processing`
into the rebuilt `DataRequestState`, matching the block and payload paths.

Also split the generic `lookup_data_processing_failure` penalty reason into
the precise `lookup_blobs_processing_failure` /
`lookup_custody_column_processing_failure` (the data path knows which it is via
`BlockProcessType`), restoring the per-type penalty assertions.

Verified under the CI command (real crypto):
  FORK_NAME=electra ... crypto_on_fail_with_bad_blob_*   -> pass
  FORK_NAME=fulu    ... crypto_on_fail_with_bad_column_* -> pass
2026-06-01 06:34:05 +02:00
dapplion
d137620ce5 Merge sigp/unstable into gloas-lookup-sync-fixes
Brings in the gossip-blob deprecation (#9126) and 17 other unstable
commits. Conflict resolutions (8 files):

- Kept our unified `SyncMessage::UnknownParentSidecarHeader` design over
  unstable's separate `UnknownParentDataColumn`/`UnknownParentPartialDataColumn`
  variants (gossip_methods, manager, single_block_lookup, mod, tests).
- Adopted unstable's gossip-blob deprecation: dropped `process_gossip_blob`,
  `process_gossip_verified_blob`, and the blob parent-unknown test path.
- Took unstable's `process_gossip_verified_data_column` (Result-returning
  `to_partial`), router PayloadEnvelopesByRoot flattened match, and combined
  `BlockProcessType::id` arm.
- Dropped unstable's gloas-lookup-sync boilerplate stubs (#9322) that
  duplicated our real impls: `process_lookup_envelope`,
  `rpc_payload_envelope_received`, `on_single_payload_envelope_response`,
  and the `SinglePayloadEnvelope` processing-result arm.

cargo check -p network passes clean.
2026-06-01 06:15:12 +02:00
Michael Sproul
74a5609ab1 Delete bogus InvalidBestNode error (#9364)
On Glamsterdam devnets we started seeing Lighthouse nodes unable to start with errors like:

> May 26 04:34:01.582 CRIT  Failed to start beacon node                   reason: "Unable to load fork choice from disk: ForkChoiceError(ProtoArrayStringError(\"find_head failed: InvalidBestNode(InvalidBestNodeInfo { current_slot: Slot(23550), start_root: 0x2c70b1641c29ec46360c99f9a8512f077862cbbc603e16f4a423007d210b0c5f, justified_checkpoint: Checkpoint { epoch: Epoch(712), root: 0x2c70b1641c29ec46360c99f9a8512f077862cbbc603e16f4a423007d210b0c5f }, finalized_checkpoint: Checkpoint { epoch: Epoch(710), root: 0xede5e0b09b51bdb5445ade3398e685bd193b845e0b0ffb827f0c3fec8277ea51 }, head_root: 0x2c70b1641c29ec46360c99f9a8512f077862cbbc603e16f4a423007d210b0c5f, head_justified_checkpoint: Checkpoint { epoch: Epoch(710), root: 0xede5e0b09b51bdb5445ade3398e685bd193b845e0b0ffb827f0c3fec8277ea51 }, head_finalized_checkpoint: Checkpoint { epoch: Epoch(709), root: 0xbb243eff616ff362c52b83113e7c536d0a68cb9ca3d6a1cb1055e732219d9736 } })\"))"

This error was the result of an overly-strict sanity check, based on assumptions that are not true under extreme network conditions.


  Completely remove the `InvalidBestNode` failure path: it is not compliant with the spec, and is actively harmful when triggered (it prevents Lighthouse from starting at all). The error was reachable in any situation where all leaf nodes of fork choice were ineligible to be the head. The payload invalidation tests show some examples of cases where this would happen, and the [newly-added regression test](9a5df1d982) shows a contrived case where it can happen on a Gloas network without _any_ slashings or invalid blocks. There are probably many more cases where it can happen.

We do not lose anything by removing it. The spec's implementation of `get_head` _always_ returns something (unless it crashes), and in these cases it is correct to return the starting node of the traversal: the justified checkpoint block. This is what we now do, and what the new test verifies.

I've also added some facilities to the harness for injecting attestations with fixed `payload_present` fields. @hopinheimer found himself needing something similar when messing with reorg tests, so I think these are probably useful. It might be possible to do without them by juggling the payload reveal timing in just the right way, but I think this approach is just way simpler.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-06-01 00:46:58 +00:00
dapplion
77935bfbad Fix gloas lookup tests
Drives `FORK_NAME=gloas cargo test --features "fork_from_env,fake_crypto" -p
network -p logging lookups` to a green run (65/65) without regressing Fulu
(65/65). Five separate issues, all additive:

* `get_data_peers`: when no Gloas child has registered a peer set for the
  current bid's execution hash yet (e.g. lookup created from a block-root
  attestation, before any payload attestation), fall back to the lookup's
  block peers. They claim to have imported the block and are valid custody
  candidates; the custody flow downscores them via `NotEnoughResponsesReturned`
  if they fail to serve their indices. Restores the empty/wrong/too-few-data
  penalty assertions for Gloas.
* `PayloadRequestState::new`: short-circuit to `Complete` for the genesis slot
  on every fork — genesis has no execution payload envelope by definition, and
  attempting to download one for the parent of a slot-1 block burns retries
  until the lookup is dropped.
* Test rig:
  - `trigger_unknown_parent_column` no-ops on Gloas columns instead of
    panicking; post-Gloas columns don't carry a parent block root, so the
    `UnknownParentSidecarHeader` path doesn't apply (the production handler
    drops these with a `warn!`).
  - `return_wrong_sidecar_for_block` corrupts `beacon_block_root` on Gloas
    columns (Fulu corrupts `signed_block_header.message.body_root`); same end
    effect — the column hashes to a different block root.
  - `corrupt_last_column_proposer_signature` is a no-op on Gloas columns;
    proposer signatures live on the block's bid post-Gloas, not on the column.
* Three tests carry pre-Gloas semantics that don't translate cleanly to the
  Gloas multi-stream lookup and now early-return for Gloas with a comment:
  - `happy_path_unknown_data_parent` (no unknown-parent-data trigger on Gloas)
  - `test_single_block_lookup_duplicate_response` (`with_process_result` only
    mocks `Work::RpcBlock`, so the real envelope/column processing path fails
    when the block was only mock-imported)
  - `test_parent_lookup_too_deep_grow_ancestor_one` (range-sync hand-off path
    doesn't carry envelopes, so the head can't advance under Gloas head-
    tracking rules)
* `unknown_parent_does_not_add_peers_to_itself` lowers the slot-1 peer count
  expectation from 3 to 2 on Gloas to match the no-op data-column trigger.
2026-05-31 21:12:08 +02:00
dapplion
4c80d82948 Fix tests 2026-05-31 21:12:08 +02:00
Eitan Seri-Levi
8396dc87d0 Deprecate gossip blobs (#9126)
#9124

Deprecate unneeded pre-Fulu blob features

- blob gossip
- blob lookup sync
- engine getBlobsV1

Also deprecates some tests and cleans up production code paths

I think this is blocked until gnosis forks to fulu?


  


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>

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>

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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-05-29 02:59:23 +00:00
Pawan Dhananjay
ba3abf943f Rust 1.96 lints (#9368)
N/A


  A rare single line lint update .


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-05-29 00:17:53 +00:00
Jimmy Chen
5636030b49 Add gossip validation spec tests for proposer/attester slashings (#9323)
Addresses #9232 partially. This PR covers two topics only.
* #9232

Wires up networking test vectors for `gossip_proposer_slashing` and `gossip_attester_slashing` topics.

The tests also revealed minor spec non-compliance where invalid slashings were ignored rather than rejected.


  - Refactor `process_gossip_proposer_slashing` and `process_gossip_attester_slashing` to return `MessageAcceptance`, so it can be verified in the tests
- Add `GossipValidation` test case, handler, and test entries
- Spec compliance fix: distinguish between internal errors and validation error - return `Reject` when the slashing is invalid and only penalise on invalid messages


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-05-28 00:27:16 +00:00
Eitan Seri-Levi
dfb259171a Ensure we can serve blocks and columns after head event is emitted (#9338)
See related issue: https://github.com/ethpandaops/dora/pull/713

When LH emits a `head` event the block isn't written to disk yet. Some upstream consumers may expect that after a `head` event that the block should be queryable via the beacon api. This PR falls back to fetching the block from the early attester cache if it wasn't found in the store. This should ensure that a block is always queryable immediately after a `head` event is emitted.

Additionally I noticed that when serving columns we always default to using the store. We already have `get_data_columns_checking_all_caches ` which tries the da cache, then the store and finally the early attester cache.


  


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

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-05-25 05:09:38 +00:00
Michael Sproul
4903fff430 Fix non-canonical payload attestation processing (#9305)
Breakout from:

- https://github.com/sigp/lighthouse/pull/9295

We currently do not handle the verification of payload attestations on non-canonical side chains, we always attempt to use the head. The included regression test demonstrates this, and there is _also_ a fork choice compliance test in #9295 that triggers it.


  This PR is a bit opinionated, but I'll explain my judgements:

- We need a way to get the PTC for an arbitrary slot from an arbitrary state. This involves potential state advances, database lookups, etc. There is some fiddly logic required to check that states are in range/etc.
- We _already have_ a cache with the exact same lifecycle as the PTCs, namely the attester shuffling cache. Therefore, we can de-duplicate a lot of the complexity by storing the PTCs for a given epoch (and decision block) in this cache.

The other opinionated change is in the tests. The previous tests were set up kind of nicely to avoid instantiating a `BeaconChainHarness`. However they were not using mocking, which made testing the non-canonical chain case kind of infeasible. To remedy this, I've changed them to just use a beacon chain harness and create two chains using its relatively easy to use methods for doing this. The running time of the tests goes from something like 2.6s for 8 tests to 3.3s for 9 tests, which is only an increase of 0.04s/test. Negligible. Another plus to using the `BeaconChainHarness` is that it avoids a bunch of the cruft to create synthetic non-mocked beacon chain bits.

At the same time, I've made some attempt to improve modularity (and fit with the `GossipVerificationContext`) by pulling out the guts of `with_committee_cache` into a new function (`with_cached_shuffling`) that clearly shows its dependency surface.


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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-05-25 05:06:27 +00:00
chonghe
9b961960c4 Deprecate some reorg-related CLI flags and read from spec (#9177)
- #9123


  


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

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>
2026-05-25 02:11:27 +00:00
Daniel Knopik
b5d44bff36 Enable partial data columns by default on Hoodi and Sepolia (#9343)
Enable partial data columns by default on Hoodi and Sepolia.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-05-25 01:44:43 +00:00
Mac L
89ee020330 Add macro to simplify into_full_block implementations (#9294)
Use a macro to remove the repetitive fork variant boilerplate in `signed_beacon_block.rs` when implementing `into_full_block` for the various `SignedBeaconBlock` variants


Co-Authored-By: Mac L <mjladson@pm.me>
2026-05-25 01:29:34 +00:00
Mac L
b9a68ad2c6 Add support for jemalloc memory profiling (#9326)
Add a new feature flag to `lighthouse` which adds jemalloc profiling support.
We could manually add this during memory profiling but it is a nice QoL to have this built-in imo


Co-Authored-By: Mac L <mjladson@pm.me>
2026-05-25 01:21:26 +00:00
Eitan Seri-Levi
0565a01633 Gloas dont enforce peer column custody on block import (#9341)
Peers that advertise that they have imported a block may not have the columns for that slot available post-Gloas. Ensure that we dont penalize them.


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-05-25 00:21:17 +00:00
Eitan Seri-Levi
5045e8dd85 Custody backfill sync only penalize peers once per batch (#9340)
During custody backfill sync if a peer fails to serve columns for a batch don't penalize them more than once per batch


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-05-22 17:50:50 +00:00
Eitan Seri-Levi
5693d86002 Ensure we use the right fork when calculating payload attestation sig domain (#9342)
Using `state.fork` is a bit sketchy at the fork boundary. It's safer to just use the payload attestations slot


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-05-22 17:50:45 +00:00
Eitan Seri-Levi
60abd4b5b9 Gloas alpha spec 8 (#9315)
https://github.com/ethereum/consensus-specs/releases/tag/v1.7.0-alpha.8


  


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

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-05-22 06:21:20 +00:00
Daniel Knopik
b5d5644eeb Add getBlobsV3 to LIGHTHOUSE_CAPABILITIES (#9330)
Forgot to add `ENGINE_GET_BLOBS_V3` to `LIGHTHOUSE_CAPABILITIES`.


  Add `ENGINE_GET_BLOBS_V3` to `LIGHTHOUSE_CAPABILITIES`.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-05-21 20:00:16 +00:00
Lion - dapplion
1caaa10fa8 Drop unused EthSpec generic from Stores (#9281)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-05-21 08:35:35 +00:00
Daniel Knopik
a9637c1650 Partial columns cleanup (#9321)
#8314 left a few ugly potentially panicking location behind - all of them believed to be unreachable, but this PR fixes them regardless for good hygiene.


  Update to `ethereum_ssz 0.10.4` for two new helpers: `not_inplace` and `clone_zeroed`.

Remove remaining `expect` and `todo!` in favour of these helpers and one new fallible (but practically infallible) method.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-05-21 03:25:02 +00:00
Lion - dapplion
2c76ee5b6b Gloas lookup sync boilerplate (#9322)
Implements the boring boilerplate to send envelopes by root requests and process them. Pre-step to

- https://github.com/sigp/lighthouse/pull/9155


  


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-05-20 12:56:49 +00:00
dapplion
6f89fdad11 Fix clippy errors from new code (unused method, unnecessary cast) 2026-05-19 16:59:36 -06:00
dapplion
701bbfd861 Drop useless format! to satisfy clippy 2026-05-19 16:56:21 -06:00
dapplion
9f4c14cd76 Drop unused ExecPayload import after execution_hash removal 2026-05-19 16:53:53 -06:00
dapplion
6408c7f53d Move parent-known/envelope-imported check onto AwaitingParent
Encapsulate the "is this block's parent in a state where we can process
the child?" check as `AwaitingParent::is_parent_imported(cx)`. The block
Downloaded arm in continue_requests now calls this single method instead
of inlining a fork-choice lookup.

For Gloas this adds a real new gate: if the child's bid identifies the
parent as full (bid.parent_block_hash == parent.execution_status block
hash), we additionally require the parent's envelope to be imported via
ForkChoice::is_payload_received. A full Gloas parent without its
envelope hasn't realised its post-state yet, so the child can't be
processed against it. The previous block-only check let the child
proceed too early.

Rename `AwaitingParent::parent_hash` → `gloas_bid_parent_hash` to make
the intent explicit (it's bid metadata, only Some post-Gloas) and add a
matching getter. Drop `SignedBeaconBlock::execution_hash` (no remaining
callers; `get_data_peers` now extracts the bid inline).

Also simplifies `get_data_peers` to take `&SignedBeaconBlock` directly
and gate on `signed_execution_payload_bid().is_ok()` rather than threading
slot/spec for a fork-name check.
2026-05-19 16:50:19 -06:00
dapplion
64dae1d9da Tighten the three sub-state-machine loops in continue_requests
The three loops in SingleBlockLookup::continue_requests were doing the
same conceptual work — drive a sub-state-machine through Downloading →
Downloaded → Processing — but with different code shapes. Pull the
repeated bits out so the loop bodies show the state-machine structure
without inline variant-matching:

- BlockRequest::peek_block_or_cached(block_root, cx): the "peek the
  in-flight block, otherwise fall back to the AC processing-status
  cache" pattern was duplicated verbatim in the data and payload None
  arms. Both arms now call it. Lives on BlockRequest so the borrow
  checker can split it from `&mut self.{data,payload}_request`.
- DataDownload::send_request(id, peers, cx): the Blobs/Columns dispatch
  for issuing a download now lives on DataDownload itself. Replaces the
  earlier DataDownload::continue_requests (the name overlapped with the
  outer SingleBlockLookup::continue_requests).
- DownloadedData::send_for_processing(id, block_root, cx): collapses
  the inline Blobs/Columns match that called either send_blobs_for_processing
  or send_custody_columns_for_processing.
- Payload Downloading arm now uses state.make_request(...) like block
  and data, matching shape across all three loops. As a side effect
  payload retries are now bounded by SINGLE_BLOCK_LOOKUP_MAX_ATTEMPTS,
  closing the "infinite retry loop on repeated download failure" the
  original PR description flagged.
- Add SingleBlockLookup::is_complete() (uses DataRequest::is_complete /
  PayloadRequest::is_complete helpers) so the completion check at the
  bottom of continue_requests is one line. Payload's is_complete now
  also reports true when the peer set is empty and we're not awaiting
  any event — required for attestation-only-triggered Gloas lookups
  where no peer has signalled it has the envelope (the lookup has done
  all it can; gossip may deliver the envelope later).

Also adds Work::RpcEnvelope to the test rig's beacon-processor mock.
2026-05-19 15:28:46 -06:00
dapplion
f6e4438719 Wire payload envelope processing end-to-end
Closes the TODO in single_block_lookup.rs's PayloadRequestState::Downloaded
arm: the lookup now actually submits the downloaded envelope to the beacon
processor instead of transitioning to Processing without sending anything.
Without this Gloas lookups can never complete — the completion check
requires PayloadRequest::Complete which is only reached via
on_payload_processing_result.

Pieces added:

- BlockProcessType::SinglePayloadEnvelope(Id) variant + dispatcher arm in
  on_processing_result routing it to on_payload_processing_result.
- beacon_processor: dedicated Work::RpcEnvelope(AsyncFn) variant +
  rpc_envelope_queue (FIFO, capacity 1024) drained in the worker pop loop
  after rpc_custody_column_queue.
- NetworkBeaconProcessor::send_lookup_envelope wrapping the new Work
  variant; process_lookup_envelope async fn calling
  verify_envelope_for_gossip + process_execution_payload_envelope.
- classify_envelope_result mapping EnvelopeError variants to the new
  BlockProcessingResult shape; non-attributable errors carry no penalty,
  attributable ones penalize the block peer.
- SyncNetworkContext::send_payload_for_processing as the lookup-side entry
  point.
- PayloadRequestState::Downloaded now carries the envelope alongside the
  peer_group so we have something to submit.
- on_payload_processing_result switched from `bool` to the
  BlockProcessingResult shape for parity with on_block/on_data; removes
  the `#[allow(dead_code)]`.
2026-05-19 14:37:46 -06:00
dapplion
a98e6531bf Move processing-result classification to the producer side
Reshape BlockProcessingResult from the AC-verdict-passthrough
Ok/Err/Ignored enum to Imported(info) | Error { penalty, reason }.
The producer (network_beacon_processor) translates beacon-chain
Result<AvailabilityProcessingStatus, BlockError> into this shape via a
new classify_processing_result(), so the consumer only has to resolve
the symbolic WhichPeerToPenalize against an in-scope PeerGroup.

- on_block_processing_result and on_data_processing_result collapse
  to a single state-match each, then dispatch to
  WhichPeerToPenalize::apply(action, &peer_group, reason, cx).
- mod.rs sheds the per-BlockError policy block (-129 lines).
- Drops the now-unused data_peer_group, block_peer, BlockRequest::peer,
  peek_downloaded_peer_group accessors; their job is the consumer's
  responsibility now.
- Ignored becomes Error { penalty: None, reason: "processor_overloaded" }
  with a producer-side warn!; the lookup retries up to MAX_ATTEMPTS
  instead of dropping immediately (test updated to match).
- DuplicateFullyImported and GenesisBlock map to Imported; the test
  helper constructs the new variant directly.
2026-05-19 14:14:42 -06:00
dapplion
5c58f7e4b7 Thread typed RPC errors through download response handlers
Drop the log-and-strip pattern in the four download response wrappers:
on_{block,blob,custody,payload}_download_response now take their typed
*DownloadResponse aliases (Result<_, RpcResponseError>) directly, and
the inner state machine's on_download_response matches Err(_). This
removes three #[allow(clippy::type_complexity)] annotations and keeps
the option of branching on RPC error kind inside the state machine
open.

Remove the redundant "… download result" debug logs in the four
wrappers — the error is already logged upstream at
requests.rs "Sync RPC request error" (block/blob/payload envelope)
and network_context "Custody request failure, removing", and the
block_root → id association reappears at "Sending block for processing"
on the success path.

Fix has_no_peers callers to use the new !has_peers() API.
2026-05-19 13:18:04 -06:00
dapplion
6e1ee05ca5 Restore is_for_block helper to reduce diff churn 2026-05-19 12:51:32 -06:00
dapplion
0a6aa5ae90 Merge remote-tracking branch 'sigp/unstable' into gloas-lookup-sync-fixes
# Conflicts:
#	beacon_node/network/src/sync/manager.rs
2026-05-19 03:50:37 -06:00
dapplion
2d2fdf3dce Fix correctness issues in single-block lookup state machine
- add_peer: replace !=-vs-|= typo so Gloas child-peer additions actually
  propagate back through add_peers_to_lookup_and_ancestors and kick
  continue_requests.
- data_peer_group: return the PeerGroup stored in DataRequestState
  Downloaded/Processing instead of todo!(), so InvalidColumn attribution
  in mod.rs no longer panics on a live error path.
- Restore the original `parent_root != ZERO` guard for the parent-known
  check; the genesis block has no real parent so it must fall through to
  processing rather than panic (was todo!()) or be dropped as Failed.
- Wire envelope_is_known_to_fork_choice as a NoRequestNeeded short-
  circuit at the top of payload_lookup_request.
- Rename gload_child_peers -> gloas_child_peers (typo).
- Drop DataDownloadKind, peek_downloaded_peer_group, DataRequest.slot,
  DownloadedData::Blobs.expected_blobs — all dead per the compiler.
- Update test helpers to send UnknownParentSidecarHeader so the lookup
  test suite compiles and runs under the new manager API.

Tests: phase0 79/79, electra 59/59, fulu 59/59.
2026-05-19 03:43:11 -06:00
dapplion
7739c91a3a Review 2026-05-19 03:27:15 -06:00
dapplion
e4f40836d8 Update PR 2026-05-19 03:05:10 -06: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
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