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

Add CLI to submit governance proposal with MsgStoreCode #4202

Closed
crodriguezvega opened this issue Jul 28, 2023 · 14 comments
Closed

Add CLI to submit governance proposal with MsgStoreCode #4202

crodriguezvega opened this issue Jul 28, 2023 · 14 comments
Assignees
Labels

Comments

@crodriguezvega
Copy link
Contributor

crodriguezvega commented Jul 28, 2023

To make it easier for users to submit a proposal to upload a new light client contract, we should add a CLI command that creates and broadcasts a gov v1 MsgSubmitProposal with the MsgStoreCode. The CLI will be much easier to use than using the submit-proposal command and passing a JSON file with the base64 encoded string of the contract bytecode.

The CLI could look like: simd tx ibc-wasm store-code [path/to/wasm-file] [flags]

We can use the CLI command in Cosmos SDK for submitting a software upgrade proposal as an example.

Note that store-code is currently in use, but it should eventually be removed, so it's ok to use a different flag for that command in the meantime.

Update also this section of the docs.

@stackman27
Copy link
Contributor

hi @crodriguezvega i think i can take on this issue

@DimitrisJim
Copy link
Contributor

go for it @stackman27

@stackman27
Copy link
Contributor

@crodriguezvega @DimitrisJim

the example provided "We can use the CLI command in Cosmos SDK for submitting a software upgrade proposal as an example."

is off of the latest cosmos-sdk version, whereas ibc-go uses v0.47.4 which doesnot have the functionality as described in this issue link: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/upgrade/client/cli/tx.go#L39

@crodriguezvega
Copy link
Contributor Author

Thanks for picking this one up, @stackman27. Yes, you're right the link I added in the description is from main, but do you see any impediment to implement this CLI using the gov v1 design? I thought we could, but maybe I'm missing something, so please let me know.

@stackman27
Copy link
Contributor

stackman27 commented Aug 15, 2023

yea unfortunately gov v1 MsgSubmitProposal interface has some functions missing in v0.47.4 that doesnot allow us to use it for ex:

proposal.SetMsgs()
main: https://github.com/cosmos/cosmos-sdk/blob/main/x/gov/types/v1/msgs.go#L48
v0.47.4: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/gov/types/v1/msgs.go

i can use x/group but it might be a little hacky: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/group/proposal.go

@julienrbrt
Copy link
Member

yea unfortunately gov v1 MsgSubmitProposal interface has some functions missing in v0.47.4 that doesnot allow us to use it for ex:

proposal.SetMsgs()

main: https://github.com/cosmos/cosmos-sdk/blob/main/x/gov/types/v1/msgs.go#L48

v0.47.4: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/gov/types/v1/msgs.go

i can use x/group but it might be a little hacky: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/group/proposal.go

If that helper missing is blocking you, we can backport it 👍

@crodriguezvega
Copy link
Contributor Author

yea unfortunately gov v1 MsgSubmitProposal interface has some functions missing in v0.47.4 that doesnot allow us to use it for ex:

proposal.SetMsgs() main: https://github.com/cosmos/cosmos-sdk/blob/main/x/gov/types/v1/msgs.go#L48 v0.47.4: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/gov/types/v1/msgs.go

i can use x/group but it might be a little hacky: https://github.com/cosmos/cosmos-sdk/blob/release/v0.47.x/x/group/proposal.go

Ah, I see. Thank you for the explanation, @stackman27!

If that helper missing is blocking you, we can backport it 👍

Thank you, @julienrbrt. I see that you have already back ported it 😄 ⚡. This would be very helpful for us, so that we don't need to write a legacy handler that we will migrate in a few weeks for the v8 upgrade. When do you think you could cut a release with this addition?

@julienrbrt
Copy link
Member

julienrbrt commented Aug 15, 2023

We cut a patch release every month, so there will be a v0.47.5 in probably about 5 to 10days. It's on my list :)
In the meantime, you could just use the latest commit from the release branch for the integration until we tag.

@crodriguezvega
Copy link
Contributor Author

We cut a patch release every month, so there will be a v0.47.5 in probably about 5 to 10days. It's on my list :)
In the meantime, you could just use the latest commit from the release branch for the integration until we tag.

Great! Then we'll upgrade as soon as it is out.

@stackman27 Do you think you can do some groundwork on this issue in the meantime until the SDK release is available?

@stackman27
Copy link
Contributor

stackman27 commented Aug 16, 2023

@crodriguezvega sounds good. What specific groupwork should i do? I thought the issue was blocked until the v0.47.5 is out

@crodriguezvega
Copy link
Contributor Author

@stackman27 Sorry for not replying earlier; I think I missed your message. We have just bumped SDK to 0.47.5 in the feat/wasm-clients feature branch, so it should good to go now. Are you still happy to work on this one?

@crodriguezvega
Copy link
Contributor Author

@stackman27 Sorry for being a bit pushy, but this issue is soon going to enter our critical path. I don't want to stress you, so no problem if you're busy and cannot work on it; we can pick it up ourselves.

@stackman27
Copy link
Contributor

no worries @crodriguezvega, i've been a little busy recently so feel free to pick this issue up

i generally prefer working on non-blocking issues :))

@crodriguezvega
Copy link
Contributor Author

Closed by #4565

@github-project-automation github-project-automation bot moved this from Todo to Done in ibc-go Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants