Skip to content

Commit e1490c5

Browse files
mergify[bot]pyramationcrodriguezvega
authored
fix: add cosmos_proto.implements_interface (backport #1740) (#1818)
* fix: add cosmos_proto.implements_interface (#1740) * fix: add cosmos_proto.implements_interface * changelog * Update CHANGELOG.md Co-authored-by: Carlos Rodriguez <carlos@interchain.io> * run `make proto-all` * run `go mod tidy` Co-authored-by: Carlos Rodriguez <carlos@interchain.io> Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com> (cherry picked from commit 40d0ff7) # Conflicts: # modules/core/02-client/types/client.pb.go * fix conflicts Co-authored-by: Dan Lynch <pyramation@gmail.com> Co-authored-by: crodriguezvega <carlos@interchain.io>
1 parent 57d67f3 commit e1490c5

File tree

3 files changed

+57
-51
lines changed

3 files changed

+57
-51
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
6969
* (app/29-fee) [\#1341](https://github.com/cosmos/ibc-go/pull/1341) Check if the fee module is locked and if the fee module is enabled before refunding all fees
7070
* (transfer) [\#1414](https://github.com/cosmos/ibc-go/pull/1414) Emitting Sender address from `fungible_token_packet` events in `OnRecvPacket` and `OnAcknowledgementPacket`.
7171
* (testing/simapp) [\#1397](https://github.com/cosmos/ibc-go/pull/1397) Adding mock module to maccperms and adding check to ensure mock module is not a blocked account address.
72-
* (core/02-client) [\#1570](https://github.com/cosmos/ibc-go/pull/1570) Emitting an event when handling an upgrade client proposal.
72+
* (core/02-client) [\#1570](https://github.com/cosmos/ibc-go/pull/1570) Emitting an event when handling an upgrade client proposal.
7373
* (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.
74+
* (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
7475

7576
### Features
7677

modules/core/02-client/types/client.pb.go

+48-46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/ibc/core/client/v1/client.proto

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ option go_package = "github.com/cosmos/ibc-go/v4/modules/core/02-client/types";
77
import "gogoproto/gogo.proto";
88
import "google/protobuf/any.proto";
99
import "cosmos/upgrade/v1beta1/upgrade.proto";
10+
import "cosmos_proto/cosmos.proto";
1011

1112
// IdentifiedClientState defines a client state with an additional client
1213
// identifier field.
@@ -41,7 +42,8 @@ message ClientConsensusStates {
4142
// handler may fail if the subject and the substitute do not match in client and
4243
// chain parameters (with exception to latest height, frozen height, and chain-id).
4344
message ClientUpdateProposal {
44-
option (gogoproto.goproto_getters) = false;
45+
option (gogoproto.goproto_getters) = false;
46+
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
4547
// the title of the update proposal
4648
string title = 1;
4749
// the description of the proposal
@@ -56,9 +58,10 @@ message ClientUpdateProposal {
5658
// UpgradeProposal is a gov Content type for initiating an IBC breaking
5759
// upgrade.
5860
message UpgradeProposal {
59-
option (gogoproto.goproto_getters) = false;
60-
option (gogoproto.goproto_stringer) = false;
61-
option (gogoproto.equal) = true;
61+
option (gogoproto.goproto_getters) = false;
62+
option (gogoproto.goproto_stringer) = false;
63+
option (gogoproto.equal) = true;
64+
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
6265

6366
string title = 1;
6467
string description = 2;

0 commit comments

Comments
 (0)