Skip to content

Commit

Permalink
Revert "Merge branch 'shawn/v2-imports' into shawn/ccv-migrations"
Browse files Browse the repository at this point in the history
This reverts commit 53e3362, reversing
changes made to 9c3f338.
  • Loading branch information
shaspitz committed May 24, 2023
1 parent 6885ad1 commit a4c9224
Show file tree
Hide file tree
Showing 20 changed files with 694 additions and 698 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
syntax = "proto3";
package interchain_security.ccv.consumer.v2;
package interchain_security.ccv.consumer.v1;

import "interchain_security/ccv/v2/ccv.proto";
import "interchain_security/ccv/v1/ccv.proto";

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/consumer/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/consumer/types";

import "google/protobuf/any.proto";
import "gogoproto/gogo.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
syntax = "proto3";

package interchain_security.ccv.consumer.v2;
package interchain_security.ccv.consumer.v1;

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/consumer/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/consumer/types";

import "interchain_security/ccv/v2/ccv.proto";
import "interchain_security/ccv/consumer/v2/consumer.proto";
import "interchain_security/ccv/v1/ccv.proto";
import "interchain_security/ccv/consumer/v1/consumer.proto";
import "tendermint/abci/types.proto";
import "ibc/lightclients/tendermint/v1/tendermint.proto";
import "ibc/core/channel/v1/channel.proto";
Expand All @@ -23,7 +23,7 @@ message GenesisState {
// ProviderConsensusState filled in on new chain, nil on restart.
ibc.lightclients.tendermint.v1.ConsensusState provider_consensus_state = 6;
// MaturingPackets nil on new chain, filled in on restart.
repeated interchain_security.ccv.consumer.v2.MaturingVSCPacket maturing_packets = 7
repeated interchain_security.ccv.consumer.v1.MaturingVSCPacket maturing_packets = 7
[ (gogoproto.nullable) = false ];
// InitialValset filled in on new chain and on restart.
repeated .tendermint.abci.ValidatorUpdate initial_val_set = 8
Expand All @@ -35,10 +35,10 @@ message GenesisState {
repeated OutstandingDowntime outstanding_downtime_slashing = 10
[ (gogoproto.nullable) = false ];
// PendingConsumerPackets nil on new chain, filled in on restart.
interchain_security.ccv.v2.ConsumerPacketDataList pending_consumer_packets = 11
interchain_security.ccv.v1.ConsumerPacketDataList pending_consumer_packets = 11
[ (gogoproto.nullable) = false ];
// LastTransmissionBlockHeight nil on new chain, filled in on restart.
interchain_security.ccv.consumer.v2.LastTransmissionBlockHeight last_transmission_block_height = 12
interchain_security.ccv.consumer.v1.LastTransmissionBlockHeight last_transmission_block_height = 12
[ (gogoproto.nullable) = false ];
bool preCCV = 13; // flag indicating whether the consumer CCV module starts in pre-CCV state
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
syntax = "proto3";

package interchain_security.ccv.consumer.v2;
option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/consumer/types";
package interchain_security.ccv.consumer.v1;
option go_package = "github.com/cosmos/interchain-security/x/ccv/consumer/types";

import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "interchain_security/ccv/consumer/v2/consumer.proto";
import "interchain_security/ccv/consumer/v1/consumer.proto";

service Query {
// ConsumerGenesis queries the genesis state needed to start a consumer chain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";

package interchain_security.ccv.provider.v2;
package interchain_security.ccv.provider.v1;

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/provider/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/provider/types";

import "gogoproto/gogo.proto";
import "interchain_security/ccv/v2/ccv.proto";
import "interchain_security/ccv/provider/v2/provider.proto";
import "interchain_security/ccv/consumer/v2/consumer.proto";
import "interchain_security/ccv/consumer/v2/genesis.proto";
import "interchain_security/ccv/v1/ccv.proto";
import "interchain_security/ccv/provider/v1/provider.proto";
import "interchain_security/ccv/consumer/v1/consumer.proto";
import "interchain_security/ccv/consumer/v1/genesis.proto";
import "tendermint/crypto/keys.proto";


Expand All @@ -22,10 +22,10 @@ message GenesisState {
(gogoproto.moretags) = "yaml:\"consumer_states\""
];
// empty for a new chain
repeated interchain_security.ccv.provider.v2.UnbondingOp unbonding_ops = 3
repeated interchain_security.ccv.provider.v1.UnbondingOp unbonding_ops = 3
[ (gogoproto.nullable) = false ];
// empty for a new chain
interchain_security.ccv.v2.MaturedUnbondingOps mature_unbonding_ops = 4;
interchain_security.ccv.v1.MaturedUnbondingOps mature_unbonding_ops = 4;
// empty for a new chain
repeated ValsetUpdateIdToHeight valset_update_id_to_height = 5
[ (gogoproto.nullable) = false ];
Expand Down Expand Up @@ -59,14 +59,14 @@ message ConsumerState {
// InitalHeight defines the initial block height for the consumer chain
uint64 initial_height = 4;
// ConsumerGenesis defines the initial consumer chain genesis states
interchain_security.ccv.consumer.v2.GenesisState consumer_genesis = 5
interchain_security.ccv.consumer.v1.GenesisState consumer_genesis = 5
[ (gogoproto.nullable) = false ];
// PendingValsetChanges defines the pending validator set changes for the consumer chain
repeated interchain_security.ccv.v2.ValidatorSetChangePacketData pending_valset_changes = 6
repeated interchain_security.ccv.v1.ValidatorSetChangePacketData pending_valset_changes = 6
[ (gogoproto.nullable) = false ];
repeated string slash_downtime_ack = 7;
// UnbondingOpsIndex defines the unbonding operations waiting on this consumer chain
repeated interchain_security.ccv.provider.v2.VscUnbondingOps unbonding_ops_index = 8
repeated interchain_security.ccv.provider.v1.VscUnbondingOps unbonding_ops_index = 8
[ (gogoproto.nullable) = false ];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";

package interchain_security.ccv.provider.v2;
package interchain_security.ccv.provider.v1;

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/provider/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/provider/types";

import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
syntax = "proto3";
package interchain_security.ccv.provider.v2;
package interchain_security.ccv.provider.v1;

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/provider/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/provider/types";

import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "interchain_security/ccv/v2/ccv.proto";
import "interchain_security/ccv/consumer/v2/genesis.proto";
import "interchain_security/ccv/provider/v2/provider.proto";
import "interchain_security/ccv/v1/ccv.proto";
import "interchain_security/ccv/consumer/v1/genesis.proto";
import "interchain_security/ccv/provider/v1/provider.proto";


service Query {
Expand Down Expand Up @@ -79,7 +79,7 @@ service Query {
message QueryConsumerGenesisRequest { string chain_id = 1; }

message QueryConsumerGenesisResponse {
interchain_security.ccv.consumer.v2.GenesisState genesis_state = 1
interchain_security.ccv.consumer.v1.GenesisState genesis_state = 1
[ (gogoproto.nullable) = false ];
}

Expand Down Expand Up @@ -162,17 +162,17 @@ message QueryThrottledConsumerPacketDataResponse {

// A query wrapper type for the global entry and data relevant to a throttled slash packet.
message ThrottledSlashPacket {
interchain_security.ccv.provider.v2.GlobalSlashEntry global_entry = 1
interchain_security.ccv.provider.v1.GlobalSlashEntry global_entry = 1
[(gogoproto.nullable) = false];
interchain_security.ccv.v2.SlashPacketData data = 2
interchain_security.ccv.v1.SlashPacketData data = 2
[(gogoproto.nullable) = false];
}

// ThrottledPacketDataWrapper contains either SlashPacketData or VSCMaturedPacketData
message ThrottledPacketDataWrapper {
oneof data {
interchain_security.ccv.v2.SlashPacketData slash_packet = 1;
interchain_security.ccv.v2.VSCMaturedPacketData vsc_matured_packet = 2;
interchain_security.ccv.v1.SlashPacketData slash_packet = 1;
interchain_security.ccv.v1.VSCMaturedPacketData vsc_matured_packet = 2;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
syntax = "proto3";
package interchain_security.ccv.provider.v2;
package interchain_security.ccv.provider.v1;

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/provider/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/provider/types";

import "google/api/annotations.proto";
import "gogoproto/gogo.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";

package interchain_security.ccv.v2;
package interchain_security.ccv.v1;

option go_package = "github.com/cosmos/interchain-security/v2/x/ccv/types";
option go_package = "github.com/cosmos/interchain-security/x/ccv/types";

import "cosmos/staking/v1beta1/staking.proto";

Expand Down
2 changes: 1 addition & 1 deletion scripts/protocgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ done
cd ..

# move proto files to the right places
cp -r github.com/cosmos/interchain-security/v2/* ./
cp -r github.com/cosmos/interchain-security/* ./
rm -rf github.com

go mod tidy -compat=1.19
6 changes: 3 additions & 3 deletions tests/e2e/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (tr TestRun) getProposal(chain chainID, proposal uint) Proposal {
Title: title,
Description: description,
}
case "/interchain_security.ccv.provider.v2.ConsumerAdditionProposal":
case "/interchain_security.ccv.provider.v1.ConsumerAdditionProposal":
chainId := gjson.Get(string(bz), `content.chain_id`).String()
spawnTime := gjson.Get(string(bz), `content.spawn_time`).Time().Sub(tr.containerConfig.now)

Expand All @@ -390,7 +390,7 @@ func (tr TestRun) getProposal(chain chainID, proposal uint) Proposal {
RevisionHeight: gjson.Get(string(bz), `content.initial_height.revision_height`).Uint(),
},
}
case "/interchain_security.ccv.provider.v2.ConsumerRemovalProposal":
case "/interchain_security.ccv.provider.v1.ConsumerRemovalProposal":
chainId := gjson.Get(string(bz), `content.chain_id`).String()
stopTime := gjson.Get(string(bz), `content.stop_time`).Time().Sub(tr.containerConfig.now)

Expand All @@ -409,7 +409,7 @@ func (tr TestRun) getProposal(chain chainID, proposal uint) Proposal {
StopTime: int(stopTime.Milliseconds()),
}

case "/interchain_security.ccv.provider.v2.EquivocationProposal":
case "/interchain_security.ccv.provider.v1.EquivocationProposal":
return EquivocationProposal{
Deposit: uint(deposit),
Status: status,
Expand Down
Loading

0 comments on commit a4c9224

Please sign in to comment.