nimbus-eth2/beacon_chain
Jacek Sieka d839b9d07e
State-only checkpoint state startup (#4251)
Currently, we require genesis and a checkpoint block and state to start
from an arbitrary slot - this PR relaxes this requirement so that we can
start with a state alone.

The current trusted-node-sync algorithm works by first downloading
blocks until we find an epoch aligned non-empty slot, then downloads the
state via slot.

However, current
[proposals](https://github.com/ethereum/beacon-APIs/pull/226) for
checkpointing prefer finalized state as
the main reference - this allows more simple access control and caching
on the server side - in particular, this should help checkpoint-syncing
from sources that have a fast `finalized` state download (like infura
and teku) but are slow when accessing state via slot.

Earlier versions of Nimbus will not be able to read databases created
without a checkpoint block and genesis. In most cases, backfilling makes
the database compatible except where genesis is also missing (custom
networks).

* backfill checkpoint block from libp2p instead of checkpoint source,
when doing trusted node sync
* allow starting the client without genesis / checkpoint block
* perform epoch start slot lookahead when loading tail state, so as to
deal with the case where the epoch start slot does not have a block
* replace `--blockId` with `--state-id` in TNS command line
* when replaying, also look at the parent of the last-known-block (even
if we don't have the parent block data, we can still replay from a
"parent" state) - in particular, this clears the way for implementing
state pruning
* deprecate `--finalized-checkpoint-block` option (no longer needed)
2022-11-02 10:02:38 +00:00
..
consensus_object_pools State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
eth1 cleanups: `proc` -> `func`, unused import, spec URLs (#4224) 2022-10-08 05:07:54 -05:00
fork_choice Harden EpochRef loading against bogus block root at tail (#4178) 2022-09-27 18:56:08 +02:00
gossip_processing fix false-positive warnings on expected VALID fcU status; adjust log levels (#4242) 2022-10-26 21:14:11 +00:00
networking State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
rpc Support `/eth/v1/validator/blinded_blocks` (#4272) 2022-10-31 18:39:03 +01:00
spec Support `/eth/v1/validator/blinded_blocks` (#4272) 2022-10-31 18:39:03 +01:00
sync Tighten chunk decoding limits (#4264) 2022-10-27 18:51:43 +02:00
validator_client VC: Fix for #4116 (external block builders support) (#4260) 2022-10-29 11:00:51 +02:00
validators Support `/eth/v1/validator/blinded_blocks` (#4272) 2022-10-31 18:39:03 +01:00
.editorconfig Add .editorconfig file and remove trailing newlines 2021-09-14 12:12:49 +03:00
.gitignore Rename binaries; Mimic the original repo layout in the distribution 2020-11-09 11:38:52 +02:00
beacon_chain_db.nim State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
beacon_chain_db_immutable.nim update consensus spec ref URLs to v1.2.0 (#4164) 2022-09-23 07:56:06 +00:00
beacon_chain_db_light_client.nim update LC spec references for v1.2.0-rc.2 (#3982) 2022-08-17 19:47:06 +00:00
beacon_clock.nim update consensus spec ref URLs to v1.2.0 (#4164) 2022-09-23 07:56:06 +00:00
beacon_node.nim implement /eth/v1/validator/register_validator (#4115) 2022-09-13 14:52:26 +03:00
beacon_node_light_client.nim rm optimistic candidate block check from LC (#4131) 2022-09-17 00:42:19 +00:00
beacon_node_status.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
conf.nim State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
conf_light_client.nim reduce LC optsync latency (#4002) 2022-08-25 03:53:59 +00:00
deposits.nim nicer error message for failed backfill (#4188) 2022-09-29 23:55:18 +03:00
era_db.nim allow accessing withState forky state via `forkyState` (#4026) 2022-08-26 17:14:18 +03:00
extras.nim api: add skip_randao_verification for produceBlockV2 (#3837) 2022-09-21 09:38:08 +02:00
filepath.nim Keymanager API for the validator client (#3976) 2022-08-19 13:30:07 +03:00
interop.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
light_client.nim reduce LC optsync latency (#4002) 2022-08-25 03:53:59 +00:00
nim.cfg enable `styleCheck:usages` (#3573) 2022-04-08 16:22:49 +00:00
nimbus_beacon_node.nim State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
nimbus_beacon_node.nim.cfg use `nim-websock` instead of `news` (#4061) 2022-09-06 23:41:33 +02:00
nimbus_binary_common.nim Remove warning on unused import of `filepath` (#4176) 2022-09-26 17:14:24 +00:00
nimbus_light_client.nim Don't search for the TTD block after the merge (#4152) 2022-09-20 09:17:25 +03:00
nimbus_light_client.nim.cfg use `nim-websock` instead of `news` (#4061) 2022-09-06 23:41:33 +02:00
nimbus_signing_node.nim load suggested fee recipient file also when keymanager is disabled (#4078) 2022-09-17 08:30:07 +03:00
nimbus_signing_node.nim.cfg Revert writing backfill root to database (#3215) 2021-12-21 11:40:14 +01:00
nimbus_validator_client.nim VC: some fixes (#4240) 2022-10-21 16:53:30 +02:00
nimbus_validator_client.nim.cfg use `nim-websock` instead of `news` (#4061) 2022-09-06 23:41:33 +02:00
sszdump.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
statediff.nim update state diffs to Bellatrix (#4177) 2022-09-26 19:13:50 +00:00
statusbar.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00
trusted_node_sync.nim State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
version.nim Version 22.10.1 2022-10-10 18:20:34 +03:00
wallets.nim compatibility with Nim 1.4+ (#3888) 2022-07-29 10:53:42 +00:00