Skip to content

Commit

Permalink
Merge branch 'main' into feat/order_fulfillment_two_RAs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdv2429 authored May 3, 2024
2 parents 56216b1 + f52b9fa commit 23296f7
Show file tree
Hide file tree
Showing 21 changed files with 2,967 additions and 766 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/e2e-test-workflow-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,20 @@ jobs:
- "e2e-test-eibc-fulfill-no-balance-evm"
- "e2e-test-eibc-corrupted-memo-evm"
- "e2e-test-eibc-excessive-fee-evm"
- "e2e-test-eibc-fulfillment-thirdparty-evm"
- "e2e-test-eibc-timeout-evm"
- "e2e-test-transfer-multi-hop-evm"
- "e2e-test-pfm-with-grace-period-evm"
- "e2e-test-pfm-with-grace-period-rollapp1-to-rollapp2-erc20"
- "e2e-test-pfm-gaia-to-rollapp-evm"
- "e2e-test-batch-finalization-evm"
- "e2e-test-disconnection-evm"
- "e2e-test-rollapp-freeze-evm"
- "e2e-test-other-rollapp-not-affected-evm"
- "e2e-test-rollapp-genesis-event-evm"
- "e2e-test-delayedack-pending-packets-evm"
- "e2e-test-delayedack-relayer-down-evm"
fail-fast: false
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -76,13 +82,17 @@ jobs:
- "e2e-test-ibc-timeout-wasm"
- "e2e-test-ibc-grace-period-wasm"
- "e2e-test-eibc-fulfillment-wasm"
- "e2e-test-eibc-fulfillment-thirdparty-wasm"
- "e2e-test-eibc-pfm-wasm"
- "e2e-test-transfer-multi-hop-wasm"
- "e2e-test-pfm-with-grace-period-wasm"
- "e2e-test-pfm-gaia-to-rollapp-wasm"
- "e2e-test-batch-finalization-wasm"
- "e2e-test-disconnection-wasm"
- "e2e-test-rollapp-freeze-wasm"
- "e2e-test-other-rollapp-not-affected-wasm"
- "e2e-test-delayedack-pending-packets-wasm"
- "e2e-test-delayedack-relayer-down-wasm"
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,25 @@ jobs:
- "e2e-test-ibc-success-evm"
- "e2e-test-ibc-timeout-evm"
- "e2e-test-ibc-grace-period-evm"
- "e2e-test-eibc-fulfillment-evm"
- "e2e-test-eibc-fulfillment-evm-2-RAs"
- "e2e-test-eibc-pfm-evm"
- "e2e-test-eibc-fulfill-no-balance-evm"
- "e2e-test-eibc-corrupted-memo-evm"
- "e2e-test-eibc-excessive-fee-evm"
- "e2e-test-eibc-fulfillment-evm"
- "e2e-test-eibc-fulfill-no-balance-evm"
- "e2e-test-eibc-fulfillment-thirdparty-evm"
- "e2e-test-eibc-pfm-evm"
- "e2e-test-eibc-timeout-evm"
- "e2e-test-transfer-multi-hop-evm"
- "e2e-test-pfm-with-grace-period-evm"
- "e2e-test-pfm-with-grace-period-rollapp1-to-rollapp2-erc20"
- "e2e-test-pfm-gaia-to-rollapp-evm"
- "e2e-test-batch-finalization-evm"
- "e2e-test-disconnection-evm"
- "e2e-test-rollapp-freeze-evm"
- "e2e-test-other-rollapp-not-affected-evm"
- "e2e-test-rollapp-genesis-event-evm"
- "e2e-test-delayedack-pending-packets-evm"
- "e2e-test-delayedack-relayer-down-evm"
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand All @@ -64,13 +69,17 @@ jobs:
- "e2e-test-ibc-timeout-wasm"
- "e2e-test-ibc-grace-period-wasm"
- "e2e-test-eibc-fulfillment-wasm"
- "e2e-test-eibc-fulfillment-thirdparty-wasm"
- "e2e-test-eibc-pfm-wasm"
- "e2e-test-transfer-multi-hop-wasm"
- "e2e-test-pfm-with-grace-period-wasm"
- "e2e-test-pfm-gaia-to-rollapp-wasm"
- "e2e-test-batch-finalization-wasm"
- "e2e-test-disconnection-wasm"
- "e2e-test-rollapp-freeze-wasm"
- "e2e-test-other-rollapp-not-affected-wasm"
- "e2e-test-delayedack-pending-packets-wasm"
- "e2e-test-delayedack-relayer-down-wasm"
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand Down
79 changes: 62 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ e2e-test-other-rollapp-not-affected-evm: clean-e2e
e2e-test-rollapp-genesis-event-evm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestRollappGenesisEvent_EVM .

e2e-test-delayedack-pending-packets-evm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestDelayedAck_NoFinalizedStates_EVM .

e2e-test-eibc-fulfillment-thirdparty-evm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestEIBCFulfillment_ThirdParty_EVM .

e2e-test-delayedack-relayer-down-evm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestDelayedAck_RelayerDown_EVM .

# Executes IBC tests via rollup-e2e-testing
e2e-test-ibc-success-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestIBCTransferSuccess_Wasm .

Expand All @@ -79,8 +89,11 @@ e2e-test-transfer-multi-hop-wasm: clean-e2e

e2e-test-pfm-with-grace-period-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestIBCPFMWithGracePeriod_Wasm .

e2e-test-batch-finalization-wasm: clean-e2e

e2e-test-pfm-with-grace-period-rollapp1-to-rollapp2-erc20: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestIBCPFM_RollApp1ToRollApp2WithErc20 .

e2e-test-batch-finalization-wasm:
cd tests && go test -timeout=25m -race -v -run TestBatchFinalization_Wasm .

e2e-test-disconnection-wasm: clean-e2e
Expand All @@ -91,62 +104,94 @@ e2e-test-rollapp-freeze-wasm: clean-e2e

e2e-test-other-rollapp-not-affected-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestOtherRollappNotAffected_Wasm .

e2e-test-eibc-fulfillment-thirdparty-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestEIBCFulfillment_ThirdParty_Wasm .

e2e-test-pfm-gaia-to-rollapp-evm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestIBCTransferGaiaToRollApp_EVM .

e2e-test-pfm-gaia-to-rollapp-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestIBCTransferGaiaToRollApp_Wasm .

e2e-test-delayedack-pending-packets-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestDelayedAck_NoFinalizedStates_Wasm .

e2e-test-delayedack-relayer-down-wasm: clean-e2e
cd tests && go test -timeout=25m -race -v -run TestDelayedAck_RelayerDown_Wasm .


# Executes all tests via rollup-e2e-testing
e2e-test-all: e2e-test-ibc-success-evm \
e2e-test-ibc-timeout-evm \
e2e-test-ibc-grace-period-evm \
e2e-test-eibc-corrupted-memo-evm \
e2e-test-eibc-excessive-fee-evm \
e2e-test-eibc-fulfillment-evm \
e2e-test-eibc-fulfillment-evm-2-RAs \
e2e-test-eibc-fulfill-no-balance-evm \
e2e-test-eibc-fulfillment-thirdparty-evm \
e2e-test-eibc-pfm-evm \
e2e-test-eibc-timeout-evm \
e2e-test-transfer-multi-hop-evm \
e2e-test-pfm-with-grace-period-evm \
e2e-test-pfm-with-grace-period-rollapp1-to-rollapp2-erc20 \
e2e-test-pfm-gaia-to-rollapp-evm \
e2e-test-batch-finalization-evm \
e2e-test-disconnection-evm \
e2e-test-eibc-fulfillment-evm \
e2e-test-eibc-fulfillment-evm-2-RAs \
e2e-test-eibc-pfm-evm \
e2e-test-eibc-fulfill-no-balance-evm \
e2e-test-eibc-corrupted-memo-evm \
e2e-test-eibc-excessive-fee-evm \
e2e-test-eibc-timeout-evm \
e2e-test-rollapp-freeze-evm \
e2e-test-other-rollapp-not-affected-evm \
e2e-test-other-rollapp-not-affected-evm \
e2e-test-rollapp-genesis-event-evm \
e2e-test-ibc-success-wasm \
e2e-test-ibc-timeout-wasm \
e2e-test-ibc-grace-period-wasm \
e2e-test-transfer-multi-hop-wasm \
e2e-test-eibc-fulfillment-wasm \
e2e-test-eibc-fulfillment-thirdparty-wasm \
e2e-test-eibc-pfm-wasm \
e2e-test-transfer-multi-hop-wasm \
e2e-test-pfm-with-grace-period-wasm \
e2e-test-pfm-gaia-to-rollapp-wasm \
e2e-test-batch-finalization-wasm \
e2e-test-disconnection-wasm \
e2e-test-rollapp-freeze-wasm \
e2e-test-other-rollapp-not-affected-wasm
e2e-test-other-rollapp-not-affected-wasm \
e2e-test-delayedack-pending-packets-wasm \
e2e-test-delayedack-relayer-down-wasm

.PHONY: clean-e2e \
e2e-test-all \
e2e-test-ibc-success-evm \
e2e-test-ibc-timeout-evm \
e2e-test-ibc-grace-period-evm \
e2e-test-eibc-fulfillment-evm \
e2e-test-eibc-fulfillment-evm-2-RAs \
e2e-test-eibc-pfm-evm \
e2e-test-eibc-fulfill-no-balance-evm \
e2e-test-eibc-corrupted-memo-evm \
e2e-test-eibc-excessive-fee-evm \
e2e-test-eibc-fulfillment-evm \
e2e-test-eibc-fulfill-no-balance-evm \
e2e-test-eibc-fulfillment-thirdparty-evm \
e2e-test-eibc-pfm-evm \
e2e-test-eibc-timeout-evm \
e2e-test-transfer-multi-hop-evm \
e2e-test-pfm-with-grace-period-evm \
e2e-test-pfm-with-grace-period-rollapp1-to-rollapp2-erc20 \
e2e-test-pfm-gaia-to-rollapp-evm \
e2e-test-batch-finalization-evm \
e2e-test-disconnection-evm \
e2e-test-rollapp-freeze-evm \
e2e-test-other-rollapp-not-affected-evm \
e2e-test-other-rollapp-not-affected-evm \
e2e-test-rollapp-genesis-event-evm \
e2e-test-ibc-success-wasm \
e2e-test-ibc-timeout-wasm \
e2e-test-ibc-grace-period-wasm \
e2e-test-eibc-fulfillment-wasm \
e2e-test-eibc-fulfillment-thirdparty-wasm \
e2e-test-eibc-pfm-wasm \
e2e-test-transfer-multi-hop-wasm \
e2e-test-pfm-with-grace-period-wasm \
e2e-test-pfm-gaia-to-rollapp-wasm \
e2e-test-batch-finalization-wasm \
e2e-test-disconnection-wasm \
e2e-test-rollapp-freeze-wasm \
e2e-test-other-rollapp-not-affected-wasm
e2e-test-other-rollapp-not-affected-wasm \
e2e-test-delayedack-pending-packets-wasm

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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-20240419100059-4be856e59619
github.com/decentrio/rollup-e2e-testing v0.0.0-20240423082530-c894964c401d
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 @@ -328,8 +328,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240419100059-4be856e59619 h1:g+dXAUOIukmrMSiA6CgZTLbTjTbSIpIuWvYu6Nf7Ugo=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240419100059-4be856e59619/go.mod h1:kslnOTBoqMTES+SQ5H3hzR3aO11Sf4vaGbAxzKZCD/Y=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240423082530-c894964c401d h1:py4u2CvZAWg4uQ+m3ErDcqVoxgycZcKW1L2IPtNfVp4=
github.com/decentrio/rollup-e2e-testing v0.0.0-20240423082530-c894964c401d/go.mod h1:kslnOTBoqMTES+SQ5H3hzR3aO11Sf4vaGbAxzKZCD/Y=
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
2 changes: 1 addition & 1 deletion tests/disconnection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ func TestDisconnection_Wasm(t *testing.T) {
err = dymension.StartAllNodes(ctx)
require.NoError(t, err)

// Make sure rollapp start pro
// Make sure rollapp start produce blocks
err = testutil.WaitForBlocks(ctx, 1, rollapp1)
require.NoError(t, err)
})
Expand Down
23 changes: 2 additions & 21 deletions tests/eibc_corrupted_memo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestEIBCCorruptedMemoNegative(t *testing.T) {
// Relayer Factory
client, network := test.DockerSetup(t)
r := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t),
relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "e2e-amd", "100:1000"),
relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "2.5.2", "100:1000"),
).Build(t, client, "relayer", network)
const ibcPath = "ibc-path"
ic := test.NewSetup().
Expand All @@ -136,26 +136,7 @@ func TestEIBCCorruptedMemoNegative(t *testing.T) {
})
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)
CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

walletAmount := math.NewInt(1_000_000_000_000)

Expand Down
23 changes: 2 additions & 21 deletions tests/eibc_fee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func TestEIBCFeeTooHigh(t *testing.T) {
// Relayer Factory
client, network := test.DockerSetup(t)
r := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t),
relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "e2e-amd", "100:1000"),
relayer.CustomDockerImage("ghcr.io/decentrio/relayer", "2.5.2", "100:1000"),
).Build(t, client, "relayer1", network)
const ibcPath = "ibc-path"
ic := test.NewSetup().
Expand All @@ -136,26 +136,7 @@ func TestEIBCFeeTooHigh(t *testing.T) {
})
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)
CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath)

walletAmount := math.NewInt(1_000_000_000_000)

Expand Down
Loading

0 comments on commit 23296f7

Please sign in to comment.