2
0
mirror of https://github.com/status-im/nimbus-eth2.git synced 2025-01-12 15:24:14 +00:00

3608 Commits

Author SHA1 Message Date
Jacek Sieka
185684daf8
simplify deposit syncing message ()
and make it less alarming since there's no action required from the user
typically
2023-07-11 08:01:56 +02:00
Jacek Sieka
1bac029935
avoid unnecessary buffer zero:ing () 2023-07-11 08:01:45 +02:00
tersec
a1ddd447bc
use correct import name for kzg4844 () 2023-07-10 23:55:40 +00:00
Etan Kissling
5115aaedb7
early exit commonAncestor when comparing with finalizedHead ()
* early exit `commonAncestor` when comparing with `finalizedHead`

As all `BlockRef` lead to `finalizedHead` (`parent == nil`),
can shortcut in that situation and immediately return `finalizedHead`
if passed as one of the arguments.

* typo in comment

* add test from 

Co-authored-by: tersec <tersec@users.noreply.github.com>

* add note about test complexity

* regenerate test summary

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
2023-07-10 20:36:25 +00:00
henridf
86e33b0a3f
Remove stale denebImplementationMissing ()
This should have been removed as part of 
2023-07-10 17:17:33 +02:00
henridf
23edc4f960
Finish readValue for deneb RestPublishedBeaconBlockBody ()
(Stray piece that got left behind a previous PR...)
2023-07-10 14:57:11 +00:00
tersec
49056c3e39
use v1.3.0 stability subnet behavior when appropriate () 2023-07-07 04:16:12 +00:00
Jacek Sieka
862897124a
rest: allow state root lookups up to 8k slots from head ()
* rest: allow state root lookups up to 8k slots from head

* avoid int, clean up error messages
2023-07-06 12:53:35 +02:00
Eugene Kabanov
ac1b02698a
VC: Use scoring function to select best attestation data when using multiple BNs. ()
* Initial commit.

* Move score selection log statement to debug level.

* Fix proper float64 log format.

* Cleanup imports and legacy code.

* Address review comments.

* Address review comments.

* Fix scoring function.

* Address review comments.

* Address review comments 2.
Fix registerBlock post-rebase issues.

* Simplify innerLoop decision making.

* Make getAttestationDataScore() more testable.
Add tests for getAttestationDataScore().

* Add modified AllTests copy.
2023-07-06 11:14:22 +02:00
tersec
1e2d3b12c4
update some consensus-specs ref URLs to v1.4.0-beta.0 () 2023-07-05 16:02:55 +00:00
tersec
583eb4db17
work around some CastSizes warnings and fix unreachable code warnings () 2023-06-30 21:34:04 +02:00
tersec
0be95571a7
update some consensus spec URLs to v1.4.0-beta.0 () 2023-06-30 16:12:54 +00:00
tersec
b4c4f0955e
https://github.com/ethereum/consensus-specs/pull/3421 https://github.com/ethereum/execution-apis/pull/420 () 2023-06-30 08:14:20 +00:00
henridf
99264d7507
Local validator proposals ()
* Implement local validator block proposals

* Address review feedback

* Fix rebase issue
2023-06-30 07:39:41 +00:00
tersec
ba94dc849f
opt-out support for v1.4.0 attestation stability subnets ()
* opt-out support for v1.4.0 attestation stability subnets

* document debug-prefix-flag-policy and remove temporary from flag name
2023-06-30 05:23:15 +00:00
tersec
d5a6d51ede
Web3Signer support only for only Bellatrix and later ()
Co-authored-by: Etan Kissling <etan@status.im>
2023-06-29 09:36:43 +00:00
tersec
dc5687093f
update gossip validation for v1.4.0-beta.0 ()
Co-authored-by: Etan Kissling <etan@status.im>
2023-06-29 08:34:21 +00:00
henridf
7b0e3b1c04
Review feedbac from () 2023-06-29 01:17:54 +00:00
henridf
1234900065
Add blob handling to message router ()
* Add blob handling to message router

* address review feedback

* Fix typos
2023-06-28 17:55:31 +00:00
Etan Kissling
41b93ae57a
fix code for Nim v1.6.14 compatibility ()
With `v1.6.14` there is compilation issue in `trusted_node_sync` where
a type is not inferred automatically anymore for a `nil` instance.
Fix it so we can bump the compiler.

See https://github.com/status-im/nimbus-build-system/pull/63
2023-06-28 17:21:43 +00:00
Eugene Kabanov
5e1a0eac85
VC: Runtime config ()
* Make VC able to understand any type of `/eth/v1/config/spec` response without any changes in source code.
Update compatibility checking.
Now VC is able to obtain any constant from `spec` call.

* Remove RestSpecVC declaration.
2023-06-28 15:33:38 +02:00
Eugene Kabanov
c534a285b9
Fix polling block monitor from deadlocks when connection has been lost. ()
Fix events block monitor from losing connection forever.
Add node to block received log statement.
2023-06-28 15:33:21 +02:00
Eugene Kabanov
c2c5d80a4f
VC: Remote BN clock offset monitoring. ()
* Initial commit.

* Add algorithm in comment.
Remove delays.
Fix logging statement issues.
Change update from epoch to slot.

* Obtain timestamp earlier.

* Add processing delays into algorithm.

* Fix time offset logging to produce integers instead of strings.

* Address review comments.

* Fix copyright year.
Fix updateStatus().

* Remove fields from Slot start log statement.
Fix issues when BN do not support Nimbus Extensions.
Rename metric name and type change.

* Add beacon role to disable time offset check manually.
2023-06-28 15:33:07 +02:00
tersec
bf575aac57
make OnFooBlockAdded callback types generic () 2023-06-28 13:30:49 +00:00
Zahary Karadjov
970f5dfc4e
Merge branch 'stable' into unstable 2023-06-27 05:40:58 +03:00
Zahary Karadjov
187e1a0633
Version 23.6.1 2023-06-27 03:58:14 +03:00
Jacek Sieka
17e74c0c8b
don't check legacy tables for pruning ()
These tables can't be deleted from (read-only) and would be too slow to
delete from anyway due to the inefficient storage format in use.

* slow down startup clearing too
* remove unused del function
2023-06-26 19:30:45 +03:00
henridf
ac3d8939a8
Add Deneb handling to state_transition.makeBeaconBlock() ()
* Add Deneb handling to state_transition.makeBeaconBlock()

* review feedback
2023-06-26 16:05:02 +00:00
tersec
a2bdc2d723
revert 2023-06-26 08:38:05 +00:00
tersec
dbd7611983
not a real change 2023-06-26 08:36:39 +00:00
tersec
ba597ef0a2
per-validator payload builder configuration () 2023-06-25 12:00:17 +00:00
tersec
614202e30d
automated consensus spec URL updating to v1.4.0-beta.0 () 2023-06-24 15:43:30 +00:00
Jacek Sieka
d9bff54d57
don't check legacy tables for pruning ()
These tables can't be deleted from (read-only) and would be too slow to
delete from anyway due to the inefficient storage format in use.

* slow down startup clearing too
* remove unused del function
2023-06-24 16:14:28 +02:00
tersec
9dbf63d8ca
use v1.4.0-beta.0 consensus spec test vectors () 2023-06-24 12:27:15 +00:00
tersec
b62664915e
consensus spec v1.4.0 attestation stability subnets () 2023-06-23 09:30:46 +00:00
henridf
fa212515f5
Implement validor client proposals for Deneb () 2023-06-23 09:30:16 +00:00
Tanguy
11d18acfeb
Add Yamux experimental support () 2023-06-23 09:16:30 +02:00
Etan Kissling
8a853fc4e4
extract LC sync task scheduling helper function ()
The helper function to compute delay until next light client sync task
can be useful from more general purpose contexts. Move to helpers, and
change it to return `Duration` instead of `BeaconTime` for flexibility.
2023-06-23 06:19:51 +00:00
Etan Kissling
cbc4cef981
bump gnosis-chain-configs to 19060cb894ea0fb8ff3c8ec2fd26c0433f56c52c ()
https://github.com/gnosischain/configs/pull/12

- Schedule shapella for gnosis
2023-06-22 11:14:02 +03:00
Etan Kissling
bab6a77abc
optimize LC sync task scheduling ()
- When syncing `LightClientUpdatesByRange`, and peer replies with
  fewer periods than requested, no need to delay next request.
- When `FinalityUpdate` / `OptimisticUpdate` sync fails,
  no need to retry immediately.
2023-06-21 17:44:49 +00:00
Etan Kissling
6ec6b99ef6
extract nextLightClientSyncTask helper ()
The `nextLightClientSyncTask` helper is generic enough to be useful for
contexts besides libp2p based light client sync. Extract it.
2023-06-21 06:28:14 +00:00
Etan Kissling
d670af5bf5
align style when calling LC libp2p API ()
The `UpdatesByRange` API takes `startPeriod / count`, but is internally
called by `Slice`. Move the logic that converts from the `Slice` to the
caller to reduce complexity inside the used `doRequest` function.
2023-06-20 20:21:32 +00:00
Eugene Kabanov
e2f7065432
Fix iteration issue. ()
Add elapsed_time to log statement.
2023-06-20 16:41:20 +00:00
Zahary Karadjov
6b683924ce
Version 23.6.0 2023-06-20 02:11:44 +03:00
Zahary Karadjov
b32fac0a25
Merge branch 'stable' into unstable 2023-06-20 02:09:05 +03:00
Zahary Karadjov
503cde366c
Switch to --history:prune by default 2023-06-20 02:08:48 +03:00
Etan Kissling
2722778ce5
reduce nim-eth dependencies just for RNG ()
We have several modules that import `nim-eth` for the sole purpose of
its `keys.newRng` function. This function is meanwhile a simple wrapper
around `nim-bearssl`'s `HmacDrbgContext.new()`, so the import doesn't
really serve a use anymore. Replace `keys.newRng` with the direct call
to reduce `nim-eth` imports.
2023-06-19 22:43:50 +00:00
henridf
0f8866d672
Add Deneb beacon API types ()
* Add Deneb beacon API types

- Introduce the `ProduceBlockResponseV2` type for handling responses to `GET /eth/v2/validator/blocks/{slot}` (https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Validator/produceBlockV2)

- Introduce the `RestPublishedSignedBlockContents` type for handling the request body to `POST /eth/v1/beacon/blocks` (https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/ValidatorRequiredApi/publishBlock)

And a few other small changes towards Deneb block production support.

* Address review feedback

* Post-rebase fixes
2023-06-19 08:56:52 +00:00
Etan Kissling
3a6b50cf21
require sync committee supermajority in CI ()
* require sync committee supermajority in CI

To better catch problems with sync committee messages in CI, extend
local testnet simulation to also verify that each block is signed
by a supermajority of the sync committee.

Requires  and 

* lint
2023-06-17 06:00:01 +00:00
Etan Kissling
8c6c8a0ffa
use correct slot when producing sync aggregate around forks ()
`produceSyncAggregate` is called in new slot when block is produced,
while the other functions in `sync_committee_msg_pool` are called in
previous slot. So, need to subtract 1 slot when producing sync aggregate
to accept the signatures using the old digest during fork transition.
2023-06-16 21:30:36 +00:00