Skip to content

Unhelpful error message when migrated state is missing with post-migration genesis file #4202

Open
@plaidfinch

Description

@plaidfinch

Describe the bug

If you use a post-migration genesis file (such as the current one as of this writing) which refers only to hashed state but does not contain a bundle of genesis state, but you do not start pd with a snapshot of rocksdb (i.e. it has nothing in its state directory to start) then the resulting error message does not tell you what you did wrong; instead it is a panic from an expect that is asserting the presence of current consensus keys.

To Reproduce

  1. Start with a black state.
  2. Copy the latest genesis file to CometBFT's config directory.
  3. DON'T copy the latest migration snapshot to pd's home directory.
  4. Start pd.
  5. Observe the error message that results.

Expected behavior

It is correct that pd should fail to start in this situation, but it should provide direction to the user instructing them on how to resolve the issue, since it does know that the genesis file is post-migration. It should fail earlier with an informative error message if the state is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-upgradesArea: Relates to chain upgradesC-bugCategory: a bugC-enhancementCategory: an enhancement to the codebaseE-easyEffort: Easy_P-mediumMedium priority

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions