Commit Graph

7241 Commits

Author SHA1 Message Date
Stefan
65bb2836be fix: set slot_number to latest_block_header.slot in Gloas fork upgrade (#8726)
During the Fulu→Gloas state upgrade, the latestExecutionPayloadHeader's
slot_number was hardcoded to 0. This caused beacon state root divergence
between Lighthouse and Lodestar at the Gloas fork boundary (slot 8).

Set slot_number to pre.latest_block_header.slot to match Lodestar's
behavior and correctly carry forward the slot of the last block.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 15:42:22 +05:30
Pawan Dhananjay
a17c447680 Add getPayload v2 methods 2026-01-21 17:21:06 -08:00
Pawan Dhananjay
658163cfde Testing 2026-01-19 15:21:04 -08:00
Pawan Dhananjay
47094d592c Add bal support, remove epbs stuff 2026-01-16 12:40:57 -08: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
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
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
Michael Sproul
2ce6b51269 Refine cargo-deny rules (#8602)
A few `cargo-deny` tweaks with @macladson

Co-authored-by: Mac L <mjladson@pm.me>


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

Co-Authored-By: Mac L <mjladson@pm.me>
2025-12-19 04:02:09 +00:00
Michael Sproul
4e35e9d587 Add cargo deny on CI (#8580)
Closes:

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


  Add `cargo deny` on CI with deprecated crates (`ethers` and `ethereum-types`) banned and duplicates banned for `reqwest`.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2025-12-16 09:02:34 +00:00
Michael Sproul
4c268bc0d5 Delete PartialBeaconState (#8591)
While reviewing Gloas I noticed we were updating `PartialBeaconState`. This code isn't used since v7.1.0 introduced hdiffs, so we can delete it and stop maintaining it 🎉

Similarly the `chunked_vector`/`chunked_iter` code can also go!


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

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2025-12-16 09:02:31 +00:00
ethDreamer
a39e991557 Gloas(EIP-7732): Containers / Constants (#7923)
* #7850

This is the first round of the conga line! 🎉

Just spec constants and container changes so far.


  


Co-Authored-By: shane-moore <skm1790@gmail.com>

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

Co-Authored-By: Shane K Moore <41407272+shane-moore@users.noreply.github.com>

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

Co-Authored-By: ethDreamer <37123614+ethDreamer@users.noreply.github.com>

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

Co-Authored-By: Jimmy Chen <jimmy@sigmaprime.io>

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2025-12-16 06:45:45 +00:00
chonghe
86c2b7cfbe Append client version info to graffiti (#7558)
* #7201


  


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

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>

Co-Authored-By: Jimmy Chen <jimmy@sigmaprime.io>

Co-Authored-By: Tan Chee Keong <tanck2005@gmail.com>
2025-12-16 03:19:28 +00:00
0xMushow
afa6457acf fix visual bug on visualize_batch_state leading to a non-wanted comma (#8499)
Which issue # does this PR address?
None


  The `visualize_batch_state`  functions uses the following loop `for mut batch_index in 0..BATCH_BUFFER_SIZE`, making it from `0` to `BATCH_BUFFER_SIZE - 1` (behind the scenes).

Hence we would never hit the following condition:

```rust
if batch_index != BATCH_BUFFER_SIZE {
visualization_string.push(',');
}
```

Replacing `!=` with `<` & `BATCH_BUFFER_SIZE -1` allows for the following change:

`[A,B,C,D,E,]` to become: `[A,B,C,D,E]`


Co-Authored-By: Antoine James <antoine@ethereum.org>
2025-12-15 05:14:15 +00:00
Akihito Nakano
ac8d77369d Fix Makefile to avoid git describe error in CI (#8513)
Fixes the error `fatal: No names found, cannot describe anything.` that occurs when running `make`
commands in CI (GitHub Actions).

https://github.com/sigp/lighthouse/actions/runs/19839541042/job/56844781126#step:5:13
> fatal: No names found, cannot describe anything.


  Changed the `GIT_TAG` variable assignment in the Makefile from immediate evaluation to lazy evaluation:

```diff
- GIT_TAG := $(shell git describe --tags --candidates 1)
+ GIT_TAG = $(shell git describe --tags --candidates 1)
```

This change ensures that git describe is only executed when `GIT_TAG` is actually used (in the `build-release-tarballs` target), rather than on every Makefile invocation.


Co-Authored-By: ackintosh <sora.akatsuki@gmail.com>
2025-12-15 05:08:21 +00:00
Mac L
32f7615cc8 Update syn to 2.0.110 (#8563)
#8547


  We are currently using an older version of `syn` in `test_random_derive`. Updating this removes one of the sources of `syn` `1.0.109` in our dependency tree.


Co-Authored-By: Mac L <mjladson@pm.me>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2025-12-15 03:20:12 +00:00
Mac L
6a3a32515f Update strum to 0.27 (#8564)
#8547


  Update our `strum` dependency to `0.27`. This unifies our strum dependencies and removes our duplication of `strum` (and by extension, `strum_macros`).


Co-Authored-By: Mac L <mjladson@pm.me>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2025-12-15 03:20:10 +00:00
Andrés David Ramírez Chiquillo
49e1112da2 Add regression test for unaligned checkpoint sync with payload pruning (#8458)
Closes #8426


  Added a new regression test: `reproduction_unaligned_checkpoint_sync_pruned_payload`.

This test reproduces the bug where unaligned checkpoint syncs (skipped slots at epoch boundaries) fail to import the anchor block's execution payload when `prune_payloads` is enabled.

The test simulates the failure mode by:
- Skipping if execution payloads are not applicable.
- Creating a harness with an unaligned checkpoint (gap of 3 slots).
- Configuring the client with prune_payloads = true.


It asserts that the Beacon Chain builds successfully (previously it panicked with `MissingFullBlockExecutionPayloadPruned`), confirming the fix logic in `try_get_full_block`.


Co-Authored-By: Andrurachi <andruvrch@gmail.com>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2025-12-15 02:33:29 +00:00
gustavo
cd0b1ef648 fix(bls): fix is_infinity when aggregating onto empty AggregateSignature (#8496)
Co-Authored-By: figtracer <1gusredo@gmail.com>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2025-12-15 01:47:04 +00:00
Eitan Seri-Levi
556e917092 Rust 1.92 lints (#8567)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
2025-12-12 08:45:38 +00:00
chonghe
5abbdb660a Do not request attestation data when attestation duty is empty (#8559)
Co-Authored-By: Tan Chee Keong <tanck@sigmaprime.io>
2025-12-11 06:56:53 +00:00
Eitan Seri-Levi
d9ddb72f5b Fix testnet script (#8557)
Fix an issue where a kurtosis testnet script was failing because no supernodes were provided


```
There was an error interpreting Starlark code
Evaluation error: fail: Fulu fork is enabled (epoch: 0) but no supernodes are configured, no nodes have 128 or more validators, and perfect_peerdas_enabled is not enabled. Either configure a supernode, ensure at least one node has 128+ validators, or enable perfect_peerdas_enabled in network_params with 16 participants.
at [github.com/ethpandaops/ethereum-package/main.star:83:57]: run
at [github.com/ethpandaops/ethereum-package/src/package_io/input_parser.star:377:17]: input_parser
at [0:0]: fail
```


  


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

Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2025-12-11 06:56:51 +00:00
Mac L
f3fd1f210b Remove consensus/types re-exports (#8540)
There are certain crates which we re-export within `types` which creates a fragmented DevEx, where there are various ways to import the same crates.

```rust
// consensus/types/src/lib.rs
pub use bls::{
AggregatePublicKey, AggregateSignature, Error as BlsError, Keypair, PUBLIC_KEY_BYTES_LEN,
PublicKey, PublicKeyBytes, SIGNATURE_BYTES_LEN, SecretKey, Signature, SignatureBytes,
get_withdrawal_credentials,
};
pub use context_deserialize::{ContextDeserialize, context_deserialize};
pub use fixed_bytes::FixedBytesExtended;
pub use milhouse::{self, List, Vector};
pub use ssz_types::{BitList, BitVector, FixedVector, VariableList, typenum, typenum::Unsigned};
pub use superstruct::superstruct;
```

This PR removes these re-exports and makes it explicit that these types are imported from a non-`consensus/types` crate.


Co-Authored-By: Mac L <mjladson@pm.me>
2025-12-09 07:13:41 +00:00
Mac L
77d58437da Clarify alloy dependencies (#8550)
Previously, we had a pinned version of `alloy` to fix some crate compatibility issues we encountered during the migration away from `ethers`. Now that the migration is complete we should remove the pin. This also updates alloy crates to their latest versions.


Co-Authored-By: Mac L <mjladson@pm.me>
2025-12-09 06:03:02 +00:00
Mac L
7bfcc03520 Reduce eth2 dependency space (#8524)
Remove certain dependencies from `eth2`, and feature-gate others which are only used by certain endpoints.

| Removed | Optional | Dev only |
| -------- | -------- | -------- |
| `either` `enr` `libp2p-identity` `multiaddr` | `protoarray` `eth2_keystore` `eip_3076` `zeroize` `reqwest-eventsource` `futures` `futures-util` | `rand` `test_random_derive` |

This is done by adding an `events` feature which enables the events endpoint and its associated dependencies.
The `lighthouse` feature also enables its associated dependencies making them optional.

The networking-adjacent dependencies were removed by just having certain fields use a `String` instead of an explicit network type. This means the user should handle conversion at the call site instead. This is a bit spicy, but I believe `PeerId`, `Enr` and `Multiaddr` are easily converted to and from `String`s so I think it's fine and reduces our dependency space by a lot. The alternative is to feature gate these types behind a `network` feature instead.


Co-Authored-By: Mac L <mjladson@pm.me>
2025-12-08 05:37:23 +00:00
Jimmy Chen
2afa87879b Move beacon pool http api to its own separate module (#8543)
Continuation of:
* #8536

Moving `/beacon/pool` endpoints out of `http_api` to a separation module. This should improve code maintainability, incremental compilation time and rust analyzer performance.

This is a tedious but straight forward change, so we're going with a pair & insta-merge approach to avoid painful & slow async review


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2025-12-05 10:59:42 +00:00
Jimmy Chen
e27f31648f Move validator http endpoints to a separate module (#8536)
Continuation of:
* #8529

Moving `/validator` endpoints out of `http_api` to a separation module. This should improve code maintainability, incremental compilation time and rust analyzer performance.

This is a tedious but straight forward change, so we're going with a pair & insta-merge approach to avoid painful & slow async review. @michaelsproul and I paired on the first commit - I believe we are almost done, will pair with @pawanjay176 tomorrow to wrap it up and merge tomorrow. (cc @macladson )


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2025-12-05 10:08:38 +00:00
Mac L
4e958a92d3 Refactor consensus/types (#7827)
Organize and categorize `consensus/types` into modules based on their relation to key consensus structures/concepts.
This is a precursor to a sensible public interface.

While this refactor is very opinionated, I am open to suggestions on module names, or type groupings if my current ones are inappropriate.


Co-Authored-By: Mac L <mjladson@pm.me>
2025-12-04 09:28:52 +00:00
Jimmy Chen
51d0336020 Move beacon state endpoints to a separate module. (#8529)
Part of the http api refactor to move endpoint handlers to separate modules.

This should improve code maintainability, incremental compilation time and rust analyzer performance.


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2025-12-04 06:58:57 +00:00
Michael Sproul
41ba135034 Move deposit contract artifacts to /target (#8518)
Alternative to:

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


  Refactors deposit_contract crate to comply with Rust build conventions by placing generated artifacts in the build output directory.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2025-12-03 04:06:28 +00:00
chonghe
0bccc7090c Always use committee index 0 when getting attestation data (#8171)
* #8046


  Split the function `publish_attestations_and_aggregates` into `publish_attestations` and `handle_aggregates`, so that for attestations, only 1 task is spawned.


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

Co-Authored-By: chonghe <44791194+chong-he@users.noreply.github.com>

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

Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2025-12-03 01:45:47 +00:00
Jimmy Chen
7ef9501ff6 Instrument attestation signing. (#8508)
We noticed attestation signing taking 2+ seconds on some of our hoodi nodes and the current traces doesn't provide enough details. This PR adds a few more spans to the `attestation_duty_cycle` code path in the VC.

Before:
<img width="842" height="154" alt="image" src="https://github.com/user-attachments/assets/cfc5c8c0-e6f2-4f56-a8e4-65001af4a005" />

After:
<img width="496" height="217" alt="image" src="https://github.com/user-attachments/assets/c91cfa88-af1b-456e-8c64-625809eb6881" />


  


Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2025-12-02 05:17:13 +00:00