Skip to content

Remove head tracker in favour of fork choice #1785

Open
@michaelsproul

Description

@michaelsproul

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)

Metadata

Metadata

Assignees

Labels

A1consensusAn issue/PR that touches consensus code, such as state_processing or block verification.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions