diff --git a/yarn-project/end-to-end/src/e2e_deploy_contract/deploy_method.test.ts b/yarn-project/end-to-end/src/e2e_deploy_contract/deploy_method.test.ts index ed7cfba703fb..708215460821 100644 --- a/yarn-project/end-to-end/src/e2e_deploy_contract/deploy_method.test.ts +++ b/yarn-project/end-to-end/src/e2e_deploy_contract/deploy_method.test.ts @@ -157,7 +157,7 @@ describe('e2e_deploy_contract deploy method', () => { // First send the deploy transaction // Pay priority fee to ensure the deployment transaction gets processed first. - const maxPriorityFeesPerGas = new GasFees(1n, 0n); + const maxPriorityFeesPerGas = new GasFees(0n, 1n); const deployTxPromise = deployTx.send({ from: defaultAccountAddress, fee: { gasSettings: { maxPriorityFeesPerGas } }, diff --git a/yarn-project/end-to-end/src/e2e_p2p/gossip_network.test.ts b/yarn-project/end-to-end/src/e2e_p2p/gossip_network.test.ts index ff561ecfff69..eba29fcf1e3b 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/gossip_network.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/gossip_network.test.ts @@ -30,6 +30,8 @@ const CHECK_ALERTS = process.env.CHECK_ALERTS === 'true'; const NUM_VALIDATORS = 4; const NUM_TXS_PER_NODE = 2; const BOOT_NODE_UDP_PORT = 4500; +const AZTEC_SLOT_DURATION = 36; +const AZTEC_EPOCH_DURATION = 4; const DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), 'gossip-')); @@ -61,8 +63,8 @@ describe('e2e_p2p_network', () => { startProverNode: false, // we'll start our own using p2p initialConfig: { ...SHORTENED_BLOCK_TIME_CONFIG_NO_PRUNES, - aztecSlotDuration: 36, - aztecEpochDuration: 4, + aztecSlotDuration: AZTEC_SLOT_DURATION, + aztecEpochDuration: AZTEC_EPOCH_DURATION, slashingRoundSizeInEpochs: 2, slashingQuorum: 5, listenAddress: '127.0.0.1', @@ -205,13 +207,15 @@ describe('e2e_p2p_network', () => { } // Ensure prover node did its job and collected txs from p2p + // Timeout must exceed one full epoch (aztecSlotDuration * aztecEpochDuration = 36 * 4 = 144s) + // plus time for the prover to generate and submit the proof. await retryUntil( async () => { const provenBlock = await nodes[0].getProvenBlockNumber(); return provenBlock > 0; }, 'proven block', - 120, + 300, ); }); }); diff --git a/yarn-project/sequencer-client/src/client/sequencer-client.test.ts b/yarn-project/sequencer-client/src/client/sequencer-client.test.ts index e325cefca47d..fde8ab830cfa 100644 --- a/yarn-project/sequencer-client/src/client/sequencer-client.test.ts +++ b/yarn-project/sequencer-client/src/client/sequencer-client.test.ts @@ -22,8 +22,8 @@ describe('computeBlockLimits', () => { describe('L2 gas', () => { it('derives maxL2BlockGas from rollupManaLimit when not explicitly set', () => { const rollupManaLimit = 1_000_000; - // Single block mode (maxNumberOfBlocks=1), default multiplier=2: - // min(1_000_000, ceil(1_000_000 / 1 * 2)) = min(1_000_000, 2_000_000) = 1_000_000 + // Single block mode (maxNumberOfBlocks=1), default multiplier=1.2: + // min(1_000_000, ceil(1_000_000 / 1 * 1.2)) = min(1_000_000, 1_200_000) = 1_000_000 const result = computeBlockLimits(makeConfig(), rollupManaLimit, 12, log); expect(result.maxL2BlockGas).toBe(rollupManaLimit); }); @@ -43,8 +43,8 @@ describe('computeBlockLimits', () => { const daLimit = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT; it('derives maxDABlockGas from DA checkpoint limit when not explicitly set', () => { - // Single block mode (maxNumberOfBlocks=1), default multiplier=2: - // min(daLimit, ceil(daLimit / 1 * 2)) = min(daLimit, daLimit * 2) = daLimit + // Single block mode (maxNumberOfBlocks=1), default multiplier=1.2: + // min(daLimit, ceil(daLimit / 1 * 1.2)) = min(daLimit, daLimit * 1.2) = daLimit const result = computeBlockLimits(makeConfig(), 1_000_000, 12, log); expect(result.maxDABlockGas).toBe(daLimit); }); @@ -78,14 +78,14 @@ describe('computeBlockLimits', () => { }); it('derives maxTxsPerBlock from maxTxsPerCheckpoint when per-block not set', () => { - // Multi-block mode with maxNumberOfBlocks=5, multiplier=2: - // min(100, ceil(100 / 5 * 2)) = min(100, 40) = 40 + // Multi-block mode with maxNumberOfBlocks=5, multiplier=1.2: + // min(100, ceil(100 / 5 * 1.2)) = min(100, 24) = 24 const config = makeConfig({ maxTxsPerCheckpoint: 100, blockDurationMs: 8000, }); const result = computeBlockLimits(config, 1_000_000, 12, log); - expect(result.maxTxsPerBlock).toBe(40); + expect(result.maxTxsPerBlock).toBe(24); }); }); @@ -97,14 +97,14 @@ describe('computeBlockLimits', () => { // timeReservedAtEnd = 8 + 19 = 27 // timeAvailableForBlocks = 72 - 1 - 27 = 44 // maxNumberOfBlocks = floor(44 / 8) = 5 - // With multiplier=2 and rollupManaLimit=1_000_000: - // maxL2BlockGas = min(1_000_000, ceil(1_000_000 / 5 * 2)) = min(1_000_000, 400_000) = 400_000 + // With multiplier=1.2 and rollupManaLimit=1_000_000: + // maxL2BlockGas = min(1_000_000, ceil(1_000_000 / 5 * 1.2)) = min(1_000_000, 240_000) = 240_000 const config = makeConfig({ blockDurationMs: 8000 }); const result = computeBlockLimits(config, 1_000_000, 12, log); - expect(result.maxL2BlockGas).toBe(400_000); + expect(result.maxL2BlockGas).toBe(240_000); const daLimit = MAX_PROCESSABLE_DA_GAS_PER_CHECKPOINT; - expect(result.maxDABlockGas).toBe(Math.min(daLimit, Math.ceil((daLimit / 5) * 2))); + expect(result.maxDABlockGas).toBe(Math.min(daLimit, Math.ceil((daLimit / 5) * 1.2))); }); }); });