Skip to content

Commit

Permalink
fix!: revert compat breaks; cleanup (#2235)
Browse files Browse the repository at this point in the history
* fix!: revert compat breaks; cleanup

* rm unused handlers
  • Loading branch information
MSalopek committed Sep 6, 2024
1 parent 216f395 commit 5b6252c
Show file tree
Hide file tree
Showing 12 changed files with 373 additions and 1,087 deletions.
3 changes: 1 addition & 2 deletions app/provider/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ func New(
govRouter := govv1beta1.NewRouter()
govRouter.
AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(providertypes.RouterKey, ibcprovider.NewProviderProposalHandler(app.ProviderKeeper))
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper))
// Set legacy router for backwards compatibility with gov v1beta1
app.GovKeeper.SetLegacyRouter(govRouter)

Expand Down
7 changes: 7 additions & 0 deletions proto/interchain_security/ccv/provider/v1/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ message ConsumerAdditionProposal {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_stringer) = false;
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
option deprecated = true;

// the title of the proposal
string title = 1;
Expand Down Expand Up @@ -121,6 +122,8 @@ message ConsumerAdditionProposal {
// Use MsgConsumerRemoval to submit this proposal type.
message ConsumerRemovalProposal {
option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content";
option deprecated = true;


// the title of the proposal
string title = 1;
Expand All @@ -138,6 +141,8 @@ message ConsumerRemovalProposal {
// ConsumerModificationProposal is a governance proposal on the provider chain to modify parameters of a running
// consumer chain. If it passes, the consumer chain's state is updated to take into account the newest params.
message ConsumerModificationProposal {
option deprecated = true;

// the title of the proposal
string title = 1;
// the description of the proposal
Expand Down Expand Up @@ -291,6 +296,8 @@ message AddressList { repeated bytes addresses = 1; }
// WARNING: This message is deprecated and is not used.
// ChannelToChain is used to map a CCV channel ID to the consumer chainID
message ChannelToChain {
option deprecated = true;

string channel_id = 1;
string chain_id = 2;
}
Expand Down
34 changes: 11 additions & 23 deletions proto/interchain_security/ccv/provider/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,19 @@ service Msg {
rpc AssignConsumerKey(MsgAssignConsumerKey) returns (MsgAssignConsumerKeyResponse);
rpc SubmitConsumerMisbehaviour(MsgSubmitConsumerMisbehaviour) returns (MsgSubmitConsumerMisbehaviourResponse);
rpc SubmitConsumerDoubleVoting(MsgSubmitConsumerDoubleVoting) returns (MsgSubmitConsumerDoubleVotingResponse);
rpc ConsumerAddition(MsgConsumerAddition) returns (MsgConsumerAdditionResponse) {
option deprecated = true;
};
rpc ConsumerRemoval(MsgConsumerRemoval) returns (MsgConsumerRemovalResponse) {
option deprecated = true;
};
rpc CreateConsumer(MsgCreateConsumer) returns (MsgCreateConsumerResponse);
rpc UpdateConsumer(MsgUpdateConsumer) returns (MsgUpdateConsumerResponse);
rpc RemoveConsumer(MsgRemoveConsumer) returns (MsgRemoveConsumerResponse);
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
rpc OptIn(MsgOptIn) returns (MsgOptInResponse);
rpc OptOut(MsgOptOut) returns (MsgOptOutResponse);
rpc SetConsumerCommissionRate(MsgSetConsumerCommissionRate) returns (MsgSetConsumerCommissionRateResponse);
rpc ConsumerModification(MsgConsumerModification) returns (MsgConsumerModificationResponse) {
option deprecated = true;
}
rpc ChangeRewardDenoms(MsgChangeRewardDenoms) returns (MsgChangeRewardDenomsResponse);
}


message MsgAssignConsumerKey {
option (cosmos.msg.v1.signer) = "submitter";
option (cosmos.msg.v1.signer) = "signer";
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Expand All @@ -58,7 +49,7 @@ message MsgAssignConsumerKey {
// `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}`
string consumer_key = 3;

string submitter = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string signer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// the consumer id of the consumer chain to assign a consensus public key to
string consumer_id = 5;
Expand Down Expand Up @@ -119,6 +110,7 @@ message MsgUpdateParamsResponse {}

// [DEPRECATED] Use `MsgCreateConsumer` instead
message MsgConsumerAddition {
option deprecated = true;
option (cosmos.msg.v1.signer) = "authority";

// the proposed chain-id of the new consumer chain, must be different from all
Expand Down Expand Up @@ -199,13 +191,11 @@ message MsgConsumerAddition {
bool allow_inactive_vals = 20;
}

// MsgConsumerAdditionResponse defines response type for MsgConsumerAddition messages
message MsgConsumerAdditionResponse {}

// [DEPRECATED] Use `MsgRemoveConsumer` instead
message MsgConsumerRemoval {
option deprecated = true;
option (cosmos.msg.v1.signer) = "authority";

// the chain-id of the consumer chain to be stopped
string chain_id = 1;
// the time on the provider chain at which all validators are responsible to
Expand All @@ -216,9 +206,6 @@ message MsgConsumerRemoval {
string authority = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// MsgConsumerRemovalResponse defines response type for MsgConsumerRemoval messages
message MsgConsumerRemovalResponse {}


// MsgRemoveConsumer defines the message used to remove (and stop) a consumer chain.
// If it passes, all the consumer chain's state is eventually removed from the provider chain.
Expand Down Expand Up @@ -256,7 +243,7 @@ message MsgChangeRewardDenomsResponse {}
message MsgOptIn {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "submitter";
option (cosmos.msg.v1.signer) = "signer";
// [DEPRECATED] use `consumer_id` instead
string chain_id = 1 [deprecated = true];
// the validator address on the provider
Expand All @@ -267,7 +254,7 @@ message MsgOptIn {
// consumer public key at a later stage by issuing a `MsgAssignConsumerKey` message.
string consumer_key = 3;
// submitter address
string submitter = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string signer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// the consumer id of the consumer chain to opt in to
string consumer_id = 5;
}
Expand All @@ -277,13 +264,13 @@ message MsgOptInResponse {}
message MsgOptOut {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "submitter";
option (cosmos.msg.v1.signer) = "signer";
// [DEPRECATED] use `consumer_id` instead
string chain_id = 1 [deprecated = true];
// the validator address on the provider
string provider_addr = 2 [ (gogoproto.moretags) = "yaml:\"address\"" ];
// submitter address
string submitter = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string signer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// the consumer id of the consumer chain to opt out from
string consumer_id = 4;
}
Expand All @@ -295,7 +282,7 @@ message MsgOptOutResponse {}
message MsgSetConsumerCommissionRate {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "submitter";
option (cosmos.msg.v1.signer) = "signer";

// The validator address on the provider
string provider_addr = 1 [ (gogoproto.moretags) = "yaml:\"address\"" ];
Expand All @@ -309,7 +296,7 @@ message MsgSetConsumerCommissionRate {
(gogoproto.nullable) = false
];
// submitter address
string submitter = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string signer = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// the consumer id of the consumer chain to set the commission rate
string consumer_id = 5;
}
Expand All @@ -320,6 +307,7 @@ message MsgSetConsumerCommissionRateResponse {}
// [DEPRECATED] Use `MsgUpdateConsumer` instead
message MsgConsumerModification {
option (cosmos.msg.v1.signer) = "authority";
option deprecated = true;

// the title of the proposal
string title = 1;
Expand Down
52 changes: 0 additions & 52 deletions x/ccv/provider/handler.go

This file was deleted.

Loading

0 comments on commit 5b6252c

Please sign in to comment.