Commit Graph

3881 Commits

Author SHA1 Message Date
Eitan Seri-Levi
8b8ebe3fc0 Merge branch 'gloas-checkpoint-sync' into gloas-alpha-spec-9 2026-06-11 18:09:16 +03:00
Eitan Seri-Levi
ca4330511a Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-alpha-spec-9 2026-06-11 18:08:20 +03:00
Daniel Knopik
43c2e78139 Better partial diagnosics (#9436)
Small collection of improved diagnostics for partials.


  - In the peer info struct (exposing peer data via `/lighthouse/peers`), add a new field to indicate on which subnets the peer supports partials.
- Fix the description of several metrics.
- Downgrade some noisy logging when sending partials to trace, and downgrade one warning that should not worry the user.


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-06-10 19:39:07 +00:00
Eitan Seri-Levi
4d6d8d7d36 Fix tests 2026-06-10 16:43:07 +03:00
Eitan Seri-Levi
0ce1345ca5 cleanup 2026-06-10 15:17:47 +03:00
Eitan Seri-Levi
126678109c Enable optimistic sync 2026-06-10 14:31:48 +03:00
Eitan Seri-Levi
3226b54cd2 Fix 2026-06-10 14:29:18 +03:00
Eitan Seri-Levi
2ba7593b02 fmt 2026-06-10 13:45:40 +03:00
Eitan Seri-Levi
71b539cf8f fix tests 2026-06-10 13:45:40 +03:00
Eitan Seri-Levi
47789368c4 test changes 2026-06-10 13:45:40 +03:00
Eitan Seri-Levi
57df3021b4 checkpoint envelope test 2026-06-10 13:45:40 +03:00
Eitan Seri-Levi
66521b01d6 Implement gloas checkpoint sync 2026-06-10 13:45:40 +03:00
Pawan Dhananjay
db3192e001 Gloas range sync (#9362)
N/A


  Implement range sync in gloas.
Basically requests blocks and payloads post gloas from the same peer, couples them and sends it for processing.
Does not change sync much at all other than adding the machinery for payloads by range requests.

Main changes are:
`RangeSyncBlock` which used to be a struct is an enum to account for the Gloas case. This allows a clear separation between gloas and pre-gloas code.
`AvailableBlockData` now has a `BlockInEnvelope` variant. This is to clearly indicate the post gloas case. I feel this is simpler to follow compared to `NoData` variant.


Tries to extract post gloas logic into its own functions so that there is minimal logic change in mainnet range sync behaviour.

This is meant as a stable base on which we can iterate further to make range sync cleaner and for unblocking range sync support on devnet. Some ideas for later is removing the retry mechanism in favour of delegating column fetching to lookup sync which can be done post #9155 and batch signature verifying envelopes.


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

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

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-06-10 10:30:57 +00:00
Lion - dapplion
47e0901965 Gloas lookup sync (#9155)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-06-10 01:41:26 +00:00
Daniel Knopik
ebe5ded2fa Fix sending partials from immediately complete columns (#9433)
The initial partial send after getBlobs only sends incomplete partial columns, causing issues as we do not propagate these columns.


  Return complete and incomplete columns from `get_columns_and_mark_as_local_fetched`, and convert any complete columns to partials if necessary. Send all columns retrieved this way after getBlobs


Co-Authored-By: Daniel Knopik <daniel@dknopik.de>
2026-06-09 17:38:55 +00:00
Eitan Seri-Levi
88f514c27d Update beacon_node/beacon_chain/src/payload_attestation_verification/mod.rs
Co-authored-by: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-06-09 10:33:08 +03:00
Eitan Seri-Levi
14286fb934 tmp 2026-06-08 01:05:36 +03:00
Eitan Seri-Levi
f4b5f0fc08 tmp 2026-06-08 01:05:30 +03:00
Eitan Seri-Levi
a70085cd8a Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-alpha-spec-9 2026-06-07 16:59:55 +03:00
Eitan Seri-Levi
c1cfcfebf7 fix 2026-06-07 16:59:13 +03:00
Eitan Seri-Levi
21688bccf9 Small comment fix 2026-06-06 15:56:55 +03:00
Eitan Seri-Levi
3524440c48 small fixes' 2026-06-06 15:55:10 +03: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
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
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
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
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
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
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
Eitan Seri-Levi
ad902d17c2 Fix tests 2026-06-03 10:07:09 +03: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
Eitan Seri-Levi
eb5a2952c1 Fix some tests 2026-06-02 14:29:26 +03:00
Eitan Seri-Levi
e3af316223 Impl 5302 2026-06-02 13:41:30 +03:00
Eitan Seri-Levi
1a2d55a88c impl 5281 gossip verification check 2026-06-02 13:04:49 +03:00
Eitan Seri-Levi
2b729482b3 5306 implemented
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 12:42:50 +03:00
Eitan Seri-Levi
1b929aadef Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-remove-slashed-validators-from-propser-duties 2026-06-02 10:34:12 +03:00
Eitan Seri-Levi
3a3f6dafb1 Merge branch 'should_build_on_full_previous_slot' into gloas-remove-slashed-validators-from-propser-duties 2026-06-02 10:34:07 +03:00
Eitan Seri-Levi
7c0bbd5cac new test 2026-06-02 10:34:02 +03: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
Eitan Seri-Levi
9c8a577412 EIP=8045 impl with tests for the slashing cache 2026-06-02 01:07:23 +03: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
Eitan Seri-Levi
dda45d3a06 Update should_build_on_full to match the updated spec plus new test case 2026-06-01 11:07:54 +03:00