-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: Add MsgSoftwareUpgrade
and MsgCancelUpgrade
(for new msgs-based gov proposals)
#11116
Conversation
MsgSoftwareUpgrade
(for new msgs-based gov proposals)
Codecov Report
@@ Coverage Diff @@
## master #11116 +/- ##
==========================================
- Coverage 65.93% 65.90% -0.03%
==========================================
Files 662 664 +2
Lines 68527 68548 +21
==========================================
- Hits 45180 45174 -6
- Misses 20702 20731 +29
+ Partials 2645 2643 -2
|
x/gov/module.go
Outdated
legacyProposalHandlers []govclient.ProposalHandler // legacy proposal handlers which live in governance cli and rest | ||
proposalHandlers []govclient.ProposalHandler // proposal handlers which live in governance cli and rest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why we need both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
legacyProposalHandlers
CLI handlers will get added as subcommands of NewCmdSubmitLegacyProposal
(so we can have simd tx gov submit-legacy-proposal software-upgrade
for instance)
same for proposalHandlers
and NewCmdSubmitProposal
(eg for having simd tx gov submit-proposal software-upgrade
)
see NewTxCmd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the cli would be better if it were simply simd tx upgrade propose
and simd tx upgrade cancel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you're suggesting to have the new commands available directly from tx upgrade
command (instead of tx gov submit-proposal
) for the new upgrade proposal msgs
but keep the legacy ones using simd tx gov submit-legacy-proposal software-upgrade / cancel-software-upgrade
?
I kind of like this new approach, although I'm a bit concerned it might be confusing for users, any thoughts? @cmwaters @AmauryM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also in favor of the new approach!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds good to me, as long as the docs/changelog are very clear about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! Although gov is the default module in control of upgrades, I wouldn't want to have them so closely coupled. In the future, one application may want a group in control of proposing upgrades
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm on second thought this is a bit more difficult than I thought because the upgrade module doesn't really know who the authority is and whether to submit a proposal or simply execute it
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
MsgSoftwareUpgrade
(for new msgs-based gov proposals)MsgSoftwareUpgrade
and MsgCancelUpgrade
(for new msgs-based gov proposals)
I pushed a commit for MsgCancelUpgrade msg service implementation and proto files. The last thing needed is CLI for MsgCancelUpgrade and CLI tests. |
We agreed at the call yesterday that I would pick this up |
We shouldn't have it built-in that the governance module account is the authority rather application developers should probably specify an initial address in the constructor as the authority. Some chains may want to create a sub account that is the authority. |
Yeah, this was a question I asked on Discord, wasn't 100% sure. I think we can put authority in the keeper config object, which can be overwritten by app developers. It can default to the gov module address. |
So I'm not entirely convinced by the cli commands. My current thinking is that if you want to submit an upgrade msg you just use |
But then that means you would basically need to execute 2 commands, which might not be considered as a UX improvement... Although from a dev standpoint, that seems more consistent with the new gov json-based CLI approach for submitting proposal with arbitrary msgs. Let's maybe discuss during our sync later today? |
FYI: I've made the authority configurable by the application (simd uses the gov module account and I'd expect most other apps to do the same). You can now also query what the authority for the upgrade module is. In our call, we also agreed to not include any new cli commands as people could no construct the message in json and submit it via |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except the fact that the Msg server should check against the keeper authority (not hardcode the gov address)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…s-sdk into marie/10489-gov-upgrade-msg
@cmwaters We need 2 approvals for automerge. Since Marie authored, you can just approve I guess |
…ased gov proposals) (cosmos#11116)
Description
Closes: #10489
Adds
MsgSoftwareUpgrade
to x/upgrade to be used in v1beta2 msgs-based gov proposals.TODO:
MsgCancelUpgrade
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change