From 42a6646597e5a79c32a5165669f751ecaaf678bb Mon Sep 17 00:00:00 2001 From: AztecBot Date: Fri, 27 Feb 2026 15:32:22 +0000 Subject: [PATCH 1/3] fix: increase minFeePadding in e2e_bot bridge resume tests and harden GasFees.mul() Gas fees can escalate >10x during rapid block building in the test environment. The previous 10x padding (minFeePadding: 9) was insufficient. Increased to 100x (minFeePadding: 99) for both bridge resume tests. Also improved GasFees.mul() to use bigint arithmetic for integer scalars, avoiding potential precision loss with large values, while properly handling non-integer scalars via Math.ceil. --- yarn-project/end-to-end/src/e2e_bot.test.ts | 11 +++++++---- yarn-project/stdlib/src/gas/gas_fees.ts | 8 +++++++- 2 files changed, 14 insertions(+), 5 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 00c5b06e16c3..78a1f6affff9 100644 --- a/yarn-project/end-to-end/src/e2e_bot.test.ts +++ b/yarn-project/end-to-end/src/e2e_bot.test.ts @@ -134,8 +134,9 @@ describe('e2e_bot', () => { // TODO: this should be taken from the `setup` call above l1Mnemonic: new SecretValue('test test test test test test test test test test test junk'), flushSetupTransactions: true, - // Increase fee headroom to handle fee volatility from rapid block building in tests - minFeePadding: 9, + // 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. + minFeePadding: 99, }; { @@ -174,8 +175,10 @@ describe('e2e_bot', () => { // TODO: this should be taken from the `setup` call above l1Mnemonic: new SecretValue('test test test test test test test test test test test junk'), flushSetupTransactions: true, - // Increase fee headroom to handle fee volatility from rapid block building in tests - minFeePadding: 9, + // 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, + // adding more block building on top of what earlier tests already produced. + minFeePadding: 99, }; { diff --git a/yarn-project/stdlib/src/gas/gas_fees.ts b/yarn-project/stdlib/src/gas/gas_fees.ts index ca2e700c27da..7387b2df0496 100644 --- a/yarn-project/stdlib/src/gas/gas_fees.ts +++ b/yarn-project/stdlib/src/gas/gas_fees.ts @@ -56,8 +56,14 @@ export class GasFees { return this.clone(); } else if (typeof scalar === 'bigint') { return new GasFees(this.feePerDaGas * scalar, this.feePerL2Gas * scalar); + } else if (Number.isInteger(scalar)) { + const s = BigInt(scalar); + return new GasFees(this.feePerDaGas * s, this.feePerL2Gas * s); } else { - return new GasFees(Number(this.feePerDaGas) * scalar, Number(this.feePerL2Gas) * scalar); + return new GasFees( + BigInt(Math.ceil(Number(this.feePerDaGas) * scalar)), + BigInt(Math.ceil(Number(this.feePerL2Gas) * scalar)), + ); } } From 4199876086a9ea48a96ba6c40bab0977cdb1002f Mon Sep 17 00:00:00 2001 From: AztecBot Date: Fri, 27 Feb 2026 15:32:33 +0000 Subject: [PATCH 2/3] fix: increase minFeePadding in e2e_bot bridge resume tests and harden GasFees.mul() --- yarn.lock | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 yarn.lock diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000000..fb57ccd13afb --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From f570f6f9fcbbe8c5746aaed16fce62ca4012be26 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 27 Feb 2026 10:33:37 -0500 Subject: [PATCH 3/3] Delete yarn.lock --- yarn.lock | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 yarn.lock diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index fb57ccd13afb..000000000000 --- a/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - -