Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
fixed relayer config for e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle committed Oct 16, 2023
1 parent 070b79a commit f594160
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 20 deletions.
20 changes: 4 additions & 16 deletions interchaintest/tests/cosmos_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (

"github.com/strangelove-ventures/hyperlane-cosmos/interchaintest/counterchain"
"github.com/strangelove-ventures/hyperlane-cosmos/interchaintest/helpers"
"github.com/strangelove-ventures/hyperlane-cosmos/x/mailbox/types"

"github.com/strangelove-ventures/hyperlane-cosmos/interchaintest/docker"

Expand Down Expand Up @@ -224,7 +223,7 @@ func TestHyperlaneCosmosE2E(t *testing.T) {

// Our images are currently local. You must build locally in monorepo, e.g. "cd rust && docker build .".
// Also make sure that the tags in hyperlane.yaml match the local docker image repo and version.
hyperlaneNetwork := hyperlane.NewHyperlaneNetwork(false, true)
hyperlaneNetwork := hyperlane.NewHyperlaneNetwork(true, true)
err = hyperlaneNetwork.Build(ctx, logger, eRep, opts, *valSimd1, *valSimd2, *rly)
require.NoError(t, err)

Expand All @@ -243,9 +242,6 @@ func TestHyperlaneCosmosE2E(t *testing.T) {
},
}

// The height where the hyperlane message is processed will be after this height
simd2CurrentHeight, err := simd2.Height(ctx)

// Dispatch the hyperlane message to simd1
dipatchMsg, err := json.Marshal(dispatchMsgStruct)
require.NoError(t, err)
Expand Down Expand Up @@ -287,19 +283,11 @@ func TestHyperlaneCosmosE2E(t *testing.T) {
require.NoError(t, err)
message, _ := simd1IsmValidator.CreateMessage(dispatchSender, uint32(simdDomain), uint32(simd2Domain), bech32Recipient, string(b))
messageId := simd1IsmValidator.GetMessageId(message)
require.Equal(t, dispatchedMsgId, messageId)
require.Equal(t, dispatchedMsgId, hexutil.Encode(messageId))

checked := map[uint64]struct{}{}
err = Await(func() (bool, error) {
// find the next block height that we haven't searched yet
newHeight := simd2CurrentHeight
for _, ok := checked[newHeight]; ok; {
newHeight = newHeight + 1
}
checked[newHeight] = struct{}{}
// check if the given block has a TX with our Processed message
return helpers.HasEvent(ctx, simd2, types.EventTypeProcessId, types.AttributeKeyID, string(messageId), newHeight)
}, 1*time.Minute, 5*time.Second)
return helpers.QueryMsgDelivered(t, ctx, simd2, dispatchedMsgId), nil
}, 10*time.Minute, 5*time.Second)
require.NoError(t, err)
}

Expand Down
3 changes: 2 additions & 1 deletion interchaintest/tests/hyperlane-rly.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CONFIG_FILES=/config/rly.json
HYP_BASE_RELAYCHAINS="${chainNamesCsv}"
HYP_BASE_RELAYCHAINS=${chainNamesCsv}
HYP_BASE_REORGPERIOD=1
HYP_BASE_DEFAULTSIGNER_KEY=8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61
HYP_BASE_DEFAULTSIGNER_TYPE=hexKey
HYP_BASE_ALLOWLOCALCHECKPOINTSYNCERS=true
RUST_BACKTRACE=full
5 changes: 2 additions & 3 deletions interchaintest/tests/hyperlane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ hyperlane-relayer:
name: hyperlane-simd1-simd2 # hyperlane relayers can relay on multiple chains
type: relayer
bin: ./relayer # For heighliner built images, this should be /bin/validator
env-path: hyperlane-relayer-args.txt # path to the docker args file
env-path: hyperlane-rly.txt # path to the docker args file
cmd-flags:
- --db ${rly_dir}/db.txt
- --allowLocalCheckpointSyncers
bind-mounts: ${rly_dir}/db.txt:${rly_dir}/db.txt,${rly_dir}/rly.json:/config/rly.json ##${val-sig-binds}
bind-mounts: ${rly_dir}/db.txt:${rly_dir}/db.txt,${rly_dir}/rly.json:/config/rly.json,${val-sig-binds}
images:
- repository: hyperlane-monorepo
uid-gid: 1025:1025
Expand Down

0 comments on commit f594160

Please sign in to comment.