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

Set empty_blocks_max_time to 3s and setup relayer without LinkPath() #86

Merged
merged 11 commits into from
Apr 15, 2024
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
cosmossdk.io/math v1.3.0
github.com/cosmos/cosmos-sdk v0.46.16
github.com/cosmos/ibc-go/v6 v6.2.1
github.com/decentrio/rollup-e2e-testing v0.0.0-20240401062200-380e8b9d21f4
github.com/decentrio/rollup-e2e-testing v0.0.0-20240412081042-4e7422935539
github.com/dymensionxyz/dymension-rdk v1.1.0-beta
github.com/dymensionxyz/dymension/v3 v3.1.0-rc01.0.20240404003005-53ccf8a922fd
github.com/evmos/ethermint v0.22.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240401062200-380e8b9d21f4 h1:VR2rKvHs7T8zql2cmZts6PEbdWEzeRVODtOwaNS0ZkM=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240401062200-380e8b9d21f4/go.mod h1:Hy/8P41OEKrlAatPG5NcD/BOWTa2s+laECwpZpmA9f0=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240412081042-4e7422935539 h1:gZlOCdIqYIPq6sl97RJGpwaQDv9Nijgo8p6ygZqP8L8=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240412081042-4e7422935539/go.mod h1:Hy/8P41OEKrlAatPG5NcD/BOWTa2s+laECwpZpmA9f0=
github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4=
github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo=
github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=
Expand Down
52 changes: 48 additions & 4 deletions tests/eibc_fulfillment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) {
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"

configFileOverrides["config/dymint.toml"] = dymintTomlOverrides
const BLOCK_FINALITY_PERIOD = 80
Expand Down Expand Up @@ -113,7 +114,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) {
r := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t),
relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "e2e-amd", "100:1000"),
).Build(t, client, "relayer", network)
const ibcPath = "ibc-path"

ic := test.NewSetup().
AddRollUp(dymension, rollapp1).
AddRelayer(r, "relayer").
Expand All @@ -131,13 +132,34 @@ func TestEIBCFulfillment_EVM(t *testing.T) {
TestName: t.Name(),
Client: client,
NetworkID: network,
SkipPathCreation: false,
SkipPathCreation: true,

// This can be used to write to the block database which will index all block data e.g. txs, msgs, events, etc.
// BlockDatabaseFile: test.DefaultBlockDatabaseFilepath(),
})
require.NoError(t, err)

err = r.GeneratePath(ctx, eRep, dymension.Config().ChainID, rollapp1.Config().ChainID, ibcPath)
require.NoError(t, err)

err = r.CreateClients(ctx, eRep, ibcPath, ibc.DefaultClientOpts())
require.NoError(t, err)

err = testutil.WaitForBlocks(ctx, 30, dymension)
require.NoError(t, err)

r.UpdateClients(ctx, eRep, ibcPath)
require.NoError(t, err)

err = r.CreateConnections(ctx, eRep, ibcPath)
require.NoError(t, err)

err = testutil.WaitForBlocks(ctx, 10, dymension)
require.NoError(t, err)

err = r.CreateChannel(ctx, eRep, ibcPath, ibc.DefaultChannelOpts())
require.NoError(t, err)

walletAmount := math.NewInt(1_000_000_000_000)

// Create some user accounts on both chains
Expand Down Expand Up @@ -290,6 +312,7 @@ func TestEIBCFulfillment_Wasm(t *testing.T) {
dymintTomlOverrides["node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name())
dymintTomlOverrides["rollapp_id"] = "rollappwasm_1234-1"
dymintTomlOverrides["gas_prices"] = "0adym"
dymintTomlOverrides["empty_blocks_max_time"] = "3s"

configFileOverrides["config/dymint.toml"] = dymintTomlOverrides
const BLOCK_FINALITY_PERIOD = 80
Expand Down Expand Up @@ -365,7 +388,7 @@ func TestEIBCFulfillment_Wasm(t *testing.T) {
r := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t),
relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "e2e-amd", "100:1000"),
).Build(t, client, "relayer", network)
const ibcPath = "ibc-path"

ic := test.NewSetup().
AddRollUp(dymension, rollapp1).
AddRelayer(r, "relayer").
Expand All @@ -383,13 +406,34 @@ func TestEIBCFulfillment_Wasm(t *testing.T) {
TestName: t.Name(),
Client: client,
NetworkID: network,
SkipPathCreation: false,
SkipPathCreation: true,

// This can be used to write to the block database which will index all block data e.g. txs, msgs, events, etc.
// BlockDatabaseFile: test.DefaultBlockDatabaseFilepath(),
})
require.NoError(t, err)

err = r.GeneratePath(ctx, eRep, dymension.Config().ChainID, rollapp1.Config().ChainID, ibcPath)
require.NoError(t, err)

err = r.CreateClients(ctx, eRep, ibcPath, ibc.DefaultClientOpts())
require.NoError(t, err)

err = testutil.WaitForBlocks(ctx, 30, dymension)
require.NoError(t, err)

r.UpdateClients(ctx, eRep, ibcPath)
require.NoError(t, err)

err = r.CreateConnections(ctx, eRep, ibcPath)
require.NoError(t, err)

err = testutil.WaitForBlocks(ctx, 10, dymension)
require.NoError(t, err)

err = r.CreateChannel(ctx, eRep, ibcPath, ibc.DefaultChannelOpts())
require.NoError(t, err)

walletAmount := math.NewInt(1_000_000_000_000)

// Create some user accounts on both chains
Expand Down
Loading
Loading