Skip to content

Commit

Permalink
switch back to CosmosRly
Browse files Browse the repository at this point in the history
  • Loading branch information
vladjdk committed Feb 26, 2025
1 parent 56a0431 commit c3c1968
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestTimeoutOnForward(t *testing.T) {
chainA, chainB, chainC, chainD := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain), chains[3].(*cosmos.CosmosChain)

r := interchaintest.NewBuiltinRelayerFactory(
ibc.Hermes,
ibc.CosmosRly,
zaptest.NewLogger(t),
relayer.DockerImage(&DefaultRelayer),
).Build(t, client, network)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestNonRefundable(t *testing.T) {
chainA, chainB, chainC := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain)

r := interchaintest.NewBuiltinRelayerFactory(
ibc.Hermes,
ibc.CosmosRly,
zaptest.NewLogger(t),
relayer.DockerImage(&DefaultRelayer),
).Build(t, client, network)
Expand Down
24 changes: 15 additions & 9 deletions middleware/packet-forward-middleware/e2e/packet_forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestPacketForwardMiddleware(t *testing.T) {
chainA, chainB, chainC, chainD := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain), chains[3].(*cosmos.CosmosChain)

r := interchaintest.NewBuiltinRelayerFactory(
ibc.Hermes,
ibc.CosmosRly,
zaptest.NewLogger(t),
relayer.DockerImage(&DefaultRelayer),
).Build(t, client, network)
Expand Down Expand Up @@ -416,19 +416,25 @@ func TestPacketForwardMiddleware(t *testing.T) {
require.NoError(t, err)

transferTx, err := chainA.SendIBCTransfer(ctx, abChan.ChannelID, userA.KeyName(), transfer, ibc.TransferOptions{
Timeout: &ibc.IBCTimeout{
NanoSeconds: uint64(time.Now().Add(1 * time.Minute).Unix()),
Height: 0,
},
//Timeout: &ibc.IBCTimeout{
// NanoSeconds: uint64(time.Now().Add(1 * time.Minute).Unix()),
// Height: 0,
//},
Memo: string(memo),
})
require.NoError(t, err)

// Wait for the packet to relayed back to A
err = testutil.WaitForCondition(time.Minute*5, time.Second*5, func() (bool, error) {
return PacketAcknowledged(ctx, chainA, abChan.PortID, abChan.ChannelID, transferTx.Packet.Sequence), nil
chainAHeight, err := chainA.Height(ctx)
require.NoError(t, err)

})
_, err = testutil.PollForAck(ctx, chainA, chainAHeight, chainAHeight+25, transferTx.Packet)
require.NoError(t, err)

// Wait for the packet to relayed back to A
//err = testutil.WaitForCondition(time.Minute*5, time.Second*5, func() (bool, error) {
// return PacketAcknowledged(ctx, chainA, abChan.PortID, abChan.ChannelID, transferTx.Packet.Sequence), nil
//
//})
require.NoError(t, err)
err = testutil.WaitForBlocks(ctx, waitBlocks, chainA)
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions middleware/packet-forward-middleware/e2e/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
PFMImage = ibc.DockerImage{
Repository: pfmRepo,
Version: pfmVersion,
UidGid: "1025:1025",
UIDGID: "1025:1025",
}

Denom = "utoken"
Expand Down Expand Up @@ -53,9 +53,9 @@ var (
}

DefaultRelayer = ibc.DockerImage{
Repository: "ghcr.io/informalsystems/hermes",
Version: "1.12.0",
UidGid: "2000:2000",
Repository: "ghcr.io/cosmos/relayer",
Version: "main",
UIDGID: "1025:1025",
}
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestStorageLeak(t *testing.T) {
chainA, chainB, chainC := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain)

r := interchaintest.NewBuiltinRelayerFactory(
ibc.Hermes,
ibc.CosmosRly,
zaptest.NewLogger(t),
relayer.DockerImage(&DefaultRelayer),
).Build(t, client, network)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestUnnecessaryLoop(t *testing.T) {
chainA, chainB := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain)

r := interchaintest.NewBuiltinRelayerFactory(
ibc.Hermes,
ibc.CosmosRly,
zaptest.NewLogger(t),
relayer.DockerImage(&DefaultRelayer),
).Build(t, client, network)
Expand Down
10 changes: 5 additions & 5 deletions middleware/packet-forward-middleware/e2e/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var (
baseChain = ibc.DockerImage{
Repository: "pfm",
Version: "v8.1.0",
UidGid: "1025:1025",
UIDGID: "1025:1025",
}

// make local-image
Expand Down Expand Up @@ -116,7 +116,7 @@ func CosmosChainUpgradeTest(t *testing.T, chainName, upgradeRepo, upgradeDockerT
chainA, chainB, chainC, chainD := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain), chains[3].(*cosmos.CosmosChain)

r := interchaintest.NewBuiltinRelayerFactory(
ibc.Hermes,
ibc.CosmosRly,
zaptest.NewLogger(t),
relayer.DockerImage(&DefaultRelayer),
).Build(t, client, network)
Expand Down Expand Up @@ -447,12 +447,12 @@ func UpgradeNodes(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain,
}

func ValidatorVoting(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, proposalID string, height int64, haltHeight int64) {
err := chain.VoteOnProposalAllValidators(ctx, proposalID, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

proposalInt, err := strconv.ParseUint(proposalID, 10, 64)
require.NoError(t, err, "failed to parse proposalID")

err = chain.VoteOnProposalAllValidators(ctx, proposalInt, cosmos.ProposalVoteYes)
require.NoError(t, err, "failed to submit votes")

_, err = cosmos.PollForProposalStatusV1(ctx, chain, height, height+haltHeightDelta, proposalInt, govv1.ProposalStatus_PROPOSAL_STATUS_PASSED)
require.NoError(t, err, "proposal status did not change to passed in expected number of blocks")

Expand Down

0 comments on commit c3c1968

Please sign in to comment.