-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
feat: add debug cmd for application codec types #18219
Conversation
WalkthroughThe primary change in this pull request is the addition of a new debugging command, Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- client/debug/main.go (2 hunks)
Files skipped from review due to trivial changes (1)
- client/debug/main.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, definitely useful thank you!
Added the backport v0.50.1 label (as 0.50 is feature frozen) and we can backport to v0.47.x as well after 0.50.0 is released.
One thing to note, is that displays the interface registry from the client.Context. Which should normally be the same as the server (app.go), but could differ if someone didn't wire their root.go properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder to myself, when calling mergify after v0.50.0 tag, add this change as well: https://github.com/cosmos/cosmos-sdk/pull/18309/files#diff-138125b0bd1d362882611450341f8ca83ca00dcc7473a3b13a792fc2a146cf78R89
@Mergifyio backport release/v0.50.x |
✅ Backports have been created
|
(cherry picked from commit 3c9168d)
Description
Adds a debug cmd for the app codec.
List interfaces usage:
> simd debug codec list-interfaces cosmos.auth.v1.ModuleCredential cosmos.group.v1.DecisionPolicy cosmos.evidence.v1beta1.Evidence cosmos.tx.v1beta1.MsgResponse cosmos.auth.v1beta1.GenesisAccount cosmos.vesting.v1beta1.VestingAccount cosmos.feegrant.v1beta1.FeeAllowanceI cosmos.authz.v1beta1.Authorization cosmos.base.v1beta1.Msg cosmos.tx.v1beta1.Tx cosmos.crypto.PubKey cosmos.crypto.PrivKey cosmos.auth.v1beta1.AccountI cosmos.tx.v1beta1.TxExtensionOptionI cosmos.gov.v1beta1.Content
List implemenations usage:
> simd debug codec list-implementations cosmos.crypto.PubKey /cosmos.auth.v1beta1.ModuleCredential /cosmos.crypto.ed25519.PubKey /cosmos.crypto.secp256k1.PubKey /cosmos.crypto.multisig.LegacyAminoPubKey /cosmos.crypto.secp256r1.PubKey
Closes: #XXXX (didn't open an issue, soz)
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
make lint
andmake test
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...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit
CodecCmd()
. This enhancement provides users with two new subcommands:list-interfaces
andlist-implementations
. Thelist-interfaces
command allows users to view all registered interface type URLs, while thelist-implementations
command displays the registered type URLs for a given interface name. This update improves the debugging process by providing more detailed information about the application codec, enhancing the user's ability to troubleshoot and understand the system's inner workings.