penumbra
penumbra copied to clipboard
pcli: uploading a validator definition against stale db fails with confusing error
Describe the bug
If a node operator submits a validator definition without having run pcli view reset
for the current chain, the error message is confusing.
To Reproduce Steps to reproduce the behavior:
- Run
pcli view sync
against target chain X. - Halt chain X, start chain Y.
- Run
pcli validator definition upload --file <file>
. - See error
Expected behavior
pcli
should be smart enough to detect that its db is out of date, and inform the user of this, ideally with a helpful message about running pcli view reset
.
Screenshots Here's an example error message, shared in Discord:
broadcasting transaction and awaiting confirmation...
Error: error broadcasting transaction
Caused by:
status: Internal, message: "Error submitting transaction: code 1, log: failed to deliver transaction: check_stateful failed: provided anchor 33d3dc1bc253891932983b2dff4513775ea9f9979c98a7db9ce6423e46330102 is not a valid SCT root", details: [], metadata: MetadataMap { headers: {} }
Additional context
This has come up a few times recently in Discord, and I myself saw it while setting up a standalone validator on v0.69.0, for the same reason: I'd forgotten to pcli view reset
for that validator identity. We have code in pcli that tries to detect a db version mismatch, but it's not covering this case.