-
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
Require cosmos.msg.v1
annotations
#13405
Comments
We can make this issue as the whole "cosmos.msg.v1" validation issue, which means also adding validation for the newyl added Amino annotations too #13407, ref #13501 (review) I can work on a PR that does all validations at once. |
Great thank you 🙏 |
Can we validate that amino annotations match what's registered in the amino codec and struct field tags? That would be great because it will allow easy, clean deprecation of amino registration soon |
That's what I'd like to explore too. The validation will start from the pulsar types, to be able to read annotations easily. The challenge is to get the associated gogo generated |
I'll actually down-scope this issue to only tackle I created another issue for the |
Summary
Require valid
cosmos.msg.v1.signer
andcosmos.msg.v1.service
annotations so that dynamic clients can rely on them.Problem Definition
In #10977, @fdymylja added the
cosmos.msg.v1.signer
proto option but had to remove the logic which makes the field required (#10977 (comment)) because of some complexities with the gogo proto global registry and the work was never finished.In #13178, the
cosmos.msg.v1.service
option was added which allows clients to dynamically distinguish Msg and Query services.If we can ensure that these options are consistently applied, then clients will know:
Msg
need to be signedThese .proto options can be leveraged in the future by the Cosmos SDK framework itself in order to simplify service registration and ADR 033 clients as described in #12972. Also the
sdk.Msg
type itself can be simplified withcosmos.msg.v1.signer
which will allowMsg.GetSigners
to be removed and take us much closer to removing bech32 globals (#9690).Proposal
Implement validation logic that runs when Msg services are registered that:
sdk.Msg
types have a validcosmos.msg.v1.signer
annotationcosmos.msg.v1.service
We can access the full gogo proto registry with the functionality add to our fork in cosmos/gogoproto#13. The original validation work that had been started in #10977 can be found at https://github.com/cosmos/cosmos-sdk/blob/7e0c199b61349f226cdbabf4b1cfcabc911390ff/types/module/assert_signers.go.
The text was updated successfully, but these errors were encountered: