-
Notifications
You must be signed in to change notification settings - Fork 41
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
Clean up Msgs and Codecs. #1957
Conversation
…AllRequestMsgs list used to, at the very least, register all the msg interfaces.
…ated stuff for all our msgs.
…nersTests helper.
…nersTests helper.
… the expected panic in case it's being wrapped with other info.
…supposed to panic like the old stuff.
…gEmitIBCAck that was missing a signers option.
…uest that had the wrong signer option in the proto.
Important Auto Review SkippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 52 files out of 111 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
…n't called directly).
… handful of places where those were being called directly.
… for sdk.Msg, but aren't anymore.
…they're in in the proto.
…eft are ones that rename a field.
…ptions the sdk uses.
… back to sdk.AccAddress variables since they're now being returned as []byte, but we want them treated as AccAddresses everywhere in there. Specifically, the error message isn't right when they are just []byte.
…ion, and switch them to an auto-generated version.
…ses in better ways. Specifically, %v will now output the bech32 string so that the other .String() methods have the bech32 there instead of the hex bytes.
…t remaining place.
…d remove the p and T cases which never get actually used.
* [1760]: Rename all the msg.go files (and their relatives) to msgs.go. * [1760]: Standardize all the msg and codec definition to use a public AllRequestMsgs list used to, at the very least, register all the msg interfaces. * [1760]: Create RunGetSignersTests to standardize checking signers-related stuff for all our msgs. * [1760]: Switch the exchange GetSigners test over to the new RunGetSignersTests helper. * [1760]: Switch the metadata GetSigners test over to the new RunGetSignersTests helper. * [1760]: For the legacy test runner, just make sure the panic contains the expected panic in case it's being wrapped with other info. * [1760]: Add GetSigners tests to the attribute module. * [1760]: Streamline the exchange GetSigners maker definitions. * [1760]: Change ExpPanic fields to ExpInErr since the new stuff isn't supposed to panic like the old stuff. * [1760]: Add a GetSigners tests to the ibchooks module, and fix the MsgEmitIBCAck that was missing a signers option. * [1760]: Add GetSigners tests to the ibcratelimit module. * [1760]: GetSigners Tests on all the marker Msgs, and fix MsgCancelRequest that had the wrong signer option in the proto. * [1760]: Switch to RunGetSignersTests in the msgfees module. * [1760]: Switch to RunGetSignersTests in the name module. * [1760]: Switch to RunGetSignersTests in the oracle module. * [1760]: Switch to RunGetSignersTests for the quarantine module. * [1760]: Switch to RunGetSignersTests for the sanction module. * [1760]: Switch to RunGetSignersTests for the trigger module. * [1760]: Get rid of most of the GetSigners methods (the ones that weren't called directly). * [1760]: Remove the marker module's GetSigners methods, and update the handful of places where those were being called directly. * [1760]: Remove the GetSigners() methods from the metadata module. * [1760]: Get rid of some ibchooks msg methods that used to be required for sdk.Msg, but aren't anymore. * [1760]: Reorder the stuff in marker/types/msgs.go to match the order they're in in the proto. * [1760]: Reorder the stuff in names msgs.go to match the proto ordering. * [1760]: Reorganize the metadata msgs.go stuff. * [1760]: Clean up the attribute and ibchooks protos a little. * [1760]: Get rid of most of the yaml tags from the protos. Only ones left are ones that rename a field. * [1760]: Remove the rest of the uses of gogoproto.moretags. * [1760]: Clean up some unneeded gogoproto.goproto_stringer options from the protos. * [1760]: Update all the Coins fields in the protos to match the same options the sdk uses. * [1760]: Remove all uses of any ModuleCdc variables, and delete them all. * [1760]: In GetFeePayerUsingFeeGrant, cast the feePayer and feeGranter back to sdk.AccAddress variables since they're now being returned as []byte, but we want them treated as AccAddresses everywhere in there. Specifically, the error message isn't right when they are just []byte. * [1760]: Get rid of all the String() methods that just do yaml conversion, and switch them to an auto-generated version. * [1760]: Refactor the MetadataAddress.Format method to handle more casses in better ways. Specifically, %v will now output the bech32 string so that the other .String() methods have the bech32 there instead of the hex bytes. * [1760]: Remove a private unused function: stringsToAccAddresses * [1760]: Switch to sigs.k8s.io/yaml (from gopkg.in/yaml.v2) in the last remaining place. * [1760]: Move DefineCustomGetSigners to the top of the file. * [1760]: Add changelog entries. * [1760]: Move now-indirect require of gopkg.in/yaml.v2 to the indirect section. * [1760]: Tweak the MetadataAddress.Format method: add some comments and remove the p and T cases which never get actually used.
Description
This PR does the following:
signer
stuff works for all ourMsg
s.Msg
s.GetSigners
methods as well as some other ones previously needed by theMsg
interface.codec.go
files.ModuleCdc
variables.Coins
proto fields that the SDK does.String
andEqual
methods for most proto messages.Related to:
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes