nimbus-eth2/tests/consensus_spec
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
..
altair add all missing epoch transition tests (#4269) 2022-10-28 08:02:33 +00:00
bellatrix add all missing epoch transition tests (#4269) 2022-10-28 08:02:33 +00:00
capella add all missing epoch transition tests (#4269) 2022-10-28 08:02:33 +00:00
phase0 add all missing epoch transition tests (#4269) 2022-10-28 08:02:33 +00:00
README.md test fixture cleanups (#2976) 2021-10-12 13:36:52 +02:00
all_tests.nim add Bellatrix fork and transition tests; "Ethereum Foundation" -> EF (#3242) 2022-01-05 09:42:56 +01:00
consensus_spec_tests_preset.nim run EF Capella consensus test fixtures (#4267) 2022-10-27 19:11:13 +00:00
fixtures_utils.nim update consensus spec ref URLs to v1.2.0 (#4164) 2022-09-23 07:56:06 +00:00
test_fixture_fork_choice.nim State-only checkpoint state startup (#4251) 2022-11-02 10:02:38 +00:00
test_fixture_light_client_single_merkle_proof.nim use v1.3.0-alpha.0 test vectors (#4263) 2022-10-27 11:54:39 +00:00
test_fixture_light_client_sync.nim use v1.3.0-alpha.0 test vectors (#4263) 2022-10-27 11:54:39 +00:00
test_fixture_light_client_update_ranking.nim update LC spec references for v1.2.0-rc.2 (#3982) 2022-08-17 19:47:06 +00:00
test_fixture_ssz_generic_types.nim stylecheck fixes (#3595) 2022-04-15 12:46:56 +00:00

README.md

Tests based on scenarios generated from the consensus spec.