Commit Graph

5920 Commits

Author SHA1 Message Date
Etan Kissling 37967ba03b
`ProveField` cleanups in `slashing_protection_common` (#5477)
Cleanup of `ProveField` warnings in `slashing_protection_common` module.
Note that `ProveField` is disabled by default in makefile, but sometimes
these pop up when doing a regular `nim c`, and cleaning these may allow
enabling the warning in some future.

As the `case` is over `a.kind`, `ProveField` warnings for `b` have to be
suppressed using `{.push.}` / `{.pop.}` for comparison operators.
2023-10-04 10:26:52 +02:00
Etan Kissling 24c68bbcf7
fix `ProveField` warning in `network_metadata` (#5476)
Spurious `ProveField` warning can be avoided by using `case` instead of
`if` on `metadata.genesis.kind`. Also suppress `GlobalVar` hints when
`incbinEnabled` is used, which has global `let` definitions.
2023-10-04 10:19:05 +02:00
Etan Kissling 4d20b4a6c6
bump `nim-chronicles` to `fb4fce77ace0b5558df1be21436b331c606de9a2` (#5475)
- avoid enum conversion when logging
2023-10-04 10:08:25 +02:00
Etan Kissling bfe76be4d7
debug log duration for processing attestation queue (#5473)
Depending on the load, processing of queued attestations may take a
while. Log processing duration at debug level.
2023-10-03 22:17:42 +02:00
Etan Kissling 886b9d4dd8
bump `eth2-networks` to `063f826a03676c33c95a66306916f18b690d35eb` (#5472)
- Add IP and location information to mainnet bootnodes
- Change IP and location of a Teku bootstrap node
- Add lighthouse's ipv6 compatible bootnodes
- Adding new Teku mainnet bootnodes
- Remove the ENRs from eth2 networks
2023-10-03 15:33:48 +02:00
Etan Kissling e1a8e9a2fa
rm unused `GenesisStateRef` (#5469)
In `el_manager`, there was an unused `GenesisStateRef` type. Remove it.
2023-10-02 19:00:23 +00:00
Jacek Sieka 9a48e2e922
fix stale activity log (#5465) 2023-09-30 13:31:08 +00:00
Etan Kissling 8aaea1a14e
simplify fork choice test (#5467)
Reduce overly verbose fork branching logic in fork choice test with
generic implementation based on `consensusFork`.
2023-09-29 13:26:34 +00:00
Jacek Sieka 252473d2d1
ssz: bump (#5463)
more `zeroMem` avoidance, value semantics for merkleizer
2023-09-28 11:59:33 +00:00
Miran e9c8f82282
mention Holesky in the book (#5460) 2023-09-28 11:35:42 +01:00
Zahary Karadjov 77d6bc5f42
Merge stable into unstable 2023-09-28 11:32:54 +01:00
tersec 7ecc1096e3
document strange-looking capella/bellatrix apparent mismatch in block building (#5461) 2023-09-27 16:06:22 +00:00
Etan Kissling 7c45b8f98d
convert remaining `toFork` -> `kind` for consistency (#5462)
We currently have multiple ways to obtain `ConsensusFork` or
`LcDataFork` from a forky type. Rename `toFork` to `kind`
for a consistent API naming.
2023-09-27 15:10:28 +00:00
Eugene Kabanov 4fb95d000d
REST server fixes and improvements. (#5422)
* Move from Option[T] to Opt[T] usage.

* Add `finalized` flag.

* Fix compilation issue.

* Http415 error code for some REST API calls.
Introduce more comprehensive error reporting for block calls.
Deprecate decodeEthConsensusVersion() function.

* Bump http-utils.

* Fix copyright year.

* Fix serialization issue.

* Address review comments.

* Post rebase fixes.
2023-09-27 16:45:33 +02:00
Zahary Karadjov cfa0268d89
Version 23.9.1
Changes:

* Updated network metadata for Holesky
* Use hash_tree_root instead of SHA256 when verifying the Holesky
  genesis state
2023-09-25 21:24:25 +01:00
Jacek Sieka 96e05e4f37
stint: bump (#5459)
fixes 32-bit compilation
2023-09-25 21:08:48 +02:00
tersec 710f26745d
small attestation pool clean up (#5458) 2023-09-24 08:50:48 +00:00
Eugene Kabanov 98e08a9e02
Fix cancellation deprecate warnings. (#5454)
Add noCancel in exception handlers.
Refactor pending cancellations code.
2023-09-24 09:28:09 +02:00
Eugene Kabanov e3fe762ec9
Fix unknown fields should be ignored when parsing liveness responses. (#5418) 2023-09-23 08:44:54 +02:00
Etan Kissling 47639ef89c
replace `Eth2NetworkMetadata` case object with `Result` (#5452)
`Eth2NetworkMetadata` has an `incompatible` case to hold an error string
in case the loaded file is not compatible with the compile-time config.
The same can be modeled with a `Result[Eth2NetworkMetadata, string]` and
avoids followup checks for the `incompatible` case.
2023-09-22 23:45:24 +02:00
Etan Kissling 5150505e66
bump `nim-ssz-serialization` to `a5767c1b4992dca3e5bd72557aadd4df0f183bf8` (#5457)
- nimble/ci updates
- use common super-type in `raisesssz` pragma
2023-09-22 23:44:57 +02:00
Eugene Kabanov caaad4777c
BN+LC+SN: Fix cancellation deprecate warnings. (#5455)
* Fix deprecation cancel() warnings in SN, BN, LC.

* Fix missing import.
2023-09-22 11:06:27 +00:00
Eugene Kabanov 88565e6da4
Make KeystoreCache working with KeystoreManagement API. (#5443) 2023-09-21 20:07:02 +02:00
tersec 2895a9a05c
automated consensus spec URL updating to v1.4.0-beta.2 (#5453) 2023-09-21 18:06:51 +00:00
Jacek Sieka e64b31986e
Increase default file limit on startup (#5436)
We use file descriptors for validators and sockets and might run out of
either on high-validator setups - increasing the limit here is harmless
and avoids a common limiting factor in setup

Co-authored-by: Etan Kissling <etan@status.im>
2023-09-21 16:08:13 +02:00
Etan Kissling e7bc41e005
`blck` --> `forkyBlck` when using `withBlck` / `withStateAndBlck` (#5451)
For symmetry with `forkyState` when using `withState`, and to avoid
problems with shadowing of `blck` when using `withBlck` in `template`,
also rename the injected `blck` to `forkyBlck`.

- https://github.com/nim-lang/Nim/issues/22698
2023-09-21 12:49:14 +02:00
tersec 351472a2d4
per payload-builder payload builder validator registration (#5431) 2023-09-20 17:00:37 +00:00
Etan Kissling ee57a07411
implement Confirmation rule prerequisite - fork choice filter change (#5450)
To support confirmation rule via beacon-APIs as described in spec PR,
add `--debug-fork-choice-version=pr3431` option and enable when Deneb
fork is scheduled. To opt-out, `--debug-fork-choice-version=stable`,
or don't schedule Deneb.

- https://github.com/ethereum/consensus-specs/pull/3431
- https://github.com/ethereum/consensus-specs/issues/3466

"will bundle this with deneb release":

- https://github.com/ethereum/pm/issues/844#issuecomment-1673359012
2023-09-20 18:27:55 +02:00
Etan Kissling 273f1d34cd
implement EIP-7514 for Deneb: Add Max Epoch Churn Limit (#5442)
* implement EIP-7514 for Deneb: Add Max Epoch Churn Limit

Cap activations per epoch according to EIP-7514:

- https://eips.ethereum.org/EIPS/eip-7514
- https://github.com/ethereum/consensus-specs/pull/3499

* apply proposer boost to first block in case of equivocation

Implement spec changes to fork choice; this only affects equivocation
when multiple blocks are signed for the same slot. Regular operation
is not changed.

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

* bump test vectors to v1.4.0-beta.2-hotfix

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
2023-09-20 13:39:56 +02:00
Etan Kissling aacb853a0b
add blob validation to `test_fixture_fork_choice` (#5441)
Preparation for processing new tests from:

- https://github.com/ethereum/consensus-specs/pull/3463
2023-09-20 01:14:49 +00:00
Etan Kissling eadd0d69ce
bump `nim-kzg4844` to `6c406c70ad8cde6ab56320158dd969beb45322ef` (#5448)
- bump `csources` to `v0.3.1`
2023-09-19 23:29:50 +00:00
Etan Kissling 1640c45a95
reject invalid proofs when validating blobs (#5445)
Currently, passing `0xc00000...` proof seems to pass `verifyProofs`.
Unsure why such a check is not necessary in spec, and also unsure
whether it is correct to reject proof at infinity, or if it could
occur, e.g., for a blob containing all 0 bytes. Weird overall...

* proper fix
2023-09-19 22:13:58 +00:00
Etan Kissling c1b43d166b
avoid repeated total active balance computation in fork choice (#5437)
We currently compute `justified_total_active_balance` inside
`calculateProposerBoost`, despite that sum already being known
in the `EpochRef` cache. Tracking `justified_total_active_balance`
whenever the justified checkpoint updates allows replacing the
repeated computation with a lookup, at minimal memory cost.
2023-09-19 22:04:55 +02:00
tersec ee75d45a8b
fix `ATTESTATION_PROPAGATION_SLOT_RANGE` unknown constant warning (#5433)
* fix ATTESTATION_PROPAGATION_SLOT_RANGE unknown constant warning

* verify underflow not an issue
2023-09-19 06:54:58 +00:00
Eugene Kabanov 521e7f535c
Bump chronos & presto. (#5394)
* Bump chronos & presto.

* Increase finalization timeouts for 10 minutes.

* Return Jenkins timeouts back to normal.
Bump chronos.

* Bump presto.
2023-09-19 08:01:58 +02:00
Miran 7eaa8f832b
Fix #2013, add images to the repo (#5438)
* add img for health.md

* add imgs for metrics.md

* add imgs for email.md

* add img for developers.md

* add imgs for grafana/readme.md

---------

Co-authored-by: Etan Kissling <etan@status.im>
2023-09-19 08:00:48 +02:00
Miran 244f930f42
update Holesky docs (#5435)
* update Holesky docs

* Update docs/the_nimbus_book/src/holesky.md

Co-authored-by: Jacek Sieka <jacek@status.im>

---------

Co-authored-by: Jacek Sieka <jacek@status.im>
Co-authored-by: Etan Kissling <etan@status.im>
2023-09-19 08:00:27 +02:00
Etan Kissling a261384efc
exclude `*.service` files from lint check (#5440)
These `*.service` files are installed on user installations, so
referring to a license file outside their installation doesn't make
too much sense.
2023-09-18 21:54:06 +00:00
Etan Kissling 63440766ef
exclude 'public-keys/all.txt' file from checkout (#5439)
The 'vendor/holesky/public-keys/all.txt' file is not used by Nimbus,
but sometimes fails to download due to payment issues in `@eth-clients`.
Skipping the download of that file should reduce that risk.

```
Downloading public-keys/all.txt (240 MB)
Error downloading object: public-keys/all.txt (ba977b5): Smudge error: Error downloading public-keys/all.txt (ba977b5b1da180914c934623fce187860e1b54cff939e6208533b2cb5f589e07): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
```

* bump nbs: Patch libnatpmp.a rule to support llvm-mingw in targets.mk

* bump nbs: Allow passing config to submodule initialization in `update-common`
2023-09-18 20:24:13 +02:00
Tanguy 4918a4e2e0
Fix direct peers (#5427)
* Fix direct peers

* Support ENRs in DP, use DP in local testnet

* fix docs

* bump libp2p
2023-09-15 18:45:55 +00:00
Jacek Sieka b4159416c4
grafana: update dashboard
* new mesh efficiency board for measuring IDONTWANT
* fix scaling of several message/slot boards
2023-09-15 16:50:36 +02:00
tersec 20fea37735
update Docker base images to include `git-lfs` (#5430)
* update Docker base images to include git-lfs

* add copyright years
2023-09-15 10:45:49 +00:00
Eugene Kabanov 12ef43bcc0
Fix issue when VC could not be interrupted while its in pre-genesis period. (#5424) 2023-09-15 12:39:26 +02:00
tersec 325d5a6afa
log builder unblinding requests (#5434) 2023-09-15 09:27:38 +00:00
tersec dae4beb4a2
log engine getPayload requests (#5432) 2023-09-15 08:56:32 +00:00
Eugene Kabanov aec953e4da
VC: Fix VC must not crash if beacon node address could not be resolved. (#5388)
* Fix VC should not crash, if beacon node URL could not be resolved.

* Bump chronos.

* Update .gitmodules.
2023-09-15 07:34:32 +02:00
tersec 5a29ad7e4f
update some consensus-spec URLs to v1.4.0-beta.1 (#5429) 2023-09-14 18:23:59 +00:00
tersec 7a001d4896
remove 4 more missing constants in preset handling warning (#5428) 2023-09-14 12:37:35 +00:00
Etan Kissling bb8584c58a
provide hint when Git LFS is not installed (#5425)
Add a hint message during git clone to direct the user to install
Git LFS if it is missing. It is required to clone Holesky submodule.

---------

Co-authored-by: Jakub <jakub@status.im>
2023-09-14 12:09:02 +02:00
Etan Kissling 176ea09c2b
cleanup `OnBlockAdded` usage (#5426)
Reduce repetitiveness when using forked `OnBlockAdded` callbacks by
introducing a template to obtain appropriate cb from `ConsensusFork`.
2023-09-13 17:57:54 +00:00