Skip to content
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

Deterministic connection and channel identifiers #7993

Merged
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
0462943
add generate identifier functions for connection and channel
colin-axner Nov 20, 2020
44174ec
update proto types and begin open init changes
colin-axner Nov 20, 2020
e01eb98
finish connection handshake chanes and some channel handshake changes
colin-axner Nov 20, 2020
2119731
finish channel handshake changes
colin-axner Nov 20, 2020
7a1c317
fix more tests
colin-axner Nov 20, 2020
38f3901
fix connection handshake tests
colin-axner Nov 20, 2020
f47d238
fix more tests
colin-axner Nov 20, 2020
9af89dc
fix build
colin-axner Nov 20, 2020
36b9c66
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 20, 2020
f953238
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 23, 2020
32a1afa
changes from self review
colin-axner Nov 23, 2020
005c47a
Merge branch 'colin/7870-deterministic-channel-connection-identifiers…
colin-axner Nov 23, 2020
d89548a
address @fedekunze review suggestions
colin-axner Nov 23, 2020
db991d7
update spec
colin-axner Nov 23, 2020
fb8f829
fix build
colin-axner Nov 23, 2020
1b6bebf
fix tests
colin-axner Nov 23, 2020
fa62c83
Update x/ibc/testing/chain.go
colin-axner Nov 23, 2020
2341f86
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 23, 2020
916b3f7
Update x/ibc/core/03-connection/types/msgs.go
colin-axner Nov 23, 2020
3da13bd
address @AdityaSripal comments
colin-axner Nov 23, 2020
6818209
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 23, 2020
e671648
reflect spec changes
colin-axner Nov 24, 2020
49d2cd7
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 24, 2020
736a139
address @AdityaSripal review suggestions
colin-axner Nov 24, 2020
ec8e1f2
Merge branch 'colin/7870-deterministic-channel-connection-identifiers…
colin-axner Nov 24, 2020
f8c2970
nit
colin-axner Nov 24, 2020
2e80297
add connection/channel identifier parsing and validation as per @Adit…
colin-axner Nov 24, 2020
cb850b9
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 24, 2020
6024dbb
Fix auth rest test
colin-axner Nov 24, 2020
e3948d2
Merge branch 'colin/7870-deterministic-channel-connection-identifiers…
colin-axner Nov 24, 2020
c3c8cd9
Merge branch 'master' into colin/7870-deterministic-channel-connectio…
colin-axner Nov 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions proto/ibc/core/channel/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ message GenesisState {
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""];
repeated PacketSequence ack_sequences = 7
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""];
// the sequence for the next generated channel identifier
uint64 next_channel_sequence = 8 [(gogoproto.moretags) = "yaml:\"next_channel_sequence\""];
}

// PacketSequence defines the genesis type necessary to retrieve and store
Expand Down
44 changes: 21 additions & 23 deletions proto/ibc/core/channel/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,9 @@ message MsgChannelOpenInit {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""];
Channel channel = 3 [(gogoproto.nullable) = false];
string signer = 4;
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
Channel channel = 2 [(gogoproto.nullable) = false];
string signer = 3;
}

// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type.
Expand All @@ -61,15 +60,14 @@ message MsgChannelOpenTry {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string desired_channel_id = 2 [(gogoproto.moretags) = "yaml:\"desired_channel_id\""];
string counterparty_chosen_channel_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_chosen_channel_id\""];
Channel channel = 4 [(gogoproto.nullable) = false];
string counterparty_version = 5 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
bytes proof_init = 6 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.core.client.v1.Height proof_height = 7
string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""];
string desired_channel_id = 2 [(gogoproto.moretags) = "yaml:\"desired_channel_id\""];
colin-axner marked this conversation as resolved.
Show resolved Hide resolved
Channel channel = 3 [(gogoproto.nullable) = false];
string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""];
bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""];
ibc.core.client.v1.Height proof_height = 6
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 8;
string signer = 7;
}

// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type.
Expand Down Expand Up @@ -147,9 +145,9 @@ message MsgRecvPacket {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""];
ibc.core.client.v1.Height proof_height = 3
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""];
ibc.core.client.v1.Height proof_height = 3
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 4;
}
Expand All @@ -162,9 +160,9 @@ message MsgTimeout {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""];
ibc.core.client.v1.Height proof_height = 3
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""];
ibc.core.client.v1.Height proof_height = 3
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
string signer = 5;
Expand All @@ -178,10 +176,10 @@ message MsgTimeoutOnClose {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""];
bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""];
ibc.core.client.v1.Height proof_height = 4
Packet packet = 1 [(gogoproto.nullable) = false];
bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""];
bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""];
ibc.core.client.v1.Height proof_height = 4
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""];
string signer = 6;
Expand All @@ -197,7 +195,7 @@ message MsgAcknowledgement {

Packet packet = 1 [(gogoproto.nullable) = false];
bytes acknowledgement = 2;
bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""];
bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""];
ibc.core.client.v1.Height proof_height = 4
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
string signer = 5;
Expand Down
2 changes: 2 additions & 0 deletions proto/ibc/core/connection/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ message GenesisState {
repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false];
repeated ConnectionPaths client_connection_paths = 2
[(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""];
// the sequence for the next generated connection identifier
uint64 next_connection_sequence = 3 [(gogoproto.moretags) = "yaml:\"next_connection_sequence\""];
}
32 changes: 15 additions & 17 deletions proto/ibc/core/connection/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ message MsgConnectionOpenInit {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""];
Counterparty counterparty = 3 [(gogoproto.nullable) = false];
Version version = 4;
string signer = 5;
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
Counterparty counterparty = 2 [(gogoproto.nullable) = false];
Version version = 3;
string signer = 4;
}

// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response type.
Expand All @@ -45,24 +44,23 @@ message MsgConnectionOpenTry {
option (gogoproto.equal) = false;
option (gogoproto.goproto_getters) = false;

string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
string desired_connection_id = 2 [(gogoproto.moretags) = "yaml:\"desired_connection_id\""];
string counterparty_chosen_connection_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_chosen_connection_id\""];
google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""];
Counterparty counterparty = 5 [(gogoproto.nullable) = false];
repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
ibc.core.client.v1.Height proof_height = 7
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
string desired_connection_id = 2 [(gogoproto.moretags) = "yaml:\"desired_connection_id\""];
google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""];
Counterparty counterparty = 4 [(gogoproto.nullable) = false];
repeated Version counterparty_versions = 5 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""];
ibc.core.client.v1.Height proof_height = 6
[(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false];
// proof of the initialization the connection on Chain A: `UNITIALIZED ->
// INIT`
bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""];
bytes proof_init = 7 [(gogoproto.moretags) = "yaml:\"proof_init\""];
// proof of client state included in message
bytes proof_client = 9 [(gogoproto.moretags) = "yaml:\"proof_client\""];
bytes proof_client = 8 [(gogoproto.moretags) = "yaml:\"proof_client\""];
// proof of client consensus state
bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
ibc.core.client.v1.Height consensus_height = 11
bytes proof_consensus = 9 [(gogoproto.moretags) = "yaml:\"proof_consensus\""];
ibc.core.client.v1.Height consensus_height = 10
[(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false];
string signer = 12;
string signer = 11;
}

// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type.
Expand Down
10 changes: 5 additions & 5 deletions proto/ibc/lightclients/solomachine/v1/solomachine.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ message Header {
// Misbehaviour defines misbehaviour for a solo machine which consists
// of a sequence and two signatures over different messages at that sequence.
message Misbehaviour {
option (gogoproto.goproto_getters) = false;
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
uint64 sequence = 2;
SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""];
SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""];
option (gogoproto.goproto_getters) = false;
string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
uint64 sequence = 2;
SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""];
SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""];
}

// SignatureAndData contains a signature and the data signed over to create that
Expand Down
2 changes: 1 addition & 1 deletion proto/ibc/lightclients/tendermint/v1/tendermint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ message ConsensusState {
// Misbehaviour is a wrapper over two conflicting Headers
// that implements Misbehaviour interface expected by ICS-02
message Misbehaviour {
option (gogoproto.goproto_getters) = false;
option (gogoproto.goproto_getters) = false;

string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""];
Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""];
Expand Down
4 changes: 2 additions & 2 deletions x/ibc/applications/transfer/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func (suite *KeeperTestSuite) TestSendTransfer() {
{"next seq send not found",
func() {
_, _, connA, connB := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)
channelA = connA.NextTestChannel(ibctesting.TransferPort)
channelB = connB.NextTestChannel(ibctesting.TransferPort)
channelA = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort)
channelB = suite.chainB.NextTestChannel(connB, ibctesting.TransferPort)
// manually create channel so next seq send is never set
suite.chainA.App.IBCKeeper.ChannelKeeper.SetChannel(
suite.chainA.GetContext(),
Expand Down
10 changes: 5 additions & 5 deletions x/ibc/applications/transfer/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() {
},
{
"invalid port ID", func() {
testChannel = connA.NextTestChannel(ibctesting.MockPort)
testChannel = suite.chainA.NextTestChannel(connA, ibctesting.MockPort)
}, false,
},
{
Expand All @@ -56,7 +56,7 @@ func (suite *TransferTestSuite) TestOnChanOpenInit() {
suite.SetupTest() // reset

_, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)
testChannel = connA.NextTestChannel(ibctesting.TransferPort)
testChannel = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort)
counterparty := channeltypes.NewCounterparty(testChannel.PortID, testChannel.ID)
channel = &channeltypes.Channel{
State: channeltypes.INIT,
Expand Down Expand Up @@ -122,7 +122,7 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() {
},
{
"invalid port ID", func() {
testChannel = connA.NextTestChannel(ibctesting.MockPort)
testChannel = suite.chainA.NextTestChannel(connA, ibctesting.MockPort)
}, false,
},
{
Expand All @@ -144,7 +144,7 @@ func (suite *TransferTestSuite) TestOnChanOpenTry() {
suite.SetupTest() // reset

_, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)
testChannel = connA.NextTestChannel(ibctesting.TransferPort)
testChannel = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort)
counterparty := channeltypes.NewCounterparty(testChannel.PortID, testChannel.ID)
channel = &channeltypes.Channel{
State: channeltypes.TRYOPEN,
Expand Down Expand Up @@ -210,7 +210,7 @@ func (suite *TransferTestSuite) TestOnChanOpenAck() {
suite.SetupTest() // reset

_, _, connA, _ = suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)
testChannel = connA.NextTestChannel(ibctesting.TransferPort)
testChannel = suite.chainA.NextTestChannel(connA, ibctesting.TransferPort)
counterpartyVersion = types.Version

module, _, err := suite.chainA.App.IBCKeeper.PortKeeper.LookupModuleByPort(suite.chainA.GetContext(), ibctesting.TransferPort)
Expand Down
2 changes: 1 addition & 1 deletion x/ibc/applications/transfer/types/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (

validChannel = "testchannel"
invalidChannel = "(invalidchannel1)"
invalidShortChannel = "invalidch"
invalidShortChannel = "invalid"
invalidLongChannel = "invalidlongchannelinvalidlongchannelinvalidlongchannelinvalidlongchannel"
)

Expand Down
21 changes: 8 additions & 13 deletions x/ibc/core/03-connection/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,33 @@ import (
const (
flagVersionIdentifier = "version-identifier"
flagVersionFeatures = "version-features"
flagProvedID = "proved-id"
)

// NewConnectionOpenInitCmd defines the command to initialize a connection on
// chain A with a given counterparty chain B
func NewConnectionOpenInitCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "open-init [connection-id] [client-id] [counterparty-connection-id] [counterparty-client-id] [path/to/counterparty_prefix.json]",
Use: "open-init [client-id] [counterparty-client-id] [path/to/counterparty_prefix.json]",
Short: "Initialize connection on chain A",
Long: `Initialize a connection on chain A with a given counterparty chain B.
- 'version-identifier' flag can be a single pre-selected version identifier to be used in the handshake.
- 'version-features' flag can be a list of features separated by commas to accompany the version identifier.`,
Example: fmt.Sprintf(
"%s tx %s %s open-init [connection-id] [client-id] [counterparty-connection-id] [counterparty-client-id] [path/to/counterparty_prefix.json] --version-identifier=\"1.0\" --version-features=\"ORDER_UNORDERED\"",
"%s tx %s %s open-init [client-id] [counterparty-client-id] [path/to/counterparty_prefix.json] --version-identifier=\"1.0\" --version-features=\"ORDER_UNORDERED\"",
version.AppName, host.ModuleName, types.SubModuleName,
),
Args: cobra.ExactArgs(5),
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)
clientCtx, err := client.ReadTxCommandFlags(clientCtx, cmd.Flags())
if err != nil {
return err
}

connectionID := args[0]
clientID := args[1]
counterpartyConnectionID := args[2]
counterpartyClientID := args[3]
clientID := args[0]
counterpartyClientID := args[1]

counterpartyPrefix, err := utils.ParsePrefix(clientCtx.LegacyAmino, args[4])
counterpartyPrefix, err := utils.ParsePrefix(clientCtx.LegacyAmino, args[2])
colin-axner marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
return err
}
Expand All @@ -71,7 +68,7 @@ func NewConnectionOpenInitCmd() *cobra.Command {
}

msg := types.NewMsgConnectionOpenInit(
connectionID, clientID, counterpartyConnectionID, counterpartyClientID,
clientID, counterpartyClientID,
counterpartyPrefix, version, clientCtx.GetFromAddress(),
)

Expand Down Expand Up @@ -116,7 +113,6 @@ func NewConnectionOpenTryCmd() *cobra.Command {
}

connectionID := args[0]
provedID, _ := cmd.Flags().GetString(flagProvedID)
clientID := args[1]
counterpartyConnectionID := args[2]
counterpartyClientID := args[3]
Expand Down Expand Up @@ -179,7 +175,7 @@ func NewConnectionOpenTryCmd() *cobra.Command {
}

msg := types.NewMsgConnectionOpenTry(
connectionID, provedID, clientID, counterpartyConnectionID, counterpartyClientID,
connectionID, clientID, counterpartyConnectionID, counterpartyClientID,
counterpartyClient, counterpartyPrefix, counterpartyVersions,
proofInit, proofClient, proofConsensus, proofHeight,
consensusHeight, clientCtx.GetFromAddress(),
Expand All @@ -193,7 +189,6 @@ func NewConnectionOpenTryCmd() *cobra.Command {
},
}

cmd.Flags().String(flagProvedID, "", "identifier set by the counterparty chain")
flags.AddTxFlagsToCmd(cmd)

return cmd
Expand Down
1 change: 1 addition & 0 deletions x/ibc/core/03-connection/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, gs types.GenesisState) {
for _, connPaths := range gs.ClientConnectionPaths {
k.SetClientConnectionPaths(ctx, connPaths.ClientId, connPaths.Paths)
}
k.SetNextConnectionSequence(ctx, gs.NextConnectionSequence)
}

// ExportGenesis returns the ibc connection submodule's exported genesis.
Expand Down
14 changes: 7 additions & 7 deletions x/ibc/core/03-connection/keeper/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,18 @@ func (suite *KeeperTestSuite) TestQueryConnections() {
"success",
func() {
clientA, clientB, connA0, connB0 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)
connA1, connB1, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB)
clientA1, clientB1, connA1, connB1 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)
connA2, _, err := suite.coordinator.ConnOpenInit(suite.chainA, suite.chainB, clientA, clientB)
suite.Require().NoError(err)

clientA1, clientB1, connA2, connB2 := suite.coordinator.SetupClientConnections(suite.chainA, suite.chainB, exported.Tendermint)

counterparty1 := types.NewCounterparty(clientB, connB0.ID, suite.chainB.GetPrefix())
counterparty2 := types.NewCounterparty(clientB, connB1.ID, suite.chainB.GetPrefix())
counterparty3 := types.NewCounterparty(clientB1, connB2.ID, suite.chainB.GetPrefix())
counterparty2 := types.NewCounterparty(clientB1, connB1.ID, suite.chainB.GetPrefix())
// counterparty connection id is blank after open init
counterparty3 := types.NewCounterparty(clientB, "", suite.chainB.GetPrefix())

conn1 := types.NewConnectionEnd(types.OPEN, clientA, counterparty1, types.ExportedVersionsToProto(types.GetCompatibleVersions()))
conn2 := types.NewConnectionEnd(types.INIT, clientA, counterparty2, types.ExportedVersionsToProto(types.GetCompatibleVersions()))
conn3 := types.NewConnectionEnd(types.OPEN, clientA1, counterparty3, types.ExportedVersionsToProto(types.GetCompatibleVersions()))
conn2 := types.NewConnectionEnd(types.OPEN, clientA1, counterparty2, types.ExportedVersionsToProto(types.GetCompatibleVersions()))
conn3 := types.NewConnectionEnd(types.INIT, clientA, counterparty3, types.ExportedVersionsToProto(types.GetCompatibleVersions()))

iconn1 := types.NewIdentifiedConnection(connA0.ID, conn1)
iconn2 := types.NewIdentifiedConnection(connA1.ID, conn2)
Expand Down
Loading