Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
plaidfinch opened this issue Apr 14, 2024 · 1 comment
Labels
A-upgrades Area: Relates to chain upgrades C-bug Category: a bug C-enhancement Category: an enhancement to the codebase E-easy Effort: Easy _P-medium Medium priority

Comments

@plaidfinch
Copy link
Collaborator

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.

@plaidfinch plaidfinch added A-upgrades Area: Relates to chain upgrades C-bug Category: a bug C-enhancement Category: an enhancement to the codebase E-easy Effort: Easy labels Apr 14, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Penumbra Apr 14, 2024
@github-actions github-actions bot added the needs-refinement unclear, incomplete, or stub issue that needs work label Apr 14, 2024
@erwanor
Copy link
Member

erwanor commented Apr 14, 2024

Good point, this will also show up if the state was corrupted during state export or during the migration. Ideally, we would take a couple flags about what we expect the pre-upgrade and what the post-upgrade states to be and fail early. This will require updating the various guides though.

@aubrika aubrika added _P-V1 Priority: slated for V1 release _P-medium Medium priority and removed needs-refinement unclear, incomplete, or stub issue that needs work labels Apr 24, 2024
@aubrika aubrika added this to the Sprint 7 milestone May 14, 2024
@aubrika aubrika removed the _P-V1 Priority: slated for V1 release label May 30, 2024
@aubrika aubrika removed this from the Sprint 7 milestone Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-upgrades Area: Relates to chain upgrades C-bug Category: a bug C-enhancement Category: an enhancement to the codebase E-easy Effort: Easy _P-medium Medium priority
Projects
Status: Backlog
Development

No branches or pull requests

3 participants