Open
Description
Description
The head tracker contains redundant information that is already present in the fork choice block DAG. This is undesirable as it means there isn't just "one source of truth", and the two data structures need to be kept in sync across concurrent executions, which is highly non-trivial (see #1771 for more)
Steps to resolve
- Write code to derive the list of heads from fork choice
- Remove the
HeadTracker
struct from the beacon chain - Port the migration code to use the head data from fork choice
- Work out how to reconcile the pruning of fork choice with pruning of the database. Possible approaches:
- Mark blocks deleted from disk as
deleted
in fork choice, until they are cleaned up by fork choice's own pruning mechanism - Mirror the pruning of the on-disk database in fork choice (i.e. prune the two structures together)
- Mark blocks deleted from disk as