nimbus-eth2/research
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
..
.gitignore wss_sim: state transition simulator (#3309) 2022-01-22 10:25:30 +01:00
block_sim.nim State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
block_sim.nim.cfg use `nim-websock` instead of `news` (#4061) 2022-09-06 23:41:33 +02:00
fakeee.nim fakeee: Increase incoming POST size (#4252) 2022-10-25 20:01:45 +00:00
nim.cfg enable `styleCheck:usages` (#3573) 2022-04-08 16:22:49 +00:00
simutils.nim Cache and resend, rather than recreate, builder API registrations (#4040) 2022-08-31 03:29:03 +03:00
stack_sizes.nim altair fork handling cleanups (#3050) 2021-11-05 08:34:34 +01:00
state_sim.nim more `withState` `state` -> `forkyState` (#4104) 2022-09-10 08:12:07 +02:00
wss_sim.nim remove rest of `withState.state` usage (#4120) 2022-09-16 15:35:00 +02:00