diff --git a/test/suites/dev/moonbase/test-pov/test-evm-over-pov.ts b/test/suites/dev/moonbase/test-pov/test-evm-over-pov.ts index aa520b0c95..85d1538738 100644 --- a/test/suites/dev/moonbase/test-pov/test-evm-over-pov.ts +++ b/test/suites/dev/moonbase/test-pov/test-evm-over-pov.ts @@ -14,7 +14,7 @@ describeSuite({ let contracts: HeavyContract[]; let callData: `0x${string}`; const MAX_CONTRACTS = 20; - const EXPECTED_POV_ROUGH = 40_000; // bytes + const EXPECTED_POV_ROUGH = 16_000; // bytes beforeAll(async () => { const { contractAddress, abi } = await deployCreateCompiledContract(context, "CallForwarder"); @@ -88,7 +88,7 @@ describeSuite({ to: proxyAddress, data: callData, txnType: "eip1559", - gasLimit: 1_000_000, + gasLimit: 100_000, }); const { result, block } = await context.createBlock(rawSigned); @@ -97,8 +97,8 @@ describeSuite({ // The block still contain the failed (out of gas) transaction so the PoV is still included // in the block. // 1M Gas allows ~38k of PoV, so we verify we are within range. - expect(block.proofSize).to.be.at.least(30_000); - expect(block.proofSize).to.be.at.most(50_000); + expect(block.proofSize).to.be.at.least(15_000); + expect(block.proofSize).to.be.at.most(25_000); expect(result?.successful).to.equal(true); expectEVMResult(result!.events, "Error", "OutOfGas"); }, diff --git a/test/suites/dev/moonbase/test-pov/test-evm-over-pov2.ts b/test/suites/dev/moonbase/test-pov/test-evm-over-pov2.ts index a6be04ca34..73f47e785e 100644 --- a/test/suites/dev/moonbase/test-pov/test-evm-over-pov2.ts +++ b/test/suites/dev/moonbase/test-pov/test-evm-over-pov2.ts @@ -63,8 +63,8 @@ describeSuite({ const { result, block } = await context.createBlock(rawSigned); log(`block.proofSize: ${block.proofSize} (successful: ${result?.successful})`); - expect(block.proofSize).toBeGreaterThanOrEqual(30_000); - expect(block.proofSize).toBeLessThanOrEqual(50_000n + emptyBlockProofSize); + expect(block.proofSize).toBeGreaterThanOrEqual(15_000); + expect(block.proofSize).toBeLessThanOrEqual(25_000n + emptyBlockProofSize); expect(result?.successful).to.equal(true); }, }); @@ -92,7 +92,7 @@ describeSuite({ log(`block.proofSize: ${block.proofSize} (successful: ${result?.successful})`); // Empty blocks usually do not exceed 10kb, picking 50kb as a safe limit - expect(block.proofSize).to.be.at.most(50_000); + expect(block.proofSize).to.be.at.most(25_000); expect(result?.successful).to.equal(false); }, }); diff --git a/test/suites/dev/moonbase/test-pov/test-precompile-over-pov.ts b/test/suites/dev/moonbase/test-pov/test-precompile-over-pov.ts index 50502c7b61..bc646ed29b 100644 --- a/test/suites/dev/moonbase/test-pov/test-precompile-over-pov.ts +++ b/test/suites/dev/moonbase/test-pov/test-precompile-over-pov.ts @@ -18,7 +18,7 @@ describeSuite({ testCases: ({ context, log, it }) => { let contracts: HeavyContract[]; const MAX_CONTRACTS = 50; - const EXPECTED_POV_ROUGH = 55_000; // bytes + const EXPECTED_POV_ROUGH = 24_000; // bytes let batchAbi: Abi; let proxyAbi: Abi; let proxyAddress: `0x${string}`; @@ -63,7 +63,7 @@ describeSuite({ const rawSigned = await createEthersTransaction(context, { to: PRECOMPILE_BATCH_ADDRESS, data: callData, - gasLimit: 1_000_000, + gasLimit: 100_000, txnType: "eip1559", }); @@ -72,8 +72,8 @@ describeSuite({ // With 1M gas we are allowed to use ~62kb of POV, so verify the range. // The tx is still included in the block because it contains the failed tx, // so POV is included in the block as well. - expect(block.proofSize).to.be.at.least(35_000); - expect(block.proofSize).to.be.at.most(70_000); + expect(block.proofSize).to.be.at.least(15_000); + expect(block.proofSize).to.be.at.most(30_000); expect(result?.successful).to.equal(true); expectEVMResult(result!.events, "Error", "OutOfGas"); }, diff --git a/test/suites/dev/moonbase/test-pov/test-precompile-over-pov2.ts b/test/suites/dev/moonbase/test-pov/test-precompile-over-pov2.ts index 536cbd5360..06212a0795 100644 --- a/test/suites/dev/moonbase/test-pov/test-precompile-over-pov2.ts +++ b/test/suites/dev/moonbase/test-pov/test-precompile-over-pov2.ts @@ -73,8 +73,8 @@ describeSuite({ }); const { result, block } = await context.createBlock(rawSigned); - expect(block.proofSize).to.be.at.least(Number(30_000)); - expect(block.proofSize).to.be.at.most(Number(50_000n + emptyBlockProofSize)); + expect(block.proofSize).to.be.at.least(Number(15_000)); + expect(block.proofSize).to.be.at.most(Number(30_000n + emptyBlockProofSize)); expect(result?.successful).to.equal(true); }, }); diff --git a/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts b/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts index fc11d6d155..0a8e70c881 100644 --- a/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts +++ b/test/suites/dev/moonbase/test-pov/test-xcm-to-evm-pov.ts @@ -22,7 +22,7 @@ describeSuite({ let proxyAddress: `0x${string}`; const MAX_CONTRACTS = 15; let contracts: HeavyContract[]; - const EXPECTED_POV_ROUGH = 43_000; // bytes + const EXPECTED_POV_ROUGH = 17_000; // bytes let balancesPalletIndex: number; let STORAGE_READ_COST: bigint; @@ -146,8 +146,8 @@ describeSuite({ // With 500k gas we are allowed to use ~150k of POV, so verify the range. // The tx is still included in the block because it contains the failed tx, // so POV is included in the block as well. - expect(block.proofSize).to.be.at.least(30_000); - expect(block.proofSize).to.be.at.most(45_000); + expect(block.proofSize).to.be.at.least(15_000); + expect(block.proofSize).to.be.at.most(22_500); // Check the evm tx was not executed because of OutOfGas error const ethEvents = (await context.polkadotJs().query.system.events()).filter(({ event }) =>