Commit Graph

5027 Commits

Author SHA1 Message Date
tersec 121c66ad3e
fix getForkedBlock to read EIP4844 and Capella blocks (#4450)
* fix getForkedBlock to read EIP4844 and Capella blocks

* update geth develop URLs
2022-12-30 21:59:21 +00:00
Jacek Sieka d854317646
fix countdown over time period (#4449)
*sigh*

fixes:
```
Error: unhandled exception:
beacon_chain/beacon_chain_db_light_client.nim(214, 12)
`period.isSupportedBySQLite`  [AssertionDefect]
```
2022-12-30 21:36:31 +01:00
Jacek Sieka 75c7195bfd
Backfill only up to MIN_EPOCHS_FOR_BLOCK_REQUESTS blocks (#4421)
When backfilling, we only need to download blocks that are newer than
MIN_EPOCHS_FOR_BLOCK_REQUESTS - the rest cannot reliably be fetched from
the network and does not have to be provided to others.

This change affects only trusted-node-synced clients - genesis sync
continues to work as before (because it needs to construct a state by
building it from genesis).

Those wishing to complete a backfill should do so with era files
instead.
2022-12-23 08:42:55 +01:00
Etan Kissling 2ac7609259
display owl on Capella transition (#4442)
Trigger ANSI art on upgrade to Capella, similar to the merge.
Future extension could log blinking art when user successfully managed
to get BLS to Execution change included into a block for a validator.

Art created by http://beatscribe.com/ (beatscribe#1008 on Discord)
2022-12-21 13:30:24 +01:00
Etan Kissling 12b428e3d7
fix `produceBlockV2` call for Capella (#4443)
Avoid issue when calling `/eth/v2/validator/blocks/{slot}` for a
Capella slot via VC, same logic as in `validator_duties`.
2022-12-21 10:35:56 +00:00
Zahary Karadjov adcc57e7ca
Version 22.12.0 2022-12-21 10:50:13 +02:00
zah 0be57eec6e
Don't package the nimbus_validator_client in the nimbus-eth2 docker images; Document the new dedicated image (#4441) 2022-12-20 23:32:31 +02:00
zah 94a87da4a2
Documentation for the --with-deposit-snapshot option (#4440) 2022-12-20 23:32:13 +02:00
Etan Kissling 2184fd2322
bump `nim-eth`, extend empty block fallback for EIP4844 (#4425)
Implements `emptyPayloadToBlockHeader` for EIP-4844.
https://github.com/status-im/nim-eth/pull/570
2022-12-20 20:00:56 +01:00
Etan Kissling c91d9d61e2
validate EL block hash in EL simulation (#4420)
When simulating EL with `--optimistic` flag, perform block hash check.
2022-12-20 09:24:33 +01:00
zah 07d4160e00
Migrating the deposit contract snapshot can no longer fail on start-up (#4438)
The missing piece of data that had to be obtained previously from
the configured EL client is now part of the network metadata baked
into the binary.
2022-12-19 18:19:48 +01:00
zah bf50e5af54
Publish official docker images for the Nimbus validator client (#4439)
Fixes https://github.com/status-im/nimbus-eth2/issues/4426
2022-12-19 16:49:25 +00:00
Jacek Sieka bd8f08204e
Implement skip_randao_verification for blinded blocks (#4435)
* Implement skip_randao_verification for blinded blocks

* fix redundant randao verification on block replay (5% faster)
* check randao in REST instead of internally
* avoid redundant copies when making blocks
* cleanup leftover randao skipping code

* fix test summary
2022-12-19 15:11:12 +02:00
Jacek Sieka 7501f10587
60% state replay speedup (#4434)
* 60% state replay speedup

* don't use HashList for epoch participation - in addition to the code
currently clearing the caches several times redundantly, clearing has to
be done each block nullifying the benefit (35%)
* introduce active balance cache - computing it is slow due to cache
unfriendliness in the random access pattern and bounds checking and we
do it for every block - this cache follows the same update pattern as
the active validator index cache (20%)
* avoid recomputing base reward several times per attestation (5%)

Applying 1024 blocks goes from 20s to ~8s on my laptop - these kinds of
requests happen on historical REST queries but also whenever there's a
reorg.

* fix test and diffs
2022-12-19 14:01:49 +02:00
Jacek Sieka 064d164a88
fix capella+ summary loading (#4433)
...once and for all.
2022-12-16 13:11:08 +01:00
tersec 110401394b
consolidate consensus spec transition test fixtures (#4428)
* consolidate consensus spec transition test fixtures

* include capella

* consoliate fork test fixtures

* note change in EIP-4844 process_block in alpha.2
2022-12-15 22:51:04 +00:00
tersec bb4ea37baa
update EF consensus spec URLs from v1.3.0-alpha.1 to v1.3.0-alpha.2 (#4432) 2022-12-15 12:15:12 +00:00
tersec 617b1e0d93
add EIP4844 fork choice tests (#4431) 2022-12-15 10:54:41 +00:00
tersec d269d82b71
use v1.3.0-alpha.2 EF consensus spec test vectors (#4430) 2022-12-15 01:51:06 +00:00
tersec e7706768c3
add database beaconstate tests for capella and eip4844 (#4429) 2022-12-14 23:12:29 +00:00
tersec 7faef7827e
fix EIP4844 withBlck (#4411)
* fix EIP4844 withBlck

* don't raiseAssert by default
2022-12-14 18:30:56 +01:00
tersec ebca6879c6
consolidate block sanity tests across forks (#4422) 2022-12-14 08:42:25 +01:00
Jacek Sieka 2440954555
allow syncing capella blocks (#4423) 2022-12-14 01:30:34 +00:00
tersec cd993ca418
consolidate slot sanity checks across forks (#4418)
* consolidate slot sanity checks across forks

* use `new` rather than `init` for constructor of `ref`s
2022-12-13 15:58:59 +00:00
tersec bc996623e0
add EIP4844 block database read/write test (#4416) 2022-12-13 00:56:50 +00:00
tersec 2b7e2499d9
use unstable Geth version in CI for capella and eip4844 support (#4415) 2022-12-13 00:55:33 +00:00
Zahary Karadjov 478e6f7c38
merge stable into unstable 2022-12-13 01:24:12 +02:00
Zahary Karadjov 23c471a8f6
Re-enable the macOS-AMD64 packaging 2022-12-12 20:19:30 +02:00
Zahary Karadjov e4b1933773
Version 22.11.1 2022-12-12 20:18:57 +02:00
tersec 6a80b56d82
use VC-provided graffiti for blinded block proposals (#4417) 2022-12-12 20:05:54 +02:00
tersec 6057631741
fix bellatrix web3signer client-side beacon block signing requests (#4407) 2022-12-12 20:04:20 +02:00
Zahary Karadjov b48b91a0d8
Temporary disable the macOS-AMD64 packaging 2022-12-12 19:43:45 +02:00
tersec 45574021c3
use VC-provided graffiti for blinded block proposals (#4417) 2022-12-12 13:02:06 +00:00
tersec ad8e682f76
remove redundant justification and finalization tests (#4412) 2022-12-09 22:45:48 +00:00
tersec e3c062189a
eip4844 `block_sim` (#4405) 2022-12-09 21:39:11 +00:00
Jacek Sieka 657d571e25
Use same skipping tense as other logs 2022-12-09 20:15:46 +01:00
Jacek Sieka f3305189f1
bump & ci fixes (#4409) 2022-12-09 17:06:29 +01:00
Jacek Sieka 6e2a02466e
unify bn/vc doppelganger detection (#4398)
* fix REST liveness endpoint responding even when gossip is not enabled
* fix VC exit code on doppelganger hit
* fix activation epoch not being updated correctly on long deposit
queues
* fix activation epoch being set incorrectly when updating validator
* move most implementation logic to `validator_pool`, add tests
* ensure consistent logging between VC and BN
* add docs
2022-12-09 17:05:55 +01:00
tersec 9df19f68fe
remove redundant deposit processing tests (#4408) 2022-12-09 13:00:22 +00:00
cheny0 6b5682df70
change all :s to s (#4403)
* change all :s to s

* edit one more :s
2022-12-09 10:42:52 +01:00
tersec 1e2f9b2fb8
avoid case object transitions for test forked block reading (#4406) 2022-12-09 09:13:51 +01:00
tersec 94653b0b71
fix bellatrix web3signer client-side beacon block signing requests (#4407) 2022-12-08 21:57:47 +00:00
Etan Kissling bbf1d6030c
add hooks for observing LC progress (#4401)
For Fluffy injection, add observer callbacks that get called whenever
new light client data is sucecssfully processed.

```
  proc onLightClientObject(
      lightClient: LightClient, obj: SomeLightClientObject) =
    info "New LC object", obj

  lightClient.bootstrapObserver =
    proc(lightClient: LightClient, obj: altair.LightClientBootstrap) =
      lightClient.onLightClientObject(obj)
  lightClient.updateObserver =
    proc(lightClient: LightClient, obj: altair.LightClientUpdate) =
      lightClient.onLightClientObject(obj)
  lightClient.finalityUpdateObserver =
    proc(lightClient: LightClient, obj: altair.LightClientFinalityUpdate) =
      lightClient.onLightClientObject(obj)
  lightClient.optimisticUpdateObserver =
    proc(lightClient: LightClient, obj: altair.LightClientOptimisticUpdate) =
      lightClient.onLightClientObject(obj)
```
2022-12-08 16:24:16 +00:00
tersec dee5af58d6
eip4844 light client tests; avoid case object out-of-bound array reads (#4404) 2022-12-08 17:21:53 +01:00
Etan Kissling 8e249121b3
add local testnet output to gitignore (#4400)
Latest local testnet output folder was not yet in gitignore.
2022-12-08 10:03:24 +01:00
tersec 50bcc48e17
eip4844 block/slot sanity and transition tests (#4399) 2022-12-08 02:07:41 +00:00
tersec 2932d3b808
extent `BeaconStateFork` enum (#4396) 2022-12-07 16:47:23 +00:00
zah d30cb8baf1
Support for obtaining deposit snapshots during trustedNodeSync (#4303)
Other changes:

* More optimal search for TTD block.

* Add timeouts to all REST requests during trusted node sync.
  Fixes #4037

* Removed support for storing a deposit snapshot in the network
  metadata.
2022-12-07 12:24:51 +02:00
tersec 7cf432b155
eip4844 fork and epoch transition tests; some eip4844 gossip (#4393) 2022-12-06 16:43:11 +00:00
tersec 031780b612
eip4844 operations tests (#4392) 2022-12-06 12:40:13 +00:00