Commit Graph

3905 Commits

Author SHA1 Message Date
Pawan Dhananjay
ffc5e47ad1 Wait until block is processed before sending columns for processing 2026-06-09 17:57:00 -07:00
Pawan Dhananjay
d797275fae Fix min rpc size of datacolumnsidecar 2026-06-09 17:54:30 -07:00
Pawan Dhananjay
63a598a198 Remove unnecessary import 2026-06-09 16:32:11 -07:00
dapplion
c4817da2e7 Dedup test code 2026-06-10 00:13:30 +02:00
dapplion
17ce0415b6 Add docs 2026-06-09 23:08:25 +02:00
dapplion
ce7df7be4b Review PR 2026-06-09 23:05:11 +02:00
dapplion
7879e6ce74 Complete sync send signals 2026-06-09 21:12:10 +02:00
dapplion
ab9258b507 Diff reduction 2026-06-09 21:07:33 +02:00
dapplion
a5e289623c Fix Gloas no-full-child lookup completion; gate wrong-data test by depth
- custody_lookup_request: under Gloas with no FULL-child peer to serve columns, park the
  data request (Pending) so the lookup completes on block import instead of stranding
- has_no_peers: once the Gloas block request is complete, evaluate only the gloas child peers
- bad_peer_wrong_data_response: the wrong-sidecar penalty is only attributable under Gloas at
  depth >= 2 (the tip has no FULL-child peer)
2026-06-09 20:49:15 +02:00
dapplion
3f550adf63 Simplify side effects 2026-06-09 19:57:59 +02:00
dapplion
476c1ec240 Fix gloas payload-envelope tests: harness persists envelopes during production
The test harness stores a payload envelope for every block it produces (via
StoreOp::PutPayloadEnvelope), so:
- by_root_unknown must use a root with no block, not a real block root (which
  already has a persisted envelope) to test the empty case.
- by_range must not expect a genesis envelope: genesis has no canonical
  execution payload, so the by-range handler filters it via block_has_canonical_payload.
2026-06-08 13:14:09 +02:00
dapplion
ec45857a50 Skip pre-Gloas block-level data-column tests under FORK_NAME=gloas
Gloas carries data columns in the payload envelope, so the test harness produces
no block-level columns for a Gloas block. Two tests assumed columns are present
and failed under the newly-enabled FORK_NAME=gloas network test matrix:
accept_processed_gossip_data_columns_without_import and
data_column_reconstruction_at_deadline. Gate them on the same fork condition as
their siblings, extended to skip Gloas; fulu coverage is unchanged.
2026-06-08 12:59:40 +02:00
dapplion
a29aece2cf Address review nits: drop RpcEnvelope doc comment, rename PeerType::PayloadEnvelope, fix lookup-not-found log 2026-06-08 12:08:45 +02:00
dapplion
f5c024e5ed Simplify Gloas lookup test setup 2026-06-06 13:14:57 +02:00
dapplion
75ddec861d Run network tests for gloas 2026-06-06 12:49:15 +02:00
dapplion
8817ec0369 Clean up tests 2026-06-06 12:32:13 +02:00
dapplion
6bf195150b Fix continue children logic 2026-06-06 12:19:19 +02:00
dapplion
03e90eafa1 Clearer logic 2026-06-06 12:13:33 +02:00
dapplion
7eda80b492 Clean up 2026-06-06 11:54:55 +02:00
dapplion
7d71c47a66 Merge remote-tracking branch 'sigp/unstable' into gloas-lookup-sync-fixes 2026-06-06 11:32:38 +02:00
Lion - dapplion
8e4df4abab Simplify lookup sync da_checker oracle (#9428)
Implementing gloas lookup sync is currently incompatible with the `GossipBlockProcessResult` mechanism.

Today it's implemented such that if we receive a sucessful `GossipBlockProcessResult` we directly mark the lookup as Complete and delete it. In Gloas we can't delete a lookup after block import, as we may still have FULL child awaiting the payload.

IMO this `GossipBlockProcessResult` brings a lot of headache and edge cases that we can just live without. Also the `reset_request` business is nasty and can easily leave the lookup in a bad state.


  If we get rid of `GossipBlockProcessResult` we only pay the following performance penalty:

- Lookup is created exactly while the block's payload is being execution validated
- (new degradation) we download the block again
- send the block for processing but the duplicate cache prevents double execution

So in the worst case we spend a few KBs of extra download bandwidth. Remember each block is downloaded 8x times through gossip in the happy case.


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

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-06-05 23:52:45 +00:00
Jimmy Chen
65f1a832e4 Optimise slow block verification tests (#9274)
Reduce CI time for `block_verification` tests that exceed 120s on Fulu/Gloas forks.

- Cache the chain segment across tests using `LazyLock<OnceCell>` (was rebuilt 10+ times independently)
- Reduce chain length from 320 to 192 slots (10 epochs to 6 epochs)
- Reduce `BLOCK_INDICES` from 7 to 3
- Reduce `chain_segment_varying_chunk_size` from 5 to 3

AI assisted, self reviewed.

Before vs After comparison (1 sample only):

* **Before**: 19 tests exceeded the 120s slow threshold.
* **After**: zero exceed it. Overall: 1,890s down to 797s (-58%).

```
| Test                                                 |  Before |   After |  Change |
|------------------------------------------------------|---------|---------|---------|
| chain_segment_varying_chunk_size                     |   239s  |     98s |    -59% |
| invalid_signature_attester_slashing                  |   175s  |     64s |    -64% |
| invalid_signature_exit                               |   173s  |     62s |    -64% |
| invalid_signature_deposit                            |   170s  |     60s |    -65% |
| invalid_signature_attestation                        |   165s  |     62s |    -63% |
| invalid_signature_proposer_slashing                  |   161s  |     56s |    -66% |
| block_gossip_verification                            |   154s  |     91s |    -41% |
| invalid_signature_block_proposal                     |   151s  |     58s |    -61% |
| invalid_signature_randao_reveal                      |   149s  |     54s |    -64% |
| invalid_signature_gossip_block                       |   135s  |     46s |    -66% |
|------------------------------------------------------|---------|---------|---------|
| TOTAL                                                |  1890s  |    797s |    -58% |
```


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-06-05 20:51:33 +00:00
Alleysira
abe7ca20a9 fix(network): clear ENR nfd field when no next fork is scheduled during runtime transitions (#9131)
No. But related to #9009 and #8996


  - Change the `ForkContext::next_fork_digest()` to return `[u8; 4]` (returning `[0u8; 4]` for "no next fork").
- Update the initialization path and runtime fork transition path accordingly.

Added tests:
- [x] `test_next_fork_digest` — existing test passes with non-Option return type
- [x] `test_next_fork_digest_returns_zero_when_no_next_fork` — init at last BPO fork returns `[0u8; 4]`
- [x] `test_next_fork_digest_zero_after_runtime_transition_to_last_fork` — simulates `update_current_fork` to last fork, then verifies zero


Co-Authored-By: alleysira <1367108378@qq.com>

Co-Authored-By: Alleysira <56925051+Alleysira@users.noreply.github.com>

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>
2026-06-05 20:16:28 +00:00
Eitan Seri-Levi
42e678189c Update gloas api routes to match updated spec (#9418)
tldr the routes got pluralized
https://github.com/ethereum/beacon-APIs/pull/613


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-06-05 20:16:06 +00:00
Daniel Knopik
e78e1d38ba Update libp2p (#9331)
Update libp2p to benefit from recent improvements, including partial messages bugfixes.


  


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-06-05 14:50:19 +00:00
dapplion
6be84997f1 Fix gloas child logic: completion accounting, retention, completion gap
- block_verification test: ParentUnknown pattern needs `..` (field restored).
- Count gloas leaf-block completions in completed_lookups (were removed silently).
- Retain a parent on payload-download TooManyAttempts while a FULL child awaits its
  payload (don't cascade-drop); the payload may still arrive.
- on_external_processing_result: complete the lookup on gossip import (gloas-aware),
  fixing the pre-gloas regression flagged by the TODO.
- Complete lookups that become available via the da_checker during continue_requests
  (no Imported processing result is emitted): detect in on_lookup_result + the
  block-imported branch of on_processing_result.
- Lint: debug_assert!(true) -> false; redundant if-let Some(_) -> is_some().
2026-06-05 16:15:52 +02:00
Pawan Dhananjay
6698872f8a Improve error types for envelopes (#9414)
N/A


  Currently, we have `EnvelopeError` having a `ImportError` wrapping a `BlockError`. I feel this is extremely unintuitive because most of the envelope processing functions can simply return an `EnvelopeError` that makes sense in the function's context. It revealed further ugliness when implementing range sync in #9362

This PR does 2 main things:
1. Removes `ImportError(BlockError)` variant
2. Adds `EnvelopeError(EnvelopeError)` variant to a `BlockError`.

I feel this is more natural as there can be envelope errors when we try importing a Block but envelope errors can be contained to just envelope related errors.

The main blocker to doing this was `PayloadVerificationHandle` returning a `BlockError`. It uses a very small subset of `BlockError` which I extracted to its own error type which can be converted into both a BlockError and EnvelopeError.

This allows us to keep most of the pure envelope processing functions to just return EnvelopeErrors while we convert it to a `BlockError` only in import paths where we need to return a consolidated `BlockError`.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-06-05 13:57:28 +00:00
dapplion
d8807db993 Complete gloas child logic 2026-06-05 15:37:12 +02:00
Eitan Seri-Levi
da42d37456 Ensure PTC votes accurately reflect data availability (#9412)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-06-05 00:01:20 +00:00
dapplion
9afaaf71df WIP: Gloas full/empty child fork harness + tests + Option B sketch
Harness/tests (foundation):
- make_gloas_block_with_status: produce a gloas block with explicit parent
  payload status (builds FULL vs EMPTY children); returns its data columns.
- TestRig::build_full_empty_fork: G(full) -> A(full) -> B(FULL child), A -> C(EMPTY).
- SimulateConfig::return_no_envelope_for_block: withhold a block's payload envelope.
- Tests: gloas_build_full_empty_fork_shape (shape), gloas_full_empty_children_
  retain_parent_for_payload (happy path), gloas_empty_child_continues_while_
  parent_payload_withheld (red: C must complete, B+A retained while payload withheld).

Option B sketch (untested, mod.rs) -- to be implemented properly:
- continue_child_lookups on a SingleBlock Imported result (children re-evaluate
  on parent block import, before its payload).
- retain a failed lookup while another lookup awaits it (is_awaited).
2026-06-05 00:29:40 +02:00
dapplion
67e1048878 Rename PeerType variants, add PeerType::new, run backfill test under gloas
- PeerType::PreGloas/PostGloas -> Block/GloasChild (names describe how a peer
  relates to the block, not the fork).
- Add PeerType::new(parent_block_hash) and use it; search_parent_of_child now
  takes peer_type: &PeerType instead of the raw parent_block_hash.
- request_batches_should_not_loop_infinitely: drop the bogus gloas skip and use
  8 validators (4 was too few for a Gloas genesis -> InvalidIndicesCount).
2026-06-04 23:17:06 +02:00
dapplion
a99fbde676 Derive lookup's bid parent_block_hash from its block; drop ParentUnknown field
Remove SingleBlockLookup::awaiting_parent_bid_hash (duplicated awaiting_parent
state) and derive the bid parent_block_hash from the lookup's own downloaded
block. This removes the parent_block_hash field from BlockError::ParentUnknown /
BlockProcessingResult::ParentUnknown, re-aligning them with unstable.
2026-06-04 22:42:59 +02:00
Lion - dapplion
eeae8514b1 Remove unused spec field from AvailableBlock (#9411)
N/A


  Remove unused spec field from AvailableBlock


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-06-04 19:14:32 +00:00
dapplion
b75c64c663 Merge branch 'unstable' into gloas-lookup-sync-fixes
Adopt #9382's canonical ParentImportStatus / get_parent_import_status (drops the
duplicate is_parent_imported_status from this branch), keeping ParentUnknown's
parent_block_hash field which the lookup-sync peer donation depends on.
2026-06-04 18:09:30 +02:00
Lion - dapplion
d98de9f8dd Reject importing Gloas block until parent's payload is imported (#9382)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-06-04 15:53:05 +00:00
dapplion
646b938159 Merge branch 'unstable' into gloas-lookup-sync-fixes 2026-06-04 14:04:46 +02:00
dapplion
31de95efdd Fix gloas lookup-sync custody/parent-chain tests; gate payload processing on block import
- Gate payload-envelope processing on block_request.state.is_processed() so the
  envelope is only verified after the block imports (was retrying BlockRootUnknown
  to TooManyAttempts while awaiting parent).
- Penalize attributable peers withholding columns post-Gloas (drop !gloas_enabled
  custody carve-out).
- Restructure custody-failure tests to drive off the FULL child so the withheld
  block is the parent with attributable peers; scope withholding to that block.
- Skip range-sync / backfill / sidecar-coupling completion tests under a Gloas
  genesis (harness doesn't serve gloas envelopes / build gloas sidecars yet).
2026-06-04 13:25:29 +02:00
Jimmy Chen
91456fb218 Regression test for range sync CGC race condition (#8039)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-06-04 07:24:27 +00:00
dapplion
5a6301026e Merge branch 'unstable' into gloas-lookup-sync-fixes
Rebase the gloas lookup-sync work onto #9391's RequestState trait-removal
design: payload-envelope request reuses the generic SingleLookupRequestState,
concrete BlockRequest/DataRequest/PayloadRequest, parent-imported gate against
awaiting_parent: Option<Hash256>. (Some gloas custody-failure tests still fail —
known peer-attribution issue, pushed for visibility.)
2026-06-04 04:16:41 +02:00
Eitan Seri-Levi
d617c826fe Gloas data column reprocess queue (#9339)
When debugging ePBS with columns, we noticed that columns arriving before their block dont pass gossip verification checks and are dropped. This PR ensures that columns arriving before the block are sent to the reprocess queue. Once their block arrives, they are reprocessed.

This isn't an issue pre-gloas because we don't make block root checks for fulu data columns. This allows us to gossip verify the column and send it to the DA cache before the block arrives.

I think we also need to handle this edge case for partial data columns. Theres an existing TODO for that already.


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-06-03 16:07:41 +00:00
Lion - dapplion
eab5163d68 Remove RequestState trait from lookup sync (#9391)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-06-03 15:29:04 +00:00
João Oliveira
c2ac519c69 Disable Mplex by default (#9365)
Co-Authored-By: João Oliveira <hello@jxs.pt>
2026-06-03 08:05:31 +00:00
Lion - dapplion
d7d56e6312 Delete unnecessary SyncMessage variants (#9379)
- Simplification from https://github.com/sigp/lighthouse/pull/9155

Lookup sync does not cache sidecars, so sending the full network object adds unnecessary complexity. Sync only needs to know: We have received a header that has an unknown parent.


  Replace `UnknownParentDataColumn` and `UnknownParentPartialDataColumn` for `UnknownParentSidecarHeader`


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

Co-Authored-By: Eitan Seri-Levi <eserilev@gmail.com>
2026-06-02 14:57:03 +00:00
Lion - dapplion
bbe7ead813 Move BlockProcessingResult match out of block lookups (#9327)
- https://github.com/sigp/lighthouse/pull/9155 remove the trait abstraction for processing block / blobs / columns / payloads

As a result we would have to duplicate x3 the big match on `BlockProcessingResult` we currently have in block lookups mod.rs

This PR moves the match of `BlockProcessingResult` to `sync_methods` to reduce the diff of https://github.com/sigp/lighthouse/pull/9155. There are some subtle changes that deserve dedicated attention, and may be drowned in the bigger diff of https://github.com/sigp/lighthouse/pull/9155 otherwise:

| Unstable | This PR / #9115 |
| - | - |
| Some error conditions immediately `Drop` the lookup (no retries). For example for "internal" errors like the BeaconChainError | Retries ALL errors 4 times. I believe assuming some errors are internal is risky as dropping a lookup drops all its children potentially forcing the node to resync a lot of blocks because of an internal timeout


  


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-06-02 02:50:56 +00:00
dapplion
ad99451e15 Remove blob lookup from rewritten arch (align with #9383) 2026-06-01 17:49:32 +02:00
dapplion
5754c38132 Merge remote-tracking branch 'sigp/unstable' into gloas-lookup-sync-fixes
Reconciles unstable's #9383 (Deprecate blob lookup sync) with this PR's
rewritten lookup architecture by removing blob lookup from the new arch:
Deneb/Electra block lookups complete on the block alone (the merged
da_checker makes them available without blobs), and DataDownload::Blobs,
blob_lookup_request, SyncRequestId::SingleBlob, BlockProcessType::SingleBlob,
the process_rpc_blobs lookup cluster, and blob lookup tests are removed.
Range-sync blobs and blob serving are kept.
2026-06-01 17:44:16 +02:00
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