-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 valid amino.*
annotations
#14682
Comments
amino.name
annotations.amino.name
annotations
amino.name
annotationsamino.*
annotations
The test suite in https://github.com/cosmos/cosmos-sdk/blob/e9478df1619d7d0845dab3308852a9e2948269ac/tests/integration/aminojson/aminojson_test.go seems robust enough to catch the consistencies described in this issue as in the case of #15165 This also raises the question for me; is fuzz testing (the approach in the test suite) good enough or do we need a set of deterministic rules? |
For a set of deterministic rules, we need a spec. However, |
My biggest concern here is not our own types, but making sure other chains adopt the new Maybe an entry in the UPGRADING.md guide is enough. Or maybe it's a script that we write, that each chain runs before updating, which will modify the The original issue proposed a startup check, which may not be the ideal UX, but I believe is still the simplest solution. |
For a time being its either/or right, Its not one or the other? |
Maybe the first step to tackling this issue ought to be just defining the spec of valid amino annotations as docs? Also if that already exists let me know where. |
I think that's a good idea 👍. There are no such docs currently, the only thing we have written are the proto comments. |
Related work: #13793 |
closing as we added this to documentation |
Summary
Validate
amino.*
annotations:amino.name
andamino.oneof_name
proto annotations matches go-amino's RegisterConcrete name.amino.encoding
,amino.message_encoding
amino.dont_omitempty
,amino.field_name
ref: #13405 (comment)
Problem Definition
With #14353, SDK msgs can have an
amino.name
proto annotation to define how they are encoded in Anys in amino. This is the same functionality asaminoCdc.RegisterConcrete
. We should:aminoCdc.RegisterConcrete
altogether, but this needs Implement protoreflect based amino JSON encoder #10993RegisterConcrete
Solution
amino.name
againstaminoCdc.RegisterConcrete
registryamino.oneof_name
againstaminoCdc.RegisterConcrete
registryamino.dont_omitempty
,amino.field_name
against existing gogoproto annotations.The text was updated successfully, but these errors were encountered: