Skip to content

Commit

Permalink
fix: set gas settings in bench
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Apr 16, 2024
1 parent a7b9d20 commit d9decd5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
22 changes: 11 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -551,15 +551,15 @@ jobs:
aztec_manifest_key: end-to-end
<<: *defaults_e2e_test

# bench-tx-size:
# steps:
# - *checkout
# - *setup_env
# - run:
# name: "Benchmark"
# 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
# aztec_manifest_key: end-to-end
# <<: *defaults_e2e_test
bench-tx-size:
steps:
- *checkout
- *setup_env
- run:
name: "Benchmark"
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
aztec_manifest_key: end-to-end
<<: *defaults_e2e_test

build-docs:
machine:
Expand Down Expand Up @@ -900,12 +900,12 @@ workflows:
# Benchmark jobs.
- bench-publish-rollup: *e2e_test
- bench-process-history: *e2e_test
# - bench-tx-size: *e2e_test
- bench-tx-size: *e2e_test
- bench-summary:
requires:
- bench-publish-rollup
- bench-process-history
# - bench-tx-size
- bench-tx-size
<<: *defaults

# Production releases.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
PublicFeePaymentMethod,
TxStatus,
} from '@aztec/aztec.js';
import { GasSettings } from '@aztec/circuits.js';
import { Fr, GasSettings } from '@aztec/circuits.js';
import { FPCContract, GasTokenContract, TokenContract } from '@aztec/noir-contracts.js';
import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token';

Expand Down Expand Up @@ -68,9 +68,15 @@ describe('benchmarks/tx_size_fees', () => {
() => Promise.resolve(new PrivateFeePaymentMethod(token.address, fpc.address, aliceWallet)),
])('sends a tx with a fee', async createPaymentMethod => {
const paymentMethod = await createPaymentMethod();
const gasSettings = GasSettings.new({
da: { gasLimit: 5, teardownGasLimit: 3, maxFeePerGas: Fr.ONE },
l1: { gasLimit: 5, teardownGasLimit: 3, maxFeePerGas: Fr.ONE },
l2: { gasLimit: 5, teardownGasLimit: 3, maxFeePerGas: Fr.ONE },
inclusionFee: new Fr(6),
});
const tx = await token.methods
.transfer(aliceWallet.getAddress(), bobAddress, 1n, 0)
.send({ fee: paymentMethod ? { gasSettings: GasSettings.empty(), paymentMethod } : undefined })
.send({ fee: paymentMethod ? { gasSettings, paymentMethod } : undefined })
.wait();

expect(tx.status).toEqual(TxStatus.MINED);
Expand Down

0 comments on commit d9decd5

Please sign in to comment.