Skip to content

Commit c74db69

Browse files
committed
chore: conflicts
1 parent bb159ea commit c74db69

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

yarn-project/end-to-end/src/spartan/prove_n_tps.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SentTx } from '@aztec/aztec.js/contracts';
1+
import { NO_WAIT } from '@aztec/aztec.js/contracts';
22
import { SponsoredFeePaymentMethod } from '@aztec/aztec.js/fee';
33
import { type AztecNode, createAztecNodeClient } from '@aztec/aztec.js/node';
44
import { RollupCheatCodes } from '@aztec/aztec/testing';
@@ -13,7 +13,7 @@ import { sleep } from '@aztec/foundation/sleep';
1313
import { DateProvider } from '@aztec/foundation/timer';
1414
import { BenchmarkingContract } from '@aztec/noir-test-contracts.js/Benchmarking';
1515
import { GasFees } from '@aztec/stdlib/gas';
16-
import { Tx } from '@aztec/stdlib/tx';
16+
import { Tx, TxHash } from '@aztec/stdlib/tx';
1717
import { ProvenTx, type TestWallet, proveInteraction } from '@aztec/test-wallet/server';
1818

1919
import { jest } from '@jest/globals';
@@ -276,9 +276,10 @@ describe(`prove ${TARGET_TPS}TPS test`, () => {
276276

277277
logger.info('Deploying benchmark contract...');
278278
const sponsor = new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
279-
benchmarkContract = await BenchmarkingContract.deploy(localTestAccounts[0].wallet)
280-
.send({ from: localTestAccounts[0].recipientAddress, fee: { paymentMethod: sponsor } })
281-
.deployed();
279+
benchmarkContract = await BenchmarkingContract.deploy(localTestAccounts[0].wallet).send({
280+
from: localTestAccounts[0].recipientAddress,
281+
fee: { paymentMethod: sponsor },
282+
});
282283

283284
logger.info('Test setup complete');
284285
});
@@ -342,7 +343,7 @@ describe(`prove ${TARGET_TPS}TPS test`, () => {
342343
const msPerTx = 1000 / TARGET_TPS;
343344
logger.info(`Will send ${txsToSend} transactions at ${TARGET_TPS} TPS over ${epochDurationSeconds} seconds`);
344345

345-
const sentTxs: SentTx[] = [];
346+
const sentTxs: TxHash[] = [];
346347
const sendStartTime = performance.now();
347348

348349
for (let i = 0; i < txsToSend; i++) {
@@ -360,7 +361,7 @@ describe(`prove ${TARGET_TPS}TPS test`, () => {
360361
// consume tx
361362
const tx = producer.readyTx;
362363
producer.readyTx = null;
363-
sentTxs.push(tx.send());
364+
sentTxs.push(await tx.send({ wait: NO_WAIT }));
364365

365366
logger.info(`Sent tx ${i + 1}/${txsToSend}`);
366367

@@ -379,10 +380,9 @@ describe(`prove ${TARGET_TPS}TPS test`, () => {
379380
logger.info(`Finished sending ${totalSent} txs in ${(sendEndTime - sendStartTime) / 1000}s`);
380381

381382
logger.info('Waiting for transactions to be mined...');
382-
const pendingTxs = new Map<string, SentTx>();
383-
for (const sentTx of sentTxs) {
384-
const hash = (await sentTx.getTxHash()).toString();
385-
pendingTxs.set(hash, sentTx);
383+
const pendingTxs = new Map<string, TxHash>();
384+
for (const txHash of sentTxs) {
385+
pendingTxs.set(txHash.toString(), txHash);
386386
}
387387

388388
let successCount = 0;
@@ -394,7 +394,7 @@ describe(`prove ${TARGET_TPS}TPS test`, () => {
394394
const start = Math.floor(Math.random() * Math.max(1, entries.length - batchSize + 1));
395395
const txsToCheck = entries.length <= batchSize ? entries : entries.slice(start, start + batchSize);
396396

397-
const receipts = await Promise.all(txsToCheck.map(([_, tx]) => tx.getReceipt()));
397+
const receipts = await Promise.all(txsToCheck.map(([_, txHash]) => aztecNode.getTxReceipt(txHash)));
398398

399399
let processedCount = 0;
400400
for (const receipt of receipts) {

0 commit comments

Comments
 (0)