Skip to content

Use hard-coded hash as trusted hash. #3358

@adlerjohn

Description

@adlerjohn

Implementation ideas

Idea from @walldiss

Problem

Currently, the trusted hash is optionally provided by the user with --headers.trusted-hash. There are two problem with this:

  1. It's a hassle for end users to determine this trusted hash. Who specifically should they request it from, for example.
  2. Getting the trusted hash from a single (or a handful of) source that could be corrupted is relatively insecure.

Proposal

Based on the notion of checkpoints from Bitcoin Core, hard-code one checkpoint (block header hash) from which syncing starts from, rather than the genesis block hash. This checkpoint should be updated periodically in celestia-node releases.

The existing flag can remain for users that explicitly want more control.

Example checkpoints in Bitcoin Core: https://github.com/bitcoin/bitcoin/blob/9d1a286f20b8a602ffe72928bcd79be09fdbf9d0/src/kernel/chainparams.cpp#L157-L173

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions