Commit Graph

6702 Commits

Author SHA1 Message Date
realbigsean
796e3567c8 slog updates 2025-03-13 10:06:15 -07:00
realbigsean
56bb6c1968 add import 2025-03-13 09:59:08 -07:00
dapplion
8f2194eb2c Add logs when adding to pubkey cache 2025-03-13 09:48:44 -07:00
Michael Sproul
8d058e4040 Release v7.0.0-beta.3 v7.0.0-beta.3 2025-03-13 10:07:09 +11:00
Michael Sproul
3645d57099 Fix descent from split check (#7105) 2025-03-11 16:14:58 +11:00
Jimmy Chen
9bb0e1377a Bump version to v7.0.0-beta.2 (#7073) v7.0.0-beta.2 2025-03-04 15:51:34 +11:00
Eitan Seri-Levi
1b585978c1 Manual compaction endpoint (#7072)
* manual compaction endpoint

* linting

---------

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
2025-03-04 15:44:50 +11:00
Jimmy Chen
feedf5d662 Add CI fixes to holesky-rescue (#7071)
* Add CI fixes.

* Remove log and update cli docs.

* Build caches after loading state from disk.

* Revert payload invalidation API - wasn't working because of the justification being permanently updated.
2025-03-04 15:17:51 +11:00
Pawan Dhananjay
9436f23843 Add http endpoint to add trusted peer (#7068)
* Add a trusted_peers endpoint

* Maintain trusted peers in heartbeat
2025-03-04 14:34:14 +11:00
Jimmy Chen
e12719c404 Add backtrace logging. (#7063) 2025-03-04 11:49:13 +11:00
Eitan Seri-Levi
defdc595fc Prevent writing to state cache when migrating the database (#7067)
* add an update_cache flag to get_state to have more granular control over when we write to the cache

* State cache tweaks

- add state-cache-headroom flag to control pruning
- prune old epoch boundary states ahead of mid-epoch states
- never prune head block's state
- avoid caching ancestor states unless they are on an epoch boundary

---------

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
2025-03-04 11:15:12 +11:00
realbigsean
8f62b1934a Split block root lookups between fork choice and store on BBR response (#7066)
* handle bbr across finalized slot gracefully

* sort deps

* Michael's off-by-one corrections

---------

Co-authored-by: Michael Sproul <micsproul@gmail.com>
2025-03-04 09:55:05 +11:00
Michael Sproul
fcf1e3f24f Revert "Reuse milhouse subtrees to shrink inactivity_scores in memory (#7062)"
This reverts commit 6399ad482b.
2025-03-04 09:17:32 +11:00
Michael Sproul
6399ad482b Reuse milhouse subtrees to shrink inactivity_scores in memory (#7062)
* SSZ bump in a single clean commit

* Do the actual intra-rebases

* Update milhouse
2025-03-03 16:33:04 +11:00
Eitan Seri-Levi
8f43cb98b7 Manual finalization endpoint (#7059)
* Load block roots from fork choice where possible to avoid loading state from disk when serving block by range requests.

* Check if the start slot is newer than finalization (`start_slot >= finalized_slot`), and use fork choice in that case.

* force finalization endpoint

* cleanup

* Remove ds store

* Don't import blocks that conflict with the split

* Disconnect and ban peer if we get blocks conflicting manual checkpoint

* immediately commit state to cold db

* revert

* Fix descent from split check

* Add safety check to checkpoint when doing manual finalization.

---------

Co-authored-by: Jimmy Chen <jchen.tc@gmail.com>
Co-authored-by: Michael Sproul <michael@sigmaprime.io>
Co-authored-by: Pawan Dhananjay <pawandhananjay@gmail.com>
2025-03-03 16:31:52 +11:00
Jimmy Chen
73b7cad202 Change state cache size default to 32. (#7055) 2025-03-01 08:42:44 +11:00
Jimmy Chen
8706040094 Load block roots from fork choice where possible when serving BlocksByRange requests (#7058)
* Load block roots from fork choice where possible to avoid loading state from disk when serving block by range requests.

* Check if the start slot is newer than finalization (`start_slot >= finalized_slot`), and use fork choice in that case.
2025-03-01 08:41:24 +11:00
Jimmy Chen
9f15f31942 Optimise status processing for holesky-rescue (#7054)
* Optimise status processing

* Fix lint

---------

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
2025-02-27 21:23:40 +11:00
Paul Hauner
dc320e3faa Bump version v7.0.0-beta.1 2025-02-26 14:57:58 +11:00
Eitan Seri-Levi
e473500456 discard unused code 2025-02-25 14:20:12 -08:00
Pawan Dhananjay
627c1bac89 take config value 2025-02-25 10:37:29 -08:00
Pawan Dhananjay
0c5580f23f Bump sync-tolerance-epoch and make it a cli param 2025-02-25 09:45:51 -08:00
Michael Sproul
279afb0696 Add vc --disable-attesting flag 2025-02-26 00:36:33 +11:00
Michael Sproul
fd1ca8ef23 Ban peers with banned payloads 2025-02-25 23:30:11 +11:00
Jimmy Chen
df3038d902 Add log 2025-02-25 18:17:15 +11:00
Jimmy Chen
88c0f9d60a Blacklist invalid block root in block verification and blacklist invalid finalized epochs in sync. 2025-02-25 18:10:19 +11:00
Jimmy Chen
c61cf26622 Blacklist invalid block root in block verification and blacklist invalid finalized epochs in sync. 2025-02-25 18:08:44 +11:00
Michael Sproul
2883429f69 MORE 2025-02-25 16:44:42 +11:00
Michael Sproul
19fc31a75b Allow invalidation of "valid" nodes 2025-02-25 16:30:27 +11:00
Michael Sproul
ff2376efec Implement invalidation API 2025-02-25 15:42:25 +11:00
Michael Sproul
d4586ea92d Remove more liveness risks 2025-02-25 15:18:54 +11:00
Michael Sproul
1b9b61bb77 lcli http-sync hacks 2025-02-25 14:00:28 +11:00
Michael Sproul
11f17e52a0 Disable liveness risk 2025-02-25 12:36:13 +11:00
Michael Sproul
d472689fa2 Fix flag 2025-02-25 11:48:41 +11:00
Michael Sproul
bbc1200b2d Add flag to disable attestation APIs 2025-02-25 11:39:48 +11:00
Pawan Dhananjay
522b3cbaab Fix builder API headers (#7009)
Resolves https://github.com/sigp/lighthouse/issues/7000


  Set the accept header on builder to the correct value when requesting ssz.

This PR also adds a flag to disable ssz over the builder api altogether. In the case that builders/relays have an ssz bug, we can react quickly by asking clients to restart their nodes with the `--disable-ssz-builder` flag to force json. I'm not fully convinced if this is useful so open to removing it or opening another PR for it.

Testing this currently.
2025-02-24 03:39:13 +00:00
Pawan Dhananjay
b3b6aea1c5 Rust 1.85 lints (#7019)
N/A


  2 changes:
1. Replace Option::map_or(true, ...) with is_none_or(...)
2. Remove unnecessary `Into::into` blocks where the type conversion is apparent from the types
2025-02-24 02:36:13 +00:00
Michael Sproul
ff739d56be Fix light client merkle proofs (#7007)
Fix a regression introduced in this PR:

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

We were indexing into the `MerkleTree` with raw generalized indices, which was incorrect and triggering `debug_assert` failures, as described here:

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


  - Convert `generalized_index` to the correct leaf index prior to proof generation.
- Add sanity checks on indices used in `BeaconState::generate_proof`.
- Remove debug asserts from `MerkleTree::generate_proof` in favour of actual errors. This would have caught the bug earlier.
- Refactor the EF tests so that the merkle validity tests are actually run. They were misconfigured in a way that resulted in them running silently with 0 test cases, and the `check_all_files_accessed.py` script still had an ignore that covered the test files, so this omission wasn't detected.
2025-02-18 00:39:49 +00:00
Michael Sproul
1888be554c Release v7.0.0-beta.0 (#6962)
New release for Electra on Holesky and Sepolia.

Includes PRs:

- https://github.com/sigp/lighthouse/pull/6808
- https://github.com/sigp/lighthouse/pull/6914
- https://github.com/sigp/lighthouse/pull/6949
- https://github.com/sigp/lighthouse/pull/6950
- https://github.com/sigp/lighthouse/pull/6958
v7.0.0-beta.0
2025-02-13 03:06:20 +00:00
Michael Sproul
25f804a111 Fix light client plumbing in beacon processor (#6993)
Our Holesky nodes running with the light client enabled were logging messages about full queues:

> Feb 12 22:09:28.949 ERRO Work queue is full                      queue: unknown_light_client_optimistic_update, queue_len: 128, msg: the system has insufficient resources for load, service: bproc

I thought this might be genuine overload, but it turns out this queue was never being read from!


  - [x] Rename light-client related queues in the beacon processor for clarity.
- [x] Ensure all light-client related queues are being popped from.
2025-02-13 00:50:17 +00:00
Eitan Seri-Levi
ed8086c897 Ensure GET v2/validator/aggregate_attestation is backwards compatible (#6984)
Closes #6983


  `GET v2/validator/aggregate_attestation` is not backwards compatible. It only works for post electra attestations. This PR adds backwards compatibility and additional test coverage. We should include this in the upcoming 7.0 beta release if possible
2025-02-12 00:13:05 +00:00
Jimmy Chen
0728140086 Address cargo audit failure RUSTSEC-2025-0006 (#6972)
PR to fix cargo audit failure and bump `hickory-proto` version:
https://github.com/sigp/lighthouse/actions/runs/13252660830/job/36993664960
2025-02-11 04:17:02 +00:00
Age Manning
62a0f25f97 IPv6 By Default (#6808) 2025-02-10 01:58:11 +00:00
Michael Sproul
ceb5ecf349 Update EF tests to spec v1.5.0-beta.2 (#6958)
Update spec tests for recent v1.5.0-beta.2 release. There are no substantial changes for Electra and earlier, and the Fulu test updates to be made are tracked here:

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


  - Add `SingleAttestation` SSZ tests
- Add new `deposit_with_reorg` fork choice tests
- Update tag to v1.5.0-beta.2
- Ignore Fulu tests
2025-02-10 01:58:08 +00:00
Lion - dapplion
f35213ebe7 Sync active request byrange ids logs (#6914)
- Re-opened PR from https://github.com/sigp/lighthouse/pull/6869

Writing and running tests I noted that the sync RPC requests are very verbose now.

`DataColumnsByRootRequestId { id: 123, requester: Custody(CustodyId { requester: CustodyRequester(SingleLookupReqId { req_id: 121, lookup_id: 101 }) }) }`

Since this Id is logged rather often I believe there's value in
1. Making them more succinct for log verbosity
2. Make them a string that's easy to copy and work with elastic


  Write custom `Display` implementations to render Ids in a more DX format

_ DataColumnsByRootRequestId with a block lookup_

```
123/Custody/121/Lookup/101
```

_DataColumnsByRangeRequestId_

```
123/122/RangeSync/0/5492900659401505034
```

- This one will be shorter after https://github.com/sigp/lighthouse/pull/6868

Also made the logs format and text consistent across all methods
2025-02-10 01:27:05 +00:00
Eitan Seri-Levi
afdda83798 Enable Light Client server by default (#6950) 2025-02-10 01:27:03 +00:00
Eitan Seri-Levi
e3e21f7516 Schedule Sepolia and Holesky Electra forks (#6949) 2025-02-10 01:27:00 +00:00
Michael Sproul
0344f68cfd Update attestation rewards API for Electra (#6819)
Closes:

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


  Use `MAX_EFFECTIVE_BALANCE_ELECTRA` (2048) for attestation reward calculations involving Electra.

Add a new `InteropGenesisBuilder` that tries to provide a more flexible way to build genesis states. Unfortunately due to lifetime jank, it is quite unergonomic at present. We may want to refactor this builder in future to make it easier to use.
2025-02-09 10:15:33 +00:00
Eitan Seri-Levi
6032f15890 Fix aggregate attestation v2 response (#6926) 2025-02-09 10:15:30 +00:00
Lion - dapplion
e3c721817e Remove duplicated fork_epoch and fork_version implementation (#6953)
This PR adds an implementation to get fork_version and fork_epoch given a `ForkName`. I didn't realize that this is already implemented in the `ChainSpec` sorry

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


  Remove duplicated fork_epoch and fork_version implementation
2025-02-08 00:38:24 +00:00