nimbus-eth2/research
Jacek Sieka 03005f48e1
Backfill support for ChainDAG (#3171)
In the ChainDAG, 3 block pointers are kept: genesis, tail and head. This
PR adds one more block pointer: the backfill block which represents the
block that has been backfilled so far.

When doing a checkpoint sync, a random block is given as starting point
- this is the tail block, and we require that the tail block has a
corresponding state.

When backfilling, we end up with blocks without corresponding states,
hence we cannot use `tail` as a backfill pointer - there is no state.

Nonetheless, we need to keep track of where we are in the backfill
process between restarts, such that we can answer GetBeaconBlocksByRange
requests.

This PR adds the basic support for backfill handling - it needs to be
integrated with backfill sync, and the REST API needs to be adjusted to
take advantage of the new backfilled blocks when responding to certain
requests.

Future work will also enable moving the tail in either direction:
* pruning means moving the tail forward in time and removing states
* backwards means recreating past states from genesis, such that
intermediate states are recreated step by step all the way to the tail -
at that point, tail, genesis and backfill will match up.
* backfilling is done when backfill != genesis - later, this will be the
WSS checkpoint instead
2021-12-13 14:36:06 +01:00
..
.gitignore update research VCS ignores (#2849) 2021-09-07 23:09:49 +00:00
block_sim.nim Backfill support for ChainDAG (#3171) 2021-12-13 14:36:06 +01:00
block_sim.nim.cfg block pool simulator (#956) 2020-05-01 17:51:24 +02:00
simutils.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
stack_sizes.nim altair fork handling cleanups (#3050) 2021-11-05 08:34:34 +01:00
stack_sizes.nim.cfg cleanups (#962) 2020-05-04 07:38:14 +02:00
state_sim.nim ncli_db: add putState, putBlock (#3096) 2021-11-18 13:02:43 +01:00
state_sim.nim.cfg add simple wasm page with state simulator (#334) 2020-01-22 15:36:16 +00:00