Commit Graph

7265 Commits

Author SHA1 Message Date
Pawan Dhananjay
c5b4580e37 Return correct variant for snappy errors (#8841)
N/A


  Handle snappy crate errors as InvalidData instead of IoError.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-02-18 04:17:07 +00:00
Jimmy Chen
691c8cf8e6 Fix duplicate data columns in DataColumnsByRange responses (#8843)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-02-18 04:16:57 +00:00
Akihito Nakano
c61665b3a1 Penalize peers that send an invalid rpc request (#6986)
Since https://github.com/sigp/lighthouse/pull/6847, invalid `BlocksByRange`/`BlobsByRange` requests, which do not comply with the spec, are [handled in the Handler](3d16d1080f/beacon_node/lighthouse_network/src/rpc/handler.rs (L880-L911)). Any peer that sends an invalid request is penalized and disconnected.

However, other kinds of invalid rpc request, which result in decoding errors, are just dropped. No penalty is applied and the connection with the peer remains.


  I have added handling for the `ListenUpgradeError` event to notify the application of an `RPCError:InvalidData` error and disconnect to the peer that sent the invalid rpc request.

I also added tests for handling invalid rpc requests.


Co-Authored-By: ackintosh <sora.akatsuki@gmail.com>
2026-02-18 14:43:59 +11:00
Jimmy Chen
d4ec006a34 Update time to fix cargo audit failure (#8764) 2026-02-18 14:03:04 +11:00
0xMushow
9065e4a56e fix(beacon_node): add pruning of observed_column_sidecars (#8531)
None


  I noticed that `observed_column_sidecars` is missing its prune call in the finalization handler, which results in a memory leak on long-running nodes (very slow (**7MB/day**)) :

13dfa9200f/beacon_node/beacon_chain/src/canonical_head.rs (L940-L959)

Both caches use the same generic type `ObservedDataSidecars<T>:`
22ec4b3271/beacon_node/beacon_chain/src/beacon_chain.rs (L413-L416)

The type's documentation explicitly requires manual pruning:

>  "*The cache supports pruning based upon the finalized epoch. It does not automatically prune, you must call Self::prune manually.*"


b4704eab4a/beacon_node/beacon_chain/src/observed_data_sidecars.rs (L66-L74)

Currently:
- `observed_blob_sidecars` => pruned
- `observed_column_sidecars` => **NOT** pruned

Without pruning, the underlying HashMap accumulates entries indefinitely, causing continuous memory growth until the node restarts.


Co-Authored-By: Antoine James <antoine@ethereum.org>
2026-02-18 12:38:05 +11:00
Jimmy Chen
edba56b9a6 Release v8.1.0 (#8749)
Closes #8681


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
v8.1.0
2026-02-05 04:40:20 +00:00
hopinheimer
819dae3d94 fix bootnode entry (#8748) 2026-02-04 12:49:56 +11:00
hopinheimer
bd1966353a Use events API to eager send attestations (#7892)
Co-Authored-By: hopinheimer <knmanas6@gmail.com>

Co-Authored-By: hopinheimer <48147533+hopinheimer@users.noreply.github.com>

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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-02-04 01:40:16 +00:00
Jimmy Chen
c25a975929 Bump bytes to 1.11.1 to fix RUSTSEC-2026-0007 (#8743) 2026-02-04 12:09:05 +11:00
Michael Sproul
99e957ad35 Merge remote-tracking branch 'origin/stable' into unstable 2026-02-03 10:47:12 +11:00
Michael Sproul
940fa81a5b Fast path for /eth/v1/beacon/blocks/head/root (#8729)
Closes:

- https://github.com/sigp/lighthouse/issues/8667


  Use the `early_attester_cache` to serve the head block root (if present). This should be faster than waiting for the head to finish importing.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-02-02 06:41:43 +00:00
Eitan Seri-Levi
3ecf964385 Replace INTERVALS_PER_SLOT with explicit slot component times (#7944)
https://github.com/ethereum/consensus-specs/pull/4476


  


Co-Authored-By: Barnabas Busa <barnabas.busa@ethereum.org>

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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-02-02 05:58:42 +00:00
Jimmy Chen
cd8049a696 Emit NewHead SSE event earlier in block import (#8718)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-01-29 07:39:05 +00:00
chonghe
119dc565a1 Call beacon_committee_selections only once per epoch (#8699)
* #8381


  Add another if in the if/else branch for selections_endpoint case, and leaving the current code for non-selections_endpoint case mostly untouched. Now the if/else branch in `fill_in_selection_proofs` has 3 branches:
- 1 for DVT with selections_endpoint (added in this PR)
- 1 for DVT without selections_endpoint (Anchor) (untouched)
- Non-DVT (untouched)

Tested and it's working, also thanks very much to @KaloyanTanev for helping to test and confirmed that the calling has reduced and aggregated attestations are still working


Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
2026-01-29 06:44:17 +00:00
Mac L
bbb074692c Disable sqlite by default (#8708)
Compiling types with the `sqlite` feature more than doubles the total compile time. Most downstream users don't need `sqlite` compatibility for `Slot` and `Epoch` types.


  Disable the `sqlite` feature by default.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-29 06:30:22 +00:00
Eitan Seri-Levi
b202e98dd9 Gloas gossip boilerplate (#8700)
All the required boilerplate for gloas gossip. We'll include the gossip message processing logic in a separate PR


  


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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-01-28 07:12:48 +00:00
Eitan Seri-Levi
f7b5c7ee3f Convert RpcBlock to an enum that indicates availability (#8424)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: Mark Mackey <mark@sigmaprime.io>

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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-01-28 05:59:32 +00:00
Jimmy Chen
c4409cdf28 Remove unused anvil references (#8710)
AFAICT `anvil` is not used anywhere in the codebase. Lighthouse has its own `MockExecutionLayer` for testing. This PR remove `anvil` installations and references in developer documentation.


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-01-28 05:21:01 +00:00
Eitan Seri-Levi
9bec8df37a Add Gloas data column support (#8682)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>

Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
2026-01-28 04:52:12 +00:00
Michael Sproul
0f57fc9d8e Check slashability of attestations in batches to avoid sequential bottleneck (#8516)
Closes:

- https://github.com/sigp/lighthouse/issues/1914


  Sign attestations prior to checking them against the slashing protection DB. This allows us to avoid the sequential DB checks which are observed in traces here:

- https://github.com/sigp/lighthouse/pull/8508#discussion_r2576686107


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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-01-27 07:56:09 +00:00
Mac L
1476c20cfc Remove data dependency from from core module in `consensus/types (#8694)
#8652


  Implements "simplified" versions of `max_blobs_by_root_request` and `max_data_columns_by_root_request` which do not depend on type information from the `data` module. I've also added tests which test the original implementation against the simplified one to ensure they don't deviate.

Also moves `all_data_column_sidecar_subnets` from a method on `ChainSpec` to a function which just takes `ChainSpec` as an argument.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-26 19:25:39 +00:00
Jimmy Chen
7f065009a7 Implement custom OpenTelemetry sampler to filter uninstrumented traces (#8647)
Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-01-22 05:11:26 +00:00
Jimmy Chen
21cabba1a2 Updated consensus types for Gloas 1.7.0-alpha.1 (#8688)
Pulling out consensus type changes from #8677.

This PR covers all type changes for spec 1.7.0-alpha.1 (except for `DataColumnSidecar` changes, which is covered in @eserilev's PR  #8682)


  


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

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-01-21 12:08:48 +00:00
João Oliveira
33e41d3f44 update libp2p dependency to upstream (#8200)
Co-Authored-By: João Oliveira <hello@jxs.pt>
2026-01-20 19:45:48 +00:00
chonghe
f78757bc4f Revised log when all validators have exited (#8623)
Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
2026-01-20 00:28:12 +00:00
Mac L
58b153cac5 Remove remaining facade module re-exports from consensus/types (#8672)
Removes the remaining facade re-exports from `consensus/types`.
I have left `graffiti` as I think it has some utility so am leaning towards keeping it in the final API design.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-16 19:51:29 +00:00
Mac L
d099ad56fb Remove execution dependency from core module in consensus/types (#8666)
#8652


  This moves the `ExecutionBlockHash` from the `execution` module to the `core` module. This allows `core` to not depend on the `execution` module, and the `ExecutionBlockHash` is a pretty core  part of our types so I think it makes sense.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-16 07:53:13 +00:00
Mac L
3903e1c67f More consensus/types re-export cleanup (#8665)
Remove more of the temporary re-exports from `consensus/types`


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-16 04:43:05 +00:00
Mr Ree
acc746d947 Update chainspec p2p and etc (#8601)
[Missing values in /eth/v1/config/spec #8571
](https://github.com/sigp/lighthouse/issues/8571) - there will be follow up PR for the re org props


  1. As per above issue from EF dev ops, I added
```
"EPOCHS_PER_SUBNET_SUBSCRIPTION": "256",
"ATTESTATION_SUBNET_COUNT": "64",
"ATTESTATION_SUBNET_EXTRA_BITS": "0",
"UPDATE_TIMEOUT": "8192",
"DOMAIN_BLS_TO_EXECUTION_CHANGE": "0x0a000000"
```
to `/eth/v1/config/spec`
2. Had to change the minimal config for UPDATE_TIMEOUT to get currents tests to pass. This is ok given UPDATE_TIMEOUT is not used in lighthouse as this config for light client spec from altair
3. ATTESTATION_SUBNET_PREFIX_BITS is now dynamically calculated and shimmed into the /eth/v1/config/spec output as advised by @michaelsproul


Co-Authored-By: Joseph Patchen <josephmipatchen@gmail.com>
2026-01-15 04:35:57 +00:00
Mac L
1abc41e337 Cleanup consensus/types re-exports (#8643)
Removes some of the temporary re-exports in `consensus/types`.

I am doing this in multiple parts to keep each diff small.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-15 02:23:55 +00:00
Mac L
605ef8e8e6 Remove state dependency from core module in consensus/types (#8653)
#8652


  - This removes instances of `BeaconStateError` from `eth_spec.rs`, and replaces them directly with `ArithError` which can be trivially converted back to `BeaconStateError` at the call site.
- Also moves the state related methods on `ChainSpec` to be methods on `BeaconState` instead. I think this might be a more natural place for them to exist anyway.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-15 02:16:40 +00:00
Jimmy Chu
f584521e85 chore(validator_client): Read genesis time and genesis validators root from eth2_network_config (#8638)
#5019


  If there is a known eth2_network_config, we read the genesis time and validators root from the config.


Co-Authored-By: Jimmy Chu <898091+jimmychu0807@users.noreply.github.com>
2026-01-14 06:25:07 +00:00
Pawan Dhananjay
c91345782a Get blobs v2 metrics (#8641)
N/A


  Add standardized metrics for getBlobsV2 from https://github.com/ethereum/beacon-metrics/pull/14.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-01-13 07:50:40 +00:00
Pawan Dhananjay
57bbc93d75 Update buckets for metric (#8651)
N/A


  The `beacon_data_column_sidecar_computation_seconds` used to record the full kzg proof generation times before we changed getBlobsV2 to just return the full proofs + cells. This metric should be taking way less time than 100ms which was the minimum bucket previously.

Update the metric to use the default buckets for better granularity.


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-01-13 05:58:34 +00:00
Eitan Seri-Levi
3fac61e0c8 Re-introduce clearer variable names in beacon processor work queue (#8649)
#8648


  


Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-01-12 23:36:01 +00:00
Jimmy Chen
39c542a37b Remove http-api tests, and test on unstable by default, with option to override. (#8646) 2026-01-12 15:21:51 +11:00
Eitan Seri-Levi
b8c386d38d Move beacon processor work queue implementation to its own file (#8141)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2026-01-11 01:22:28 +00:00
Lion - dapplion
6166ad2eb2 Replace tracing::debug! with debug! same for other levels (#8300)
Just visual clean-up, making logging statements look uniform. There's no reason to use `tracing::debug` instead of `debug`. If we ever need to migrate our logging lib in the future it would make things easier too.


  


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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-01-08 07:04:44 +00:00
Jimmy Chen
d1028c9b36 Add nightly tests workflow to test prior forks (#8319) (#8636)
Once #8271 is merged, CI will only cover tests for RECENT_FORKS (prev, current, next)

  To make sure functionalities aren't broken for prior forks, we run tests for these forks nightly. They can also be manually triggered.

  Cherry-picked from d59e340d3b
2026-01-08 17:32:54 +11:00
0xMushow
0706e62f52 fix(peerdb): use start_slot instead of end_slot for safer actions (#8498)
Which issue # does this PR address?
None


  Discussed in private with @jimmygchen, Lighthouse's `earliest_available_slot` is guaranteed to always align with epoch boundaries, but as a safety implementation, we should use `start_slot` just in case other clients differ in their implementations.

At least we agreed it would be safer for `synced_peers_for_epoch`, I also made the change in `has_good_custody_range_sync_peer`, but this is to be reviewed please.


Co-Authored-By: Antoine James <antoine@ethereum.org>

Co-Authored-By: Jimmy Chen <jimmy@sigmaprime.io>
2026-01-08 06:17:46 +00:00
chonghe
a39558f6e5 Remove Windows in the documentation (#8628)
Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
2026-01-08 03:42:24 +00:00
Akihito Nakano
79d314ddba Tweak a log message for mock-el (#8599)
```bash
$ lcli mock-el ....
...
...
Dec 15 11:52:06.002 INFO  Metrics HTTP server started                   listen_address: "127.0.0.1:8551"
...
```

The log message "Metrics HTTP server" was misleading, as the server is actually a Mock Execution Client that provides a JSON-RPC API for testing purposes, not a metrics server.


  


Co-Authored-By: ackintosh <sora.akatsuki@gmail.com>
2026-01-07 19:42:16 +00:00
Mac L
3662e1ab7f Remove duplicated crypto dependencies (#8605)
#8547


  This unifies the following `crypto` dependencies to a single version each:

- `sha2`
- `hmac`
- `pbkdf2`
- `aes`
- `cipher`
- `ctr`
- `scrypt`
- `digest`


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-07 19:38:31 +00:00
Shane K Moore
2fe59405bc Gloas add off protocol payment field to bid (#8596)
Co-Authored-By: shane-moore <skm1790@gmail.com>
2026-01-06 03:28:44 +00:00
Jimmy Chen
dbe474e132 Delete attester cache (#8469)
Fixes attester cache write lock contention. Alternative to #8463.


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-01-06 03:08:02 +00:00
Andrés David Ramírez Chiquillo
ea3a3da1a4 fix: improve error for insufficient blob data columns (#8595)
Closes #8569


  Updates the HTTP API error when the node cannot reconstruct blobs due to "Insufficient data columns".

Changes the response from 500 Internal Server Error to 400 Bad Request and adds a hint to run with --supernode or --semi-supernode.


Co-Authored-By: Andrurachi <andruvrch@gmail.com>
2026-01-05 06:16:52 +00:00
kevaundray
ea811d66c2 perf: remove allocations from merkle tree proof verification logic (#8614)
This PR does two small things:

- Removes the allocations that were happening on each loop
- Makes it more explicit that the bit in the index is only being used to specify the order of the inputs for the hash function


  


Co-Authored-By: Kevaundray Wedderburn <kevtheappdev@gmail.com>
2026-01-05 06:11:58 +00:00
Abhivansh
9b3d7e3a54 refactor: remove service_name (#8606)
Which issue # does this PR address?
#8586


  Please list or describe the changes introduced by this PR.
Remove `service_name` from `TaskExecutor`


Co-Authored-By: Abhivansh <31abhivanshj@gmail.com>
2026-01-02 00:07:40 +00:00
Shane K Moore
6dab3c9a61 update ruint dependency (#8617)
I was resolving CI issues for my gloas block production [PR ](https://github.com/sigp/lighthouse/pull/8313), and noticed the `make audit-CI` [check](https://github.com/sigp/lighthouse/actions/runs/20588442102/job/59129268003) was failing due to:
```
Crate:     ruint
Version:   1.17.0
Title:     Unsoundness of safe `reciprocal_mg10`
Date:      2025-12-22
ID:        RUSTSEC-2025-0137
URL:       https://rustsec.org/advisories/RUSTSEC-2025-0137
Solution:  Upgrade to >=1.17.1
```


  Using the latest stable rust, `1.92.0`, I ran `cargo update ruint` -> `cargo check` -> `make audit-CI`, which passed


Co-Authored-By: shane-moore <skm1790@gmail.com>
2026-01-01 04:50:03 +00:00
Mac L
008dec1258 Update procfs (#8608)
#8547


  This is a low hanging fruit dependency update to remove one of the duplicate versions of `rustix`


Co-Authored-By: Mac L <mjladson@pm.me>
2026-01-01 04:50:01 +00:00