Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions yarn-project/end-to-end/src/e2e_bot.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

{
Expand Down Expand Up @@ -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,
};

{
Expand Down
8 changes: 7 additions & 1 deletion yarn-project/stdlib/src/gas/gas_fees.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
);
}
}

Expand Down
Loading