From 95d05c41df657607242c3a9e2983e27c1ed38886 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 4 Mar 2026 23:34:24 +0000 Subject: [PATCH] chore: add comment explaining dedicated L1 account for bridge resume tests --- yarn-project/end-to-end/src/e2e_bot.test.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yarn-project/end-to-end/src/e2e_bot.test.ts b/yarn-project/end-to-end/src/e2e_bot.test.ts index 9fb5d09ff8f7..ba55a1a4941d 100644 --- a/yarn-project/end-to-end/src/e2e_bot.test.ts +++ b/yarn-project/end-to-end/src/e2e_bot.test.ts @@ -134,7 +134,10 @@ describe('e2e_bot', () => { l1RpcUrls, feePaymentMethod: 'fee_juice', - l1PrivateKey: getPrivateKey(), + // Use a dedicated L1 account (index 7) for bridging. The default mnemonic account (index 0) + // is shared with the sequencer which sends L1 block proposals, causing nonce races on the + // approve/deposit calls in bridgeL1FeeJuice. Indices 8 and 9 are used by other tests below. + l1PrivateKey: new SecretValue(bufferToHex(getPrivateKeyFromIndex(7)!)), flushSetupTransactions: true, // Increase fee headroom to handle fee volatility from rapid block building in tests. // Fees can escalate >10x due to blocks built by earlier tests and bridge operations. @@ -174,7 +177,8 @@ describe('e2e_bot', () => { l1RpcUrls, feePaymentMethod: 'fee_juice', - l1PrivateKey: getPrivateKey(), + // See comment above — dedicated L1 account to avoid nonce races with the sequencer. + l1PrivateKey: new SecretValue(bufferToHex(getPrivateKeyFromIndex(7)!)), flushSetupTransactions: true, // Increase fee headroom to handle fee volatility from rapid block building in tests. // This test is especially susceptible because changing salt triggers a new bridge claim,