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 f9cbc273adfc..10f9b4e9c98a 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 @@ -7,7 +7,7 @@ import fs from 'fs'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { type NodeContext, createNodes } from '../fixtures/setup_p2p_test.js'; import { AlertChecker, type AlertConfig } from '../quality_of_service/alert_checker.js'; -import { P2PNetworkTest, WAIT_FOR_TX_TIMEOUT } from './p2p_network.js'; +import { P2PNetworkTest, SHORTENED_BLOCK_TIME_CONFIG, WAIT_FOR_TX_TIMEOUT } from './p2p_network.js'; import { createPXEServiceAndSubmitTransactions } from './shared.js'; const CHECK_ALERTS = process.env.CHECK_ALERTS === 'true'; @@ -41,6 +41,9 @@ describe('e2e_p2p_network', () => { numberOfNodes: NUM_NODES, basePort: BOOT_NODE_UDP_PORT, metricsPort: shouldCollectMetrics(), + initialConfig: { + ...SHORTENED_BLOCK_TIME_CONFIG, + }, }); await t.setupAccount(); diff --git a/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts b/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts index 8d901f16d7c8..0d2305540fa1 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts @@ -38,6 +38,13 @@ const BOOTSTRAP_NODE_PRIVATE_KEY = '080212208f988fc0899e4a73a5aee4d271a5f2067060 const l1ContractsConfig = getL1ContractsConfigEnvVars(); export const WAIT_FOR_TX_TIMEOUT = l1ContractsConfig.aztecSlotDuration * 3; +export const SHORTENED_BLOCK_TIME_CONFIG = { + aztecEpochDuration: 4, + aztecSlotDuration: 12, + ethereumSlotDuration: 4, + aztecProofSubmissionWindow: 4 * 2 - 1, // epoch_duration * 2 - 1 +}; + export class P2PNetworkTest { private snapshotManager: ISnapshotManager; private baseAccount; @@ -86,13 +93,19 @@ export class P2PNetworkTest { process.env.E2E_DATA_PATH, { ...initialValidatorConfig, - ethereumSlotDuration: l1ContractsConfig.ethereumSlotDuration, + ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration, + aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration, + aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration, + aztecProofSubmissionWindow: + initialValidatorConfig.aztecProofSubmissionWindow ?? l1ContractsConfig.aztecProofSubmissionWindow, salt: 420, metricsPort: metricsPort, numberOfInitialFundedAccounts: 1, }, { aztecEpochDuration: initialValidatorConfig.aztecEpochDuration ?? l1ContractsConfig.aztecEpochDuration, + ethereumSlotDuration: initialValidatorConfig.ethereumSlotDuration ?? l1ContractsConfig.ethereumSlotDuration, + aztecSlotDuration: initialValidatorConfig.aztecSlotDuration ?? l1ContractsConfig.aztecSlotDuration, aztecProofSubmissionWindow: initialValidatorConfig.aztecProofSubmissionWindow ?? l1ContractsConfig.aztecProofSubmissionWindow, assumeProvenThrough: assumeProvenThrough ?? Number.MAX_SAFE_INTEGER, diff --git a/yarn-project/end-to-end/src/e2e_p2p/rediscovery.test.ts b/yarn-project/end-to-end/src/e2e_p2p/rediscovery.test.ts index 9412a272ef3b..c611d6712279 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/rediscovery.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/rediscovery.test.ts @@ -5,7 +5,7 @@ import fs from 'fs'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { type NodeContext, createNode, createNodes } from '../fixtures/setup_p2p_test.js'; -import { P2PNetworkTest, WAIT_FOR_TX_TIMEOUT } from './p2p_network.js'; +import { P2PNetworkTest, SHORTENED_BLOCK_TIME_CONFIG, WAIT_FOR_TX_TIMEOUT } from './p2p_network.js'; import { createPXEServiceAndSubmitTransactions } from './shared.js'; // Don't set this to a higher value than 9 because each node will use a different L1 publisher account and anvil seeds @@ -26,6 +26,9 @@ describe('e2e_p2p_rediscovery', () => { basePort: BOOT_NODE_UDP_PORT, // To collect metrics - run in aztec-packages `docker compose --profile metrics up` and set COLLECT_METRICS=true metricsPort: shouldCollectMetrics(), + initialConfig: { + ...SHORTENED_BLOCK_TIME_CONFIG, + }, }); await t.setupAccount(); await t.applyBaseSnapshots(); diff --git a/yarn-project/end-to-end/src/e2e_p2p/reqresp.test.ts b/yarn-project/end-to-end/src/e2e_p2p/reqresp.test.ts index 16ee4aceb0b1..61d6b64f988b 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/reqresp.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/reqresp.test.ts @@ -8,7 +8,7 @@ import { getContract } from 'viem'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { type NodeContext, createNodes } from '../fixtures/setup_p2p_test.js'; -import { P2PNetworkTest, WAIT_FOR_TX_TIMEOUT } from './p2p_network.js'; +import { P2PNetworkTest, SHORTENED_BLOCK_TIME_CONFIG, WAIT_FOR_TX_TIMEOUT } from './p2p_network.js'; import { createPXEServiceAndSubmitTransactions } from './shared.js'; // Don't set this to a higher value than 9 because each node will use a different L1 publisher account and anvil seeds @@ -29,6 +29,9 @@ describe('e2e_p2p_reqresp_tx', () => { basePort: BOOT_NODE_UDP_PORT, // To collect metrics - run in aztec-packages `docker compose --profile metrics up` metricsPort: shouldCollectMetrics(), + initialConfig: { + ...SHORTENED_BLOCK_TIME_CONFIG, + }, }); await t.setupAccount(); await t.applyBaseSnapshots(); diff --git a/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts b/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts index 33156d50a779..bbb8a5291d82 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts @@ -15,7 +15,7 @@ import { getAddress, getContract } from 'viem'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { createNodes } from '../fixtures/setup_p2p_test.js'; -import { P2PNetworkTest } from './p2p_network.js'; +import { P2PNetworkTest, SHORTENED_BLOCK_TIME_CONFIG } from './p2p_network.js'; // Don't set this to a higher value than 9 because each node will use a different L1 publisher account and anvil seeds const NUM_NODES = 4; @@ -42,6 +42,9 @@ describe('e2e_p2p_governance_proposer', () => { basePort: BOOT_NODE_UDP_PORT, // To collect metrics - run in aztec-packages `docker compose --profile metrics up` metricsPort: shouldCollectMetrics(), + initialConfig: { + ...SHORTENED_BLOCK_TIME_CONFIG, + }, }); await t.applyBaseSnapshots(); await t.setup();