diff --git a/CHANGELOG.md b/CHANGELOG.md index d40860acfaa..8a11a862f04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,7 +51,8 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (modules/light-clients/07-tendermint) [\#1713](https://github.com/cosmos/ibc-go/pull/1713) Allow client upgrade proposals to update `TrustingPeriod`. See ADR-026 for context. * (app/20-transfer) [\#1680](https://github.com/cosmos/ibc-go/pull/1680) Adds migration to correct any malformed trace path information of tokens with denoms that contains slashes. The transfer module consensus version has been bumped to 2. * (app/20-transfer) [\#1730](https://github.com/cosmos/ibc-go/pull/1730) parse the ics20 denomination provided via a packet using the channel identifier format specified by ibc-go. - +* (core/client) [\#1740](https://github.com/cosmos/ibc-go/pull/1740) Add `cosmos_proto.implements_interface` to adhere to guidelines in [Cosmos SDK ADR 019](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-019-protobuf-state-encoding.md#safe-usage-of-any) for annotating `google.protobuf.Any` types + ### Features ### Bug Fixes diff --git a/modules/core/02-client/types/client.pb.go b/modules/core/02-client/types/client.pb.go index 34eb54cc90f..86bba961602 100644 --- a/modules/core/02-client/types/client.pb.go +++ b/modules/core/02-client/types/client.pb.go @@ -9,6 +9,7 @@ import ( types1 "github.com/cosmos/cosmos-sdk/x/upgrade/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -397,52 +398,53 @@ func init() { func init() { proto.RegisterFile("ibc/core/client/v1/client.proto", fileDescriptor_b6bc4c8185546947) } var fileDescriptor_b6bc4c8185546947 = []byte{ - // 705 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0x8e, 0xdb, 0xfc, 0xa2, 0xe6, 0x52, 0x35, 0xfd, 0xb9, 0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35, 0x02, 0xb2, 0xd6, 0x52, 0xe4, 0xb9, - 0x00, 0x32, 0x22, 0xaa, 0x4d, 0x97, 0xee, 0x14, 0x91, 0x84, 0x05, 0x11, 0xe9, 0xa4, 0xb3, 0x92, - 0x5a, 0x44, 0xcf, 0x40, 0xa1, 0x6f, 0x47, 0xf6, 0x88, 0xcd, 0x85, 0xed, 0x20, 0xa0, 0x6f, 0x2f, - 0x43, 0xb2, 0xaa, 0xd6, 0x58, 0x6e, 0x16, 0x17, 0x85, 0xaf, 0x11, 0x90, 0xb5, 0xa6, 0x10, 0x99, - 0x9f, 0x75, 0xad, 0xd3, 0xf3, 0xba, 0x76, 0x76, 0x5e, 0xd7, 0xbe, 0x9d, 0xd7, 0xb5, 0x0f, 0x17, - 0xf5, 0xdc, 0xd9, 0x45, 0x3d, 0xf7, 0xf5, 0xa2, 0x9e, 0x7b, 0xb3, 0xe7, 0x13, 0x3e, 0x8c, 0x1d, - 0xc3, 0xa5, 0x23, 0x53, 0x8d, 0x50, 0xe2, 0xb8, 0x3b, 0x3e, 0x35, 0x27, 0xbb, 0xe6, 0x88, 0x7a, - 0x71, 0x80, 0x99, 0x9c, 0xde, 0x8f, 0xdb, 0x3b, 0x6a, 0x80, 0xf3, 0xe9, 0x18, 0x33, 0xa7, 0x20, - 0x3e, 0xca, 0xee, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x6f, 0x16, 0x77, 0xe0, 0x05, 0x00, - 0x00, + // 734 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xbd, 0x6e, 0x13, 0x4b, + 0x18, 0xf5, 0x3a, 0xbe, 0x56, 0x3c, 0xbe, 0x8a, 0x73, 0x37, 0xce, 0x8d, 0xaf, 0x6f, 0xe4, 0xb1, + 0x46, 0x14, 0x16, 0x22, 0xbb, 0xd8, 0x91, 0x50, 0xe4, 0x0e, 0xbb, 0x49, 0x0a, 0x90, 0x59, 0x14, + 0x21, 0x68, 0xac, 0xfd, 0x99, 0xac, 0x27, 0x5a, 0xef, 0x58, 0x3b, 0xb3, 0x06, 0xbf, 0x01, 0x1d, + 0x94, 0x20, 0xa5, 0xc8, 0x1b, 0xd0, 0xf0, 0x08, 0x14, 0x29, 0x23, 0x2a, 0xaa, 0x15, 0x4a, 0x1a, + 0x6a, 0x3f, 0x01, 0xf2, 0xcc, 0x6c, 0x62, 0xe7, 0x07, 0x10, 0x74, 0x33, 0x67, 0xce, 0x9e, 0x39, + 0xdf, 0xf1, 0x1e, 0x2f, 0x80, 0xc4, 0x71, 0x4d, 0x97, 0x46, 0xd8, 0x74, 0x03, 0x82, 0x43, 0x6e, + 0x8e, 0x9b, 0x6a, 0x65, 0x8c, 0x22, 0xca, 0xa9, 0xae, 0x13, 0xc7, 0x35, 0x66, 0x04, 0x43, 0xc1, + 0xe3, 0x66, 0xb5, 0xec, 0x53, 0x9f, 0x8a, 0x63, 0x73, 0xb6, 0x92, 0xcc, 0xea, 0x7f, 0x3e, 0xa5, + 0x7e, 0x80, 0x4d, 0xb1, 0x73, 0xe2, 0x03, 0xd3, 0x0e, 0x27, 0xea, 0xe8, 0x8e, 0x4b, 0xd9, 0x90, + 0x32, 0x33, 0x1e, 0xf9, 0x91, 0xed, 0x61, 0x73, 0xdc, 0x74, 0x30, 0xb7, 0x9b, 0xe9, 0x3e, 0x15, + 0x90, 0xac, 0xbe, 0x54, 0x96, 0x1b, 0x79, 0x84, 0x8e, 0x34, 0xb0, 0xbe, 0xe7, 0xe1, 0x90, 0x93, + 0x03, 0x82, 0xbd, 0xae, 0x70, 0xf2, 0x94, 0xdb, 0x1c, 0xeb, 0x4d, 0x50, 0x90, 0xc6, 0xfa, 0xc4, + 0xab, 0x68, 0x75, 0xad, 0x51, 0xe8, 0x94, 0xa7, 0x09, 0x5c, 0x9d, 0xd8, 0xc3, 0xa0, 0x8d, 0x2e, + 0x8e, 0x90, 0xb5, 0x2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 0x84, 0x93, 0x9b, 0x2f, 0xd1, 0x15, 0x02, 0xb2, 0x56, 0x52, 0xe4, 0xb1, 0x00, 0x16, 0x44, 0x54, + 0xc5, 0xb3, 0xb7, 0x8a, 0x48, 0xc2, 0x9c, 0x88, 0x74, 0xd2, 0x5e, 0x4e, 0x07, 0x40, 0x8f, 0x40, + 0xbe, 0x67, 0x47, 0xf6, 0x90, 0xcd, 0x84, 0xed, 0x20, 0xa0, 0x2f, 0x2f, 0x22, 0x60, 0x15, 0xad, + 0xbe, 0xd4, 0x28, 0xcc, 0x0b, 0x5f, 0x21, 0x20, 0x6b, 0x45, 0x21, 0x32, 0x1d, 0xd6, 0xb1, 0x4e, + 0xce, 0x6a, 0xda, 0xe9, 0x59, 0x4d, 0xfb, 0x7a, 0x56, 0xd3, 0xde, 0x9e, 0xd7, 0x32, 0xa7, 0xe7, + 0xb5, 0xcc, 0x97, 0xf3, 0x5a, 0xe6, 0xc5, 0x8e, 0x4f, 0xf8, 0x20, 0x76, 0x0c, 0x97, 0x0e, 0xd5, + 0xdf, 0xac, 0x49, 0x1c, 0x77, 0xcb, 0xa7, 0xe6, 0x78, 0xdb, 0x1c, 0x52, 0x2f, 0x0e, 0x30, 0x93, + 0x1f, 0x85, 0xfb, 0xad, 0x2d, 0xf5, 0x5d, 0xe0, 0x93, 0x11, 0x66, 0x4e, 0x5e, 0xfc, 0x64, 0xdb, + 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x08, 0xd1, 0x44, 0x6d, 0x37, 0x06, 0x00, 0x00, } func (this *UpgradeProposal) Equal(that interface{}) bool { diff --git a/proto/ibc/core/client/v1/client.proto b/proto/ibc/core/client/v1/client.proto index 657d99ed204..f97263c4fcf 100644 --- a/proto/ibc/core/client/v1/client.proto +++ b/proto/ibc/core/client/v1/client.proto @@ -7,6 +7,7 @@ option go_package = "github.com/cosmos/ibc-go/v3/modules/core/02-client/types"; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "cosmos/upgrade/v1beta1/upgrade.proto"; +import "cosmos_proto/cosmos.proto"; // IdentifiedClientState defines a client state with an additional client // identifier field. @@ -41,7 +42,8 @@ message ClientConsensusStates { // handler may fail if the subject and the substitute do not match in client and // chain parameters (with exception to latest height, frozen height, and chain-id). message ClientUpdateProposal { - option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_getters) = false; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; // the title of the update proposal string title = 1; // the description of the proposal @@ -56,9 +58,10 @@ message ClientUpdateProposal { // UpgradeProposal is a gov Content type for initiating an IBC breaking // upgrade. message UpgradeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + option (gogoproto.equal) = true; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; string title = 1; string description = 2;