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

no concrete type registered for type URL /juno.v1.clock.UpdateParamProposal #4

Open
ducphamle2 opened this issue Sep 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ducphamle2
Copy link
Collaborator

When using the juno command: oraid tx clock add-contract, we received the following error:

image

After debugging for a day, the closest I have got to understand this bug is that:

  • Cosmos SDK 0.50x has changed the way it handles gov proposals.
  • Instead of whitelisting the gov proposal content (like /juno.v1.clock.UpdateParamProposal), it recursively validates the entire MsgSubmitProposal message, consider any sub-messages within it also to be a Cosmos message as well.
  • Because /juno.v1.clock.UpdateParamProposal is not a message -> hence the error
@ducphamle2
Copy link
Collaborator Author

ducphamle2 commented Sep 11, 2024

My attempt to fix the bug by registering /juno.v1.clock.UpdateParamProposal didn't work, even though it bypassed the above error:

registry.RegisterInterface("juno.clock.v1.UpdateParamsProposal", (*sdk.Msg)(nil), &UpdateParamsProposal{})

image

This is because there are additional checks for the message such as no cosmos.msg.v1.signer option found for the message.

image

This is odd, because it should not be intended to be a message.

@ducphamle2
Copy link
Collaborator Author

ducphamle2 commented Sep 11, 2024

I then switched to a new direction, by using the new official way of submitting gov proposals: https://docs.cosmos.network/main/build/modules/gov#messages

image

I added a new msgServer message, called MsgUpdateParams and registered it as a message. I also added its basic Msg implementations.

image
image
image

Fortunately, it worked.

@ducphamle2
Copy link
Collaborator Author

ducphamle2 commented Sep 11, 2024

Please refer to these commits to see how I fixed it: oraichain/juno@3c83f1d, oraichain/juno@2c59cc9,

Also, fixed in #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant