diff --git a/.github/workflows/e2e-test-workflow-call.yml b/.github/workflows/e2e-test-workflow-call.yml index 0e0d5c2a..617c860e 100644 --- a/.github/workflows/e2e-test-workflow-call.yml +++ b/.github/workflows/e2e-test-workflow-call.yml @@ -143,4 +143,3 @@ jobs: ROLLAPP_WASM_CI: ${{ inputs.rollapp_wasm_ci }} RELAYER_CI: ${{ inputs.relayer_ci }} - diff --git a/tests/fullnode_sync_test.go b/tests/fullnode_sync_test.go index 13b9f022..5696c8da 100644 --- a/tests/fullnode_sync_test.go +++ b/tests/fullnode_sync_test.go @@ -13,6 +13,7 @@ import ( "github.com/decentrio/rollup-e2e-testing/cosmos/hub/dym_hub" "github.com/decentrio/rollup-e2e-testing/cosmos/rollapp/dym_rollapp" "github.com/decentrio/rollup-e2e-testing/ibc" + "github.com/decentrio/rollup-e2e-testing/relayer" "github.com/decentrio/rollup-e2e-testing/testreporter" "github.com/decentrio/rollup-e2e-testing/testutil" ) @@ -24,15 +25,15 @@ func TestFullnodeSync_EVM(t *testing.T) { ctx := context.Background() - configFileOverrides := make(map[string]any) - dymintTomlOverrides := make(testutil.Toml) - dymintTomlOverrides["settlement_layer"] = "dymension" - dymintTomlOverrides["node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) - dymintTomlOverrides["rollapp_id"] = "rollappevm_1234-1" - dymintTomlOverrides["gas_prices"] = "0adym" - dymintTomlOverrides["empty_blocks_max_time"] = "3s" + // setup config for rollapp 1 + settlement_layer_rollapp1 := "dymension" + settlement_node_address := fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) + rollapp1_id := "rollappevm_1234-1" + gas_price_rollapp1 := "0adym" + maxIdleTime1 := "3s" + maxProofTime := "500ms" + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -80,8 +81,19 @@ func TestFullnodeSync_EVM(t *testing.T) { // Relayer Factory client, network := test.DockerSetup(t) + r := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), + relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "2.5.2", "100:1000"), + ).Build(t, client, "relayer1", network) + ic := test.NewSetup(). - AddRollUp(dymension, rollapp1) + AddRollUp(dymension, rollapp1). + AddRelayer(r, "relayer1"). + AddLink(test.InterchainLink{ + Chain1: dymension, + Chain2: rollapp1, + Relayer: r, + Path: ibcPath, + }) rep := testreporter.NewNopReporter() eRep := rep.RelayerExecReporter(t) @@ -97,10 +109,17 @@ func TestFullnodeSync_EVM(t *testing.T) { }) require.NoError(t, err) + CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath) + + err = r.StartRelayer(ctx, eRep, ibcPath) + require.NoError(t, err) + // Wait for rollapp finalized rollapp1Height, err := rollapp1.Height(ctx) require.NoError(t, err) - dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollapp1Height, 300) + isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollapp1Height, 300) + require.True(t, isFinalized) + require.NoError(t, err) // Stop the full node err = rollapp1.FullNodes[0].StopContainer(ctx) diff --git a/tests/setup.go b/tests/setup.go index dc3f7e57..7eb03fdb 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -367,7 +367,6 @@ func defaultConfig() *simappparams.EncodingConfig { return &cfg } - func customEpochConfig(epochDuration string) ibc.ChainConfig { // Custom dymension epoch for faster disconnection modifyGenesisKV := dymensionGenesisKV