-
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
Dynamic client metadata #13310
Comments
3 tasks
25 tasks
RiccardoM
pushed a commit
to desmos-labs/desmos
that referenced
this issue
Jul 3, 2023
## Description This PR adds useful proto annotation for upcoming feature cosmos/cosmos-sdk#13310, which supports the auto command line tool generation. - [x] cosmos.AddressString - [x] cosmos.msg.v1.signer - [x] amino.name - [x] cosmos.msg.v1.service - [x] amino.dont_omit_empty - [x] amino.encoding <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### 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... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### 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... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable) --------- Co-authored-by: dadamu <[email protected]>
added documentation on proto annotations, i believe this was the final action item in this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Clients of the Cosmos SDK can get almost all of the information they need about communicating with a Cosmos SDK chain from that chain’s .proto files. This allows clients to be dynamically generated, for instance auto-generated CLI’s as described in #11775.
Ideally all of the required metadata for generating a dynamic client should be in the .proto files as protobuf options, with out-of-band information only needed for optional customization (as
autocli
does with separate config options).Most required metadata is already present but applied inconsistently without verification (ex.
cosmos.msg.v1.signers
, etc.). Metadata for amino JSON signing is missing from proto files and needs to be provided to clients manually.These two issues will ensure that all metadata required for clients is in .proto files:
cosmos.msg.v1
annotations #13405amino.*
annotations #14682Additional useful client metadata is provided by the existing
cosmos_proto.scalar
,cosmos_proto.accepts_interface
andcosmos_proto.implements_interface
annotations but these are probably not required. A stretch goal though could be to add validation for these and explore additional ideas proposed in #11882.The text was updated successfully, but these errors were encountered: