Commit Graph

7301 Commits

Author SHA1 Message Date
Mac L
827ff953bc Enable all ssz tests 2026-02-13 21:10:34 +11:00
Mac L
e9d53ea5bc Merge branch 'unstable' into progressive-list-tests 2026-02-13 05:41:12 +11:00
Mac L
be9d697ad9 Fix Bitfield type inference 2026-02-13 05:29:36 +11:00
Michael Sproul
b8072c5b77 Gloas payload bid consensus (#8801)
- [x] Consensus changes for execution payload bids
- [x] EF tests for bids (and `block_header` -- no changes required).


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-02-12 04:26:23 +00:00
radik878
711971f269 fix: cache slot in check_block_relevancy to prevent TOCTOU (#8776)
Co-Authored-By: radik878 <radikpadik76@gmail.com>
2026-02-11 23:45:50 +00:00
Lion - dapplion
d7c78a7f89 rename --reconstruct-historic-states to --archive (#8795)
Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-02-11 23:45:48 +00:00
Lion - dapplion
8d72cc34eb Add sync request metrics (#7790)
Add error rates metrics on unstable to benchmark against tree-sync. In my branch there are frequent errors but mostly connections errors as the node is still finding it set of stable peers.

These metrics are very useful and unstable can benefit from them ahead of tree-sync


  Add three new metrics:
- sync_rpc_requests_success_total: Total count of sync RPC requests successes
- sync_rpc_requests_error_total: Total count of sync RPC requests errors
- sync_rpc_request_duration_sec: Time to complete a successful sync RPC requesst


Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-02-10 23:40:01 +00:00
Akihito Nakano
889946c04b Remove pending requests from ready_requests (#6625)
Co-Authored-By: ackintosh <sora.akatsuki@gmail.com>

Co-Authored-By: João Oliveira <hello@jxs.pt>
2026-02-10 23:14:28 +00:00
Akihito Nakano
e1d3dcc8dc 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-10 22:49:20 +00:00
Eitan Seri-Levi
56eb81a5e0 Implement weak subjectivity safety checks (#7347)
Closes #7273


  https://github.com/ethereum/consensus-specs/pull/4179


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

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

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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-02-10 21:52:52 +00:00
Alexander Uvizhev
a1176e77be Add insecure-dep test task to Makefile and CI (#8464)
#8106


  I added `insecure-deps` target to Makefile and a new step into `check-code` section of test-suite CI workflow that uses the former.

That bash multiliner is not ideal, I'd prefer a cargo plugin instead but none exists.

I also changed Cargo.toml to test that the new CI check works. Once we see a pipeline fails, I revert the change.


Co-Authored-By: Alexander Uvizhev <uvizhe@gmail.com>

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

Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com>
2026-02-10 08:13:25 +00:00
Jimmy Chen
8948159a40 Add AI assistant documentation and commands (#8785)
* Add AI assistant documentation and commands

Adds structured documentation for AI coding assistants:

- CLAUDE.md / AGENTS.md: Lightweight entry points with critical rules
- .ai/: Shared knowledge base (CODE_REVIEW.md, DEVELOPMENT.md, ISSUES.md)
- .claude/commands/: Claude Code skills for review, issue, release
- .github/copilot-instructions.md: GitHub Copilot instructions

Supports Claude Code, OpenAI Codex, and GitHub Copilot with modular,
pointer-based structure for maintainability.

Includes guidelines for AI assistants to prompt developers about updating
these docs after receiving feedback, creating a continuous improvement loop.

* Add parallel development tip with git worktrees

* Address review feedback

- Add missing details to DEVELOPMENT.md: fork-specific testing, database
backends, cross-compilation targets, make test-release
- Simplify AGENTS.md to pointer to CLAUDE.md (Codex can read files)

* Address review feedback

- Add priority signaling: Critical vs Important vs Good Practices
- Restore actionable file references (canonical_head.rs, test_utils.rs, etc.)
- Add Rayon CPU oversubscription context
- Add tracing span guidelines
- Simplify AGENTS.md to pointer

* Address review feedback and remove Copilot instructions

- Restore anti-patterns section (over-engineering, unnecessary complexity)
- Restore design principles (simplicity first, high cohesion)
- Add architecture guidance (dependency bloat, schema migrations, backwards compat)
- Improve natural language guidance for AI comments
- Add try_read lock pattern
- Remove copilot-instructions.md (can't follow file refs, untestable)
2026-02-09 23:41:57 -07:00
Michael Sproul
7e275f8dc2 Gloas envelope consensus and more operations tests (#8781)
- Implement new `process_execution_payload` (as `process_execution_payload_envelope`).
- Implement new processing for deposit requests, including logic for adding new builders to the registry with index reuse.
- Enable a bunch more operations EF tests (most of them except bid processing/payload attestations/etc which we don't have code for yet).


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-02-10 03:59:25 +00:00
Mac L
286b67f048 Remove dependency on OpenSSL (#8768)
https://github.com/sigp/lighthouse/issues/8756


  Only the Web3Signer actually needs OpenSSL in order to parse PKCS12 certificates. This updates the function to instead manually parse the cert (using the `p12-keystore` crate) and converts it to a `PEM` certificate (using the `pem` crate) which can be directly converted to a `reqwest::tls::Identity` as this can be done directly in `rustls`.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-02-10 02:10:48 +00:00
João Oliveira
0c9f97f015 Remove libp2p multiaddress (#8683)
Co-Authored-By: João Oliveira <hello@jxs.pt>

Co-Authored-By: ackintosh <sora.akatsuki@gmail.com>
2026-02-09 23:31:49 +00:00
Michael Sproul
a3f04bd2d2 Merge v8.1.0 (stable) into unstable 2026-02-10 08:27:43 +11:00
Michael Sproul
f8cfaa4251 Gloas consensus logic for attestations (#8760)
Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-02-09 05:26:34 +00:00
Pawan Dhananjay
b8d098685f Record metrics for only valid gossip blocks (#8723)
N/A


  Fixes the issue where we were setting block observed timings for blocks that were potentially gossip invalid.
Thanks @gitToki for the find


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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-02-09 05:23:44 +00:00
Michael Sproul
c4437d2927 Fix regression test for #8528 (#8771)
I accidentally broke `unstable` while merging some missed commits from `release-v8.0`. The merge was clean but semantically broken, and I didn't notice because I pushed without running CI 😬


  - Fix the regression test added for #8528, for compatibility with the recent `RpcBlock` changes. I'm passing `is_available = false` which seems correct for this test.


Co-Authored-By: Michael Sproul <michael@sigmaprime.io>
2026-02-09 01:31:50 +00:00
Michael Sproul
532d8918c8 Merge remote-tracking branch 'origin/release-v8.0' into unstable 2026-02-09 09:18:10 +11:00
Mac L
2ad02510cd Remove syn version 1 (#8678)
#8547


  This updates a few of our crates to remove the older `syn 1` crate.

This updates:
- `criterion` -> `0.8`
- `itertools` -> `0.14`

And also certain `sigp` crates:
- `xdelta3` -> [`fe39066`](fe3906605c)
- `superstruct` -> `0.10.1`
- `ethereum_ssz` -> `0.10.1`
- `tree_hash` -> `0.12.1`
- `metastruct` -> `0.1.4`
- `context_deserialize` -> `0.2.1`
- `compare_fields` -> `0.1.1`


Co-Authored-By: Mac L <mjladson@pm.me>
2026-02-07 01:18:04 +00:00
Mac L
e4bc650097 Use if-addrs instead of local_ip_address (#8659)
Swaps out the `local_ip_address` dependency for `if-addrs`. The reason for this is that is that `local_ip_address` is a relatively heavy dependency (depends on `neli`) compared to `if-addrs` and we only use it to check the presence of an IPv6 interface. This is an experiment to see if we can use the more lightweight `if-addrs` instead.


Co-Authored-By: Mac L <mjladson@pm.me>
2026-02-06 15:40:09 +00:00
Mac L
bb133d510d Update time to fix cargo audit failure (#8764)
Update `time` to fix [ RUSTSEC-2026-0009 ](https://rustsec.org/advisories/RUSTSEC-2026-0009.html)


Co-Authored-By: Mac L <mjladson@pm.me>
2026-02-06 14:16:53 +00: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
Michael Sproul
7df2972d41 Run all ssz_static tests for Gloas (#8755)
- Ensure all ssz_static tests are running and passing for Gloas 🎉
- Refine file ignores for Gloas EF tests


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

Co-Authored-By: Jimmy Chen <jchen.tc@gmail.com>
2026-02-04 09:15:38 +00:00
Pawan Dhananjay
e50bab098e Remove state lru cache (#8724)
N/A


  In https://github.com/sigp/lighthouse/pull/4801 , we added a state lru cache to avoid having too many states in memory which was a concern with 200mb+ states pre tree-states.
With https://github.com/sigp/lighthouse/pull/5891 , we made the overflow cache a simpler in memory lru cache that can only hold 32 pending states at the most and doesn't flush anything to disk. As noted in #5891, we can always fetch older blocks which never became available over rpc if they become available later.

Since we merged tree states, I don't think the state lru cache is relevant anymore. Instead of having the `DietAvailabilityPendingExecutedBlock` that stores only the state root, we can just store the full state in the `AvailabilityPendingExecutedBlock`.
Given entries in the cache can span max 1 epoch (cache size is 32), the underlying `BeaconState` objects in the cache share most of their memory. The state_lru_cache is one level of indirection that doesn't give us any benefit.
Please check me on this cc @dapplion


Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com>
2026-02-04 04:55:53 +00:00
Jimmy Chen
1dd0f7bcbb Remove kzg_commitments from DataColumnSidecarGloas (#8739)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-02-04 03:37:05 +00:00
Eitan Seri-Levi
39727aa406 Move KZG commitments from payload envelope to payload bid and spec alpha.2 (#8725)
Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>

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

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

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-02-04 02:52:40 +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
Michael Sproul
90a593aaea Merge remote-tracking branch 'origin/release-v8.1' into unstable 2026-02-04 12:12:06 +11: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
d42327bb86 Implement Gloas withdrawals and refactor (#8692)
Co-Authored-By: Michael Sproul <michael@sigmaprime.io>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
2026-02-03 07:36:20 +00:00
Eitan Seri-Levi
ed7354d460 Payload envelope db operations (#8717)
Adds support for payload envelopes in the db. This is the minimum we'll need to store and fetch payloads.


  


Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
2026-02-03 05:46:10 +00: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