diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 406742264b..239fd7d278 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -143,6 +143,12 @@ jobs: with: go-version: 1.21 + - name: Install Docker Compose + run: | + sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + docker-compose --version + - name: Start 4 node docker cluster run: make clean && INVARIANT_CHECK_INTERVAL=10 ${{matrix.test.env}} make docker-cluster-start & diff --git a/app/receipt_test.go b/app/receipt_test.go index d1ce00052e..935031cef3 100644 --- a/app/receipt_test.go +++ b/app/receipt_test.go @@ -87,7 +87,7 @@ func TestEvmEventsForCw20(t *testing.T) { wasmAddr := common.HexToAddress(wasmd.WasmdAddress) txData := ethtypes.LegacyTx{ Nonce: 0, - GasPrice: big.NewInt(1000000000), + GasPrice: big.NewInt(333000000000), Gas: 1000000, To: &wasmAddr, Data: data, @@ -202,7 +202,7 @@ func TestEvmEventsForCw721(t *testing.T) { wasmAddr := common.HexToAddress(wasmd.WasmdAddress) txData := ethtypes.LegacyTx{ Nonce: 0, - GasPrice: big.NewInt(1000000000), + GasPrice: big.NewInt(333000000000), Gas: 1000000, To: &wasmAddr, Data: data, diff --git a/contracts/test/ERC20toNativePointerTest.js b/contracts/test/ERC20toNativePointerTest.js index c6c0243806..f878e1eebb 100644 --- a/contracts/test/ERC20toNativePointerTest.js +++ b/contracts/test/ERC20toNativePointerTest.js @@ -1,5 +1,6 @@ const {setupSigners, deployErc20PointerNative, getAdmin, createTokenFactoryTokenAndMint, ABI, generateWallet, - fundAddress, getSeiAddress + fundAddress, getSeiAddress, + delay } = require("./lib"); const {expect} = require("chai"); @@ -89,10 +90,13 @@ describe("ERC20 to Native Pointer", function () { expect(await pointer.balanceOf(recipient)).to.equal(amount); // fund address so it can transact - await fundAddress(recipient) + await fundAddress(recipient, "1000000000000000000000") + await delay() // unlinked wallet can send balance back to sender (becomes linked at this moment) - await (await pointer.connect(recipientWallet).transfer(sender.evmAddress, amount)).wait() + await (await pointer.connect(recipientWallet).transfer(sender.evmAddress, amount, { + gasPrice: ethers.parseUnits('333', 'gwei') + })).wait() expect(await pointer.balanceOf(recipient)).to.equal(BigInt(0)); expect(await pointer.balanceOf(sender.evmAddress)).to.equal(startBal); diff --git a/contracts/test/EVMCompatabilityTest.js b/contracts/test/EVMCompatabilityTest.js index 8ab8220ec6..bbf1dbc7d9 100644 --- a/contracts/test/EVMCompatabilityTest.js +++ b/contracts/test/EVMCompatabilityTest.js @@ -497,24 +497,24 @@ describe("EVM Test", function () { describe("EIP-1559", async function() { const zero = ethers.parseUnits('0', 'ether') - const twoGwei = ethers.parseUnits("2", "gwei"); - const oneGwei = ethers.parseUnits("1", "gwei"); + const highgp = ethers.parseUnits("400", "gwei"); + const gp = ethers.parseUnits("333", "gwei"); const testCases = [ - ["No truncation from max priority fee", oneGwei, oneGwei], - ["With truncation from max priority fee", oneGwei, twoGwei], - ["With complete truncation from max priority fee", zero, twoGwei] + ["No truncation from max priority fee", gp, gp], + ["With truncation from max priority fee", gp, highgp], + ["With complete truncation from max priority fee", zero, highgp] ]; it("Should be able to send many EIP-1559 txs", async function () { - const oneGwei = ethers.parseUnits("1", "gwei"); + const gp = ethers.parseUnits("333", "gwei"); const zero = ethers.parseUnits('0', 'ether') for (let i = 0; i < 10; i++) { const txResponse = await owner.sendTransaction({ to: owner.address, value: zero, - maxPriorityFeePerGas: oneGwei, - maxFeePerGas: oneGwei, + maxPriorityFeePerGas: gp, + maxFeePerGas: gp, type: 2 }); await txResponse.wait(); @@ -617,8 +617,8 @@ describe("EVM Test", function () { it("Should retrieve a transaction receipt", async function () { const txResponse = await evmTester.setBoolVar(false, { type: 2, // force it to be EIP-1559 - maxPriorityFeePerGas: ethers.parseUnits('100', 'gwei'), // set gas high just to get it included - maxFeePerGas: ethers.parseUnits('100', 'gwei') + maxPriorityFeePerGas: ethers.parseUnits('400', 'gwei'), // set gas high just to get it included + maxFeePerGas: ethers.parseUnits('400', 'gwei') }); await txResponse.wait(); const receipt = await ethers.provider.getTransactionReceipt(txResponse.hash); @@ -1093,6 +1093,7 @@ describe("EVM Validations ", function() { await setupSigners(await hre.ethers.getSigners()) signer = generateWallet() await fundAddress(await signer.getAddress()) + await sleep(3000) }) it("should prevent wrong chainId for eip-155 txs", async function() { @@ -1104,9 +1105,9 @@ describe("EVM Validations ", function() { chainId: "0x12345", type: 2, nonce: nonce, - maxPriorityFeePerGas: 21000, + maxPriorityFeePerGas: 400000000000, gasLimit: 21000, - maxFeePerGas:10000000000}) + maxFeePerGas: 400000000000}) const nodeUrl = 'http://localhost:8545'; const response = await axios.post(nodeUrl, { diff --git a/precompiles/distribution/distribution_test.go b/precompiles/distribution/distribution_test.go index cc7f0c770d..1a7e071d3c 100644 --- a/precompiles/distribution/distribution_test.go +++ b/precompiles/distribution/distribution_test.go @@ -148,7 +148,7 @@ func TestWithdraw(t *testing.T) { res, err = msgServer.EVMTransaction(sdk.WrapSDKContext(ctx), req) require.Nil(t, err) require.Empty(t, res.VmError) - require.Equal(t, uint64(68682), res.GasUsed) + require.Equal(t, uint64(68688), res.GasUsed) // reinitialized d, found = testApp.StakingKeeper.GetDelegation(ctx, seiAddr, val) @@ -301,7 +301,7 @@ func setWithdrawAddressAndWithdraw( res, err = msgServer.EVMTransaction(sdk.WrapSDKContext(ctx), r) require.Nil(t, err) require.Empty(t, res.VmError) - require.Equal(t, uint64(152848), res.GasUsed) + require.Equal(t, uint64(152854), res.GasUsed) // reinitialized for _, val := range vals { @@ -1051,7 +1051,7 @@ func TestPrecompile_RunAndCalculateGas_Rewards(t *testing.T) { suppliedGas: uint64(1000000), }, wantRet: emptyCasePackedOutput, - wantRemainingGas: 994319, + wantRemainingGas: 994313, wantErr: false, }, { @@ -1067,7 +1067,7 @@ func TestPrecompile_RunAndCalculateGas_Rewards(t *testing.T) { suppliedGas: uint64(1000000), }, wantRet: happyPathPackedOutput, - wantRemainingGas: 994319, + wantRemainingGas: 994313, wantErr: false, }, } diff --git a/precompiles/ibc/ibc_test.go b/precompiles/ibc/ibc_test.go index da56d0f937..feccfb150e 100644 --- a/precompiles/ibc/ibc_test.go +++ b/precompiles/ibc/ibc_test.go @@ -106,7 +106,7 @@ func TestPrecompile_Run(t *testing.T) { fields: fields{transferKeeper: &MockTransferKeeper{}}, args: commonArgs, wantBz: packedTrue, - wantRemainingGas: 994319, + wantRemainingGas: 994313, wantErr: false, }, { @@ -235,7 +235,7 @@ func TestPrecompile_Run(t *testing.T) { value: nil, }, wantBz: packedTrue, - wantRemainingGas: 994319, + wantRemainingGas: 994313, wantErr: false, }, { @@ -255,7 +255,7 @@ func TestPrecompile_Run(t *testing.T) { value: nil, }, wantBz: packedTrue, - wantRemainingGas: 994319, + wantRemainingGas: 994313, wantErr: false, }, } diff --git a/x/evm/integration_test.go b/x/evm/integration_test.go index 577fbcb46b..bb03ee0ae0 100644 --- a/x/evm/integration_test.go +++ b/x/evm/integration_test.go @@ -75,7 +75,7 @@ func TestERC2981PointerToCW2981(t *testing.T) { require.Nil(t, err) txData := ethtypes.LegacyTx{ Nonce: 0, - GasPrice: big.NewInt(1000000000), + GasPrice: big.NewInt(333000000000), Gas: 5000000, To: &to, Data: data, @@ -108,7 +108,7 @@ func TestERC2981PointerToCW2981(t *testing.T) { require.Nil(t, err) txData = ethtypes.LegacyTx{ Nonce: 1, - GasPrice: big.NewInt(1000000000), + GasPrice: big.NewInt(333000000000), Gas: 1000000, To: &pointerAddr, Data: data, @@ -158,7 +158,7 @@ func TestCW2981PointerToERC2981(t *testing.T) { require.Nil(t, err) txData := ethtypes.LegacyTx{ Nonce: 0, - GasPrice: big.NewInt(1000000000), + GasPrice: big.NewInt(333000000000), Gas: 5000000, To: nil, Data: append(bz, data...), @@ -193,7 +193,7 @@ func TestCW2981PointerToERC2981(t *testing.T) { to := common.HexToAddress(receipt.ContractAddress) txData = ethtypes.LegacyTx{ Nonce: 1, - GasPrice: big.NewInt(1000000000), + GasPrice: big.NewInt(333000000000), Gas: 1000000, To: &to, Data: data, diff --git a/x/evm/module_test.go b/x/evm/module_test.go index 8f12f0e423..32e30c2795 100644 --- a/x/evm/module_test.go +++ b/x/evm/module_test.go @@ -53,7 +53,7 @@ func TestModuleExportGenesis(t *testing.T) { module := evm.NewAppModule(nil, k) jsonMsg := module.ExportGenesis(ctx, types.ModuleCdc) jsonStr := string(jsonMsg) - assert.Equal(t, "{\"params\":{\"priority_normalizer\":\"1.000000000000000000\",\"base_fee_per_gas\":\"0.000000000000000000\",\"minimum_fee_per_gas\":\"1000000000.000000000000000000\",\"whitelisted_cw_code_hashes_for_delegate_call\":[]},\"address_associations\":[{\"sei_address\":\"sei17xpfvakm2amg962yls6f84z3kell8c5la4jkdu\",\"eth_address\":\"0x27F7B8B8B5A4e71E8E9aA671f4e4031E3773303F\"}],\"codes\":[],\"states\":[],\"nonces\":[],\"serialized\":[{\"prefix\":\"Fg==\",\"key\":\"AwAC\",\"value\":\"AAAAAAAAAAM=\"},{\"prefix\":\"Fg==\",\"key\":\"BAAG\",\"value\":\"AAAAAAAAAAQ=\"}]}", jsonStr) + assert.Equal(t, "{\"params\":{\"priority_normalizer\":\"1.000000000000000000\",\"base_fee_per_gas\":\"0.000000000000000000\",\"minimum_fee_per_gas\":\"333000000000.000000000000000000\",\"whitelisted_cw_code_hashes_for_delegate_call\":[]},\"address_associations\":[{\"sei_address\":\"sei17xpfvakm2amg962yls6f84z3kell8c5la4jkdu\",\"eth_address\":\"0x27F7B8B8B5A4e71E8E9aA671f4e4031E3773303F\"}],\"codes\":[],\"states\":[],\"nonces\":[],\"serialized\":[{\"prefix\":\"Fg==\",\"key\":\"AwAC\",\"value\":\"AAAAAAAAAAM=\"},{\"prefix\":\"Fg==\",\"key\":\"BAAG\",\"value\":\"AAAAAAAAAAQ=\"}]}", jsonStr) } func TestConsensusVersion(t *testing.T) { diff --git a/x/evm/types/params.go b/x/evm/types/params.go index faff9e9ec6..485782dc02 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -23,7 +23,7 @@ var DefaultPriorityNormalizer = sdk.NewDec(1) // burnt rather than go to validators (similar to base fee on // Ethereum). var DefaultBaseFeePerGas = sdk.NewDec(0) -var DefaultMinFeePerGas = sdk.NewDec(1000000000) +var DefaultMinFeePerGas = sdk.NewDec(333000000000) var DefaultWhitelistedCwCodeHashesForDelegateCall = generateDefaultWhitelistedCwCodeHashesForDelegateCall()