Skip to content

Commit 86d8176

Browse files
authored
fix: set gas settings in bench (#5796)
Set non-empty gas settings on benchmark txs
1 parent a7b9d20 commit 86d8176

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

.circleci/config.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -551,15 +551,15 @@ jobs:
551551
aztec_manifest_key: end-to-end
552552
<<: *defaults_e2e_test
553553

554-
# bench-tx-size:
555-
# steps:
556-
# - *checkout
557-
# - *setup_env
558-
# - run:
559-
# name: "Benchmark"
560-
# command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_tx_size_fees.test.ts ENABLE_GAS=1 DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
561-
# aztec_manifest_key: end-to-end
562-
# <<: *defaults_e2e_test
554+
bench-tx-size:
555+
steps:
556+
- *checkout
557+
- *setup_env
558+
- run:
559+
name: "Benchmark"
560+
command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose-no-sandbox.yml TEST=benchmarks/bench_tx_size_fees.test.ts ENABLE_GAS=1 DEBUG=aztec:benchmarks:*,aztec:sequencer,aztec:sequencer:*,aztec:world_state,aztec:merkle_trees
561+
aztec_manifest_key: end-to-end
562+
<<: *defaults_e2e_test
563563

564564
build-docs:
565565
machine:
@@ -900,12 +900,12 @@ workflows:
900900
# Benchmark jobs.
901901
- bench-publish-rollup: *e2e_test
902902
- bench-process-history: *e2e_test
903-
# - bench-tx-size: *e2e_test
903+
- bench-tx-size: *e2e_test
904904
- bench-summary:
905905
requires:
906906
- bench-publish-rollup
907907
- bench-process-history
908-
# - bench-tx-size
908+
- bench-tx-size
909909
<<: *defaults
910910

911911
# Production releases.

yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
PublicFeePaymentMethod,
99
TxStatus,
1010
} from '@aztec/aztec.js';
11-
import { GasSettings } from '@aztec/circuits.js';
11+
import { Fr, GasSettings } from '@aztec/circuits.js';
1212
import { FPCContract, GasTokenContract, TokenContract } from '@aztec/noir-contracts.js';
1313
import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token';
1414

@@ -68,9 +68,15 @@ describe('benchmarks/tx_size_fees', () => {
6868
() => Promise.resolve(new PrivateFeePaymentMethod(token.address, fpc.address, aliceWallet)),
6969
])('sends a tx with a fee', async createPaymentMethod => {
7070
const paymentMethod = await createPaymentMethod();
71+
const gasSettings = GasSettings.new({
72+
da: { gasLimit: 5, teardownGasLimit: 3, maxFeePerGas: Fr.ONE },
73+
l1: { gasLimit: 5, teardownGasLimit: 3, maxFeePerGas: Fr.ONE },
74+
l2: { gasLimit: 5, teardownGasLimit: 3, maxFeePerGas: Fr.ONE },
75+
inclusionFee: new Fr(6),
76+
});
7177
const tx = await token.methods
7278
.transfer(aliceWallet.getAddress(), bobAddress, 1n, 0)
73-
.send({ fee: paymentMethod ? { gasSettings: GasSettings.empty(), paymentMethod } : undefined })
79+
.send({ fee: paymentMethod ? { gasSettings, paymentMethod } : undefined })
7480
.wait();
7581

7682
expect(tx.status).toEqual(TxStatus.MINED);

0 commit comments

Comments
 (0)