Commit Graph

6819 Commits

Author SHA1 Message Date
ltitanb
0a917989b2 impl test random for some types (#7370)
ref: https://github.com/sigp/lighthouse/pull/7367


  Implement `TestRandom` for a few types
2025-05-12 23:50:11 +00:00
Ricki Moore
e051c7ca89 Siren Pectra Feature Updates (#7396)
Add new sections explaining new features for upcoming Pectra upgrade

1.  Deposits
2. Consolidations
3. Partial Withdrawals
4. Partial Deposits / Top-ups
2025-05-12 23:50:08 +00:00
Age Manning
5b25a48af3 Siren installation improvement (#7404) 2025-05-12 23:12:52 +00:00
SunnysidedJ
593390162f peerdas-devnet-7: update DataColumnSidecarsByRoot request to use DataColumnsByRootIdentifier (#7399)
Update DataColumnSidecarsByRoot request to use DataColumnsByRootIdentifier #7377


  As described in https://github.com/ethereum/consensus-specs/pull/4284
2025-05-12 00:20:55 +00:00
João Oliveira
92391cdac6 update gossipsub to the latest upstream revision (#7284)
updates to the latest gossipsub revision which includes https://github.com/libp2p/rust-libp2p/pull/5868
cc @jimmygchen as I think you were interested in this feature
2025-05-09 11:23:21 +00:00
Akihito Nakano
e0c1f27e13 simulator: Persist beacon logs (#7394)
Beacon logs in the simulator are printed only to stdout. The logs are usually large, so persisting them would be helpful for debugging.


  Added `--log-dir` parameter to the simulators and a step to upload the logs to Artifacts.

(Update)
Added `--disable-stdout-logging` to disable stdout logging, making the CI page cleaner.
2025-05-09 10:50:08 +00:00
Lion - dapplion
a497ec601c Retry custody requests after peer metadata updates (#6975)
Closes https://github.com/sigp/lighthouse/issues/6895

We need sync to retry custody requests when a peer CGC updates. A higher CGC can result in a data column subnet peer count increasing from 0 to 1, allowing requests to happen.


  Add new sync event `SyncMessage::UpdatedPeerCgc`. It's sent by the router when a metadata response updates the known CGC
2025-05-09 08:27:17 +00:00
Jimmy Chen
4b9c16fc71 Add Electra forks to basic sim tests (#7199)
This PR adds transitions to Electra ~~and Fulu~~ fork epochs in the simulator tests.

~~It also covers blob inclusion verification and data column syncing on a full node in Fulu.~~

UPDATE: Remove fulu fork from sim tests due to https://github.com/sigp/lighthouse/pull/7199#issuecomment-2852281176
2025-05-08 08:43:44 +00:00
chonghe
e90fcbe657 Add ARM binary for macOS in release (#7416)
* #5410
2025-05-08 06:12:57 +00:00
Jimmy Chen
8dc3d23af0 Add a default timeout to all BeaconNodeHttpClient requests (#7400)
Add a default request timeout to all `BeaconNodeHttpClient` requests to ensure that no HTTP request can hang indefinitely.
2025-05-08 02:08:32 +00:00
Jimmy Chen
0f13029c7d Don't publish data columns reconstructed from RPC columns to the gossip network (#7409)
Don't publish data columns reconstructed from RPC columns to the gossip network, as this may result in peer downscoring if we're sending columns from past slots.
2025-05-07 23:24:48 +00:00
Yeongjong Pyo
058dae0641 Add requires --http when using vc subcommands --http-port (#7405)
Prevent running  `lighthouse vc --http-port <PORT>` without `--http`.
Issue: https://github.com/sigp/lighthouse/issues/7402


  Added requires `--http` when using `lighthouse vc --http-port <PORT>`.
Implemented a test code for this issue.
2025-05-07 05:00:56 +00:00
Daniel Knopik
3d92e3663b Modularize validator store (#6705)
- Create trait `ValidatorStore` with all functions used by the `validator_services`
- Make `validator_services` generic on `S: ValidatorStore`
- Introduce `LighthouseValidatorStore`, which has identical functionality to the old `ValidatorStore`
- Remove dependencies (especially `environment`) from `validator_services` and `beacon_node_fallback` in order to be able to cleanly use them in Anchor
2025-05-07 03:43:33 +00:00
Lion - dapplion
beb0ce68bd Make range sync peer loadbalancing PeerDAS-friendly (#6922)
- Re-opens https://github.com/sigp/lighthouse/pull/6864 targeting unstable

Range sync and backfill sync still assume that each batch request is done by a single peer. This assumption breaks with PeerDAS, where we request custody columns to N peers.

Issues with current unstable:

- Peer prioritization counts batch requests per peer. This accounting is broken now, data columns by range request are not accounted
- Peer selection for data columns by range ignores the set of peers on a syncing chain, instead draws from the global pool of peers
- The implementation is very strict when we have no peers to request from. After PeerDAS this case is very common and we want to be flexible or easy and handle that case better than just hard failing everything.


  - [x] Upstream peer prioritization to the network context, it knows exactly how many active requests a peer (including columns by range)
- [x] Upstream peer selection to the network context, now `block_components_by_range_request` gets a set of peers to choose from instead of a single peer. If it can't find a peer, it returns the error `RpcRequestSendError::NoPeer`
- [ ] Range sync and backfill sync handle `RpcRequestSendError::NoPeer` explicitly
- [ ] Range sync: leaves the batch in `AwaitingDownload` state and does nothing. **TODO**: we should have some mechanism to fail the chain if it's stale for too long - **EDIT**: Not done in this PR
- [x] Backfill sync: pauses the sync until another peer joins - **EDIT**: Same logic as unstable

### TODOs

- [ ] Add tests :)
- [x] Manually test backfill sync

Note: this touches the mainnet path!
2025-05-07 02:03:07 +00:00
chonghe
43c38a6fa0 Change slog to tracing in comments (#7378)
* #7196
2025-05-06 13:06:40 +00:00
GarmashAlex
c8224c8d5e docs: fix broken link to voluntary exit guide (#7387) 2025-05-05 13:56:09 +00:00
Lion - dapplion
2aa5d5c25e Make sure to log SyncingChain ID (#7359)
Debugging an sync issue from @pawanjay176 I'm missing some key info where instead of logging the ID of the SyncingChain we just log "Finalized" (the sync type). This looks like some typo or something was lost in translation when refactoring things.

```
Apr 17 12:12:00.707 DEBUG Syncing new finalized chain                   chain: Finalized, component: "range_sync"
```

This log should include more info about the new chain but just logs "Finalized"

```
Apr 17 12:12:00.810 DEBUG New chain added to sync                       peer_id: "16Uiu2HAmHP8QLYQJwZ4cjMUEyRgxzpkJF87qPgNecLTpUdruYbdA", sync_type: Finalized, new_chain: Finalized, component: "range_sync"
```


  - Remove the Display impl and log the ID explicitly for all logs.
- Log more details when creating a new SyncingChain
2025-05-01 19:53:29 +00:00
Jimmy Chen
93ec9df137 Compute proposer shuffling only once in gossip verification (#7304)
When we perform data column gossip verification, we sometimes see multiple proposer shuffling cache miss simultaneously and this results in multiple threads computing the shuffling cache and potentially slows down the gossip verification.

Proposal here is to use a `OnceCell` for each shuffling key to make sure it's only computed once. I have only implemented this in data column verification as a PoC, but this can also be applied to blob and block verification

Related issues:
- https://github.com/sigp/lighthouse/issues/4447
- https://github.com/sigp/lighthouse/issues/7203
2025-05-01 01:30:42 +00:00
Eitan Seri-Levi
9779b4ba2c Optimize validate_data_columns (#7326) 2025-04-30 04:36:50 +00:00
Mac L
94ccd7608e Add documentation for VC API /lighthouse/beacon/health (#6653)
Changes the endpoint to get fallback health information from `/lighthouse/ui/fallback_health` to `/lighthouse/beacon/health`. This more accurately describes that the endpoint is related to the connected beacon nodes and also matched the `/lighthouse/beacon/update` endpoint being added in #6551.

Adds documentation for both fallback health and the endpoint to the Lighthouse book.
2025-04-30 02:07:07 +00:00
Roman Krasiuk
34a6c3a930 vc: increase default gas limit (#6897)
Increases default gas limit to 36M.
2025-04-30 01:15:39 +00:00
hopinheimer
63a10eaaea Changing boot_enr.yaml to expect bootstap_nodes.yaml for pectra devnet (#6956) 2025-04-28 09:43:46 +00:00
chonghe
2e2b0d2176 Revise consolidation info in Lighthouse book (#7351)
One of the information in the consolidation section in Lighthouse book is wrong. I realise this after reading https://ethereum.org/en/roadmap/pectra/maxeb/ and a further look at [EIP 7251](https://eips.ethereum.org/EIPS/eip-7251) which states:

`
Note: the system contract uses the EVM CALLER operation (Solidity: msg.sender) to get the address used in the consolidation request, i.e. the address that calls the system contract must match the 0x01 withdrawal credential recorded in the beacon state.
`

So the withdrawal credentials of both source and target validators need not be the same.
2025-04-28 09:43:41 +00:00
Hamdi Allam
6fad18644b feat: presign for validator account (#6747)
#6746


  Add a --presign flag to emit the json output to stdout instead of publishing the exit
2025-04-24 05:38:05 +00:00
Akihito Nakano
1324d3d3c4 Delayed RPC Send Using Tokens (#5923)
closes https://github.com/sigp/lighthouse/issues/5785


  The diagram below shows the differences in how the receiver (responder) behaves before and after this PR. The following sentences will detail the changes.

```mermaid
flowchart TD

subgraph "*** After ***"
Start2([START]) --> AA[Receive request]
AA --> COND1{Is there already an active request <br> with the same protocol?}
COND1 --> |Yes| CC[Send error response]
CC --> End2([END])
%% COND1 --> |No| COND2{Request is too large?}
%% COND2 --> |Yes| CC
COND1 --> |No| DD[Process request]
DD --> EE{Rate limit reached?}
EE --> |Yes| FF[Wait until tokens are regenerated]
FF --> EE
EE --> |No| GG[Send response]
GG --> End2
end

subgraph "*** Before ***"
Start([START]) --> A[Receive request]
A --> B{Rate limit reached <br> or <br> request is too large?}
B -->|Yes| C[Send error response]
C --> End([END])
B -->|No| E[Process request]
E --> F[Send response]
F --> End
end
```

### `Is there already an active request with the same protocol?`

This check is not performed in `Before`. This is taken from the PR in the consensus-spec, which proposes updates regarding rate limiting and response timeout.
https://github.com/ethereum/consensus-specs/pull/3767/files
> The requester MUST NOT make more than two concurrent requests with the same ID.

The PR mentions the requester side. In this PR, I introduced the `ActiveRequestsLimiter` for the `responder` side to restrict more than two requests from running simultaneously on the same protocol per peer. If the limiter disallows a request, the responder sends a rate-limited error and penalizes the requester.



### `Rate limit reached?` and `Wait until tokens are regenerated`

UPDATE: I moved the limiter logic to the behaviour side. https://github.com/sigp/lighthouse/pull/5923#issuecomment-2379535927

~~The rate limiter is shared between the behaviour and the handler.  (`Arc<Mutex<RateLimiter>>>`) The handler checks the rate limit and queues the response if the limit is reached. The behaviour handles pruning.~~

~~I considered not sharing the rate limiter between the behaviour and the handler, and performing all of these either within the behaviour or handler. However, I decided against this for the following reasons:~~

- ~~Regarding performing everything within the behaviour: The behaviour is unable to recognize the response protocol when `RPC::send_response()` is called, especially when the response is `RPCCodedResponse::Error`. Therefore, the behaviour can't rate limit responses based on the response protocol.~~
- ~~Regarding performing everything within the handler: When multiple connections are established with a peer, there could be multiple handlers interacting with that peer. Thus, we cannot enforce rate limiting per peer solely within the handler. (Any ideas? 🤔 )~~
2025-04-24 03:46:16 +00:00
chonghe
402a81cdd7 Fix Kurtosis testnet (#7350)
`spamoor_blob` is removed in https://github.com/ethpandaops/ethereum-package/pull/972. When attempting to start local testnet, it will error:

`
Evaluation error: fail: Invalid additional_services spamoor_blob, allowed fields: ["assertoor", "broadcaster", "tx_fuzz", "custom_flood", "forkmon", "blockscout", "dora", "full_beaconchain_explorer", "prometheus_grafana", "blobscan", "dugtrio", "blutgang", "forky", "apache", "tracoor", "spamoor"]
`

This PR changes `spamoor_blob` to `spamoor`.
2025-04-24 02:55:10 +00:00
Robert Mordzon
1dd37048b9 Enable cross-compiling for riscv64 architecture (#7346)
Lighthouse currently lacks support for cross-compilation targeting the `riscv64` architecture.


  This PR introduces initial support for cross-compiling Lighthouse to `riscv64`. The following changes were made:

- **Makefile**: Updated to support `cross` with `riscv64` as a target.
- **Cross.toml**: Added configuration specific to `riscv64`.
- **Documentation**: List 'build-riscv64' in `book/src/installation_cross_compiling.md`.
2025-04-23 22:31:46 +00:00
chonghe
c13e069c9c Revise logging when queue is full (#7324) 2025-04-22 22:46:30 +00:00
Tim Fan
5527125f5e Fix GitHub releases page looks bad in GitHub dark theme (#7340)
#2573


  Change release page display in dark theme.

Before

<img width="1028" alt="image" src="https://user-images.githubusercontent.com/574696/132262479-c1e5c904-576f-4878-8a10-6012e0c51620.png" />

After:

<img width="1028" alt="image" src="https://github.com/user-attachments/assets/e6f42090-f9eb-4da7-9567-521124ea2f10" />

Others stay unchanged
2025-04-22 09:40:36 +00:00
Michael Sproul
e61e92b926 Merge remote-tracking branch 'origin/stable' into unstable 2025-04-22 18:55:06 +10:00
chonghe
9f4b0cdc28 Fix Kurtosis doppelganger CI (#7343) 2025-04-22 08:46:31 +00:00
Michael Sproul
54f7bc5b2c Release v7.0.0 (#7288)
New v7.0.0 release for Electra on mainnet.
v7.0.0
2025-04-22 09:21:03 +10:00
chonghe
80fe133d2c Update Lighthouse Book for Electra features (#7280)
* #7227
2025-04-17 09:31:26 +00:00
Varun Doshi
410af7c5f5 feat: update mainnet bootnodes (#7279)
Fixes #7266


  Updates mainnet bootnodes and added 2 new Teku bootnodes
2025-04-17 09:31:23 +00:00
Mac L
c32569ab83 Restore HTTP API logging and add more metrics (#7225)
#7124


  - Restores previous HTTP logging with tracing compatible syntax
- Adds metrics for certain missing endpoints (and alphabetized the existing ones)
2025-04-17 08:18:45 +00:00
Michael Sproul
c7acffc171 Merge remote-tracking branch 'origin/stable' into release-v7.0.0 2025-04-17 17:40:00 +10:00
Michael Sproul
fd82ee2f81 Release v7.0.0-beta.7 (#7333) v7.0.0-beta.7 2025-04-17 14:46:43 +10:00
Jean-Baptiste Pinalie
5352d5f78a Update proposer_slashings and attester_slashings amounts for electra. (#7316)
Did not find a specific issue beside https://github.com/sigp/lighthouse/issues/6821


  Leverage `whistleblower_reward_quotient_for_state` to have accurate post-electra `proposer_slashings` and `attester_slashings` fields returned by `/eth/v1/beacon/rewards/blocks/<id>`.
2025-04-17 00:58:36 +00:00
Michael Sproul
6fad6fba6a Release v7.0.0-beta.6 2025-04-16 08:54:53 +10:00
Michael Sproul
bff6dd300a Update withdrawals processing (spec v1.5.0-beta.6) 2025-04-16 08:52:01 +10:00
Jimmy Chen
476f3a593c Add MAX_BLOBS_PER_BLOCK_FULU config (#7161)
Add `MAX_BLOBS_PER_BLOCK_FULU` config.
2025-04-15 00:20:46 +00:00
EllipticPoint
08882c64ca Fix execution engine integration tests with latest geth version (#6996)
https://github.com/sigp/lighthouse/issues/6937


  - Use `ethers-rs` [`Signer`](https://www.gakonst.com/ethers-rs/middleware/signer.html) middleware for local signing and sending raw txs to geth
- ~~Set `totalDifficulty = 0` through `serde` default if the block does not contain a `totalDifficulty` field~~
2025-04-12 09:03:50 +00:00
Lion - dapplion
be68dd24d0 Fix wrong custody column count for lookup blocks (#7281)
Fixes
- https://github.com/sigp/lighthouse/issues/7278


  Don't assume 0 columns for `RpcBlockInner::Block`
2025-04-11 22:00:57 +00:00
Robert Mordzon
70f8ab9a6f Add riscv64 build support (#7309)
Lighthouse does not compile on the _riscv64_ architecture due to a missing target configuration in the `bls_hardware_acceleration` function.


  Added support for compiling Lighthouse on the riscv64 architecture by explicitly handling the _riscv64_ target in the bls_hardware_acceleration function.
Specifically, this line was added:
```
#[cfg(target_arch = "riscv64")]
return false;
```
This prevents a compilation error on RISC-V.
2025-04-11 13:17:22 +00:00
Mac L
39eb8145f8 Merge branch 'release-v7.0.0' into unstable 2025-04-11 21:32:24 +10:00
Eitan Seri-Levi
af51d50b05 Ensure /eth/v2/beacon/pool/attestations honors committee_index (#7298)
#7294


  Fix the filtering logic so that we actually filter by committee index for both `Base` and `Electra` attestations.

Added a tiny optimization when calculating committee_index to prevent unneeded memory allocations

Added a regression test
2025-04-11 04:47:30 +00:00
Eitan Seri-Levi
ef8ec35ac5 Ensure light_client/updates endpoint returns spec compliant SSZ data (#7230)
Closes #7167


  - Ensure the fork digest is generated from ther light client updates attested header and not the signature slot
- Ensure the format of the SSZ response is spec compliant
2025-04-11 04:47:27 +00:00
Mac L
9304a592bf Update crossbeam to fix cargo audit failure (#7313)
There is a `cargo audit` failure related to this CVE: https://rustsec.org/advisories/RUSTSEC-2025-0024


  Unblock CI by updating `crossbeam-channel`
2025-04-11 02:39:52 +00:00
chonghe
93703623c8 Gnosis Pectra fork epoch (#7296)
~~* #7274~~
* #7295
2025-04-10 08:51:14 +00:00
Michael Sproul
bb5b00ead5 Update and cleanup Electra preset (#7303)
- Update the bundled `electra.yaml` preset files for `mainnet` and `minimal` to match `consensus-specs` as of: bf09edef17
- Add the field `max_pending_deposits_per_epoch` to our runtime representation of `ElectraPreset`. This results in it appearing in `/eth/v1/config/spec` where it was previously absent.
2025-04-10 06:27:31 +00:00