-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Refactor new x/upgrade validation to allow checksum to be optional #10718
Comments
do we still need this? |
I'm going to take myself off of this. A while back I had some work done toward it, but things have changed a bunch since then (e.g. gov v1), and I haven't been able to make any progress in a long time. Since the |
This issue is very much still needed. Now, though, this issue is about making the checksums optional in cosmovisor again too. The extra validation done using the When this was written, that checksum was optional. The extra validation would require it, but that validation could be skipped. It was more of a suggestion. I.e. "You should use checksums on your urls or else jump through this hoop if you want to use this command." This issue was then to allow more granular skipping of parts of that validation so that you could, for example, have the validation check that all the URLs are valid and return expected things, but do so without requiring checksums on the URLs. But the checksums were always intended to be optional, not required. Requiring URLs to have a checksum doesn't actually improve security (as claimed in the changelog). Requiring it only removes options. In fact, we've had two instances where security was improved by NOT having a checksum. In both cases, a security issue was identified in a version slated for upgrade. The new version had been created and an upgrade proposal had been submitted, voted on, and passed. Then issues were found when there wasn't enough time to get a new proposal passed before the upgrade height would be reached. By not having the checksum on the URL in the Also, when we discussed requiring checksums in the cosmovisor/upgrade working group, we found that requiring checksums was extremely unlikely to cause anyone to enable auto-download that didn't already use auto-download. There were several use cases for not having them though. So requiring them would have lots of negative effects with little-to-no positive effects. Additionally, the only place where there should be code that downloads anything is either in cosmovisor or the Really, since all that download and validation stuff is specific to cosmovisor, it's probably better to have the |
Thanks for the context. This makes sense and I'll look into that! |
Summary
When validating upgrade plans, make it possible for urls to not include a checksum query parameter.
Problem Definition
Currently, in
cosmovisor
, the checksums are optional. If provided, they're used for verification, but they're not required. The newx/upgrade
module plan validation requires the urls to have a checksum query parameter though.This makes it impossible to reuse the module's validation and download logic by
cosmovisor
. Related: #10464Additionally, it'd be nice to allow users that don't use a checksum on one or more url, to be able to validate the other parts of their plans.
Proposal
Add three flags to the CLI
software-upgrade
command:--no-validate-info-checksum
- if provided, a url in theinfo
field will not be required to have a checksum.--no validate-binary-checksums
- if provided, a url in thebinaries
map will not be required to have a checksum.--no-validate-checksums
- Same as providing both--no-validate-info-checksum
and--no validate-binary-checksums
.Then separate out the validation that requires urls to have a checksum to facilitate these new flags. Also ensure that the download functionality doesn't require urls to have a checksum.
For Admin Use
The text was updated successfully, but these errors were encountered: