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

Stop namadan if --path checksum does not match --hash #4108

Closed
Rigorously opened this issue Nov 28, 2024 · 6 comments
Closed

Stop namadan if --path checksum does not match --hash #4108

Rigorously opened this issue Nov 28, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@Rigorously
Copy link

Several validators failed to upgrade from v0.45.1 to v0.46, because they supplied a HTML file (wget github page) instead of JSON file.

After running namadan-0.46.0 ledger run --height 182000 --path $MIGRATION_JSON --hash acadd7d124804448b3c7f7b3dc0c3bc536fe6dbd1594757d5a992d47ecacc5c6 their nodes came in an inconsistent state and they need to sync from scratch. This could perhaps be prevented by having namadan verify the $MIGRATION_JSON.

@Rigorously Rigorously added the enhancement New feature or request label Nov 28, 2024
@brentstone
Copy link
Collaborator

@grarco @tzemanovic

@tzemanovic
Copy link
Member

if the hash doesn't match the migration file the node will crash with:

The application panicked (crashed).
Message:  called `Result::unwrap()` on an `Err` value:
   0: Provided hash did not match the contents at the specified path.

so the issue is somewhere else

@Rigorously
Copy link
Author

Rigorously commented Nov 29, 2024

The crash because of the hash mismatch implies a restart, and restarts currently cause a panic because the state cannot be restored: #4112 .

@sug0
Copy link
Contributor

sug0 commented Dec 1, 2024

can we close this?

@brentstone
Copy link
Collaborator

@sug0 @tzemanovic @grarco your choice if we can close

@sug0
Copy link
Contributor

sug0 commented Dec 1, 2024

@tzemanovic confirmed that we halt on an invalid hash as soon as we boot up. the only explanation for the hash check to have succeeded is if the user provided a checksum they computed themselves over the faulty file.

@sug0 sug0 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants