From 9606390ff21bbb17234c3bac9491832edf008796 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Thu, 12 Sep 2024 15:33:33 +0700 Subject: [PATCH 01/22] update dependen --- go.mod | 15 +++++--- go.sum | 16 +++++---- tests/eibc_invariant_test.go | 66 ++++-------------------------------- tests/setup.go | 4 +-- 4 files changed, 30 insertions(+), 71 deletions(-) diff --git a/go.mod b/go.mod index 7d6fd8ab..b1fb1b35 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ replace ( require ( github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628 - github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240717194206-54c0fca5fada + github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240911123104-4782bc4e587f github.com/dymensionxyz/dymint v1.2.0-rc01 ) @@ -30,7 +30,7 @@ require ( cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d // indirect github.com/99designs/keyring v1.2.2 // indirect github.com/BurntSushi/toml v1.3.2 // indirect - github.com/DataDog/zstd v1.5.2 // indirect + github.com/DataDog/zstd v1.5.5 // indirect github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect github.com/avast/retry-go/v4 v4.5.0 // indirect github.com/cockroachdb/pebble v1.1.0 // indirect @@ -72,8 +72,8 @@ require ( cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.38.0 // indirect - cosmossdk.io/api v0.3.1 // indirect - cosmossdk.io/core v0.6.1 // indirect + cosmossdk.io/api v0.7.0 // indirect + cosmossdk.io/core v0.10.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.3.1 // indirect @@ -125,6 +125,7 @@ require ( github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240421130646-b8980ec7aade // indirect github.com/dymensionxyz/gerr-cosmos v1.0.0 // indirect + github.com/dymensionxyz/sdk-utils v0.2.8 // indirect github.com/ethereum/go-ethereum v1.12.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -256,8 +257,14 @@ require ( ) replace ( + // for collections + cosmossdk.io/api => cosmossdk.io/api v0.3.1 + github.com/cosmos/gogoproto => github.com/cosmos/gogoproto v1.4.10 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 + + github.com/osmosis-labs/osmosis/osmomath => github.com/dymensionxyz/osmosis/osmomath v0.0.6-dymension-v0.1.0.20240820121212-c0e21fa21e43 + github.com/osmosis-labs/osmosis/v15 => github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20240820121212-c0e21fa21e43 github.com/tendermint/tendermint => github.com/cometbft/cometbft v0.34.28 // stick with compatible version or x/exp in v0.47.x line diff --git a/go.sum b/go.sum index 246d255a..7583d656 100644 --- a/go.sum +++ b/go.sum @@ -521,8 +521,8 @@ code.cloudfoundry.org/go-diodes v0.0.0-20220725190411-383eb6634c40 h1:wzkYwwcf4u code.cloudfoundry.org/go-diodes v0.0.0-20220725190411-383eb6634c40/go.mod h1:Nx9ASXN4nIlRDEXv+qXE3dpuhnTnO28Lxl/bMUd6BMc= cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.6.1 h1:OBy7TI2W+/gyn2z40vVvruK3di+cAluinA6cybFbE7s= -cosmossdk.io/core v0.6.1/go.mod h1:g3MMBCBXtxbDWBURDVnJE7XML4BG5qENhs0gzkcpuFA= +cosmossdk.io/core v0.10.0 h1:NP28Ol9YyRODmZLJg2ko/mUl40hMegeMzhJnG+XPkcY= +cosmossdk.io/core v0.10.0/go.mod h1:MygXNld9DvMgYY4yE76DM/mdZpgfeyRjy6FPjEEehlY= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -551,8 +551,8 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/ChainSafe/go-schnorrkel v1.0.0 h1:3aDA67lAykLaG1y3AOjs88dMxC88PgUuHRrLeDnvGIM= github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z7vcchBSbMBEhCw4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= -github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -818,14 +818,18 @@ github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240421130646-b8980ec7aade h1:LHbwDuI4hPNGSA+gWQz4ev0xt8p+ztPLEcZWR7e5YzA= github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240421130646-b8980ec7aade/go.mod h1:UxhLdtWOWg7l6+5Hpkm39Khd23wcr5H62YxM04rMbh8= -github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240717194206-54c0fca5fada h1:icRxU53BU7JtUspdTwo3Gwl0U/q8DsQwmXx4sUGowFc= -github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240717194206-54c0fca5fada/go.mod h1:a/kNkXs3uPwYrn+P139a9zh+8r1rVpPFuPi7gn08Gck= +github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240911123104-4782bc4e587f h1:uYJurcggZdL+2si81VsmW4nzGwmhumFZ+Rml+peiPOs= +github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240911123104-4782bc4e587f/go.mod h1:olFkQFRpTe6LHqZlTBN+gGaKkUYcF3q0GValXRJ0xSc= github.com/dymensionxyz/dymint v1.2.0-rc01 h1:zFHUXmy/07Bs7/qSRzGnGdRipgCm4GGAsoxF1+OCwS8= github.com/dymensionxyz/dymint v1.2.0-rc01/go.mod h1:8ECqxpdco6NOSBTJCcbcUeBGTQClc+JQnHmyc5+3vKU= github.com/dymensionxyz/ethermint v0.22.0-dymension-v0.4.1.0.20240625101522-b1506ae83050 h1:1mtlo6bDOdBihHWbDpOaai0NMC/4xHCkCHGCqdLT8WM= github.com/dymensionxyz/ethermint v0.22.0-dymension-v0.4.1.0.20240625101522-b1506ae83050/go.mod h1:aokD0im7cUMMtR/khzNsmcGtINtxCpBfcgRvJdmLymA= github.com/dymensionxyz/gerr-cosmos v1.0.0 h1:oi91rgOkpJWr41oX9JOyjvvBnhGY54tj513x8VlDAEc= github.com/dymensionxyz/gerr-cosmos v1.0.0/go.mod h1:n+0olxPogzWqFKba45mCpvrHLGmeS8W9UZjggHnWk6c= +github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20240820121212-c0e21fa21e43 h1:ugbpHwwlckB4W/aNXUTEsxaakPFgXi+LAsCtvfJ200Q= +github.com/dymensionxyz/osmosis/v15 v15.2.1-0.20240820121212-c0e21fa21e43/go.mod h1:2rsnXAdjYfXtyEw0mNwAdOiAccALYjAPvINGUf9Qg7Y= +github.com/dymensionxyz/sdk-utils v0.2.8 h1:ZX5NSLd0DyGVUqucHnyI14zkeYaD7hVn7v44MQOYFUU= +github.com/dymensionxyz/sdk-utils v0.2.8/go.mod h1:it9owYOpnIe17+ftTATQNDN4z+mBQx20/2Jm8SK15Rk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index 7eb16a99..c25cba90 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -36,13 +36,6 @@ func TestEIBCInvariant_EVM(t *testing.T) { maxProofTime := "500ms" configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - // setup config for rollapp 2 - settlement_layer_rollapp2 := "dymension" - rollapp2_id := "decentrio_12345-1" - gas_price_rollapp2 := "0adym" - maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( dymensionGenesisKV, @@ -84,28 +77,6 @@ func TestEIBCInvariant_EVM(t *testing.T) { NumValidators: &numRollAppVals, NumFullNodes: &numRollAppFn, }, - { - Name: "rollapp2", - ChainConfig: ibc.ChainConfig{ - Type: "rollapp-dym", - Name: "rollapp-temp2", - ChainID: "decentrio_12345-1", - Images: []ibc.DockerImage{rollappEVMImage}, - Bin: "rollappd", - Bech32Prefix: "ethm", - Denom: "urax", - CoinType: "60", - GasPrices: "0.0urax", - GasAdjustment: 1.1, - TrustingPeriod: "112h", - EncodingConfig: encodingConfig(), - NoHostMount: false, - ModifyGenesis: modifyRollappEVMGenesis(rollappEVMGenesisKV), - ConfigFileOverrides: configFileOverrides2, - }, - NumValidators: &numRollAppVals, - NumFullNodes: &numRollAppFn, - }, { Name: "dymension-hub", ChainConfig: ibc.ChainConfig{ @@ -135,8 +106,7 @@ func TestEIBCInvariant_EVM(t *testing.T) { require.NoError(t, err) rollapp1 := chains[0].(*dym_rollapp.DymRollApp) - rollapp2 := chains[1].(*dym_rollapp.DymRollApp) - dymension := chains[2].(*dym_hub.DymHub) + dymension := chains[1].(*dym_hub.DymHub) // Relayer Factory client, network := test.DockerSetup(t) @@ -144,26 +114,15 @@ func TestEIBCInvariant_EVM(t *testing.T) { r1 := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), relayer.CustomDockerImage(RelayerMainRepo, relayerVersion, "100:1000"), relayer.ImagePull(pullRelayerImage), ).Build(t, client, "relayer1", network) - // relayer for rollapp 2 - r2 := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), - relayer.CustomDockerImage(RelayerMainRepo, relayerVersion, "100:1000"), relayer.ImagePull(pullRelayerImage), - ).Build(t, client, "relayer2", network) ic := test.NewSetup(). - AddRollUp(dymension, rollapp1, rollapp2). + AddRollUp(dymension, rollapp1). AddRelayer(r1, "relayer1"). - AddRelayer(r2, "relayer2"). AddLink(test.InterchainLink{ Chain1: dymension, Chain2: rollapp1, Relayer: r1, Path: ibcPath, - }). - AddLink(test.InterchainLink{ - Chain1: dymension, - Chain2: rollapp2, - Relayer: r2, - Path: anotherIbcPath, }) rep := testreporter.NewNopReporter() @@ -181,28 +140,25 @@ func TestEIBCInvariant_EVM(t *testing.T) { require.NoError(t, err) CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath) - CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, anotherIbcPath) // Create some user accounts on both chains - users := test.GetAndFundTestUsers(t, ctx, t.Name(), walletAmount, dymension, dymension, rollapp1, rollapp2) + users := test.GetAndFundTestUsers(t, ctx, t.Name(), walletAmount, dymension, dymension, rollapp1) // Wait a few blocks for relayer to start and for user accounts to be created err = testutil.WaitForBlocks(ctx, 5, dymension, rollapp1) require.NoError(t, err) // Get our Bech32 encoded user addresses - dymensionUser, marketMaker, rollappUser, rollapp2User := users[0], users[1], users[2], users[3] + dymensionUser, marketMaker, rollappUser := users[0], users[1], users[2] dymensionUserAddr := dymensionUser.FormattedAddress() marketMakerAddr := marketMaker.FormattedAddress() rollappUserAddr := rollappUser.FormattedAddress() - rollapp2UserAddr := rollapp2User.FormattedAddress() // Assert the accounts were funded testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, dymension.Config().Denom, walletAmount) testutil.AssertBalance(t, ctx, dymension, marketMakerAddr, dymension.Config().Denom, walletAmount) testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount) - testutil.AssertBalance(t, ctx, rollapp2, rollapp2UserAddr, rollapp2.Config().Denom, walletAmount) multiplier := math.NewInt(10) @@ -212,25 +168,15 @@ func TestEIBCInvariant_EVM(t *testing.T) { dymChannels, err := r1.GetChannels(ctx, eRep, dymension.Config().ChainID) require.NoError(t, err) - dymRA2Channels, err := r2.GetChannels(ctx, eRep, dymension.Config().ChainID) - require.NoError(t, err) - channsRollApp1, err := r1.GetChannels(ctx, eRep, rollapp1.GetChainID()) require.NoError(t, err) - channsRollApp2, err := r2.GetChannels(ctx, eRep, rollapp2.GetChainID()) - require.NoError(t, err) - require.Len(t, channsRollApp1, 1) - require.Len(t, channsRollApp2, 1) - require.Len(t, dymChannels, 2) - require.Len(t, dymRA2Channels, 2) + require.Len(t, dymChannels, 1) // Start relayer err = r1.StartRelayer(ctx, eRep, ibcPath) require.NoError(t, err) - err = r2.StartRelayer(ctx, eRep, anotherIbcPath) - require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 5, dymension, rollapp1) require.NoError(t, err) @@ -264,6 +210,8 @@ func TestEIBCInvariant_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 5, dymension) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := transferData.Amount.Sub(transferData.Amount.Quo(math.NewInt(1000))) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) diff --git a/tests/setup.go b/tests/setup.go index 4558e124..391819b5 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -689,13 +689,13 @@ func CreateChannel(ctx context.Context, t *testing.T, r ibc.Relayer, eRep *testr err = r.CreateClients(ctx, eRep, ibcPath, ibc.DefaultClientOpts()) require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 20, chainA, chainB) + err = testutil.WaitForBlocks(ctx, 5, chainA, chainB) require.NoError(t, err) err = r.CreateConnections(ctx, eRep, ibcPath) require.NoError(t, err) - err = testutil.WaitForBlocks(ctx, 10, chainA, chainB) + err = testutil.WaitForBlocks(ctx, 5, chainA, chainB) require.NoError(t, err) err = r.CreateChannel(ctx, eRep, ibcPath, ibc.DefaultChannelOpts()) From e2d93ba3baffd24ca6042c85e24bc30eb71b5a2d Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Thu, 12 Sep 2024 19:13:37 +0700 Subject: [PATCH 02/22] dispute_period --- tests/eibc_invariant_test.go | 9 ++++++--- tests/setup.go | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index c25cba90..25145333 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -210,7 +210,8 @@ func TestEIBCInvariant_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 5, dymension) + err = testutil.WaitForBlocks(ctx, 10, dymension) + require.NoError(t, err) // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := transferData.Amount.Sub(transferData.Amount.Quo(math.NewInt(1000))) @@ -248,19 +249,21 @@ func TestEIBCInvariant_EVM(t *testing.T) { require.NoError(t, err) // fulfill 2 demand order - _, err = dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) + tx, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) // if eibcEvent != nil { // fmt.Println("After order fulfillment:", eibcEvent) // } + fmt.Println(tx) - _, err = dymension.FullfillDemandOrder(ctx, eibcEvents[2].OrderId, marketMakerAddr, eibcFee) + tx, err = dymension.FullfillDemandOrder(ctx, eibcEvents[2].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) // eibcEvent = getEibcEventFromTx(t, dymension, txhash) // if eibcEvent != nil { // fmt.Println("After order fulfillment:", eibcEvent) // } + fmt.Println(tx) for i, e := range eibcEvents { fmt.Println("Event", i, ":", e) diff --git a/tests/setup.go b/tests/setup.go index 391819b5..b878fb4e 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -86,7 +86,7 @@ type ForwardMetadata struct { const ( ibcPath = "dymension-demo" anotherIbcPath = "dymension-demo2" - BLOCK_FINALITY_PERIOD = 30 + BLOCK_FINALITY_PERIOD = 60 EventDemandOrderCreated = "dymensionxyz.dymension.eibc.EventDemandOrderCreated" EventDemandOrderFulfilled = "dymensionxyz.dymension.eibc.EventDemandOrderFulfilled" EventDemandOrderFeeUpdated = "dymensionxyz.dymension.eibc.EventDemandOrderFeeUpdated" From d9fbc1c2239cbd97230b5610191037e308055d09 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Fri, 13 Sep 2024 10:40:34 +0700 Subject: [PATCH 03/22] fix tests --- Makefile | 2 +- go.mod | 2 +- go.sum | 4 +- tests/admc_test.go | 3 ++ tests/automated_denommetadata_test.go | 54 +-------------------------- tests/bridging_fee_test.go | 3 ++ tests/eibc_fee_market_test.go | 3 ++ tests/eibc_fulfillment_test.go | 9 +++++ tests/eibc_timeout_test.go | 19 ---------- tests/setup.go | 14 +++---- 10 files changed, 30 insertions(+), 83 deletions(-) diff --git a/Makefile b/Makefile index bef9b80c..7956ac36 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ e2e-test-eibc-timeout-evm: clean-e2e cd tests && go test -timeout=45m -race -v -run TestEIBCTimeoutDymToRollapp_EVM . e2e-test-eibc-timeout_and_fulfill-evm: clean-e2e - cd tests && go test -timeout=45m -race -v -run TestEIBCTimeoutFulFillDymToRollapp_Evm . + cd tests && go test -timeout=45m -race -v -run TestEIBCTimeoutFulFillDymToRollapp_EVM . e2e-test-transfer-multi-hop-evm: clean-e2e cd tests && go test -timeout=45m -race -v -run TestIBCTransferMultiHop_EVM . diff --git a/go.mod b/go.mod index b1fb1b35..d73451a6 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ replace ( require ( github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 - github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628 + github.com/decentrio/rollup-e2e-testing v0.0.0-20240913033921-1be71f15ccb1 github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240911123104-4782bc4e587f github.com/dymensionxyz/dymint v1.2.0-rc01 ) diff --git a/go.sum b/go.sum index 7583d656..e432f86b 100644 --- a/go.sum +++ b/go.sum @@ -770,8 +770,8 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 h1:qWpUYGOsrSC+1Vmd2TjhbsSpntvvx9PsX3AoeMunFxc= github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869/go.mod h1:HZNYnPwmSxkwTPjSD5yolauc1Vx1ZzKL4FFMxTq4H5Y= -github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628 h1:BaQci/ieiQ7+N0sRouA+CznSzPDbOx+ae/LsgcCQgSs= -github.com/decentrio/rollup-e2e-testing v0.0.0-20240911110829-da071a3f1628/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c= +github.com/decentrio/rollup-e2e-testing v0.0.0-20240913033921-1be71f15ccb1 h1:dtlJSp+W8KzZpbO+xqGLz9OjgCV+AKf8MvIm/TtrTHs= +github.com/decentrio/rollup-e2e-testing v0.0.0-20240913033921-1be71f15ccb1/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c= 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/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= diff --git a/tests/admc_test.go b/tests/admc_test.go index 7d96f3e4..ab194e5e 100644 --- a/tests/admc_test.go +++ b/tests/admc_test.go @@ -325,6 +325,9 @@ func TestADMC_Migrate_Empty_User_Memo_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) diff --git a/tests/automated_denommetadata_test.go b/tests/automated_denommetadata_test.go index 8266c1a8..2235680b 100644 --- a/tests/automated_denommetadata_test.go +++ b/tests/automated_denommetadata_test.go @@ -354,13 +354,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { maxProofTime := "500ms" configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - // setup config for rollapp 2 - settlement_layer_rollapp2 := "dymension" - rollapp2_id := "decentrio_12345-1" - gas_price_rollapp2 := "0adym" - maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -391,28 +384,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { NumValidators: &numRollAppVals, NumFullNodes: &numRollAppFn, }, - { - Name: "rollapp2", - ChainConfig: ibc.ChainConfig{ - Type: "rollapp-dym", - Name: "rollapp-temp2", - ChainID: "decentrio_12345-1", - Images: []ibc.DockerImage{rollappEVMImage}, - Bin: "rollappd", - Bech32Prefix: "ethm", - Denom: "urax", - CoinType: "60", - GasPrices: "0.0urax", - GasAdjustment: 1.1, - TrustingPeriod: "112h", - EncodingConfig: encodingConfig(), - NoHostMount: false, - ModifyGenesis: modifyRollappEVMGenesis(rollappEVMGenesisKV), - ConfigFileOverrides: configFileOverrides2, - }, - NumValidators: &numRollAppVals, - NumFullNodes: &numRollAppFn, - }, { Name: "dymension-hub", ChainConfig: dymensionConfig, @@ -443,10 +414,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { r1 := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), relayer.CustomDockerImage(RelayerMainRepo, relayerVersion, "100:1000"), relayer.ImagePull(pullRelayerImage), ).Build(t, client, "relayer1", network) - // relayer for rollapp 2 - r2 := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), - relayer.CustomDockerImage(RelayerMainRepo, relayerVersion, "100:1000"), relayer.ImagePull(pullRelayerImage), - ).Build(t, client, "relayer2", network) r3 := test.NewBuiltinRelayerFactory( ibc.CosmosRly, @@ -458,7 +425,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { AddRollUp(dymension, rollapp1, rollapp2). AddChain(gaia). AddRelayer(r1, "relayer1"). - AddRelayer(r2, "relayer2"). AddRelayer(r3, "relayer3"). AddLink(test.InterchainLink{ Chain1: dymension, @@ -466,12 +432,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { Relayer: r1, Path: ibcPath, }). - AddLink(test.InterchainLink{ - Chain1: dymension, - Chain2: rollapp2, - Relayer: r2, - Path: ibcPath, - }). AddLink(test.InterchainLink{ Chain1: dymension, Chain2: gaia, @@ -494,7 +454,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { require.NoError(t, err) CreateChannel(ctx, t, r1, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath) - CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, ibcPath) CreateChannel(ctx, t, r3, eRep, dymension.CosmosChain, gaia, ibcPath) // Create some user accounts on both chains @@ -522,14 +481,10 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { require.NoError(t, err) require.Len(t, channsRollApp1, 1) - channsRollApp2, err := r2.GetChannels(ctx, eRep, rollapp2.GetChainID()) - require.NoError(t, err) - require.Len(t, channsRollApp2, 1) - gaiaChannels, err := r3.GetChannels(ctx, eRep, gaia.GetChainID()) require.NoError(t, err) - require.Len(t, dymChannels, 3) + require.Len(t, dymChannels, 2) require.Len(t, gaiaChannels, 1) channDymGaia := gaiaChannels[0].Counterparty @@ -541,8 +496,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { // Start relayer err = r1.StartRelayer(ctx, eRep, ibcPath) require.NoError(t, err) - err = r2.StartRelayer(ctx, eRep, ibcPath) - require.NoError(t, err) err = r3.StartRelayer(ctx, eRep, ibcPath) require.NoError(t, err) @@ -624,11 +577,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { t.Logf("an error occurred while stopping the relayer: %s", err) } - err = r2.StopRelayer(ctx, eRep) - if err != nil { - t.Logf("an error occurred while stopping the relayer: %s", err) - } - err = r3.StopRelayer(ctx, eRep) if err != nil { t.Logf("an error occurred while stopping the relayer: %s", err) diff --git a/tests/bridging_fee_test.go b/tests/bridging_fee_test.go index e42d045a..f8b300e0 100644 --- a/tests/bridging_fee_test.go +++ b/tests/bridging_fee_test.go @@ -410,5 +410,8 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Sub(bridgingFee).Add(transferAmount)) } diff --git a/tests/eibc_fee_market_test.go b/tests/eibc_fee_market_test.go index 65fa860a..05090c08 100644 --- a/tests/eibc_fee_market_test.go +++ b/tests/eibc_fee_market_test.go @@ -853,6 +853,9 @@ func TestEIBCUnallowedSigner_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := (bigTransferAmount.Sub(bigBridgingFee)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 46344491..7d51fa36 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1005,6 +1005,9 @@ func TestEIBCFulfillment_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1633,6 +1636,9 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel_ra1[0].Counterparty.PortID, dymChannel_ra1[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -2797,6 +2803,9 @@ func TestEIBCFulfillment_ignore_hub_to_RA_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferDataRollapp1 := ibc.WalletData{ Address: rollappUserAddr, Denom: dymension.Config().Denom, diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 5eb34945..5ccf789e 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -409,10 +409,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { r := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), relayer.CustomDockerImage(RelayerMainRepo, relayerVersion, "100:1000"), relayer.ImagePull(pullRelayerImage), ).Build(t, client, "relayer", network) - // relayer for rollapp 2 - r2 := test.NewBuiltinRelayerFactory(ibc.CosmosRly, zaptest.NewLogger(t), - relayer.CustomDockerImage(RelayerMainRepo, relayerVersion, "100:1000"), relayer.ImagePull(pullRelayerImage), - ).Build(t, client, "relayer2", network) // relayer for rollapp gaia r3 := test.NewBuiltinRelayerFactory( ibc.CosmosRly, @@ -425,7 +421,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { AddRollUp(dymension, rollapp1, rollapp2). AddChain(gaia). AddRelayer(r, "relayer"). - AddRelayer(r2, "relayer2"). AddRelayer(r3, "relayer3"). AddLink(test.InterchainLink{ Chain1: dymension, @@ -433,12 +428,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { Relayer: r, Path: ibcPath, }). - AddLink(test.InterchainLink{ - Chain1: dymension, - Chain2: rollapp2, - Relayer: r2, - Path: anotherIbcPath, - }). AddLink(test.InterchainLink{ Chain1: dymension, Chain2: gaia, @@ -461,7 +450,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) CreateChannel(ctx, t, r, eRep, dymension.CosmosChain, rollapp1.CosmosChain, ibcPath) - CreateChannel(ctx, t, r2, eRep, dymension.CosmosChain, rollapp2.CosmosChain, anotherIbcPath) CreateChannel(ctx, t, r3, eRep, dymension.CosmosChain, gaia, ibcPath) channsDym, err := r.GetChannels(ctx, eRep, dymension.GetChainID()) @@ -492,9 +480,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { err = r.StartRelayer(ctx, eRep, ibcPath) require.NoError(t, err) - err = r2.StartRelayer(ctx, eRep, anotherIbcPath) - require.NoError(t, err) - err = r3.StartRelayer(ctx, eRep, ibcPath) require.NoError(t, err) @@ -504,10 +489,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { if err != nil { t.Logf("an error occurred while stopping the relayer: %s", err) } - err = r2.StopRelayer(ctx, eRep) - if err != nil { - t.Logf("an error occurred while stopping the relayer: %s", err) - } err = r3.StopRelayer(ctx, eRep) if err != nil { t.Logf("an error occurred while stopping the relayer2: %s", err) diff --git a/tests/setup.go b/tests/setup.go index b878fb4e..dc589e27 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -197,18 +197,18 @@ var ( gaiaGenesisKV = []cosmos.GenesisKV{ { Key: "app_state.staking.params.unbonding_time", - Value: "600s", + Value: "1200s", }, } rollappEVMGenesisKV = []cosmos.GenesisKV{ { Key: "app_state.sequencers.params.unbonding_time", - Value: "600s", + Value: "1200s", }, { Key: "app_state.staking.params.unbonding_time", - Value: "600s", + Value: "1200s", }, { Key: "app_state.mint.params.mint_denom", @@ -280,11 +280,11 @@ var ( rollappWasmGenesisKV = []cosmos.GenesisKV{ { Key: "app_state.sequencers.params.unbonding_time", - Value: "600s", + Value: "1200s", }, { Key: "app_state.staking.params.unbonding_time", - Value: "600s", + Value: "1200s", }, // Bank denom metadata { @@ -316,11 +316,11 @@ var ( dymensionGenesisKV = []cosmos.GenesisKV{ { Key: "app_state.sequencer.params.unbonding_time", - Value: "600s", + Value: "1200s", }, { Key: "app_state.staking.params.unbonding_time", - Value: "600s", + Value: "1200s", }, // gov params { From 2dac93a0d4f10ade7bb09fc7635794df397ef182 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Fri, 13 Sep 2024 11:21:19 +0700 Subject: [PATCH 04/22] add waiting time --- tests/admc_test.go | 33 +++++++++++++++ tests/automated_denommetadata_test.go | 28 +++++++++++-- tests/bridging_fee_test.go | 3 ++ tests/eibc_ack_error_test.go | 59 +++++++++++++++++++++++++++ tests/eibc_corrupted_memo_test.go | 6 +++ tests/eibc_fee_market_test.go | 23 +++++++++++ tests/eibc_fee_test.go | 6 +++ tests/eibc_feemarket_test.go | 46 +++++++++++++++++++++ tests/eibc_fulfillment_test.go | 55 +++++++++++++++++++++++++ tests/eibc_invariant_test.go | 11 +++++ tests/eibc_nobalance_test.go | 3 ++ tests/eibc_not_fulfillment_test.go | 14 +++++++ tests/eibc_pfm_test.go | 6 +++ tests/eibc_timeout_test.go | 15 +++++++ tests/erc20_ibc_transfer_test.go | 11 +++++ tests/fullnode_sync_gossip_test.go | 7 ++++ tests/genesis_transfer_test.go | 6 +++ tests/hardfork_test.go | 27 ++++++++++++ tests/ibc_grace_period_test.go | 30 ++++++++++++++ tests/ibc_transfer_test.go | 18 ++++++++ tests/rollapp_upgrade_test.go | 12 ++++++ tests/upgrade_hub_test.go | 20 +++++++++ 22 files changed, 435 insertions(+), 4 deletions(-) diff --git a/tests/admc_test.go b/tests/admc_test.go index ab194e5e..894adc17 100644 --- a/tests/admc_test.go +++ b/tests/admc_test.go @@ -154,6 +154,9 @@ func TestADMC_Originates_HubtoRA_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -404,6 +407,9 @@ func TestADMC_Migrate_Empty_User_Memo_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) @@ -551,6 +557,9 @@ func TestADMC_Migrate_With_User_Memo_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) @@ -636,6 +645,9 @@ func TestADMC_Migrate_With_User_Memo_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) @@ -778,6 +790,9 @@ func TestADMC_Originates_HubtoRA_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -949,6 +964,9 @@ func TestADMC_Migrate_Empty_User_Memo_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) @@ -1022,6 +1040,9 @@ func TestADMC_Migrate_Empty_User_Memo_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) @@ -1169,6 +1190,9 @@ func TestADMC_Migrate_With_User_Memo_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1249,6 +1273,9 @@ func TestADMC_Migrate_With_User_Memo_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + resp, err = dymension.GetNode().QueryAllDenomMetadata(ctx) require.NoError(t, err) require.Equal(t, 2, len(resp.Metadatas)) @@ -1419,6 +1446,9 @@ func TestADMC_MetaData_NotFound_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1616,6 +1646,9 @@ func TestADMC_MetaData_NotFound_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() diff --git a/tests/automated_denommetadata_test.go b/tests/automated_denommetadata_test.go index 2235680b..920f632f 100644 --- a/tests/automated_denommetadata_test.go +++ b/tests/automated_denommetadata_test.go @@ -259,6 +259,9 @@ func TestADMC_Hub_to_RA_reserved_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferData = ibc.WalletData{ Address: dymensionUserAddr, Denom: gaia.Config().Denom, @@ -404,9 +407,8 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { require.NoError(t, err) rollapp1 := chains[0].(*dym_rollapp.DymRollApp) - rollapp2 := chains[1].(*dym_rollapp.DymRollApp) - dymension := chains[2].(*dym_hub.DymHub) - gaia := chains[3].(*cosmos.CosmosChain) + dymension := chains[1].(*dym_hub.DymHub) + gaia := chains[2].(*cosmos.CosmosChain) // Relayer Factory client, network := test.DockerSetup(t) @@ -422,7 +424,7 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { ).Build(t, client, "relayer3", network) ic := test.NewSetup(). - AddRollUp(dymension, rollapp1, rollapp2). + AddRollUp(dymension, rollapp1). AddChain(gaia). AddRelayer(r1, "relayer1"). AddRelayer(r3, "relayer3"). @@ -523,6 +525,9 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferData = ibc.WalletData{ Address: dymensionUserAddr, Denom: gaia.Config().Denom, @@ -824,6 +829,9 @@ func TestADMC_Hub_to_RA_reserved_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferData = ibc.WalletData{ Address: dymensionUserAddr, Denom: gaia.Config().Denom, @@ -1134,6 +1142,9 @@ func TestADMC_Hub_to_RA_3rd_Party_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferData = ibc.WalletData{ Address: dymensionUserAddr, Denom: gaia.Config().Denom, @@ -1343,6 +1354,12 @@ func TestADMC_Hub_to_RA_Migrate_Dym_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1535,6 +1552,9 @@ func TestADMC_Hub_to_RA_Migrate_Dym_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() diff --git a/tests/bridging_fee_test.go b/tests/bridging_fee_test.go index f8b300e0..c159b271 100644 --- a/tests/bridging_fee_test.go +++ b/tests/bridging_fee_test.go @@ -369,6 +369,9 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Sub(bridgingFee)) diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index 20396ec8..f2bf02f6 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -259,6 +259,9 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Send a normal ibc tx from RA2 -> Hub transferData = ibc.WalletData{ Address: dymensionUserAddr, @@ -280,6 +283,9 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for adym on rollapp dymensionTokenDenom := transfertypes.GetPrefixedDenom(channDymRollApp1.PortID, channDymRollApp1.ChannelID, dymension.Config().Denom) dymensionIBCDenom := transfertypes.ParseDenomTrace(dymensionTokenDenom).IBCDenom() @@ -308,6 +314,9 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, dymension.Config().Denom, walletAmount.Sub(transferData.Amount)) erc20MAcc, err := rollapp1.Validators[0].QueryModuleAccount(ctx, "erc20") require.NoError(t, err) @@ -419,6 +428,9 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -677,6 +689,9 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + var options ibc.TransferOptions t.Run("Demand order is created upon AckError for rollapp token", func(t *testing.T) { @@ -788,6 +803,10 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1048,6 +1067,9 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + var options ibc.TransferOptions // register ibc denom on rollapp1 @@ -1125,6 +1147,9 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + erc20MAcc, err := rollapp1.Validators[0].QueryModuleAccount(ctx, "erc20") require.NoError(t, err) erc20MAccAddr := erc20MAcc.Account.BaseAccount.Address @@ -1225,6 +1250,10 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, thirdPartyDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1470,6 +1499,9 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Send a normal ibc tx from RA2 -> Hub transferData = ibc.WalletData{ Address: dymensionUserAddr, @@ -1491,6 +1523,9 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for adym on rollapp dymensionTokenDenom := transfertypes.GetPrefixedDenom(channDymRollApp1.PortID, channDymRollApp1.ChannelID, dymension.Config().Denom) dymensionIBCDenom := transfertypes.ParseDenomTrace(dymensionTokenDenom).IBCDenom() @@ -1519,6 +1554,9 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, dymension.Config().Denom, walletAmount.Sub(transferData.Amount)) testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, dymensionIBCDenom, transferAmount) @@ -1617,6 +1655,10 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1875,6 +1917,9 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + var options ibc.TransferOptions t.Run("Demand order is created upon AckError for rollapp token", func(t *testing.T) { @@ -1983,6 +2028,10 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -2243,6 +2292,9 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + var options ibc.TransferOptions t.Run("Demand order is created upon AckError for rollapp token", func(t *testing.T) { @@ -2277,6 +2329,9 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + testutil.AssertBalance(t, ctx, rollapp1, rollapp1UserAddr, thirdPartyIBCDenomOnRA, transferAmount) // end of preconditions @@ -2372,6 +2427,10 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, thirdPartyDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index 250345fa..a5acd7ba 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -188,6 +188,9 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -240,6 +243,9 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Sub(bridgingFee).MulRaw(2)) testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr2, rollappIBCDenom, zeroBal) testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr3, rollappIBCDenom, zeroBal) diff --git a/tests/eibc_fee_market_test.go b/tests/eibc_fee_market_test.go index 05090c08..7ca2eab4 100644 --- a/tests/eibc_fee_market_test.go +++ b/tests/eibc_fee_market_test.go @@ -210,6 +210,9 @@ func TestEIBCFulfillAlreadyFulfilledDemand_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferDataRollapp1 := ibc.WalletData{ Address: marketMakerAddr, Denom: rollapp1.Config().Denom, @@ -232,6 +235,9 @@ func TestEIBCFulfillAlreadyFulfilledDemand_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := (bigTransferAmount.Sub(bigBridgingFee)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) @@ -314,6 +320,10 @@ func TestEIBCFulfillAlreadyFulfilledDemand_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 200) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -525,6 +535,9 @@ func TestEIBCAlreadyFulfilledDemand_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferDataRollapp1 := ibc.WalletData{ Address: marketMakerAddr, Denom: rollapp1.Config().Denom, @@ -547,6 +560,9 @@ func TestEIBCAlreadyFulfilledDemand_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := (bigTransferAmount.Sub(bigBridgingFee)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) @@ -629,6 +645,10 @@ func TestEIBCAlreadyFulfilledDemand_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 200) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1115,6 +1135,9 @@ func TestEIBCUnallowedSigner_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := (bigTransferAmount.Sub(bigBridgingFee)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) diff --git a/tests/eibc_fee_test.go b/tests/eibc_fee_test.go index b8500af5..c7dbe91c 100644 --- a/tests/eibc_fee_test.go +++ b/tests/eibc_fee_test.go @@ -187,6 +187,9 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -220,6 +223,9 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount.Sub(transferData.Amount)) testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferData.Amount.Sub(bridgingFee)) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 11031911..a988a3a1 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -229,6 +229,9 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -302,6 +305,10 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -539,6 +546,9 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channsRollApp1[0].PortID, channsRollApp1[0].ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -613,6 +623,10 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -841,6 +855,9 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -910,6 +927,10 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1147,6 +1168,9 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channsRollApp1[0].PortID, channsRollApp1[0].ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1216,6 +1240,10 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1396,6 +1424,9 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Compose an IBC transfer and send from hub to rollapp // global eibc fee in case of auto created orders is 0.0015 numerator := math.NewInt(15) @@ -1480,6 +1511,9 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1654,6 +1688,9 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Compose an IBC transfer and send from hub to rollapp // global eibc fee in case of auto created orders is 0.0015 numerator := math.NewInt(15) @@ -1738,6 +1775,9 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1917,6 +1957,9 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Compose an IBC transfer and send from hub to rollapp // global eibc fee in case of auto created orders is 0.0015 numerator := math.NewInt(15) @@ -2139,6 +2182,9 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Compose an IBC transfer and send from hub to rollapp // global eibc fee in case of auto created orders is 0.0015 numerator := math.NewInt(15) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 7d51fa36..b7990bcc 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -257,6 +257,9 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferDataRollapp1 := ibc.WalletData{ Address: marketMakerAddr, Denom: rollapp1.Config().Denom, @@ -283,6 +286,9 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := (bigTransferAmount.Sub(bigBridgingFee)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) @@ -369,6 +375,10 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 200) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -643,6 +653,9 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferDataRollapp1 := ibc.WalletData{ Address: marketMakerAddr, Denom: rollapp1.Config().Denom, @@ -669,6 +682,9 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := (bigTransferAmount.Sub(bigBridgingFee)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) @@ -753,6 +769,10 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 200) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1075,6 +1095,10 @@ func TestEIBCFulfillment_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1312,6 +1336,9 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channsRollApp1[0].PortID, channsRollApp1[0].ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1380,6 +1407,10 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1743,6 +1774,10 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 200) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // verify funds were deducted from market maker's wallet address balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) @@ -2036,6 +2071,9 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferData = ibc.WalletData{ Address: dymensionUserAddr, Denom: gaia.Config().Denom, @@ -2096,6 +2134,9 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expBalance := transferData.Amount.Sub(transferData.Amount.Quo(math.NewInt(1000))) balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) @@ -2152,6 +2193,10 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -2438,6 +2483,9 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + transferData = ibc.WalletData{ Address: dymensionUserAddr, Denom: gaia.Config().Denom, @@ -2498,6 +2546,9 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) require.NoError(t, err) @@ -2555,6 +2606,10 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index 25145333..33400199 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -288,6 +288,10 @@ func TestEIBCInvariant_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -564,6 +568,9 @@ func TestEIBCInvariant_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee expMmBalanceRollappDenom := transferData.Amount.Sub(bridgingFee.MulRaw(10)) balance, err := dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) @@ -632,6 +639,10 @@ func TestEIBCInvariant_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) diff --git a/tests/eibc_nobalance_test.go b/tests/eibc_nobalance_test.go index 9414a90d..a6fd3726 100644 --- a/tests/eibc_nobalance_test.go +++ b/tests/eibc_nobalance_test.go @@ -213,6 +213,9 @@ func TestEIBCNoBalanceToFulfillOrder_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // verify funds were transferred to dymensionUserAddr testutil.AssertBalance(t, ctx, dymension, marketMakerAddr, rollappIBCDenom, zeroBal) // Minus 0.1% of transfer amount for bridge fee diff --git a/tests/eibc_not_fulfillment_test.go b/tests/eibc_not_fulfillment_test.go index efe68fa8..c5534a48 100644 --- a/tests/eibc_not_fulfillment_test.go +++ b/tests/eibc_not_fulfillment_test.go @@ -241,6 +241,9 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channsRollApp1[0].Counterparty.PortID, channsRollApp1[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -287,6 +290,10 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) require.NoError(t, err) @@ -522,6 +529,9 @@ func TestEIBCNotFulfillment_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channsRollApp1[0].Counterparty.PortID, channsRollApp1[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -565,6 +575,10 @@ func TestEIBCNotFulfillment_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) require.NoError(t, err) diff --git a/tests/eibc_pfm_test.go b/tests/eibc_pfm_test.go index 26518838..baa10641 100644 --- a/tests/eibc_pfm_test.go +++ b/tests/eibc_pfm_test.go @@ -284,6 +284,9 @@ func TestEIBCPFM_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Make sure the ack contains error require.True(t, bytes.Contains(ack.Acknowledgement, []byte("error"))) @@ -563,6 +566,9 @@ func TestEIBCPFM_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Make sure the ack contains error require.True(t, bytes.Contains(ack.Acknowledgement, []byte("error"))) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 5ccf789e..7ba86e2e 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -185,6 +185,9 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Compose an IBC transfer and send from hub to rollapp // global eibc fee in case of auto created orders is 0.0015 numerator := math.NewInt(15) @@ -264,6 +267,9 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -540,6 +546,9 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Set a short timeout for IBC transfer options := ibc.TransferOptions{ Timeout: &ibc.IBCTimeout{ @@ -637,6 +646,9 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1029,6 +1041,9 @@ func TestEIBCTimeoutFulFillDymToRollapp_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) diff --git a/tests/erc20_ibc_transfer_test.go b/tests/erc20_ibc_transfer_test.go index 090894f1..e089bb78 100644 --- a/tests/erc20_ibc_transfer_test.go +++ b/tests/erc20_ibc_transfer_test.go @@ -234,6 +234,10 @@ func TestERC20HubToRollAppWithoutRegister_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + erc20MAcc, err := rollapp1.Validators[0].QueryModuleAccount(ctx, "erc20") require.NoError(t, err) erc20MAccAddr := erc20MAcc.Account.BaseAccount.Address @@ -417,6 +421,9 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Compose an IBC transfer and send from dymension -> rollapp transferData = ibc.WalletData{ Address: rollappUserAddr, @@ -525,6 +532,10 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // check balance on dym and rollapp after transfer testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, dymensionIBCDenom, zeroBal) testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, dymension.Config().Denom, walletAmount.Sub(bridgeFee)) diff --git a/tests/fullnode_sync_gossip_test.go b/tests/fullnode_sync_gossip_test.go index 7e0aa48f..0514a28c 100644 --- a/tests/fullnode_sync_gossip_test.go +++ b/tests/fullnode_sync_gossip_test.go @@ -320,6 +320,7 @@ func TestSync_Celes_Rt_Gossip_EVM(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err := rollapp1.Validators[0].Height(ctx) require.NoError(t, err) @@ -914,6 +915,7 @@ func TestSync_Sqc_Disconnect_Gossip_EVM(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err := rollapp1.Validators[0].Height(ctx) require.NoError(t, err) @@ -947,6 +949,7 @@ func TestSync_Sqc_Disconnect_Gossip_EVM(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err = rollapp1.Validators[0].Height(ctx) require.NoError(t, err) @@ -1263,6 +1266,7 @@ func TestSync_Sqc_Disconnect_Gossip_Wasm(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err := rollapp1.Validators[0].Height(ctx) require.NoError(t, err) @@ -1296,6 +1300,7 @@ func TestSync_Sqc_Disconnect_Gossip_Wasm(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err = rollapp1.Validators[0].Height(ctx) require.NoError(t, err) @@ -1612,6 +1617,7 @@ func TestSync_Fullnode_Disconnect_Gossip_EVM(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err := rollapp1.Validators[0].Height(ctx) require.NoError(t, err) @@ -1958,6 +1964,7 @@ func TestSync_Fullnode_Disconnect_Gossip_Wasm(t *testing.T) { isFinalized, err := dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) require.True(t, isFinalized) + valHeight, err := rollapp1.Validators[0].Height(ctx) require.NoError(t, err) diff --git a/tests/genesis_transfer_test.go b/tests/genesis_transfer_test.go index 7eb9e200..154e9063 100644 --- a/tests/genesis_transfer_test.go +++ b/tests/genesis_transfer_test.go @@ -456,6 +456,9 @@ func TestGenesisTransferConnectionBlock_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -616,6 +619,9 @@ func TestGenesisTransferConnectionBlock_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() diff --git a/tests/hardfork_test.go b/tests/hardfork_test.go index c1fc54b7..159ce477 100644 --- a/tests/hardfork_test.go +++ b/tests/hardfork_test.go @@ -212,6 +212,9 @@ func TestHardFork_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappIbcDenom := GetIBCDenom(channsRollApp1Dym.Counterparty.PortID, channsRollApp1Dym.Counterparty.ChannelID, rollapp1.Config().Denom) @@ -494,6 +497,9 @@ func TestHardFork_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub newRollAppIbcDenom := GetIBCDenom(channsNewRollAppDym.Counterparty.PortID, channsNewRollAppDym.Counterparty.ChannelID, newRollApp.Config().Denom) @@ -545,6 +551,9 @@ func TestHardFork_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + multiplier = math.NewInt(1000) bridgeFee := transferAmount.Quo(multiplier) // check assets balance @@ -743,6 +752,9 @@ func TestHardFork_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappIbcDenom := GetIBCDenom(channsRollApp1Dym.Counterparty.PortID, channsRollApp1Dym.Counterparty.ChannelID, rollapp1.Config().Denom) @@ -1025,6 +1037,9 @@ func TestHardFork_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom newRollAppIbcDenom := GetIBCDenom(channsNewRollAppDym.Counterparty.PortID, channsNewRollAppDym.Counterparty.ChannelID, newRollApp.Config().Denom) // Minus 0.1% of transfer amount for bridge fee @@ -1072,6 +1087,9 @@ func TestHardFork_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + multiplier = math.NewInt(1000) bridgeFee := transferAmount.Quo(multiplier) // check assets balance @@ -1272,6 +1290,9 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappIbcDenom := GetIBCDenom(channsRollApp1Dym.Counterparty.PortID, channsRollApp1Dym.Counterparty.ChannelID, rollapp1.Config().Denom) @@ -1556,6 +1577,9 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub newRollAppIbcDenom := GetIBCDenom(channsNewRollAppDym.Counterparty.PortID, channsNewRollAppDym.Counterparty.ChannelID, newRollApp.Config().Denom) @@ -1627,6 +1651,9 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + multiplier = math.NewInt(1000) bridgeFee := transferAmount.Quo(multiplier) // check assets balance diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index 9f1f85dc..968c9038 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -229,6 +229,9 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -288,6 +291,9 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Add(transferAmount).Sub(bridgingFee).Sub(bridgingFee)) @@ -525,6 +531,9 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -574,6 +583,9 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Minus 0.1% of transfer amount for bridge fee testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Add(transferAmount).Sub(bridgingFee).Sub(bridgingFee)) @@ -826,6 +838,9 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Assert balance was updated on the Hub testutil.AssertBalance(t, ctx, rollapp1, rollapp1UserAddr, rollapp1.Config().Denom, walletAmount.Sub(transferData.Amount)) // Minus 0.1% of transfer amount for bridge fee @@ -1080,6 +1095,9 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Assert balance was updated on the Hub testutil.AssertBalance(t, ctx, rollapp1, rollapp1UserAddr, rollapp1.Config().Denom, walletAmount.Sub(transferData.Amount)) testutil.AssertBalance(t, ctx, dymension, dymensionUserAddr, rollappIBCDenom, transferAmount.Sub(bridgingFee)) @@ -1322,6 +1340,9 @@ func TestDelayedAck_RelayerDown_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1374,6 +1395,9 @@ func TestDelayedAck_RelayerDown_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + t.Log("rollapp1UserAddr:", rollapp1UserAddr) t.Log("dymIBCDenom:", dymIBCDenom) @@ -1622,6 +1646,9 @@ func TestDelayedAck_RelayerDown_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(dymChannel[0].Counterparty.PortID, dymChannel[0].Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -1674,6 +1701,9 @@ func TestDelayedAck_RelayerDown_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + t.Log("rollapp1UserAddr:", rollapp1UserAddr) t.Log("dymIBCDenom:", dymIBCDenom) // Assert balance was updated on rollapp diff --git a/tests/ibc_transfer_test.go b/tests/ibc_transfer_test.go index 0d5ce22a..26760b14 100644 --- a/tests/ibc_transfer_test.go +++ b/tests/ibc_transfer_test.go @@ -239,6 +239,9 @@ func TestIBCTransferSuccess_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -415,6 +418,9 @@ func TestIBCTransferSuccess_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -585,6 +591,9 @@ func TestGenesisIBCTransferReservedMemo_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -603,6 +612,9 @@ func TestGenesisIBCTransferReservedMemo_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Assert fund was not transferred testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount.Sub(transferData.Amount)) } @@ -743,6 +755,9 @@ func TestGenesisIBCTransferReservedMemo_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -761,6 +776,9 @@ func TestGenesisIBCTransferReservedMemo_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Assert fund was not transferred testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount.Sub(transferData.Amount)) } diff --git a/tests/rollapp_upgrade_test.go b/tests/rollapp_upgrade_test.go index 16ed23e6..b4d73ba3 100644 --- a/tests/rollapp_upgrade_test.go +++ b/tests/rollapp_upgrade_test.go @@ -218,6 +218,9 @@ func TestRollappUpgradeNonStateBreaking_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -408,6 +411,9 @@ func TestRollappUpgradeNonStateBreaking_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -684,6 +690,9 @@ func TestRollapp_EVM_Upgrade(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() @@ -938,6 +947,9 @@ func TestRollapp_Wasm_Upgrade(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom for urax on Hub rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() diff --git a/tests/upgrade_hub_test.go b/tests/upgrade_hub_test.go index 75346e2e..1f24fe46 100644 --- a/tests/upgrade_hub_test.go +++ b/tests/upgrade_hub_test.go @@ -357,6 +357,9 @@ func TestHubUpgrade(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom dymensionTokenDenom1 := transfertypes.GetPrefixedDenom(channDymRollApp1.PortID, channDymRollApp1.ChannelID, dymension.Config().Denom) dymensionIBCDenom1 := transfertypes.ParseDenomTrace(dymensionTokenDenom1).IBCDenom() @@ -394,6 +397,9 @@ func TestHubUpgrade(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + expMmBalanceRollapp1Denom := transferData.Amount balance, err := dymension.GetBalance(ctx, marketMaker1Addr, rollapp1IBCDenom) require.NoError(t, err) @@ -450,6 +456,10 @@ func TestHubUpgrade(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollapp1Height, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMaker1Addr, rollapp1IBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMaker1Addr after packet finalization:", balance) @@ -477,6 +487,9 @@ func TestHubUpgrade(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + // Get the IBC denom dymensionTokenDenom2 := transfertypes.GetPrefixedDenom(channRollApp2Dym.PortID, channRollApp2Dym.ChannelID, dymension.Config().Denom) dymensionIBCDenom2 := transfertypes.ParseDenomTrace(dymensionTokenDenom2).IBCDenom() @@ -507,6 +520,9 @@ func TestHubUpgrade(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + expMmBalanceRollapp2Denom := transferData.Amount balance, err = dymension.GetBalance(ctx, marketMaker2Addr, rollapp2IBCDenom) require.NoError(t, err) @@ -562,6 +578,10 @@ func TestHubUpgrade(t *testing.T) { isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp2.GetChainID(), rollapp2Height, 300) require.NoError(t, err) require.True(t, isFinalized) + + err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + balance, err = dymension.GetBalance(ctx, marketMaker2Addr, rollapp2IBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMaker2Addr after packet finalization:", balance) From 11ce01b70ced64cd67582bfed2d5038960e23822 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Fri, 13 Sep 2024 12:29:46 +0700 Subject: [PATCH 05/22] fix tests --- tests/admc_test.go | 4 +- tests/automated_denommetadata_test.go | 5 +- tests/bridging_fee_test.go | 12 +--- tests/eibc_ack_error_test.go | 72 ++------------------- tests/eibc_corrupted_memo_test.go | 11 +--- tests/eibc_fee_test.go | 13 +--- tests/eibc_feemarket_test.go | 77 +++-------------------- tests/eibc_fulfillment_test.go | 90 +++------------------------ tests/eibc_invariant_test.go | 8 --- tests/eibc_nobalance_test.go | 11 +--- tests/eibc_not_fulfillment_test.go | 21 +------ tests/eibc_pfm_test.go | 21 +------ tests/eibc_timeout_test.go | 30 ++------- tests/erc20_ibc_transfer_test.go | 20 ++---- tests/frozen_test.go | 36 +++++------ tests/hardfork_test.go | 33 +--------- tests/ibc_grace_period_test.go | 65 ++----------------- tests/ibc_timeout_test.go | 21 +------ tests/rollapp_invariant_test.go | 21 +------ tests/sequencer_invariant_test.go | 21 +------ tests/setup.go | 6 +- tests/tx_batch_finalization_test.go | 21 +------ 22 files changed, 80 insertions(+), 539 deletions(-) diff --git a/tests/admc_test.go b/tests/admc_test.go index 894adc17..ad64e2a2 100644 --- a/tests/admc_test.go +++ b/tests/admc_test.go @@ -1306,7 +1306,7 @@ func TestADMC_MetaData_NotFound_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides modifyGenesisKV := append( - dymModifyGenesisKV, + dymensionGenesisKV, []cosmos.GenesisKV{ { Key: "app_state.bank.denom_metadata", @@ -1506,7 +1506,7 @@ func TestADMC_MetaData_NotFound_Wasm(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides modifyGenesisKV := append( - dymModifyGenesisKV, + dymensionGenesisKV, []cosmos.GenesisKV{ { Key: "app_state.bank.denom_metadata", diff --git a/tests/automated_denommetadata_test.go b/tests/automated_denommetadata_test.go index 920f632f..5532a2c7 100644 --- a/tests/automated_denommetadata_test.go +++ b/tests/automated_denommetadata_test.go @@ -477,7 +477,7 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { dymChannels, err := r1.GetChannels(ctx, eRep, dymension.Config().ChainID) require.NoError(t, err) - require.Equal(t, 3, len(dymChannels)) + require.Equal(t, 2, len(dymChannels)) channsRollApp1, err := r1.GetChannels(ctx, eRep, rollapp1.GetChainID()) require.NoError(t, err) @@ -486,9 +486,6 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { gaiaChannels, err := r3.GetChannels(ctx, eRep, gaia.GetChainID()) require.NoError(t, err) - require.Len(t, dymChannels, 2) - require.Len(t, gaiaChannels, 1) - channDymGaia := gaiaChannels[0].Counterparty require.NotEmpty(t, channDymGaia.ChannelID) diff --git a/tests/bridging_fee_test.go b/tests/bridging_fee_test.go index c159b271..2f0f680f 100644 --- a/tests/bridging_fee_test.go +++ b/tests/bridging_fee_test.go @@ -185,16 +185,6 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -261,7 +251,7 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index f2bf02f6..93e90887 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -49,16 +49,6 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -125,7 +115,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -476,16 +466,6 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -552,7 +532,7 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -843,16 +823,6 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -919,7 +889,7 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1290,16 +1260,6 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1366,7 +1326,7 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1704,16 +1664,6 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1780,7 +1730,7 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2068,16 +2018,6 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -2144,7 +2084,7 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index a5acd7ba..a57696e0 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -43,14 +42,6 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -95,7 +86,7 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_fee_test.go b/tests/eibc_fee_test.go index c7dbe91c..ae837544 100644 --- a/tests/eibc_fee_test.go +++ b/tests/eibc_fee_test.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -44,14 +43,6 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -96,7 +87,7 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -217,7 +208,7 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { // get eIbc event eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) fmt.Println(eibcEvents) - require.True(t, len(eibcEvents) == 1) // verify there were no eibc events registered on the hub + require.True(t, len(eibcEvents) == 0) // verify there were no eibc events registered on the hub isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index a988a3a1..53423205 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -11,7 +11,6 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -43,14 +42,6 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(50), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -117,7 +108,7 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -349,14 +340,6 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -423,7 +406,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -667,14 +650,6 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(50), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -741,7 +716,7 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -971,14 +946,6 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1045,7 +1012,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1282,13 +1249,6 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1333,7 +1293,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1546,13 +1506,6 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { maxProofTime := "500ms" configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1597,7 +1550,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1815,13 +1768,6 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1866,7 +1812,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2040,13 +1986,6 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { maxProofTime := "500ms" configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -2091,7 +2030,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index b7990bcc..08ab2749 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -45,14 +45,6 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -119,7 +111,7 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -441,14 +433,6 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -515,7 +499,7 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -836,14 +820,6 @@ func TestEIBCFulfillment_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -910,7 +886,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1139,14 +1115,6 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1213,7 +1181,7 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1451,14 +1419,6 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1525,7 +1485,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1771,7 +1731,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee), balance)) // wait until packet finalization and verify funds + fee were added to market maker's wallet address - isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 200) + isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 400) require.NoError(t, err) require.True(t, isFinalized) @@ -1828,13 +1788,6 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Disable erc20 modifyRollappGeneisKV := append( @@ -1913,7 +1866,7 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2248,14 +2201,6 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -2324,7 +2269,7 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2659,14 +2604,6 @@ func TestEIBCFulfillment_ignore_hub_to_RA_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -2733,7 +2670,7 @@ func TestEIBCFulfillment_ignore_hub_to_RA_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2916,13 +2853,6 @@ func TestEIBCFulfillment_ignore_hub_to_RA_Wasm(t *testing.T) { gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 @@ -2990,7 +2920,7 @@ func TestEIBCFulfillment_ignore_hub_to_RA_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index 33400199..705f8613 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -39,10 +39,6 @@ func TestEIBCInvariant_EVM(t *testing.T) { const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, cosmos.GenesisKV{ Key: "app_state.delayedack.params.epoch_identifier", Value: EPOCH_IDENTIFIER, @@ -353,10 +349,6 @@ func TestEIBCInvariant_Wasm(t *testing.T) { const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, cosmos.GenesisKV{ Key: "app_state.delayedack.params.epoch_identifier", Value: EPOCH_IDENTIFIER, diff --git a/tests/eibc_nobalance_test.go b/tests/eibc_nobalance_test.go index a6fd3726..91e1035d 100644 --- a/tests/eibc_nobalance_test.go +++ b/tests/eibc_nobalance_test.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/math" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -44,14 +43,6 @@ func TestEIBCNoBalanceToFulfillOrder_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -96,7 +87,7 @@ func TestEIBCNoBalanceToFulfillOrder_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_not_fulfillment_test.go b/tests/eibc_not_fulfillment_test.go index c5534a48..8072b526 100644 --- a/tests/eibc_not_fulfillment_test.go +++ b/tests/eibc_not_fulfillment_test.go @@ -11,7 +11,6 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -45,14 +44,6 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -119,7 +110,7 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -333,14 +324,6 @@ func TestEIBCNotFulfillment_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -407,7 +390,7 @@ func TestEIBCNotFulfillment_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_pfm_test.go b/tests/eibc_pfm_test.go index baa10641..5298fc37 100644 --- a/tests/eibc_pfm_test.go +++ b/tests/eibc_pfm_test.go @@ -12,7 +12,6 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -51,14 +50,6 @@ func TestEIBCPFM_EVM(t *testing.T) { numRollAppFn := 0 numRollAppVals := 1 - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { Name: "rollapp1", @@ -120,7 +111,7 @@ func TestEIBCPFM_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -334,14 +325,6 @@ func TestEIBCPFM_Wasm(t *testing.T) { numRollAppFn := 0 numRollAppVals := 1 - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { Name: "rollapp1", @@ -403,7 +386,7 @@ func TestEIBCPFM_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 7ba86e2e..f7a49147 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -43,13 +43,6 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -94,7 +87,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -311,13 +304,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -386,7 +372,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -460,7 +446,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { channsDym, err := r.GetChannels(ctx, eRep, dymension.GetChainID()) require.NoError(t, err) - require.Len(t, channsDym, 3) + require.Len(t, channsDym, 2) rollAppChan, err := r.GetChannels(ctx, eRep, rollapp1.GetChainID()) require.NoError(t, err) @@ -692,14 +678,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_Wasm(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -768,7 +746,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/erc20_ibc_transfer_test.go b/tests/erc20_ibc_transfer_test.go index e089bb78..4094b585 100644 --- a/tests/erc20_ibc_transfer_test.go +++ b/tests/erc20_ibc_transfer_test.go @@ -53,13 +53,7 @@ func TestERC20HubToRollAppWithoutRegister_EVM(t *testing.T) { Value: true, }, ) - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) + cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { Name: "rollapp1", @@ -99,7 +93,7 @@ func TestERC20HubToRollAppWithoutRegister_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -287,13 +281,7 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { Value: true, }, ) - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) + cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { Name: "rollapp1", @@ -333,7 +321,7 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/frozen_test.go b/tests/frozen_test.go index 84e16234..1b74d912 100644 --- a/tests/frozen_test.go +++ b/tests/frozen_test.go @@ -22,14 +22,6 @@ import ( "github.com/decentrio/rollup-e2e-testing/testutil" ) -var dymModifyGenesisKV = append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: "20", - }, -) - var extraFlags = map[string]interface{}{"genesis-accounts-path": true} // TestRollAppFreeze ensure upon freeze gov proposal passed, no updates can be made to the rollapp and not IBC txs are passing. @@ -123,7 +115,7 @@ func TestRollAppFreeze_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -464,7 +456,7 @@ func TestRollAppFreeze_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -832,7 +824,7 @@ func TestOtherRollappNotAffected_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1270,7 +1262,7 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1672,7 +1664,7 @@ func TestPacketRollbacked_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1986,7 +1978,7 @@ func TestPacketRollbacked_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2345,7 +2337,7 @@ func TestRollAppFreezeNoBrokenInvariants_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2680,7 +2672,7 @@ func TestRollAppFreezeNoBrokenInvariants_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -3015,7 +3007,7 @@ func TestRollAppSqcSlashedJailed_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -3425,7 +3417,7 @@ func TestRollAppSqcSlashedJailed_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -3811,7 +3803,7 @@ func TestRollAppFreezeStateNotProgressing_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -4132,7 +4124,7 @@ func TestRollAppFreezeStateNotProgressing_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -4453,7 +4445,7 @@ func TestRollAppFreezeEibcPending_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -4795,7 +4787,7 @@ func TestRollAppFreezeEibcPending_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymModifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/hardfork_test.go b/tests/hardfork_test.go index 159ce477..c64c528b 100644 --- a/tests/hardfork_test.go +++ b/tests/hardfork_test.go @@ -38,14 +38,6 @@ func TestHardFork_EVM(t *testing.T) { maxProofTime := "500ms" configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -90,7 +82,7 @@ func TestHardFork_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -576,14 +568,6 @@ func TestHardFork_Wasm(t *testing.T) { maxIdleTime1 := "3s" maxProofTime := "500ms" - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") // Create chain factory with dymension @@ -630,7 +614,7 @@ func TestHardFork_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1113,17 +1097,6 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { maxProofTime := "500ms" configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") - // Custom dymension epoch for faster disconnection - modifyGenesisKV := append( - dymModifyGenesisKV, - []cosmos.GenesisKV{ - { - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - }..., - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1168,7 +1141,7 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index 968c9038..6b987cb4 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -11,7 +11,6 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -44,14 +43,6 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -118,7 +109,7 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -339,14 +330,6 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -413,7 +396,7 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -630,15 +613,6 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") - // Increase dispute blocks - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(200), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -705,7 +679,7 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -887,15 +861,6 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") - // Increase dispute blocks - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(200), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -962,7 +927,7 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1143,15 +1108,6 @@ func TestDelayedAck_RelayerDown_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Increase dispute blocks - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1218,7 +1174,7 @@ func TestDelayedAck_RelayerDown_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1456,15 +1412,6 @@ func TestDelayedAck_RelayerDown_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - // Increase dispute blocks - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1531,7 +1478,7 @@ func TestDelayedAck_RelayerDown_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index 8f554a86..3c7356b5 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -8,7 +8,6 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -43,14 +42,6 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(10), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -95,7 +86,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -293,14 +284,6 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(10), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -345,7 +328,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/rollapp_invariant_test.go b/tests/rollapp_invariant_test.go index 353aaabf..eb1795fe 100644 --- a/tests/rollapp_invariant_test.go +++ b/tests/rollapp_invariant_test.go @@ -6,7 +6,6 @@ import ( "testing" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -40,14 +39,6 @@ func TestRollappInvariant_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -114,7 +105,7 @@ func TestRollappInvariant_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -303,14 +294,6 @@ func TestRollappInvariant_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -377,7 +360,7 @@ func TestRollappInvariant_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/sequencer_invariant_test.go b/tests/sequencer_invariant_test.go index f286e782..1b9c63d4 100644 --- a/tests/sequencer_invariant_test.go +++ b/tests/sequencer_invariant_test.go @@ -6,7 +6,6 @@ import ( "testing" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -40,14 +39,6 @@ func TestSequencerInvariant_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -114,7 +105,7 @@ func TestSequencerInvariant_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -306,14 +297,6 @@ func TestSequencerInvariant_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -380,7 +363,7 @@ func TestSequencerInvariant_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/setup.go b/tests/setup.go index dc589e27..ca2cd399 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -86,7 +86,7 @@ type ForwardMetadata struct { const ( ibcPath = "dymension-demo" anotherIbcPath = "dymension-demo2" - BLOCK_FINALITY_PERIOD = 60 + BLOCK_FINALITY_PERIOD = 50 EventDemandOrderCreated = "dymensionxyz.dymension.eibc.EventDemandOrderCreated" EventDemandOrderFulfilled = "dymensionxyz.dymension.eibc.EventDemandOrderFulfilled" EventDemandOrderFeeUpdated = "dymensionxyz.dymension.eibc.EventDemandOrderFeeUpdated" @@ -314,6 +314,10 @@ var ( } dymensionGenesisKV = []cosmos.GenesisKV{ + { + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), + }, { Key: "app_state.sequencer.params.unbonding_time", Value: "1200s", diff --git a/tests/tx_batch_finalization_test.go b/tests/tx_batch_finalization_test.go index 30b97363..ee67a431 100644 --- a/tests/tx_batch_finalization_test.go +++ b/tests/tx_batch_finalization_test.go @@ -7,7 +7,6 @@ import ( "time" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "github.com/decentrio/rollup-e2e-testing/cosmos/hub/dym_hub" "github.com/decentrio/rollup-e2e-testing/cosmos/rollapp/dym_rollapp" dymensiontypes "github.com/decentrio/rollup-e2e-testing/dymension" @@ -46,14 +45,6 @@ func TestBatchFinalization_EVM(t *testing.T) { dymintTomlOverrides["batch_submit_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension numHubVals := 1 @@ -99,7 +90,7 @@ func TestBatchFinalization_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -186,14 +177,6 @@ func TestBatchFinalization_Wasm(t *testing.T) { dymintTomlOverrides["batch_submit_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(BLOCK_FINALITY_PERIOD), - }, - ) - configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension numHubVals := 1 @@ -239,7 +222,7 @@ func TestBatchFinalization_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, From aa15339f49b2f3db455e60e0ae265c65f948a14e Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Fri, 13 Sep 2024 15:10:30 +0700 Subject: [PATCH 06/22] fix tests --- tests/eibc_ack_error_test.go | 6 ++++++ tests/eibc_corrupted_memo_test.go | 2 +- tests/eibc_fee_market_test.go | 4 +--- tests/eibc_feemarket_test.go | 20 ++++++++++---------- tests/eibc_fulfillment_test.go | 15 +++++++++------ tests/eibc_timeout_test.go | 2 +- tests/frozen_test.go | 6 +++++- tests/hardfork_test.go | 6 +++++- tests/ibc_grace_period_test.go | 23 +++++++++++++++++++++-- tests/ibc_timeout_test.go | 8 ++++---- tests/ibc_transfer_test.go | 6 ++++++ 11 files changed, 69 insertions(+), 29 deletions(-) diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index 93e90887..24f4d07a 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -413,6 +413,9 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { expMmBalanceDymDenom := marketMakerBalance.Sub((transferAmountWithoutFee.Sub(bridgingFee))) require.True(t, balance.Equal(expMmBalanceDymDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceDymDenom, balance)) + rollappHeight, err = rollapp1.Height(ctx) + require.NoError(t, err) + // wait until packet finalization, mm balance should be the same due to the ack error isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) @@ -1611,6 +1614,9 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { expMmBalanceDymDenom := marketMakerBalance.Sub((transferAmountWithoutFee.Sub(bridgingFee))) require.True(t, balance.Equal(expMmBalanceDymDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceDymDenom, balance)) + rollappHeight, err = rollapp1.Height(ctx) + require.NoError(t, err) + // wait until packet finalization, mm balance should be the same due to the ack error isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index a57696e0..b6c30680 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -225,7 +225,7 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { // get eIbc events eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) fmt.Println(eibcEvents) - require.True(t, len(eibcEvents) == 2) // verify 1 EIBC event was registered on the hub + require.True(t, len(eibcEvents) == 1) // verify 1 EIBC event was registered on the hub rollappHeight, err = rollapp1.GetNode().Height(ctx) require.NoError(t, err) diff --git a/tests/eibc_fee_market_test.go b/tests/eibc_fee_market_test.go index 7ca2eab4..2cae24e1 100644 --- a/tests/eibc_fee_market_test.go +++ b/tests/eibc_fee_market_test.go @@ -1157,11 +1157,9 @@ func TestEIBCUnallowedSigner_Wasm(t *testing.T) { _, err = rollapp1.SendIBCTransfer(ctx, dymChannel_ra1[0].ChannelID, rollappUserAddr, transferDataRollapp1, options) require.NoError(t, err) - balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) - require.NoError(t, err) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) require.NoError(t, err) for i, eibcEvent := range eibcEvents { diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 53423205..213cfd59 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -258,11 +258,11 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 5, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) - _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[1].OrderId, dymensionUserAddr, math.NewInt(100_000)) + _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, math.NewInt(100_000)) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 5, dymension) @@ -568,11 +568,11 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) - _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[1].OrderId, dymensionUserAddr, eibcFee.MulRaw(2)) + _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, eibcFee.MulRaw(2)) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 5, dymension) @@ -866,9 +866,9 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { // get eIbc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) - _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[1].OrderId, dymensionUserAddr, eibcFee) + _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, eibcFee) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 5, dymension) @@ -1685,7 +1685,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1946,7 +1946,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 08ab2749..0bcc78ad 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1345,10 +1345,10 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { // get eIbc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -1730,6 +1730,9 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { fmt.Println("Balance for ibc denom from rollapp 2 of dymensionUserAddr after fulfilling the order:", balance) require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee), balance)) + rollappHeight, err = rollapp1.GetNode().Height(ctx) + require.NoError(t, err) + // wait until packet finalization and verify funds + fee were added to market maker's wallet address isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 400) require.NoError(t, err) @@ -2114,10 +2117,10 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { // get eIbc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -2519,10 +2522,10 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { // get eIbc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index f7a49147..2fd55fc2 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -221,7 +221,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/frozen_test.go b/tests/frozen_test.go index 1b74d912..10a4b7da 100644 --- a/tests/frozen_test.go +++ b/tests/frozen_test.go @@ -1898,9 +1898,13 @@ func TestPacketRollbacked_EVM(t *testing.T) { require.NoError(t, err, "proposal status did not change to passed") latestIndex, err := dymension.GetNode().QueryLatestStateIndex(ctx, rollapp1.Config().ChainID) - testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + require.NoError(t, err) + + testutil.WaitForBlocks(ctx, 50, dymension, rollapp1) // after Grace period, the latest index should be the same lalatestIndex, err := dymension.GetNode().QueryLatestStateIndex(ctx, rollapp1.Config().ChainID) + require.NoError(t, err) + require.Equal(t, latestIndex, lalatestIndex, "rollapp state index still increment after grace period. Rerun") // Check if rollapp1 has frozen or not diff --git a/tests/hardfork_test.go b/tests/hardfork_test.go index c64c528b..5b49c9df 100644 --- a/tests/hardfork_test.go +++ b/tests/hardfork_test.go @@ -1392,7 +1392,9 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { latestIndex, err := dymension.GetNode().QueryLatestStateIndex(ctx, rollapp1.Config().ChainID) require.NoError(t, err) - testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) + + testutil.WaitForBlocks(ctx, 50, dymension) + // after Grace period, the latest index should be the same lalatestIndex, err := dymension.GetNode().QueryLatestStateIndex(ctx, rollapp1.Config().ChainID) require.NoError(t, err) @@ -1406,9 +1408,11 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { // Check rollapp1 state index not increment require.NoError(t, err) require.Equal(t, fmt.Sprint(targetIndex), latestIndex.StateIndex.Index, "rollapp state index still increment") + // stop all nodes and override genesis with new state err = rollapp1.StopAllNodes(ctx) require.NoError(t, err) + // get the latest hight was finalized rollappState, err := dymension.QueryRollappState(ctx, rollapp1.Config().ChainID, true) require.NoError(t, err) diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index 6b987cb4..f5b114dc 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" + "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -613,6 +614,15 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + // Increase dispute blocks + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(200), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -679,7 +689,7 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -861,6 +871,15 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { maxIdleTime2 := "3s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + // Increase dispute blocks + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(200), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -927,7 +946,7 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index 3c7356b5..9f5a43ce 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -206,7 +206,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() - err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -245,7 +245,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -447,7 +447,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() - err = testutil.WaitForBlocks(ctx, 40, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -486,7 +486,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured diff --git a/tests/ibc_transfer_test.go b/tests/ibc_transfer_test.go index 26760b14..2cb42097 100644 --- a/tests/ibc_transfer_test.go +++ b/tests/ibc_transfer_test.go @@ -607,6 +607,9 @@ func TestGenesisIBCTransferReservedMemo_EVM(t *testing.T) { }) require.ErrorContains(t, err, "cannot use transfer genesis memo: unauthorized") + rollappHeight, err = rollapp1.GetNode().Height(ctx) + require.NoError(t, err) + // wait until the packet is finalized isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) @@ -771,6 +774,9 @@ func TestGenesisIBCTransferReservedMemo_Wasm(t *testing.T) { }) require.ErrorContains(t, err, "cannot use transfer genesis memo: unauthorized") + rollappHeight, err = rollapp1.GetNode().Height(ctx) + require.NoError(t, err) + // wait until the packet is finalized isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) From 33e005976ca355d008f34ff770e2e87115fe4953 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Fri, 13 Sep 2024 16:42:14 +0700 Subject: [PATCH 07/22] fix tests --- tests/eibc_feemarket_test.go | 19 ++++++++++--------- tests/eibc_fulfillment_test.go | 14 ++------------ tests/eibc_invariant_test.go | 8 ++++++++ tests/frozen_test.go | 4 ++-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 213cfd59..9f2144fe 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -269,7 +269,7 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.NoError(t, err) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, math.NewInt(100_000)) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, math.NewInt(100_000)) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -579,7 +579,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { require.NoError(t, err) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee.MulRaw(2)) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee.MulRaw(2)) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -875,7 +875,7 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { require.NoError(t, err) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -1169,18 +1169,18 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) - _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[1].OrderId, dymensionUserAddr, eibcFee.MulRaw(2)) + _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, eibcFee.MulRaw(2)) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 5, dymension) require.NoError(t, err) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee.MulRaw(2)) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee.MulRaw(2)) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -1428,7 +1428,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1721,6 +1721,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) expBalanceMarketMaker := walletAmount.Sub((transferAmountWithoutFeeUpdated)) + // expBalanceMarketMaker := walletAmount.Add(globalEIbcFee.Mul(math.NewInt(2))) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) // wait until packet finalization and verify funds (incl. fee) were added to market maker's wallet address @@ -2164,7 +2165,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 0bcc78ad..76deb2a9 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1725,27 +1725,17 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { require.NoError(t, err) fmt.Println("Balance of dymensionUserAddr after fulfilling the order:", balance) require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee), balance)) + balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollapp2IBCDenom) require.NoError(t, err) fmt.Println("Balance for ibc denom from rollapp 2 of dymensionUserAddr after fulfilling the order:", balance) require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee), balance)) - rollappHeight, err = rollapp1.GetNode().Height(ctx) - require.NoError(t, err) - - // wait until packet finalization and verify funds + fee were added to market maker's wallet address - isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 400) - require.NoError(t, err) - require.True(t, isFinalized) - - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) - require.NoError(t, err) - // verify funds were deducted from market maker's wallet address balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub((transferAmountWithoutFee)).Add(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferAmount).Sub(bridgingFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollapp2IBCDenom) diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index 705f8613..6dbb4e36 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -43,6 +43,10 @@ func TestEIBCInvariant_EVM(t *testing.T) { Key: "app_state.delayedack.params.epoch_identifier", Value: EPOCH_IDENTIFIER, }, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(80), + }, ) // Create chain factory with dymension @@ -353,6 +357,10 @@ func TestEIBCInvariant_Wasm(t *testing.T) { Key: "app_state.delayedack.params.epoch_identifier", Value: EPOCH_IDENTIFIER, }, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(80), + }, ) // Create chain factory with dymension diff --git a/tests/frozen_test.go b/tests/frozen_test.go index 10a4b7da..a97812c7 100644 --- a/tests/frozen_test.go +++ b/tests/frozen_test.go @@ -1192,8 +1192,8 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) { dymintTomlOverrides2["max_proof_time"] = "500ms" dymintTomlOverrides2["max_idle_time"] = "3s" dymintTomlOverrides2["batch_submit_max_time"] = "100s" - dymintTomlOverrides["batch_submit_time"] = "20s" - dymintTomlOverrides["p2p_blocksync_enabled"] = "false" + dymintTomlOverrides2["batch_submit_time"] = "20s" + dymintTomlOverrides2["p2p_blocksync_enabled"] = "false" configFileOverrides2["config/dymint.toml"] = dymintTomlOverrides2 // Create chain factory with dymension From bc7a6254f8bb31776abe1491a1407b29d2ecdd5d Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Fri, 13 Sep 2024 20:23:08 +0700 Subject: [PATCH 08/22] fix tests --- tests/eibc_ack_error_test.go | 2 +- tests/eibc_feemarket_test.go | 11 +++++------ tests/eibc_fulfillment_test.go | 2 +- tests/eibc_timeout_test.go | 2 +- tests/ibc_timeout_test.go | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index 24f4d07a..7ff8d011 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -430,7 +430,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { require.True(t, balance.Equal(expMmBalanceDymDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceDymDenom, balance)) // wait for a few blocks and check if the fund returns to rollapp - testutil.WaitForBlocks(ctx, BLOCK_FINALITY_PERIOD+10, rollapp1) + testutil.WaitForBlocks(ctx, 10, rollapp1) testutil.AssertBalance(t, ctx, rollapp1, erc20MAccAddr, dymensionIBCDenom, transferAmount) }) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 9f2144fe..4c859742 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -485,7 +485,6 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { multiplier := math.NewInt(10) eibcFee := transferAmount.Quo(multiplier) // transferAmount * 0.1 - transferAmountWithoutFee := transferAmount.Sub(eibcFee) dymChannels, err := r1.GetChannels(ctx, eRep, dymension.Config().ChainID) require.NoError(t, err) @@ -595,7 +594,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of dymensionUserAddr after fulfilling the order:", balance) - require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee), balance)) + require.True(t, balance.Equal(transferAmount.Sub(bridgingFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmount.Sub(bridgingFee), balance)) // verify funds were deducted from market maker's wallet address balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) @@ -1201,7 +1200,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmountWithoutFee.Sub(eibcFee)).Add(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(eibcFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) // wait until packet finalization and verify funds + fee were added to market maker's wallet address isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) @@ -1428,7 +1427,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1720,7 +1719,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expBalanceMarketMaker := walletAmount.Sub((transferAmountWithoutFeeUpdated)) + expBalanceMarketMaker := walletAmount.Add(transferAmount).Add(globalEIbcFee.MulRaw(2)) // expBalanceMarketMaker := walletAmount.Add(globalEIbcFee.Mul(math.NewInt(2))) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) @@ -1947,7 +1946,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 76deb2a9..c8d19e5a 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1735,7 +1735,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferAmount).Sub(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmountWithoutFee).Add(bridgingFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollapp2IBCDenom) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 2fd55fc2..20d308a8 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -252,7 +252,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expBalanceMarketMaker := walletAmount.Sub((transferAmountWithoutFee)) + expBalanceMarketMaker := walletAmount.Add(transferAmountWithoutFee).Add(globalEIbcFee) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) // wait until packet finalization and verify funds (incl. fee) were added to market maker's wallet address diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index 9f5a43ce..73219136 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -206,7 +206,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() - err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -245,7 +245,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured From f8f6e6d23c5f3e9dff13b25e86ce4d7e926cea19 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sat, 14 Sep 2024 08:42:42 +0700 Subject: [PATCH 09/22] fix tests --- tests/eibc_feemarket_test.go | 68 +++++++++++++++++++++++++----------- tests/eibc_timeout_test.go | 14 +++----- 2 files changed, 52 insertions(+), 30 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 4c859742..79f41ea9 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" + "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -567,7 +568,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) @@ -1168,7 +1169,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) @@ -1200,7 +1201,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(eibcFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmountWithoutFee).Add(bridgingFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) // wait until packet finalization and verify funds + fee were added to market maker's wallet address isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) @@ -1248,6 +1249,14 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1292,7 +1301,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1429,6 +1438,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { // get eibc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) require.NoError(t, err) + fmt.Println(eibcEvents) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) require.Equal(t, eibcEvents[0].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) @@ -1448,7 +1458,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 5, dymension) + err = testutil.WaitForBlocks(ctx, 1, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address @@ -1462,7 +1472,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expBalanceMarketMaker := walletAmount.Sub((transferAmountWithoutFeeUpdated)) + expBalanceMarketMaker := walletAmount.Sub(transferAmountWithoutFeeUpdated) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) // wait until packet finalization and verify funds (incl. fee) were added to market maker's wallet address @@ -1470,9 +1480,6 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) - require.NoError(t, err) - balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -1505,11 +1512,20 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { maxProofTime := "500ms" configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 numRollAppFn := 0 numRollAppVals := 1 + cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { Name: "rollapp1", @@ -1549,7 +1565,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1705,7 +1721,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 5, dymension) + err = testutil.WaitForBlocks(ctx, 1, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address @@ -1719,8 +1735,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expBalanceMarketMaker := walletAmount.Add(transferAmount).Add(globalEIbcFee.MulRaw(2)) - // expBalanceMarketMaker := walletAmount.Add(globalEIbcFee.Mul(math.NewInt(2))) + expBalanceMarketMaker := walletAmount.Sub(transferAmountWithoutFeeUpdated) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) // wait until packet finalization and verify funds (incl. fee) were added to market maker's wallet address @@ -1768,6 +1783,14 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1812,7 +1835,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1930,8 +1953,6 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { _, err = dymension.SendIBCTransfer(ctx, channel.ChannelID, dymensionUserAddr, transferData, options) require.NoError(t, err) - rollappHeight, err = rollapp1.GetNode().Height(ctx) - require.NoError(t, err) // Get the IBC denom for dymension on roll app dymensionTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, dymension.Config().Denom) dymensionIBCDenom := transfertypes.ParseDenomTrace(dymensionTokenDenom).IBCDenom() @@ -1986,11 +2007,20 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { maxProofTime := "500ms" configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 numRollAppFn := 0 numRollAppVals := 1 + cf := test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { Name: "rollapp1", @@ -2030,7 +2060,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -2148,8 +2178,6 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { _, err = dymension.SendIBCTransfer(ctx, channel.ChannelID, dymensionUserAddr, transferData, options) require.NoError(t, err) - rollappHeight, err = rollapp1.GetNode().Height(ctx) - require.NoError(t, err) // Get the IBC denom for dymension on roll app dymensionTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, dymension.Config().Denom) dymensionIBCDenom := transfertypes.ParseDenomTrace(dymensionTokenDenom).IBCDenom() @@ -2164,7 +2192,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 20d308a8..14a8f735 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -238,7 +238,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 5, dymension) + err = testutil.WaitForBlocks(ctx, 1, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address @@ -252,7 +252,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expBalanceMarketMaker := walletAmount.Add(transferAmountWithoutFee).Add(globalEIbcFee) + expBalanceMarketMaker := walletAmount.Sub(transferAmountWithoutFee) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) // wait until packet finalization and verify funds (incl. fee) were added to market maker's wallet address @@ -260,9 +260,6 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) - require.NoError(t, err) - balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) @@ -595,7 +592,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom)) @@ -612,7 +609,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 3, dymension) + err = testutil.WaitForBlocks(ctx, 1, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address @@ -632,9 +629,6 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) - require.NoError(t, err) - balance, err = dymension.GetBalance(ctx, marketMakerAddr, gaiaIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) From 0ccde135177c4c7a395b04b675a90f8e526d61fd Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sat, 14 Sep 2024 13:06:28 +0700 Subject: [PATCH 10/22] fix tests --- tests/eibc_feemarket_test.go | 12 +++++++----- tests/eibc_timeout_test.go | 22 +++++++++++++++++++--- tests/ibc_timeout_test.go | 4 ++-- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 79f41ea9..6ea6405c 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -595,7 +595,9 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of dymensionUserAddr after fulfilling the order:", balance) - require.True(t, balance.Equal(transferAmount.Sub(bridgingFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmount.Sub(bridgingFee), balance)) + + transferAmountWithoutFee := transferAmount.Sub(eibcFee) + require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee), balance)) // verify funds were deducted from market maker's wallet address balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) @@ -1201,7 +1203,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmountWithoutFee).Add(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmountWithoutFee.Sub(eibcFee)).Add(bridgingFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) // wait until packet finalization and verify funds + fee were added to market maker's wallet address isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) @@ -1700,7 +1702,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1967,7 +1969,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -2192,7 +2194,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 14a8f735..c98fda19 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -43,6 +43,14 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -87,7 +95,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -301,6 +309,14 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { maxIdleTime2 := "1s" configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -369,7 +385,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -592,7 +608,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom)) diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index 73219136..df05dcc6 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -447,7 +447,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() - err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -486,7 +486,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 60, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured From 58d9e100940a1d457f5919c5c28cc0c5e0fd0454 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sat, 14 Sep 2024 16:00:59 +0700 Subject: [PATCH 11/22] fix tests --- tests/admc_test.go | 8 ----- tests/automated_denommetadata_test.go | 16 +++++----- tests/bridging_fee_test.go | 4 +-- tests/disconnection_test.go | 2 -- tests/eibc_ack_error_test.go | 24 +++++++------- tests/eibc_corrupted_memo_test.go | 1 - tests/eibc_fee_market_test.go | 16 +++++----- tests/eibc_fee_test.go | 1 - tests/eibc_feemarket_test.go | 22 ++++++------- tests/eibc_fulfillment_test.go | 36 ++++++++++----------- tests/eibc_invariant_test.go | 6 ++-- tests/eibc_nobalance_test.go | 1 - tests/eibc_not_fulfillment_test.go | 8 ++--- tests/eibc_pfm_test.go | 8 ++--- tests/eibc_timeout_test.go | 13 ++++---- tests/erc20_ibc_transfer_test.go | 4 +-- tests/frozen_test.go | 42 ++++++++++++------------- tests/fullnode_sync_block_sync_test.go | 6 ++-- tests/fullnode_sync_gossip_test.go | 8 +---- tests/fullnode_sync_test.go | 4 +-- tests/genesis_transfer_test.go | 4 --- tests/hardfork_test.go | 12 +++---- tests/ibc_finalize_block_test.go | 12 +++---- tests/ibc_grace_period_test.go | 24 +++++++------- tests/ibc_pfm_test.go | 4 --- tests/ibc_pfm_with_grace_period_test.go | 10 +++--- tests/ibc_timeout_test.go | 2 -- tests/ibc_transfer_test.go | 5 --- tests/rollapp_invariant_test.go | 8 ++--- tests/rollapp_upgrade_test.go | 4 --- tests/sequencer_invariant_test.go | 8 ++--- tests/sequencer_test.go | 2 -- tests/setup.go | 3 +- tests/tx_batch_finalization_test.go | 2 -- tests/upgrade_hub_test.go | 4 +-- 35 files changed, 139 insertions(+), 195 deletions(-) diff --git a/tests/admc_test.go b/tests/admc_test.go index ad64e2a2..5e8f1573 100644 --- a/tests/admc_test.go +++ b/tests/admc_test.go @@ -34,7 +34,6 @@ func TestADMC_Originates_HubtoRA_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -204,7 +203,6 @@ func TestADMC_Migrate_Empty_User_Memo_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -433,7 +431,6 @@ func TestADMC_Migrate_With_User_Memo_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -670,7 +667,6 @@ func TestADMC_Originates_HubtoRA_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -840,7 +836,6 @@ func TestADMC_Migrate_Empty_User_Memo_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1066,7 +1061,6 @@ func TestADMC_Migrate_With_User_Memo_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1299,7 +1293,6 @@ func TestADMC_MetaData_NotFound_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1499,7 +1492,6 @@ func TestADMC_MetaData_NotFound_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/automated_denommetadata_test.go b/tests/automated_denommetadata_test.go index 5532a2c7..d85e612c 100644 --- a/tests/automated_denommetadata_test.go +++ b/tests/automated_denommetadata_test.go @@ -36,14 +36,14 @@ func TestADMC_Hub_to_RA_reserved_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -355,7 +355,7 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -603,14 +603,14 @@ func TestADMC_Hub_to_RA_reserved_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -921,14 +921,14 @@ func TestADMC_Hub_to_RA_3rd_Party_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1231,7 +1231,6 @@ func TestADMC_Hub_to_RA_Migrate_Dym_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1429,7 +1428,6 @@ func TestADMC_Hub_to_RA_Migrate_Dym_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/bridging_fee_test.go b/tests/bridging_fee_test.go index 2f0f680f..15a989c7 100644 --- a/tests/bridging_fee_test.go +++ b/tests/bridging_fee_test.go @@ -174,7 +174,7 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -183,7 +183,7 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/disconnection_test.go b/tests/disconnection_test.go index 3b28ac7f..c330635c 100644 --- a/tests/disconnection_test.go +++ b/tests/disconnection_test.go @@ -121,7 +121,6 @@ func TestDisconnection_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "20s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["block_batch_max_size_bytes"] = "1000" dymintTomlOverrides["max_batch_skew"] = "1" @@ -251,7 +250,6 @@ func TestDisconnection_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "5s" dymintTomlOverrides["batch_submit_time"] = "5s" dymintTomlOverrides["block_batch_max_size_bytes"] = "1000" dymintTomlOverrides["max_batch_skew"] = "1" diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index 7ff8d011..50b34845 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -38,7 +38,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -47,7 +47,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -458,7 +458,7 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -467,7 +467,7 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -815,7 +815,7 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -824,7 +824,7 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1252,7 +1252,7 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -1261,7 +1261,7 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1659,7 +1659,7 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -1668,7 +1668,7 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -2013,7 +2013,7 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -2022,7 +2022,7 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index b6c30680..35055bea 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -36,7 +36,6 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/eibc_fee_market_test.go b/tests/eibc_fee_market_test.go index 2cae24e1..337ef19e 100644 --- a/tests/eibc_fee_market_test.go +++ b/tests/eibc_fee_market_test.go @@ -35,14 +35,14 @@ func TestEIBCFulfillAlreadyFulfilledDemand_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -360,14 +360,14 @@ func TestEIBCAlreadyFulfilledDemand_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -685,14 +685,14 @@ func TestEIBCUnallowedSigner_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -947,14 +947,14 @@ func TestEIBCUnallowedSigner_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_fee_test.go b/tests/eibc_fee_test.go index ae837544..364aa5fd 100644 --- a/tests/eibc_fee_test.go +++ b/tests/eibc_fee_test.go @@ -36,7 +36,6 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" dymintTomlOverrides["block_time"] = "2s" diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 6ea6405c..48149ddb 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -34,14 +34,14 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -332,14 +332,14 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -643,14 +643,14 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -939,14 +939,14 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1245,7 +1245,6 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1512,7 +1511,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) modifyGenesisKV := append( dymensionGenesisKV, @@ -1779,7 +1778,6 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -2007,7 +2005,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) modifyGenesisKV := append( dymensionGenesisKV, diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index c8d19e5a..1ff03fcf 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -36,14 +36,14 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -424,14 +424,14 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -811,14 +811,14 @@ func TestEIBCFulfillment_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1106,14 +1106,14 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1410,14 +1410,14 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1773,14 +1773,14 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Disable erc20 modifyRollappGeneisKV := append( @@ -2185,14 +2185,14 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -2588,14 +2588,14 @@ func TestEIBCFulfillment_ignore_hub_to_RA_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -2838,14 +2838,14 @@ func TestEIBCFulfillment_ignore_hub_to_RA_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index 6dbb4e36..07ec4235 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -34,7 +34,7 @@ func TestEIBCInvariant_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( @@ -341,14 +341,14 @@ func TestEIBCInvariant_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( diff --git a/tests/eibc_nobalance_test.go b/tests/eibc_nobalance_test.go index 91e1035d..7d5d349c 100644 --- a/tests/eibc_nobalance_test.go +++ b/tests/eibc_nobalance_test.go @@ -37,7 +37,6 @@ func TestEIBCNoBalanceToFulfillOrder_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/eibc_not_fulfillment_test.go b/tests/eibc_not_fulfillment_test.go index 8072b526..b5cd7682 100644 --- a/tests/eibc_not_fulfillment_test.go +++ b/tests/eibc_not_fulfillment_test.go @@ -35,14 +35,14 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -315,14 +315,14 @@ func TestEIBCNotFulfillment_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_pfm_test.go b/tests/eibc_pfm_test.go index 5298fc37..db3d24ca 100644 --- a/tests/eibc_pfm_test.go +++ b/tests/eibc_pfm_test.go @@ -36,14 +36,14 @@ func TestEIBCPFM_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -310,14 +310,14 @@ func TestEIBCPFM_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index c98fda19..8787b761 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -37,7 +37,6 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -229,7 +228,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 40, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -300,14 +299,14 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) modifyGenesisKV := append( dymensionGenesisKV, @@ -608,7 +607,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom)) @@ -679,14 +678,14 @@ func TestEIBCTimeoutFulFillDymToRollapp_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/erc20_ibc_transfer_test.go b/tests/erc20_ibc_transfer_test.go index 4094b585..70733304 100644 --- a/tests/erc20_ibc_transfer_test.go +++ b/tests/erc20_ibc_transfer_test.go @@ -37,7 +37,7 @@ func TestERC20HubToRollAppWithoutRegister_EVM(t *testing.T) { 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 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -265,7 +265,7 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { 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 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/frozen_test.go b/tests/frozen_test.go index a97812c7..bb28fa9d 100644 --- a/tests/frozen_test.go +++ b/tests/frozen_test.go @@ -39,14 +39,14 @@ func TestRollAppFreeze_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -381,14 +381,14 @@ func TestRollAppFreeze_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -749,14 +749,14 @@ func TestOtherRollappNotAffected_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1177,7 +1177,6 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1191,7 +1190,6 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) { dymintTomlOverrides2["settlement_gas_prices"] = "0adym" dymintTomlOverrides2["max_proof_time"] = "500ms" dymintTomlOverrides2["max_idle_time"] = "3s" - dymintTomlOverrides2["batch_submit_max_time"] = "100s" dymintTomlOverrides2["batch_submit_time"] = "20s" dymintTomlOverrides2["p2p_blocksync_enabled"] = "false" @@ -1618,7 +1616,7 @@ func TestPacketRollbacked_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1936,7 +1934,7 @@ func TestPacketRollbacked_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -2266,14 +2264,14 @@ func TestRollAppFreezeNoBrokenInvariants_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -2601,14 +2599,14 @@ func TestRollAppFreezeNoBrokenInvariants_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -2936,14 +2934,14 @@ func TestRollAppSqcSlashedJailed_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -3346,14 +3344,14 @@ func TestRollAppSqcSlashedJailed_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -3761,7 +3759,7 @@ func TestRollAppFreezeStateNotProgressing_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -4082,7 +4080,7 @@ func TestRollAppFreezeStateNotProgressing_Wasm(t *testing.T) { 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 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -4403,7 +4401,7 @@ func TestRollAppFreezeEibcPending_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -4745,7 +4743,7 @@ func TestRollAppFreezeEibcPending_Wasm(t *testing.T) { 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 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/fullnode_sync_block_sync_test.go b/tests/fullnode_sync_block_sync_test.go index 3047d212..324eb719 100644 --- a/tests/fullnode_sync_block_sync_test.go +++ b/tests/fullnode_sync_block_sync_test.go @@ -42,8 +42,7 @@ func TestSync_BlockSync_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "3600s" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "3600s" dymintTomlOverrides["block_time"] = "20ms" dymintTomlOverrides["p2p_gossip_cache_size"] = "1" dymintTomlOverrides["p2p_blocksync_enabled"] = "true" @@ -384,8 +383,7 @@ func TestSync_BlockSync_fn_disconnect_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "3600s" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "3600s" dymintTomlOverrides["block_time"] = "20ms" dymintTomlOverrides["p2p_gossip_cache_size"] = "1" dymintTomlOverrides["p2p_blocksync_enabled"] = "true" diff --git a/tests/fullnode_sync_gossip_test.go b/tests/fullnode_sync_gossip_test.go index 0514a28c..ed5508a6 100644 --- a/tests/fullnode_sync_gossip_test.go +++ b/tests/fullnode_sync_gossip_test.go @@ -41,8 +41,7 @@ func TestSync_Celes_Rt_Gossip_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_max_time"] = "5s" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "5s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -358,7 +357,6 @@ func TestSync_Celes_Rt_Gossip_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_max_time"] = "80s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -636,7 +634,6 @@ func TestSync_Sqc_Disconnect_Gossip_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_max_time"] = "5s" dymintTomlOverrides["batch_submit_time"] = "5s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -987,7 +984,6 @@ func TestSync_Sqc_Disconnect_Gossip_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_max_time"] = "5s" dymintTomlOverrides["batch_submit_time"] = "5s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1338,7 +1334,6 @@ func TestSync_Fullnode_Disconnect_Gossip_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_max_time"] = "5s" dymintTomlOverrides["batch_submit_time"] = "5s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -1685,7 +1680,6 @@ func TestSync_Fullnode_Disconnect_Gossip_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_max_time"] = "5s" dymintTomlOverrides["batch_submit_time"] = "5s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/fullnode_sync_test.go b/tests/fullnode_sync_test.go index 5c0a893f..18e0705f 100644 --- a/tests/fullnode_sync_test.go +++ b/tests/fullnode_sync_test.go @@ -69,7 +69,7 @@ func TestFullnodeSync_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "5s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "20s", true) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, true) // Create chain factory with dymension numHubVals := 1 @@ -318,7 +318,6 @@ func TestFullnodeSync_Celestia_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "80s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -595,7 +594,6 @@ func TestFullnodeSync_Celestia_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "80s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/genesis_transfer_test.go b/tests/genesis_transfer_test.go index 154e9063..8bacb575 100644 --- a/tests/genesis_transfer_test.go +++ b/tests/genesis_transfer_test.go @@ -34,7 +34,6 @@ func TestGenesisTransferBridgeBlocking_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -185,7 +184,6 @@ func TestGenesisTransferBridgeBlocking_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -336,7 +334,6 @@ func TestGenesisTransferConnectionBlock_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -499,7 +496,6 @@ func TestGenesisTransferConnectionBlock_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/hardfork_test.go b/tests/hardfork_test.go index 5b49c9df..c349d169 100644 --- a/tests/hardfork_test.go +++ b/tests/hardfork_test.go @@ -36,7 +36,7 @@ func TestHardFork_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -368,7 +368,7 @@ func TestHardFork_EVM(t *testing.T) { // setup config for rollapp 1 new_rollapp_id := "rollappevm_1234-2" - configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) cf = test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { @@ -568,7 +568,7 @@ func TestHardFork_Wasm(t *testing.T) { maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -900,7 +900,7 @@ func TestHardFork_Wasm(t *testing.T) { // setup config for rollapp 1 new_rollapp_id := "rollappwasm_1234-2" - configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) cf = test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { @@ -1095,7 +1095,7 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1432,7 +1432,7 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { // setup config for rollapp 1 new_rollapp_id := "rollappevm_1234-2" - configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) cf = test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { diff --git a/tests/ibc_finalize_block_test.go b/tests/ibc_finalize_block_test.go index 1d9f37f2..aa179e59 100644 --- a/tests/ibc_finalize_block_test.go +++ b/tests/ibc_finalize_block_test.go @@ -35,7 +35,7 @@ func TestDymFinalizeBlock_OnRecvPacket_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) modifyGenesisKV := append( rollappEVMGenesisKV, @@ -218,7 +218,7 @@ func TestDymFinalizeBlock_OnAckPacket_EVM(t *testing.T) { 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 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -418,7 +418,7 @@ func TestDymFinalizeBlock_OnTimeOutPacket_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -600,7 +600,7 @@ func TestDymFinalizeBlock_OnRecvPacket_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) modifyGenesisKV := append( rollappWasmGenesisKV, @@ -788,7 +788,7 @@ func TestDymFinalizeBlock_OnAckPacket_Wasm(t *testing.T) { 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 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -989,7 +989,7 @@ func TestDymFinalizeBlock_OnTimeOutPacket_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index f5b114dc..b564d929 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -35,14 +35,14 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -322,14 +322,14 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -605,14 +605,14 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Increase dispute blocks modifyGenesisKV := append( @@ -862,14 +862,14 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "30s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Increase dispute blocks modifyGenesisKV := append( @@ -1118,14 +1118,14 @@ func TestDelayedAck_RelayerDown_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -1422,14 +1422,14 @@ func TestDelayedAck_RelayerDown_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/ibc_pfm_test.go b/tests/ibc_pfm_test.go index 2de4ea28..ea21defd 100644 --- a/tests/ibc_pfm_test.go +++ b/tests/ibc_pfm_test.go @@ -36,7 +36,6 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_max_time"] = "100s" // dymintTomlOverrides["batch_submit_time"] = "20s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -287,7 +286,6 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_max_time"] = "100s" // dymintTomlOverrides["batch_submit_time"] = "20s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -538,7 +536,6 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_max_time"] = "100s" // dymintTomlOverrides["batch_submit_time"] = "20s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -785,7 +782,6 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_max_time"] = "100s" // dymintTomlOverrides["batch_submit_time"] = "20s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/ibc_pfm_with_grace_period_test.go b/tests/ibc_pfm_with_grace_period_test.go index 1786baa8..26281c60 100644 --- a/tests/ibc_pfm_with_grace_period_test.go +++ b/tests/ibc_pfm_with_grace_period_test.go @@ -37,7 +37,6 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_max_time"] = "100s" // dymintTomlOverrides["batch_submit_time"] = "20s" // modifyGenesisKV := append( @@ -333,7 +332,6 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_max_time"] = "100s" // dymintTomlOverrides["batch_submit_time"] = "20s" // modifyGenesisKV := append(dymensionGenesisKV, @@ -627,14 +625,14 @@ package tests // gas_price_rollapp1 := "0adym" // maxIdleTime1 := "3s" // maxProofTime := "500ms" -// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") +// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // // setup config for rollapp 2 // settlement_layer_rollapp2 := "dymension" // rollapp2_id := "decentrio_12345-1" // gas_price_rollapp2 := "0adym" // maxIdleTime2 := "3s" -// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") +// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // // Create chain factory with dymension // numHubVals := 1 @@ -983,14 +981,14 @@ package tests // gas_price_rollapp1 := "0adym" // maxIdleTime1 := "3s" // maxProofTime := "500ms" -// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") +// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // // setup config for rollapp 2 // settlement_layer_rollapp2 := "dymension" // rollapp2_id := "decentrio_12345-1" // gas_price_rollapp2 := "0adym" // maxIdleTime2 := "3s" -// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") +// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // modifyGenesisKV := append(dymensionGenesisKV, // cosmos.GenesisKV{ diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index df05dcc6..dbb9e84b 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -36,7 +36,6 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "30s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -278,7 +277,6 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "30s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/ibc_transfer_test.go b/tests/ibc_transfer_test.go index 2cb42097..cf94311d 100644 --- a/tests/ibc_transfer_test.go +++ b/tests/ibc_transfer_test.go @@ -33,7 +33,6 @@ func TestSpinUp(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -119,7 +118,6 @@ func TestIBCTransferSuccess_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -297,7 +295,6 @@ func TestIBCTransferSuccess_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -472,7 +469,6 @@ func TestGenesisIBCTransferReservedMemo_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -638,7 +634,6 @@ func TestGenesisIBCTransferReservedMemo_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" dymintTomlOverrides["batch_submit_time"] = "20s" diff --git a/tests/rollapp_invariant_test.go b/tests/rollapp_invariant_test.go index eb1795fe..d8081a1f 100644 --- a/tests/rollapp_invariant_test.go +++ b/tests/rollapp_invariant_test.go @@ -30,14 +30,14 @@ func TestRollappInvariant_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -285,14 +285,14 @@ func TestRollappInvariant_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/rollapp_upgrade_test.go b/tests/rollapp_upgrade_test.go index b4d73ba3..77323c3f 100644 --- a/tests/rollapp_upgrade_test.go +++ b/tests/rollapp_upgrade_test.go @@ -35,7 +35,6 @@ func TestRollappUpgradeNonStateBreaking_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -246,7 +245,6 @@ func TestRollappUpgradeNonStateBreaking_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -460,7 +458,6 @@ func TestRollapp_EVM_Upgrade(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -717,7 +714,6 @@ func TestRollapp_Wasm_Upgrade(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/sequencer_invariant_test.go b/tests/sequencer_invariant_test.go index 1b9c63d4..2365f91d 100644 --- a/tests/sequencer_invariant_test.go +++ b/tests/sequencer_invariant_test.go @@ -30,14 +30,14 @@ func TestSequencerInvariant_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 @@ -288,14 +288,14 @@ func TestSequencerInvariant_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 diff --git a/tests/sequencer_test.go b/tests/sequencer_test.go index 1f65e5db..b02ca324 100644 --- a/tests/sequencer_test.go +++ b/tests/sequencer_test.go @@ -41,7 +41,6 @@ func TestSequencerCelestia_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "80s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -320,7 +319,6 @@ func TestSequencerHubDisconnection_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "30s" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/setup.go b/tests/setup.go index ca2cd399..329bea17 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -654,7 +654,7 @@ type rollappParam struct { // require.Equal(t, string(deployerWhitelistParams), newParams.Value) // } -func overridesDymintToml(settlemenLayer, nodeAddress, rollappId, gasPrices, maxIdleTime, maxProofTime, batchSubmitMaxTime string, optionalConfigs ...bool) map[string]any { +func overridesDymintToml(settlemenLayer, nodeAddress, rollappId, gasPrices, maxIdleTime, maxProofTime string, optionalConfigs ...bool) map[string]any { configFileOverrides := make(map[string]any) dymintTomlOverrides := make(testutil.Toml) @@ -677,7 +677,6 @@ func overridesDymintToml(settlemenLayer, nodeAddress, rollappId, gasPrices, maxI dymintTomlOverrides["settlement_gas_prices"] = gasPrices dymintTomlOverrides["max_idle_time"] = maxIdleTime dymintTomlOverrides["max_proof_time"] = maxProofTime - dymintTomlOverrides["batch_submit_max_time"] = batchSubmitMaxTime dymintTomlOverrides["p2p_blocksync_enabled"] = "false" dymintTomlOverrides["batch_submit_time"] = "20s" diff --git a/tests/tx_batch_finalization_test.go b/tests/tx_batch_finalization_test.go index ee67a431..e998ac46 100644 --- a/tests/tx_batch_finalization_test.go +++ b/tests/tx_batch_finalization_test.go @@ -41,7 +41,6 @@ func TestBatchFinalization_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" @@ -173,7 +172,6 @@ func TestBatchFinalization_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_max_time"] = "100s" dymintTomlOverrides["batch_submit_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/upgrade_hub_test.go b/tests/upgrade_hub_test.go index 1f24fe46..f8d1f7f0 100644 --- a/tests/upgrade_hub_test.go +++ b/tests/upgrade_hub_test.go @@ -49,14 +49,14 @@ func TestHubUpgrade(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "100s") + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "100s") + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 0 From 8eab1b8e7074dd47ac0a92e0d80f4d93ffa00b1a Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sat, 14 Sep 2024 17:44:47 +0700 Subject: [PATCH 12/22] fix tests --- tests/eibc_feemarket_test.go | 6 +++--- tests/eibc_fulfillment_test.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 48149ddb..229df13c 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -1437,7 +1437,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 60, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) require.NoError(t, err) fmt.Println(eibcEvents) fmt.Println("Event:", eibcEvents[0]) @@ -1701,7 +1701,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -2192,7 +2192,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 1ff03fcf..6837a416 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1039,12 +1039,12 @@ func TestEIBCFulfillment_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[1]) + fmt.Println("Event:", eibcEvents[0]) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[1].OrderId, marketMakerAddr, eibcFee) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) From a28b51b96f89a882279a9fd52a522f5c5c6922c5 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sat, 14 Sep 2024 22:42:01 +0700 Subject: [PATCH 13/22] fix tests --- tests/eibc_fee_test.go | 1 - tests/eibc_feemarket_test.go | 74 +++++++++++++------------------- tests/eibc_timeout_test.go | 48 +++++++++++---------- tests/erc20_ibc_transfer_test.go | 21 +++++---- 4 files changed, 68 insertions(+), 76 deletions(-) diff --git a/tests/eibc_fee_test.go b/tests/eibc_fee_test.go index 364aa5fd..e910dcc1 100644 --- a/tests/eibc_fee_test.go +++ b/tests/eibc_fee_test.go @@ -38,7 +38,6 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { dymintTomlOverrides["max_proof_time"] = "500ms" dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" - dymintTomlOverrides["block_time"] = "2s" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 229df13c..c0db680b 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -1245,19 +1245,11 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(100), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1302,7 +1294,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1459,7 +1451,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 1, dymension) + err = testutil.WaitForBlocks(ctx, 5, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address @@ -1505,21 +1497,19 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { ctx := context.Background() // 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 := "rollappwasm_1234-1" - gas_price_rollapp1 := "0adym" - maxIdleTime1 := "10s" - maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(100), - }, - ) + configFileOverrides := make(map[string]any) + dymintTomlOverrides := make(testutil.Toml) + dymintTomlOverrides["settlement_layer"] = "dymension" + dymintTomlOverrides["settlement_node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) + dymintTomlOverrides["rollapp_id"] = "rollappwasm_1234-1" + dymintTomlOverrides["settlement_gas_prices"] = "0adym" + dymintTomlOverrides["max_idle_time"] = "3s" + dymintTomlOverrides["max_proof_time"] = "500ms" + dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["p2p_blocksync_enabled"] = "false" + + configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension numHubVals := 1 @@ -1545,7 +1535,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { EncodingConfig: encodingConfig(), NoHostMount: false, ModifyGenesis: modifyRollappWasmGenesis(rollappWasmGenesisKV), - ConfigFileOverrides: configFileOverrides1, + ConfigFileOverrides: configFileOverrides, }, NumValidators: &numRollAppVals, NumFullNodes: &numRollAppFn, @@ -1566,7 +1556,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1722,7 +1712,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 1, dymension) + err = testutil.WaitForBlocks(ctx, 5, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address @@ -1999,21 +1989,17 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { ctx := context.Background() // 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 := "rollappwasm_1234-1" - gas_price_rollapp1 := "0adym" - maxIdleTime1 := "10s" - maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(100), - }, - ) + configFileOverrides := make(map[string]any) + dymintTomlOverrides := make(testutil.Toml) + dymintTomlOverrides["settlement_layer"] = "dymension" + dymintTomlOverrides["settlement_node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) + dymintTomlOverrides["rollapp_id"] = "rollappwasm_1234-1" + dymintTomlOverrides["settlement_gas_prices"] = "0adym" + dymintTomlOverrides["max_idle_time"] = "3s" + dymintTomlOverrides["max_proof_time"] = "500ms" + dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["p2p_blocksync_enabled"] = "false" // Create chain factory with dymension numHubVals := 1 @@ -2039,7 +2025,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { EncodingConfig: encodingConfig(), NoHostMount: false, ModifyGenesis: modifyRollappWasmGenesis(rollappWasmGenesisKV), - ConfigFileOverrides: configFileOverrides1, + ConfigFileOverrides: configFileOverrides, }, NumValidators: &numRollAppVals, NumFullNodes: &numRollAppFn, @@ -2060,7 +2046,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 8787b761..8b6bb5fe 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -293,28 +293,30 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { ctx := context.Background() // 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 := "10s" - maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := make(map[string]any) + dymintTomlOverrides1 := make(testutil.Toml) + dymintTomlOverrides1["settlement_layer"] = "dymension" + dymintTomlOverrides1["settlement_node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) + dymintTomlOverrides1["rollapp_id"] = "rollappevm_1234-1" + dymintTomlOverrides1["settlement_gas_prices"] = "0adym" + dymintTomlOverrides1["max_idle_time"] = "3s" + dymintTomlOverrides1["max_proof_time"] = "500ms" + dymintTomlOverrides1["batch_submit_time"] = "100s" + dymintTomlOverrides1["p2p_blocksync_enabled"] = "false" + + configFileOverrides1["config/dymint.toml"] = dymintTomlOverrides1 // setup config for rollapp 2 - settlement_layer_rollapp2 := "dymension" - rollapp2_id := "decentrio_12345-1" - gas_price_rollapp2 := "0adym" - maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) - - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(100), - }, - ) + configFileOverrides2 := make(map[string]any) + dymintTomlOverrides2 := make(testutil.Toml) + dymintTomlOverrides2["settlement_layer"] = "dymension" + dymintTomlOverrides2["settlement_node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) + dymintTomlOverrides2["rollapp_id"] = "decentrio_12345-1" + dymintTomlOverrides2["settlement_gas_prices"] = "0adym" + dymintTomlOverrides2["max_idle_time"] = "3s" + dymintTomlOverrides2["max_proof_time"] = "500ms" + dymintTomlOverrides2["batch_submit_time"] = "100s" + dymintTomlOverrides2["p2p_blocksync_enabled"] = "false" // Create chain factory with dymension numHubVals := 1 @@ -384,7 +386,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -607,7 +609,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom)) @@ -624,7 +626,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { // require.True(t, eibcEvent.IsFulfilled) // wait a few blocks and verify sender received funds on the dymension - err = testutil.WaitForBlocks(ctx, 1, dymension) + err = testutil.WaitForBlocks(ctx, 5, dymension) require.NoError(t, err) // verify funds minus fee were added to receiver's address diff --git a/tests/erc20_ibc_transfer_test.go b/tests/erc20_ibc_transfer_test.go index 70733304..ae4d79ee 100644 --- a/tests/erc20_ibc_transfer_test.go +++ b/tests/erc20_ibc_transfer_test.go @@ -259,13 +259,18 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { ctx := context.Background() // setup config for rollapp - 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) + configFileOverrides := make(map[string]any) + dymintTomlOverrides := make(testutil.Toml) + dymintTomlOverrides["settlement_layer"] = "dymension" + dymintTomlOverrides["settlement_node_address"] = fmt.Sprintf("http://dymension_100-1-val-0-%s:26657", t.Name()) + dymintTomlOverrides["rollapp_id"] = "rollappevm_1234-1" + dymintTomlOverrides["settlement_gas_prices"] = "0adym" + dymintTomlOverrides["max_idle_time"] = "3s" + dymintTomlOverrides["max_proof_time"] = "500ms" + dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["p2p_blocksync_enabled"] = "false" + + configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension numHubVals := 1 @@ -493,7 +498,7 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { require.NotNil(t, tokenPair) // convert erc20 - _, err = rollapp1.GetNode().ConvertErc20(ctx, rollappUser.KeyName(), tokenPair.Erc20Address, transferAmount.String(), rollappUserAddr, rollappUserAddr, rollapp1_id) + _, err = rollapp1.GetNode().ConvertErc20(ctx, rollappUser.KeyName(), tokenPair.Erc20Address, transferAmount.String(), rollappUserAddr, rollappUserAddr, rollapp1.Config().ChainID) require.NoError(t, err, "can not convert erc20 to cosmos coin") err = testutil.WaitForBlocks(ctx, 5, dymension, rollapp1) From e1a1f0bec05ff11b236c16b56108d48a681435f6 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sat, 14 Sep 2024 23:14:53 +0700 Subject: [PATCH 14/22] dispute_period 30 --- tests/eibc_feemarket_test.go | 2 +- tests/eibc_fulfillment_test.go | 2 +- tests/eibc_timeout_test.go | 2 +- tests/setup.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index c0db680b..0255e76c 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -1429,7 +1429,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println(eibcEvents) fmt.Println("Event:", eibcEvents[0]) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 6837a416..42bc546a 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1041,7 +1041,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) { // get eIbc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[0]) + fmt.Println("Event:", eibcEvents) // fulfill demand order txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 8b6bb5fe..9d80ddee 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -228,7 +228,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/setup.go b/tests/setup.go index 329bea17..6645740e 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -86,7 +86,7 @@ type ForwardMetadata struct { const ( ibcPath = "dymension-demo" anotherIbcPath = "dymension-demo2" - BLOCK_FINALITY_PERIOD = 50 + BLOCK_FINALITY_PERIOD = 30 EventDemandOrderCreated = "dymensionxyz.dymension.eibc.EventDemandOrderCreated" EventDemandOrderFulfilled = "dymensionxyz.dymension.eibc.EventDemandOrderFulfilled" EventDemandOrderFeeUpdated = "dymensionxyz.dymension.eibc.EventDemandOrderFeeUpdated" From bbf92d0b063ba00b5a44b824c52904183e8722b7 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sun, 15 Sep 2024 07:38:10 +0700 Subject: [PATCH 15/22] dispute_period 50 --- tests/admc_test.go | 16 ++++----- tests/automated_denommetadata_test.go | 18 +++++----- tests/bridging_fee_test.go | 4 +-- tests/disconnection_test.go | 2 +- tests/eibc_ack_error_test.go | 26 +++++++-------- tests/eibc_corrupted_memo_test.go | 2 +- tests/eibc_fee_market_test.go | 18 +++++----- tests/eibc_fee_test.go | 2 +- tests/eibc_feemarket_test.go | 24 +++++++------- tests/eibc_fulfillment_test.go | 36 ++++++++++---------- tests/eibc_invariant_test.go | 6 ++-- tests/eibc_nobalance_test.go | 2 +- tests/eibc_not_fulfillment_test.go | 8 ++--- tests/eibc_pfm_test.go | 8 ++--- tests/eibc_timeout_test.go | 10 +++--- tests/erc20_ibc_transfer_test.go | 4 +-- tests/frozen_test.go | 44 ++++++++++++------------- tests/fullnode_sync_gossip_test.go | 2 +- tests/fullnode_sync_test.go | 6 ++-- tests/genesis_transfer_test.go | 8 ++--- tests/hardfork_test.go | 12 +++---- tests/ibc_finalize_block_test.go | 12 +++---- tests/ibc_grace_period_test.go | 24 +++++++------- tests/ibc_pfm_test.go | 8 ++--- tests/ibc_pfm_with_grace_period_test.go | 12 +++---- tests/ibc_timeout_test.go | 4 +-- tests/ibc_transfer_test.go | 10 +++--- tests/rollapp_invariant_test.go | 8 ++--- tests/rollapp_upgrade_test.go | 8 ++--- tests/sequencer_invariant_test.go | 8 ++--- tests/sequencer_test.go | 4 +-- tests/setup.go | 6 ++-- tests/tx_batch_finalization_test.go | 4 +-- tests/upgrade_hub_test.go | 4 +-- 34 files changed, 185 insertions(+), 185 deletions(-) diff --git a/tests/admc_test.go b/tests/admc_test.go index 5e8f1573..5f21a1e3 100644 --- a/tests/admc_test.go +++ b/tests/admc_test.go @@ -34,7 +34,7 @@ func TestADMC_Originates_HubtoRA_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -203,7 +203,7 @@ func TestADMC_Migrate_Empty_User_Memo_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -431,7 +431,7 @@ func TestADMC_Migrate_With_User_Memo_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -667,7 +667,7 @@ func TestADMC_Originates_HubtoRA_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -836,7 +836,7 @@ func TestADMC_Migrate_Empty_User_Memo_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1061,7 +1061,7 @@ func TestADMC_Migrate_With_User_Memo_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1293,7 +1293,7 @@ func TestADMC_MetaData_NotFound_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1492,7 +1492,7 @@ func TestADMC_MetaData_NotFound_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/automated_denommetadata_test.go b/tests/automated_denommetadata_test.go index d85e612c..99cfb964 100644 --- a/tests/automated_denommetadata_test.go +++ b/tests/automated_denommetadata_test.go @@ -36,14 +36,14 @@ func TestADMC_Hub_to_RA_reserved_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -355,7 +355,7 @@ func TestADMC_Hub_to_RA_3rd_Party_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -603,14 +603,14 @@ func TestADMC_Hub_to_RA_reserved_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -921,14 +921,14 @@ func TestADMC_Hub_to_RA_3rd_Party_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1231,7 +1231,7 @@ func TestADMC_Hub_to_RA_Migrate_Dym_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1428,7 +1428,7 @@ func TestADMC_Hub_to_RA_Migrate_Dym_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/bridging_fee_test.go b/tests/bridging_fee_test.go index 15a989c7..f7a2fe4c 100644 --- a/tests/bridging_fee_test.go +++ b/tests/bridging_fee_test.go @@ -174,7 +174,7 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -183,7 +183,7 @@ func TestChangeBridgeFeeParam_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/disconnection_test.go b/tests/disconnection_test.go index c330635c..478300a7 100644 --- a/tests/disconnection_test.go +++ b/tests/disconnection_test.go @@ -121,7 +121,7 @@ func TestDisconnection_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["block_batch_max_size_bytes"] = "1000" dymintTomlOverrides["max_batch_skew"] = "1" dymintTomlOverrides["batch_acceptance_attempts"] = "1" diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index 50b34845..185ae689 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -38,7 +38,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -47,7 +47,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -430,7 +430,7 @@ func TestEIBC_AckError_Dym_EVM(t *testing.T) { require.True(t, balance.Equal(expMmBalanceDymDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceDymDenom, balance)) // wait for a few blocks and check if the fund returns to rollapp - testutil.WaitForBlocks(ctx, 10, rollapp1) + testutil.WaitForBlocks(ctx, BLOCK_FINALITY_PERIOD+10, rollapp1) testutil.AssertBalance(t, ctx, rollapp1, erc20MAccAddr, dymensionIBCDenom, transferAmount) }) @@ -458,7 +458,7 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -467,7 +467,7 @@ func TestEIBC_AckError_RA_Token_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -815,7 +815,7 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -824,7 +824,7 @@ func TestEIBC_AckError_3rd_Party_Token_EVM(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1252,7 +1252,7 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "30s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -1261,7 +1261,7 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1659,7 +1659,7 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -1668,7 +1668,7 @@ func TestEIBC_AckError_RA_Token_Wasm(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -2013,7 +2013,7 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") extraFlags := map[string]interface{}{"genesis-accounts-path": true} @@ -2022,7 +2022,7 @@ func TestEIBC_AckError_3rd_Party_Token_Wasm(t *testing.T) { rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index 35055bea..ccba56d8 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -36,7 +36,7 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/eibc_fee_market_test.go b/tests/eibc_fee_market_test.go index 337ef19e..d0098032 100644 --- a/tests/eibc_fee_market_test.go +++ b/tests/eibc_fee_market_test.go @@ -35,14 +35,14 @@ func TestEIBCFulfillAlreadyFulfilledDemand_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -360,14 +360,14 @@ func TestEIBCAlreadyFulfilledDemand_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -685,14 +685,14 @@ func TestEIBCUnallowedSigner_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -947,14 +947,14 @@ func TestEIBCUnallowedSigner_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1159,7 +1159,7 @@ func TestEIBCUnallowedSigner_Wasm(t *testing.T) { require.NoError(t, err) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) for i, eibcEvent := range eibcEvents { diff --git a/tests/eibc_fee_test.go b/tests/eibc_fee_test.go index e910dcc1..422dae5e 100644 --- a/tests/eibc_fee_test.go +++ b/tests/eibc_fee_test.go @@ -36,7 +36,7 @@ func TestEIBCFeeTooHigh_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 0255e76c..1d62d944 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -34,14 +34,14 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -332,14 +332,14 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -643,14 +643,14 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -939,14 +939,14 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1245,7 +1245,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1506,7 +1506,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1768,7 +1768,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1998,7 +1998,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" // Create chain factory with dymension diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 42bc546a..97ab336e 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -36,14 +36,14 @@ func TestEIBCFulfillOnOneRollApp_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -424,14 +424,14 @@ func TestEIBCFulfillOnOneRollApp_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -811,14 +811,14 @@ func TestEIBCFulfillment_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1106,14 +1106,14 @@ func TestEIBCFulfillment_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1410,14 +1410,14 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1773,14 +1773,14 @@ func TestEIBCFulfillment_ThirdParty_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Disable erc20 modifyRollappGeneisKV := append( @@ -2185,14 +2185,14 @@ func TestEIBCFulfillment_ThirdParty_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -2588,14 +2588,14 @@ func TestEIBCFulfillment_ignore_hub_to_RA_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -2838,14 +2838,14 @@ func TestEIBCFulfillment_ignore_hub_to_RA_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_invariant_test.go b/tests/eibc_invariant_test.go index 07ec4235..4a167f11 100644 --- a/tests/eibc_invariant_test.go +++ b/tests/eibc_invariant_test.go @@ -34,7 +34,7 @@ func TestEIBCInvariant_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( @@ -341,14 +341,14 @@ func TestEIBCInvariant_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") const EPOCH_IDENTIFIER string = "minute" modifyGenesisKV := append( diff --git a/tests/eibc_nobalance_test.go b/tests/eibc_nobalance_test.go index 7d5d349c..d9c60add 100644 --- a/tests/eibc_nobalance_test.go +++ b/tests/eibc_nobalance_test.go @@ -37,7 +37,7 @@ func TestEIBCNoBalanceToFulfillOrder_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/eibc_not_fulfillment_test.go b/tests/eibc_not_fulfillment_test.go index b5cd7682..d1da445a 100644 --- a/tests/eibc_not_fulfillment_test.go +++ b/tests/eibc_not_fulfillment_test.go @@ -35,14 +35,14 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -315,14 +315,14 @@ func TestEIBCNotFulfillment_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_pfm_test.go b/tests/eibc_pfm_test.go index db3d24ca..82024c92 100644 --- a/tests/eibc_pfm_test.go +++ b/tests/eibc_pfm_test.go @@ -36,14 +36,14 @@ func TestEIBCPFM_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -310,14 +310,14 @@ func TestEIBCPFM_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 9d80ddee..178c58b0 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -37,7 +37,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -301,7 +301,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { dymintTomlOverrides1["settlement_gas_prices"] = "0adym" dymintTomlOverrides1["max_idle_time"] = "3s" dymintTomlOverrides1["max_proof_time"] = "500ms" - dymintTomlOverrides1["batch_submit_time"] = "100s" + dymintTomlOverrides1["batch_submit_time"] = "50s" dymintTomlOverrides1["p2p_blocksync_enabled"] = "false" configFileOverrides1["config/dymint.toml"] = dymintTomlOverrides1 @@ -315,7 +315,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { dymintTomlOverrides2["settlement_gas_prices"] = "0adym" dymintTomlOverrides2["max_idle_time"] = "3s" dymintTomlOverrides2["max_proof_time"] = "500ms" - dymintTomlOverrides2["batch_submit_time"] = "100s" + dymintTomlOverrides2["batch_submit_time"] = "50s" dymintTomlOverrides2["p2p_blocksync_enabled"] = "false" // Create chain factory with dymension @@ -680,14 +680,14 @@ func TestEIBCTimeoutFulFillDymToRollapp_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/erc20_ibc_transfer_test.go b/tests/erc20_ibc_transfer_test.go index ae4d79ee..dd9ac2e8 100644 --- a/tests/erc20_ibc_transfer_test.go +++ b/tests/erc20_ibc_transfer_test.go @@ -37,7 +37,7 @@ func TestERC20HubToRollAppWithoutRegister_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -267,7 +267,7 @@ func TestERC20RollAppToHubWithRegister_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/frozen_test.go b/tests/frozen_test.go index bb28fa9d..0f96cdd6 100644 --- a/tests/frozen_test.go +++ b/tests/frozen_test.go @@ -39,14 +39,14 @@ func TestRollAppFreeze_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -381,14 +381,14 @@ func TestRollAppFreeze_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -749,14 +749,14 @@ func TestOtherRollappNotAffected_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1177,7 +1177,7 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1190,7 +1190,7 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) { dymintTomlOverrides2["settlement_gas_prices"] = "0adym" dymintTomlOverrides2["max_proof_time"] = "500ms" dymintTomlOverrides2["max_idle_time"] = "3s" - dymintTomlOverrides2["batch_submit_time"] = "20s" + dymintTomlOverrides2["batch_submit_time"] = "50s" dymintTomlOverrides2["p2p_blocksync_enabled"] = "false" configFileOverrides2["config/dymint.toml"] = dymintTomlOverrides2 @@ -1616,7 +1616,7 @@ func TestPacketRollbacked_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1934,7 +1934,7 @@ func TestPacketRollbacked_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -2264,14 +2264,14 @@ func TestRollAppFreezeNoBrokenInvariants_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -2599,14 +2599,14 @@ func TestRollAppFreezeNoBrokenInvariants_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -2934,14 +2934,14 @@ func TestRollAppSqcSlashedJailed_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -3344,14 +3344,14 @@ func TestRollAppSqcSlashedJailed_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -3759,7 +3759,7 @@ func TestRollAppFreezeStateNotProgressing_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -4080,7 +4080,7 @@ func TestRollAppFreezeStateNotProgressing_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -4401,7 +4401,7 @@ func TestRollAppFreezeEibcPending_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -4743,7 +4743,7 @@ func TestRollAppFreezeEibcPending_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/fullnode_sync_gossip_test.go b/tests/fullnode_sync_gossip_test.go index ed5508a6..63b8d394 100644 --- a/tests/fullnode_sync_gossip_test.go +++ b/tests/fullnode_sync_gossip_test.go @@ -357,7 +357,7 @@ func TestSync_Celes_Rt_Gossip_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "200ms" dymintTomlOverrides["max_proof_time"] = "150ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["block_time"] = "190ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" diff --git a/tests/fullnode_sync_test.go b/tests/fullnode_sync_test.go index 18e0705f..7922cdc9 100644 --- a/tests/fullnode_sync_test.go +++ b/tests/fullnode_sync_test.go @@ -69,7 +69,7 @@ func TestFullnodeSync_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "5s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, true) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s", true) // Create chain factory with dymension numHubVals := 1 @@ -318,7 +318,7 @@ func TestFullnodeSync_Celestia_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides1 := make(map[string]any) @@ -594,7 +594,7 @@ func TestFullnodeSync_Celestia_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides1 := make(map[string]any) diff --git a/tests/genesis_transfer_test.go b/tests/genesis_transfer_test.go index 8bacb575..ad12f66b 100644 --- a/tests/genesis_transfer_test.go +++ b/tests/genesis_transfer_test.go @@ -34,7 +34,7 @@ func TestGenesisTransferBridgeBlocking_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -184,7 +184,7 @@ func TestGenesisTransferBridgeBlocking_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -334,7 +334,7 @@ func TestGenesisTransferConnectionBlock_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -496,7 +496,7 @@ func TestGenesisTransferConnectionBlock_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/hardfork_test.go b/tests/hardfork_test.go index c349d169..2a43fd82 100644 --- a/tests/hardfork_test.go +++ b/tests/hardfork_test.go @@ -36,7 +36,7 @@ func TestHardFork_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -368,7 +368,7 @@ func TestHardFork_EVM(t *testing.T) { // setup config for rollapp 1 new_rollapp_id := "rollappevm_1234-2" - configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") cf = test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { @@ -568,7 +568,7 @@ func TestHardFork_Wasm(t *testing.T) { maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -900,7 +900,7 @@ func TestHardFork_Wasm(t *testing.T) { // setup config for rollapp 1 new_rollapp_id := "rollappwasm_1234-2" - configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") cf = test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { @@ -1095,7 +1095,7 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1432,7 +1432,7 @@ func TestHardForkRecoverIbcClient_EVM(t *testing.T) { // setup config for rollapp 1 new_rollapp_id := "rollappevm_1234-2" - configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides = overridesDymintToml(settlement_layer_rollapp, settlement_node_address, new_rollapp_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") cf = test.NewBuiltinChainFactory(zaptest.NewLogger(t), []*test.ChainSpec{ { diff --git a/tests/ibc_finalize_block_test.go b/tests/ibc_finalize_block_test.go index aa179e59..a975f9b1 100644 --- a/tests/ibc_finalize_block_test.go +++ b/tests/ibc_finalize_block_test.go @@ -35,7 +35,7 @@ func TestDymFinalizeBlock_OnRecvPacket_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") modifyGenesisKV := append( rollappEVMGenesisKV, @@ -218,7 +218,7 @@ func TestDymFinalizeBlock_OnAckPacket_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -418,7 +418,7 @@ func TestDymFinalizeBlock_OnTimeOutPacket_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -600,7 +600,7 @@ func TestDymFinalizeBlock_OnRecvPacket_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") modifyGenesisKV := append( rollappWasmGenesisKV, @@ -788,7 +788,7 @@ func TestDymFinalizeBlock_OnAckPacket_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -989,7 +989,7 @@ func TestDymFinalizeBlock_OnTimeOutPacket_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index b564d929..acfc2bbd 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -35,14 +35,14 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -322,14 +322,14 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -605,14 +605,14 @@ func TestDelayedAck_NoFinalizedStates_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Increase dispute blocks modifyGenesisKV := append( @@ -862,14 +862,14 @@ func TestDelayedAck_NoFinalizedStates_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Increase dispute blocks modifyGenesisKV := append( @@ -1118,14 +1118,14 @@ func TestDelayedAck_RelayerDown_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -1422,14 +1422,14 @@ func TestDelayedAck_RelayerDown_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/ibc_pfm_test.go b/tests/ibc_pfm_test.go index ea21defd..358d92d8 100644 --- a/tests/ibc_pfm_test.go +++ b/tests/ibc_pfm_test.go @@ -36,7 +36,7 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_time"] = "20s" +// dymintTomlOverrides["batch_submit_time"] = "50s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // // Create chain factory with dymension @@ -286,7 +286,7 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_time"] = "20s" +// dymintTomlOverrides["batch_submit_time"] = "50s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // // Create chain factory with dymension @@ -536,7 +536,7 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_time"] = "20s" +// dymintTomlOverrides["batch_submit_time"] = "50s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // // Create chain factory with dymension @@ -782,7 +782,7 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_time"] = "20s" +// dymintTomlOverrides["batch_submit_time"] = "50s" // configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // // Create chain factory with dymension diff --git a/tests/ibc_pfm_with_grace_period_test.go b/tests/ibc_pfm_with_grace_period_test.go index 26281c60..8efb369d 100644 --- a/tests/ibc_pfm_with_grace_period_test.go +++ b/tests/ibc_pfm_with_grace_period_test.go @@ -37,7 +37,7 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_time"] = "20s" +// dymintTomlOverrides["batch_submit_time"] = "50s" // modifyGenesisKV := append( // dymensionGenesisKV, @@ -332,7 +332,7 @@ package tests // dymintTomlOverrides["settlement_gas_prices"] = "0adym" // dymintTomlOverrides["max_idle_time"] = "3s" // dymintTomlOverrides["max_proof_time"] = "500ms" -// dymintTomlOverrides["batch_submit_time"] = "20s" +// dymintTomlOverrides["batch_submit_time"] = "50s" // modifyGenesisKV := append(dymensionGenesisKV, // cosmos.GenesisKV{ @@ -625,14 +625,14 @@ package tests // gas_price_rollapp1 := "0adym" // maxIdleTime1 := "3s" // maxProofTime := "500ms" -// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) +// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime,"50s") // // setup config for rollapp 2 // settlement_layer_rollapp2 := "dymension" // rollapp2_id := "decentrio_12345-1" // gas_price_rollapp2 := "0adym" // maxIdleTime2 := "3s" -// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) +// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime,"50s") // // Create chain factory with dymension // numHubVals := 1 @@ -981,14 +981,14 @@ package tests // gas_price_rollapp1 := "0adym" // maxIdleTime1 := "3s" // maxProofTime := "500ms" -// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) +// configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime,"50s") // // setup config for rollapp 2 // settlement_layer_rollapp2 := "dymension" // rollapp2_id := "decentrio_12345-1" // gas_price_rollapp2 := "0adym" // maxIdleTime2 := "3s" -// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) +// configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime,"50s") // modifyGenesisKV := append(dymensionGenesisKV, // cosmos.GenesisKV{ diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index dbb9e84b..922acc92 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -36,7 +36,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -277,7 +277,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/ibc_transfer_test.go b/tests/ibc_transfer_test.go index cf94311d..ae5bc020 100644 --- a/tests/ibc_transfer_test.go +++ b/tests/ibc_transfer_test.go @@ -33,7 +33,7 @@ func TestSpinUp(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -118,7 +118,7 @@ func TestIBCTransferSuccess_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -295,7 +295,7 @@ func TestIBCTransferSuccess_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension @@ -469,7 +469,7 @@ func TestGenesisIBCTransferReservedMemo_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension @@ -635,7 +635,7 @@ func TestGenesisIBCTransferReservedMemo_Wasm(t *testing.T) { dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides // Create chain factory with dymension diff --git a/tests/rollapp_invariant_test.go b/tests/rollapp_invariant_test.go index d8081a1f..90ce6ffa 100644 --- a/tests/rollapp_invariant_test.go +++ b/tests/rollapp_invariant_test.go @@ -30,14 +30,14 @@ func TestRollappInvariant_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -285,14 +285,14 @@ func TestRollappInvariant_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/rollapp_upgrade_test.go b/tests/rollapp_upgrade_test.go index 77323c3f..2c477397 100644 --- a/tests/rollapp_upgrade_test.go +++ b/tests/rollapp_upgrade_test.go @@ -35,7 +35,7 @@ func TestRollappUpgradeNonStateBreaking_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -245,7 +245,7 @@ func TestRollappUpgradeNonStateBreaking_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -458,7 +458,7 @@ func TestRollapp_EVM_Upgrade(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -714,7 +714,7 @@ func TestRollapp_Wasm_Upgrade(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/sequencer_invariant_test.go b/tests/sequencer_invariant_test.go index 2365f91d..f548e8e0 100644 --- a/tests/sequencer_invariant_test.go +++ b/tests/sequencer_invariant_test.go @@ -30,14 +30,14 @@ func TestSequencerInvariant_EVM(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 @@ -288,14 +288,14 @@ func TestSequencerInvariant_Wasm(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "3s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "3s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 diff --git a/tests/sequencer_test.go b/tests/sequencer_test.go index b02ca324..b7a8a231 100644 --- a/tests/sequencer_test.go +++ b/tests/sequencer_test.go @@ -41,7 +41,7 @@ func TestSequencerCelestia_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides1 := make(map[string]any) @@ -319,7 +319,7 @@ func TestSequencerHubDisconnection_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides1 := make(map[string]any) diff --git a/tests/setup.go b/tests/setup.go index 6645740e..df034640 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -86,7 +86,7 @@ type ForwardMetadata struct { const ( ibcPath = "dymension-demo" anotherIbcPath = "dymension-demo2" - BLOCK_FINALITY_PERIOD = 30 + BLOCK_FINALITY_PERIOD = 50 EventDemandOrderCreated = "dymensionxyz.dymension.eibc.EventDemandOrderCreated" EventDemandOrderFulfilled = "dymensionxyz.dymension.eibc.EventDemandOrderFulfilled" EventDemandOrderFeeUpdated = "dymensionxyz.dymension.eibc.EventDemandOrderFeeUpdated" @@ -654,7 +654,7 @@ type rollappParam struct { // require.Equal(t, string(deployerWhitelistParams), newParams.Value) // } -func overridesDymintToml(settlemenLayer, nodeAddress, rollappId, gasPrices, maxIdleTime, maxProofTime string, optionalConfigs ...bool) map[string]any { +func overridesDymintToml(settlemenLayer, nodeAddress, rollappId, gasPrices, maxIdleTime, maxProofTime, batch_submit_time string, optionalConfigs ...bool) map[string]any { configFileOverrides := make(map[string]any) dymintTomlOverrides := make(testutil.Toml) @@ -678,7 +678,7 @@ func overridesDymintToml(settlemenLayer, nodeAddress, rollappId, gasPrices, maxI dymintTomlOverrides["max_idle_time"] = maxIdleTime dymintTomlOverrides["max_proof_time"] = maxProofTime dymintTomlOverrides["p2p_blocksync_enabled"] = "false" - dymintTomlOverrides["batch_submit_time"] = "20s" + dymintTomlOverrides["batch_submit_time"] = batch_submit_time configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/tx_batch_finalization_test.go b/tests/tx_batch_finalization_test.go index e998ac46..0cd053e9 100644 --- a/tests/tx_batch_finalization_test.go +++ b/tests/tx_batch_finalization_test.go @@ -41,7 +41,7 @@ func TestBatchFinalization_EVM(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -172,7 +172,7 @@ func TestBatchFinalization_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "100s" + dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides diff --git a/tests/upgrade_hub_test.go b/tests/upgrade_hub_test.go index f8d1f7f0..43a8cb8d 100644 --- a/tests/upgrade_hub_test.go +++ b/tests/upgrade_hub_test.go @@ -49,14 +49,14 @@ func TestHubUpgrade(t *testing.T) { gas_price_rollapp1 := "0adym" maxIdleTime1 := "10s" maxProofTime := "500ms" - configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime) + configFileOverrides1 := overridesDymintToml(settlement_layer_rollapp1, settlement_node_address, rollapp1_id, gas_price_rollapp1, maxIdleTime1, maxProofTime, "50s") // setup config for rollapp 2 settlement_layer_rollapp2 := "dymension" rollapp2_id := "decentrio_12345-1" gas_price_rollapp2 := "0adym" maxIdleTime2 := "1s" - configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime) + configFileOverrides2 := overridesDymintToml(settlement_layer_rollapp2, settlement_node_address, rollapp2_id, gas_price_rollapp2, maxIdleTime2, maxProofTime, "50s") // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 0 From 425d4d7cbdde18150ddc72e11722836b3256e895 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sun, 15 Sep 2024 08:30:57 +0700 Subject: [PATCH 16/22] fix tests --- tests/eibc_feemarket_test.go | 15 ++------------- tests/eibc_fulfillment_test.go | 2 +- tests/eibc_nobalance_test.go | 2 +- tests/eibc_not_fulfillment_test.go | 2 +- tests/eibc_timeout_test.go | 2 +- tests/setup.go | 2 +- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 1d62d944..dd8ff684 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -1429,7 +1429,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println(eibcEvents) fmt.Println("Event:", eibcEvents[0]) @@ -1465,18 +1465,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expBalanceMarketMaker := walletAmount.Sub(transferAmountWithoutFeeUpdated) - require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) - - // wait until packet finalization and verify funds (incl. fee) were added to market maker's wallet address - isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) - require.NoError(t, err) - require.True(t, isFinalized) - - balance, err = dymension.GetBalance(ctx, marketMakerAddr, dymension.Config().Denom) - require.NoError(t, err) - fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) - expBalanceMarketMaker = expBalanceMarketMaker.Add(transferData.Amount) + expBalanceMarketMaker := walletAmount.Add((globalEIbcFee.Mul(math.NewInt(2)))) require.True(t, balance.Equal(expBalanceMarketMaker), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expBalanceMarketMaker, balance)) t.Cleanup( diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 97ab336e..7b9b2caa 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1001,7 +1001,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension) + err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) require.NoError(t, err) // Get the IBC denom for urax on Hub diff --git a/tests/eibc_nobalance_test.go b/tests/eibc_nobalance_test.go index d9c60add..2cc16818 100644 --- a/tests/eibc_nobalance_test.go +++ b/tests/eibc_nobalance_test.go @@ -203,7 +203,7 @@ func TestEIBCNoBalanceToFulfillOrder_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) require.NoError(t, err) // verify funds were transferred to dymensionUserAddr diff --git a/tests/eibc_not_fulfillment_test.go b/tests/eibc_not_fulfillment_test.go index d1da445a..f50c47fc 100644 --- a/tests/eibc_not_fulfillment_test.go +++ b/tests/eibc_not_fulfillment_test.go @@ -232,7 +232,7 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) require.NoError(t, err) // Get the IBC denom for urax on Hub diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 178c58b0..52f87cbf 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -228,7 +228,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/setup.go b/tests/setup.go index df034640..343b3428 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -924,7 +924,7 @@ func getEIbcEventsWithinBlockRange( return nil, fmt.Errorf("error waiting for blocks: %w", err) } - eibcEvents, err := getEibcEventsOfType(dymension.CosmosChain, height-5, height+blockRange, breakOnFirstOccurence) + eibcEvents, err := getEibcEventsOfType(dymension.CosmosChain, height-5, height+30, breakOnFirstOccurence) if err != nil { return nil, fmt.Errorf("error getting events of type 'eibc': %w", err) } From c994f50664cba772c8eba601a48459269be8c253 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sun, 15 Sep 2024 11:23:04 +0700 Subject: [PATCH 17/22] fix tests --- live-tests/eibc_3rd_token_test.go | 4 ++-- live-tests/eibc_demand_order_ignored_test.go | 2 +- live-tests/eibc_fulfillment_test.go | 3 +-- live-tests/eibc_invalid_fee_test.go | 2 +- live-tests/eibc_no_memo_test.go | 2 +- tests/eibc_feemarket_test.go | 16 ++++++++-------- tests/eibc_fulfillment_test.go | 10 +++++----- tests/eibc_timeout_test.go | 2 +- tests/erc20_ibc_transfer_test.go | 2 +- tests/frozen_test.go | 8 ++++---- tests/setup.go | 2 +- 11 files changed, 26 insertions(+), 27 deletions(-) diff --git a/live-tests/eibc_3rd_token_test.go b/live-tests/eibc_3rd_token_test.go index 8ac14406..b165aaee 100644 --- a/live-tests/eibc_3rd_token_test.go +++ b/live-tests/eibc_3rd_token_test.go @@ -173,7 +173,7 @@ func TestEIBC_3rd_Token_RolY_Live(t *testing.T) { // get eIbc event encoding := encodingConfig() - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, &hub, 20, false, encoding.InterfaceRegistry) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, &hub, 30, false, encoding.InterfaceRegistry) require.NoError(t, err) for i, eibcEvent := range eibcEvents { fmt.Println(i, "EIBC Event:", eibcEvent) @@ -331,7 +331,7 @@ func TestEIBC_3rd_Token_Timeout_RolY_Live(t *testing.T) { // get eIbc event encoding := encodingConfig() - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, &hub, 20, false, encoding.InterfaceRegistry) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, &hub, 30, false, encoding.InterfaceRegistry) require.NoError(t, err) for i, eibcEvent := range eibcEvents { fmt.Println(i, "EIBC Event:", eibcEvent) diff --git a/live-tests/eibc_demand_order_ignored_test.go b/live-tests/eibc_demand_order_ignored_test.go index a3bc079d..e5114c83 100644 --- a/live-tests/eibc_demand_order_ignored_test.go +++ b/live-tests/eibc_demand_order_ignored_test.go @@ -80,6 +80,6 @@ func TestEIBC_Demand_Order_Ignored_RolX_Live(t *testing.T) { require.NoError(t, err) encoding := encodingConfig() - _, err = getEIbcEventsWithinBlockRange(ctx, &hub, 10, false, encoding.InterfaceRegistry) + _, err = getEIbcEventsWithinBlockRange(ctx, &hub, 30, false, encoding.InterfaceRegistry) require.Error(t, err, "There wasn't a single 'eibc' event registered within the specified block range on the hub") } diff --git a/live-tests/eibc_fulfillment_test.go b/live-tests/eibc_fulfillment_test.go index d4d01166..a0009b4a 100644 --- a/live-tests/eibc_fulfillment_test.go +++ b/live-tests/eibc_fulfillment_test.go @@ -123,7 +123,6 @@ func TestEIBCFulfillRolX_Live(t *testing.T) { cosmos.SendIBCTransfer(rollappX, channelIDRollappXDym, rollappXUser.Address, transferDataRollAppXToHub, rolxFee, options) require.NoError(t, err) - // Check non-fulfill testutil.AssertBalance(t, ctx, dymensionUser, rollappXIBCDenom, hub.GrpcAddr, math.ZeroInt()) @@ -138,7 +137,7 @@ func TestEIBCFulfillRolX_Live(t *testing.T) { // fulfill demand orders from rollapp 1 for _, eibcEvent := range eibcEvents { re := regexp.MustCompile(`^\d+`) - if re.ReplaceAllString(eibcEvent.Price, "") == rollappXIBCDenom && eibcEvent.PacketStatus == "PENDING"{ + if re.ReplaceAllString(eibcEvent.Price, "") == rollappXIBCDenom && eibcEvent.PacketStatus == "PENDING" { fmt.Println("EIBC Event:", eibcEvent) _, err := cosmos.FullfillDemandOrder(&hub, eibcEvent.OrderId, marketMaker.Address, dymFee) require.NoError(t, err) diff --git a/live-tests/eibc_invalid_fee_test.go b/live-tests/eibc_invalid_fee_test.go index e3d06d51..fcdb15c7 100644 --- a/live-tests/eibc_invalid_fee_test.go +++ b/live-tests/eibc_invalid_fee_test.go @@ -106,7 +106,7 @@ func TestEIBC_Invalid_Fee_RolX_Live(t *testing.T) { fmt.Println(rollappXHeight) encoding := encodingConfig() - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, &hub, 40, false, encoding.InterfaceRegistry) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, &hub, 30, false, encoding.InterfaceRegistry) require.NoError(t, err) for i, eibcEvent := range eibcEvents { fmt.Println(i, "EIBC Event:", eibcEvent) diff --git a/live-tests/eibc_no_memo_test.go b/live-tests/eibc_no_memo_test.go index 63da88e0..2bb73e3f 100644 --- a/live-tests/eibc_no_memo_test.go +++ b/live-tests/eibc_no_memo_test.go @@ -74,7 +74,7 @@ func TestEIBC_No_Memo_RolX_Live(t *testing.T) { require.NoError(t, err) encoding := encodingConfig() - eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, &hub, 20, false, encoding.InterfaceRegistry) + eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, &hub, 30, false, encoding.InterfaceRegistry) require.Equal(t, len(eibcEvents), 0) } diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index dd8ff684..4b942c92 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -259,7 +259,7 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) @@ -568,7 +568,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) @@ -866,7 +866,7 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) @@ -1171,7 +1171,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) @@ -1429,7 +1429,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println(eibcEvents) fmt.Println("Event:", eibcEvents[0]) @@ -1680,7 +1680,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1946,7 +1946,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -2167,7 +2167,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 7b9b2caa..5b13ff74 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1039,7 +1039,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBal), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBal, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 20, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents) @@ -1681,7 +1681,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBalance), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBalance, balance)) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 5, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) require.Equal(t, eibcEvents[len(eibcEvents)-1].PacketStatus, "PENDING") @@ -1703,7 +1703,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBalance), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBalance, balance)) // get eIbc event - eibcEvents, err = getEIbcEventsWithinBlockRange(ctx, dymension, 5, false) + eibcEvents, err = getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) require.Equal(t, eibcEvents[len(eibcEvents)-1].PacketStatus, "PENDING") @@ -2806,7 +2806,7 @@ func TestEIBCFulfillment_ignore_hub_to_RA_EVM(t *testing.T) { require.NoError(t, err) // get eIbc event - _, err = getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + _, err = getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) // expect no eibc events created as ibc transfer from hub to rollapp is ignored require.Error(t, err, "There wasn't a single 'eibc' event registered within the specified block range on the hub") @@ -3056,7 +3056,7 @@ func TestEIBCFulfillment_ignore_hub_to_RA_Wasm(t *testing.T) { require.NoError(t, err) // get eIbc event - _, err = getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + _, err = getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) // expect no eibc events created as ibc transfer from hub to rollapp is ignored require.Error(t, err, "There wasn't a single 'eibc' event registered within the specified block range on the hub") diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 52f87cbf..178c58b0 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -228,7 +228,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) diff --git a/tests/erc20_ibc_transfer_test.go b/tests/erc20_ibc_transfer_test.go index dd9ac2e8..fa74a737 100644 --- a/tests/erc20_ibc_transfer_test.go +++ b/tests/erc20_ibc_transfer_test.go @@ -181,7 +181,7 @@ func TestERC20HubToRollAppWithoutRegister_EVM(t *testing.T) { require.NoError(t, err) // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) diff --git a/tests/frozen_test.go b/tests/frozen_test.go index 0f96cdd6..43c5dfa4 100644 --- a/tests/frozen_test.go +++ b/tests/frozen_test.go @@ -3979,7 +3979,7 @@ func TestRollAppFreezeStateNotProgressing_EVM(t *testing.T) { require.Equal(t, true, dymUserRollapp1bal.Equal(transferAmount.Sub(bridgingFee)), "dym hub balance changed") // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) for i, eibcEvent := range eibcEvents { @@ -4300,7 +4300,7 @@ func TestRollAppFreezeStateNotProgressing_Wasm(t *testing.T) { require.Equal(t, true, dymUserRollapp1bal.Equal(transferAmount.Sub(bridgingFee)), "dym hub balance changed") // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) for i, eibcEvent := range eibcEvents { @@ -4621,7 +4621,7 @@ func TestRollAppFreezeEibcPending_EVM(t *testing.T) { require.Equal(t, true, dymUserRollapp1bal.Equal(transferAmount.Sub(bridgingFee)), "dym hub balance changed") // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) for i, eibcEvent := range eibcEvents { @@ -4963,7 +4963,7 @@ func TestRollAppFreezeEibcPending_Wasm(t *testing.T) { require.Equal(t, true, dymUserRollapp1bal.Equal(transferAmount.Sub(bridgingFee)), "dym hub balance changed") // get eIbc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 10, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) for i, eibcEvent := range eibcEvents { diff --git a/tests/setup.go b/tests/setup.go index 343b3428..df034640 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -924,7 +924,7 @@ func getEIbcEventsWithinBlockRange( return nil, fmt.Errorf("error waiting for blocks: %w", err) } - eibcEvents, err := getEibcEventsOfType(dymension.CosmosChain, height-5, height+30, breakOnFirstOccurence) + eibcEvents, err := getEibcEventsOfType(dymension.CosmosChain, height-5, height+blockRange, breakOnFirstOccurence) if err != nil { return nil, fmt.Errorf("error getting events of type 'eibc': %w", err) } From 9797872d642f15889a4132c4607c8ce052f2b8b4 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sun, 15 Sep 2024 13:16:24 +0700 Subject: [PATCH 18/22] fix tests --- tests/eibc_corrupted_memo_test.go | 2 +- tests/eibc_feemarket_test.go | 15 ++------------- tests/eibc_fulfillment_test.go | 1 + tests/eibc_not_fulfillment_test.go | 2 +- tests/ibc_grace_period_test.go | 2 +- tests/ibc_timeout_test.go | 8 ++++---- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index ccba56d8..5e672a9f 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -224,7 +224,7 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { // get eIbc events eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) fmt.Println(eibcEvents) - require.True(t, len(eibcEvents) == 1) // verify 1 EIBC event was registered on the hub + require.True(t, len(eibcEvents) == 2) // verify 1 EIBC event was registered on the hub rollappHeight, err = rollapp1.GetNode().Height(ctx) require.NoError(t, err) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 4b942c92..9110f812 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -11,7 +11,6 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" - "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -1413,8 +1412,6 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { _, err = dymension.SendIBCTransfer(ctx, channel.ChannelID, dymensionUserAddr, transferData, options) require.NoError(t, err) - rollappHeight, err = rollapp1.GetNode().Height(ctx) - require.NoError(t, err) // Get the IBC denom for dymension on roll app dymensionTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, dymension.Config().Denom) dymensionIBCDenom := transfertypes.ParseDenomTrace(dymensionTokenDenom).IBCDenom() @@ -1425,7 +1422,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { // According to delayedack module, we need the rollapp to have finalizedHeight > ibcClientLatestHeight // in order to trigger ibc timeout or else it will trigger callback - err = testutil.WaitForBlocks(ctx, 1, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 20, dymension, rollapp1) require.NoError(t, err) // get eibc event @@ -1762,14 +1759,6 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides - modifyGenesisKV := append( - dymensionGenesisKV, - cosmos.GenesisKV{ - Key: "app_state.rollapp.params.dispute_period_in_blocks", - Value: fmt.Sprint(100), - }, - ) - // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1814,7 +1803,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), + ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 5b13ff74..e96135ef 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1741,6 +1741,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollapp2IBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferAmount).Sub(bridgingFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) t.Cleanup( diff --git a/tests/eibc_not_fulfillment_test.go b/tests/eibc_not_fulfillment_test.go index f50c47fc..7bf718fd 100644 --- a/tests/eibc_not_fulfillment_test.go +++ b/tests/eibc_not_fulfillment_test.go @@ -282,7 +282,7 @@ func TestEIBCNotFulfillment_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) require.NoError(t, err) balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index acfc2bbd..f748dbff 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -567,7 +567,7 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 30, dymension, rollapp1) require.NoError(t, err) // Minus 0.1% of transfer amount for bridge fee diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index 922acc92..f45ed4ff 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -205,7 +205,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() - err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 100, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -244,7 +244,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 100, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -445,7 +445,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { rollappTokenDenom := transfertypes.GetPrefixedDenom(channel.Counterparty.PortID, channel.Counterparty.ChannelID, rollapp1.Config().Denom) rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom() - err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 100, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured @@ -484,7 +484,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 70, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 100, dymension, rollapp1) require.NoError(t, err) // Assert funds were returned to the sender after the timeout has occured From d317d37349941e563254e5bb7b3b8608020a1a58 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sun, 15 Sep 2024 13:59:44 +0700 Subject: [PATCH 19/22] fix tests --- tests/eibc_corrupted_memo_test.go | 4 ++-- tests/eibc_feemarket_test.go | 35 ++++--------------------------- tests/eibc_fulfillment_test.go | 5 +++-- tests/eibc_timeout_test.go | 2 +- 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/tests/eibc_corrupted_memo_test.go b/tests/eibc_corrupted_memo_test.go index 5e672a9f..e913770f 100644 --- a/tests/eibc_corrupted_memo_test.go +++ b/tests/eibc_corrupted_memo_test.go @@ -222,9 +222,9 @@ func TestEIBCCorruptedMemoNegative_EVM(t *testing.T) { require.NoError(t, err) // get eIbc events - eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, _ := getEIbcEventsWithinBlockRange(ctx, dymension, 45, false) fmt.Println(eibcEvents) - require.True(t, len(eibcEvents) == 2) // verify 1 EIBC event was registered on the hub + require.True(t, len(eibcEvents) == 1) // verify 1 EIBC event was registered on the hub rollappHeight, err = rollapp1.GetNode().Height(ctx) require.NoError(t, err) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 9110f812..d3404b20 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -290,22 +290,9 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmount.SubRaw(100_000)).Add(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(eibcFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) // wait until packet finalization and verify funds + fee were added to market maker's wallet address - isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) - require.NoError(t, err) - require.True(t, isFinalized) - - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) - require.NoError(t, err) - - balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) - require.NoError(t, err) - fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferData.Amount) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(bridgingFee) - require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) t.Cleanup( func() { @@ -897,21 +884,7 @@ func TestEIBC_Fee_Market_Auto_Created_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmount.Sub(eibcFee)).Add(bridgingFee) - require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) - // wait until packet finalization and verify funds + fee were added to market maker's wallet address - isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) - require.NoError(t, err) - require.True(t, isFinalized) - - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) - require.NoError(t, err) - - balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) - require.NoError(t, err) - fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferData.Amount) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(eibcFee) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) t.Cleanup( @@ -1422,11 +1395,11 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { // According to delayedack module, we need the rollapp to have finalizedHeight > ibcClientLatestHeight // in order to trigger ibc timeout or else it will trigger callback - err = testutil.WaitForBlocks(ctx, 20, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 1, dymension, rollapp1) require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) require.NoError(t, err) fmt.Println(eibcEvents) fmt.Println("Event:", eibcEvents[0]) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index e96135ef..77cc0c59 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1703,9 +1703,10 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { require.True(t, balance.Equal(zeroBalance), fmt.Sprintf("Value mismatch. Expected %s, actual %s", zeroBalance, balance)) // get eIbc event - eibcEvents, err = getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err = getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) + fmt.Println(eibcEvents) require.NoError(t, err) - require.Equal(t, eibcEvents[len(eibcEvents)-1].PacketStatus, "PENDING") + require.Equal(t, "PENDING", eibcEvents[len(eibcEvents)-1].PacketStatus) // fulfill demand order 2 txhash, err = dymension.FullfillDemandOrder(ctx, eibcEvents[len(eibcEvents)-1].OrderId, marketMakerAddr, eibcFee) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 178c58b0..84a0c9f3 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -228,7 +228,7 @@ func TestEIBCTimeoutDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) From 7ec5483dfd37244b6d42b44b17ce6eb70ec2486d Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Sun, 15 Sep 2024 19:25:28 +0700 Subject: [PATCH 20/22] fix tests --- go.mod | 2 +- go.sum | 4 +-- tests/eibc_ack_error_test.go | 2 +- tests/eibc_feemarket_test.go | 49 +++++++++++++++------------------- tests/eibc_fulfillment_test.go | 2 +- tests/eibc_timeout_test.go | 2 +- tests/ibc_grace_period_test.go | 2 +- tests/ibc_timeout_test.go | 2 +- 8 files changed, 30 insertions(+), 35 deletions(-) diff --git a/go.mod b/go.mod index d73451a6..f5a322f0 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ replace ( require ( github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 - github.com/decentrio/rollup-e2e-testing v0.0.0-20240913033921-1be71f15ccb1 + github.com/decentrio/rollup-e2e-testing v0.0.0-20240915121335-ddec1ae61af9 github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240911123104-4782bc4e587f github.com/dymensionxyz/dymint v1.2.0-rc01 ) diff --git a/go.sum b/go.sum index e432f86b..94e515fa 100644 --- a/go.sum +++ b/go.sum @@ -770,8 +770,8 @@ github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c h1:pFUpOrbxDR github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c/go.mod h1:6UhI8N9EjYm1c2odKpFpAYeR8dsBeM7PtzQhRgxRr9U= github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 h1:qWpUYGOsrSC+1Vmd2TjhbsSpntvvx9PsX3AoeMunFxc= github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869/go.mod h1:HZNYnPwmSxkwTPjSD5yolauc1Vx1ZzKL4FFMxTq4H5Y= -github.com/decentrio/rollup-e2e-testing v0.0.0-20240913033921-1be71f15ccb1 h1:dtlJSp+W8KzZpbO+xqGLz9OjgCV+AKf8MvIm/TtrTHs= -github.com/decentrio/rollup-e2e-testing v0.0.0-20240913033921-1be71f15ccb1/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c= +github.com/decentrio/rollup-e2e-testing v0.0.0-20240915121335-ddec1ae61af9 h1:nLpSvNKjfhl2oG3T0ZDGkg0V82B2KD6pCdHz89bAjM4= +github.com/decentrio/rollup-e2e-testing v0.0.0-20240915121335-ddec1ae61af9/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c= 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/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI= diff --git a/tests/eibc_ack_error_test.go b/tests/eibc_ack_error_test.go index 185ae689..09fc3bcb 100644 --- a/tests/eibc_ack_error_test.go +++ b/tests/eibc_ack_error_test.go @@ -1565,7 +1565,7 @@ func TestEIBC_AckError_Dym_Wasm(t *testing.T) { rollappHeight, err = rollapp1.Height(ctx) require.NoError(t, err) - ack, err := testutil.PollForAck(ctx, rollapp1, rollappHeight, rollappHeight+80, ibcTx.Packet) + ack, err := testutil.PollForAck(ctx, rollapp1, rollappHeight, rollappHeight+70, ibcTx.Packet) require.NoError(t, err) // Make sure that the ack contains error diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index d3404b20..043814cc 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -248,9 +248,6 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { _, err = rollapp1.SendIBCTransfer(ctx, dymChannel[0].ChannelID, rollappUserAddr, transferData, options) require.NoError(t, err) - rollappHeight, err = rollapp1.GetNode().Height(ctx) - require.NoError(t, err) - balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) require.NoError(t, err) @@ -262,14 +259,14 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) - _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, math.NewInt(100_000)) + _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, eibcFee) require.NoError(t, err) err = testutil.WaitForBlocks(ctx, 5, dymension) require.NoError(t, err) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, math.NewInt(100_000)) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, math.NewInt(10_000)) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -286,6 +283,15 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.NoError(t, err) fmt.Println("Balance of dymensionUserAddr after fulfilling the order:", balance) require.True(t, balance.Equal(transferAmount.Sub(bridgingFee).SubRaw(100_000)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmount.Sub(bridgingFee).SubRaw(100_000), balance)) + + rollappHeight, err = rollapp1.GetNode().Height(ctx) + require.NoError(t, err) + + // wait until the packet is finalized + isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) + require.NoError(t, err) + require.True(t, isFinalized) + // verify funds were deducted from market maker's wallet address balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) @@ -584,12 +590,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { transferAmountWithoutFee := transferAmount.Sub(eibcFee) require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee), balance)) - // verify funds were deducted from market maker's wallet address - balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) - require.NoError(t, err) - fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmount.Sub(eibcFee.MulRaw(2))).Add(bridgingFee) - require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) + // wait until packet finalization and verify funds + fee were added to market maker's wallet address isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) @@ -601,8 +602,7 @@ func TestEIBC_Fee_Market_Success_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferData.Amount) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(eibcFee.MulRaw(2)) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) t.Cleanup( @@ -1171,12 +1171,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { require.NoError(t, err) fmt.Println("Balance of dymensionUserAddr after fulfilling the order:", balance) require.True(t, balance.Equal(transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmountWithoutFee.Sub(bridgingFee).Sub(eibcFee), balance)) - // verify funds were deducted from market maker's wallet address - balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) - require.NoError(t, err) - fmt.Println("Balance of marketMakerAddr after fulfilling the order:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(transferAmountWithoutFee.Sub(eibcFee)).Add(bridgingFee) - require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) + // wait until packet finalization and verify funds + fee were added to market maker's wallet address isFinalized, err = dymension.WaitUntilRollappHeightIsFinalized(ctx, rollapp1.GetChainID(), rollappHeight, 300) require.NoError(t, err) @@ -1188,8 +1183,7 @@ func TestEIBC_Fee_Market_Auto_Created_Wasm(t *testing.T) { balance, err = dymension.GetBalance(ctx, marketMakerAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of marketMakerAddr after packet finalization:", balance) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(transferData.Amount) - expMmBalanceRollappDenom = expMmBalanceRollappDenom.Sub(bridgingFee) + expMmBalanceRollappDenom = expMmBalanceRollappDenom.Add(eibcFee.MulRaw(2)) require.True(t, balance.Equal(expMmBalanceRollappDenom), fmt.Sprintf("Value mismatch. Expected %s, actual %s", expMmBalanceRollappDenom, balance)) t.Cleanup( @@ -1399,12 +1393,11 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) require.NoError(t, err) fmt.Println(eibcEvents) - fmt.Println("Event:", eibcEvents[0]) - require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) - require.Equal(t, eibcEvents[0].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) + require.Equal(t, eibcEvents[1].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) + require.Equal(t, eibcEvents[1].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) // modify demand order with new fee _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, globalEIbcFee.Mul(math.NewInt(2))) @@ -1650,7 +1643,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1908,7 +1901,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1952,6 +1945,8 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { dymintTomlOverrides["batch_submit_time"] = "50s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" + configFileOverrides["config/dymint.toml"] = dymintTomlOverrides + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 77cc0c59..3b3311fa 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1706,7 +1706,7 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { eibcEvents, err = getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) fmt.Println(eibcEvents) require.NoError(t, err) - require.Equal(t, "PENDING", eibcEvents[len(eibcEvents)-1].PacketStatus) + require.Equal(t, "PENDING", eibcEvents[0].PacketStatus) // fulfill demand order 2 txhash, err = dymension.FullfillDemandOrder(ctx, eibcEvents[len(eibcEvents)-1].OrderId, marketMakerAddr, eibcFee) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 84a0c9f3..9f7f5c2b 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -609,7 +609,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom)) diff --git a/tests/ibc_grace_period_test.go b/tests/ibc_grace_period_test.go index f748dbff..2ded3d04 100644 --- a/tests/ibc_grace_period_test.go +++ b/tests/ibc_grace_period_test.go @@ -283,7 +283,7 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) { require.NoError(t, err) require.True(t, isFinalized) - err = testutil.WaitForBlocks(ctx, 10, dymension, rollapp1) + err = testutil.WaitForBlocks(ctx, 40, dymension, rollapp1) require.NoError(t, err) // Minus 0.1% of transfer amount for bridge fee diff --git a/tests/ibc_timeout_test.go b/tests/ibc_timeout_test.go index f45ed4ff..42fcd539 100644 --- a/tests/ibc_timeout_test.go +++ b/tests/ibc_timeout_test.go @@ -277,7 +277,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "50s" + dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides From 1cd9c5cd8720d5551eefa21ac7076754f58001b9 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Mon, 16 Sep 2024 00:39:07 +0700 Subject: [PATCH 21/22] fix tests --- tests/eibc_feemarket_test.go | 12 ++++++------ tests/eibc_timeout_test.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index 043814cc..d66602a2 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -1396,8 +1396,8 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) require.NoError(t, err) fmt.Println(eibcEvents) - require.Equal(t, eibcEvents[1].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) - require.Equal(t, eibcEvents[1].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) + require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) + require.Equal(t, eibcEvents[0].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) // modify demand order with new fee _, err = dymension.UpdateDemandOrder(ctx, eibcEvents[0].OrderId, dymensionUserAddr, globalEIbcFee.Mul(math.NewInt(2))) @@ -1643,9 +1643,9 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 100, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[0]) + fmt.Println("Event:", eibcEvents) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) require.Equal(t, eibcEvents[0].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) @@ -1901,9 +1901,9 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 70, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 100, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[0]) + fmt.Println("Event:", eibcEvents) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) require.Equal(t, eibcEvents[0].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index 9f7f5c2b..fd822db1 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -609,7 +609,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 100, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom)) From 7856dc828690b1ce525c012ad869b0799af5a928 Mon Sep 17 00:00:00 2001 From: anhductn2001 Date: Mon, 16 Sep 2024 11:56:05 +0700 Subject: [PATCH 22/22] fix tests --- tests/eibc_feemarket_test.go | 35 +++++++++++++++++++++++++--------- tests/eibc_fulfillment_test.go | 4 ++-- tests/eibc_timeout_test.go | 14 ++++++++++++-- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/tests/eibc_feemarket_test.go b/tests/eibc_feemarket_test.go index d66602a2..847edb9c 100644 --- a/tests/eibc_feemarket_test.go +++ b/tests/eibc_feemarket_test.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap/zaptest" test "github.com/decentrio/rollup-e2e-testing" + "github.com/decentrio/rollup-e2e-testing/cosmos" "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" @@ -266,7 +267,7 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { require.NoError(t, err) // fulfill demand order - txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, math.NewInt(10_000)) + txhash, err := dymension.FullfillDemandOrder(ctx, eibcEvents[0].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) // eibcEvent := getEibcEventFromTx(t, dymension, txhash) @@ -282,7 +283,7 @@ func TestEIBC_Fee_Market_Success_EVM(t *testing.T) { balance, err = dymension.GetBalance(ctx, dymensionUserAddr, rollappIBCDenom) require.NoError(t, err) fmt.Println("Balance of dymensionUserAddr after fulfilling the order:", balance) - require.True(t, balance.Equal(transferAmount.Sub(bridgingFee).SubRaw(100_000)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmount.Sub(bridgingFee).SubRaw(100_000), balance)) + require.True(t, balance.Equal(transferAmount.Sub(bridgingFee).Sub(eibcFee)), fmt.Sprintf("Value mismatch. Expected %s, actual %s", transferAmount.Sub(bridgingFee).SubRaw(100_000), balance)) rollappHeight, err = rollapp1.GetNode().Height(ctx) require.NoError(t, err) @@ -1216,6 +1217,14 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1260,7 +1269,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1458,7 +1467,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "50s" + dymintTomlOverrides["batch_submit_time"] = "100s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -1643,7 +1652,7 @@ func TestEIBCUpdateOnAckErrAndTimeout_Wasm(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 100, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1725,6 +1734,14 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { configFileOverrides["config/dymint.toml"] = dymintTomlOverrides + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(120), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -1769,7 +1786,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -1901,7 +1918,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 100, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 80, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) @@ -1942,7 +1959,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { dymintTomlOverrides["settlement_gas_prices"] = "0adym" dymintTomlOverrides["max_idle_time"] = "3s" dymintTomlOverrides["max_proof_time"] = "500ms" - dymintTomlOverrides["batch_submit_time"] = "50s" + dymintTomlOverrides["batch_submit_time"] = "20s" dymintTomlOverrides["p2p_blocksync_enabled"] = "false" configFileOverrides["config/dymint.toml"] = dymintTomlOverrides @@ -2126,7 +2143,7 @@ func TestEIBCUpdateOnTimeout_Unallowed_Wasm(t *testing.T) { // get eibc event eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 30, false) require.NoError(t, err) - fmt.Println("Event:", eibcEvents[0]) + fmt.Println("Event:", eibcEvents) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, dymension.Config().Denom)) require.Equal(t, eibcEvents[0].Fee, fmt.Sprintf("%s%s", globalEIbcFee, dymension.Config().Denom)) diff --git a/tests/eibc_fulfillment_test.go b/tests/eibc_fulfillment_test.go index 3b3311fa..6d75c70a 100644 --- a/tests/eibc_fulfillment_test.go +++ b/tests/eibc_fulfillment_test.go @@ -1706,10 +1706,10 @@ func TestEIBCFulfillment_two_rollapps_EVM(t *testing.T) { eibcEvents, err = getEIbcEventsWithinBlockRange(ctx, dymension, 50, false) fmt.Println(eibcEvents) require.NoError(t, err) - require.Equal(t, "PENDING", eibcEvents[0].PacketStatus) + require.Equal(t, "PENDING", eibcEvents[1].PacketStatus) // fulfill demand order 2 - txhash, err = dymension.FullfillDemandOrder(ctx, eibcEvents[len(eibcEvents)-1].OrderId, marketMakerAddr, eibcFee) + txhash, err = dymension.FullfillDemandOrder(ctx, eibcEvents[len(eibcEvents)-2].OrderId, marketMakerAddr, eibcFee) require.NoError(t, err) fmt.Println(txhash) eibcEvent = getEibcEventFromTx(t, dymension, txhash) diff --git a/tests/eibc_timeout_test.go b/tests/eibc_timeout_test.go index fd822db1..2eca490c 100644 --- a/tests/eibc_timeout_test.go +++ b/tests/eibc_timeout_test.go @@ -318,6 +318,16 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { dymintTomlOverrides2["batch_submit_time"] = "50s" dymintTomlOverrides2["p2p_blocksync_enabled"] = "false" + configFileOverrides2["config/dymint.toml"] = dymintTomlOverrides2 + + modifyGenesisKV := append( + dymensionGenesisKV, + cosmos.GenesisKV{ + Key: "app_state.rollapp.params.dispute_period_in_blocks", + Value: fmt.Sprint(100), + }, + ) + // Create chain factory with dymension numHubVals := 1 numHubFullNodes := 1 @@ -386,7 +396,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { GasAdjustment: 1.1, TrustingPeriod: "112h", NoHostMount: false, - ModifyGenesis: modifyDymensionGenesis(dymensionGenesisKV), + ModifyGenesis: modifyDymensionGenesis(modifyGenesisKV), ConfigFileOverrides: nil, }, NumValidators: &numHubVals, @@ -609,7 +619,7 @@ func TestEIBCTimeoutFulFillDymToRollapp_EVM(t *testing.T) { require.NoError(t, err) // get eibc event - eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 100, false) + eibcEvents, err := getEIbcEventsWithinBlockRange(ctx, dymension, 80, false) require.NoError(t, err) fmt.Println("Event:", eibcEvents[0]) require.Equal(t, eibcEvents[0].Price, fmt.Sprintf("%s%s", transferAmountWithoutFee, gaiaIBCDenom))