Skip to content

Commit 287ed68

Browse files
committed
perf(e2e): parallelize dual token mints
applyFundAliceWithBananas sent Alice's private and public banana mints back-to-back, paying one production slot each. The two mints touch disjoint balances, so they are now sent concurrently and share a slot. Each mint keeps its own tx:mint span, so the overlap shows up as busyMs < totalMs in the timing data.
1 parent 6a73f33 commit 287ed68

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

yarn-project/end-to-end/src/single-node/fees/fees_test.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,16 @@ export class FeesTest extends SingleNodeTestContext {
401401
public async applyFundAliceWithBananas() {
402402
this.logger.info('Applying fund Alice with bananas setup');
403403

404-
await this.mintPrivateBananas(this.ALICE_INITIAL_BANANAS, this.aliceAddress);
405-
await testSpan('tx:mint', () =>
406-
this.bananaCoin.methods.mint_to_public(this.aliceAddress, this.ALICE_INITIAL_BANANAS).send({
407-
from: this.aliceAddress,
408-
}),
409-
);
404+
// The private and public mints touch disjoint balances, so they are sent concurrently to share a
405+
// slot instead of paying one slot each.
406+
await Promise.all([
407+
this.mintPrivateBananas(this.ALICE_INITIAL_BANANAS, this.aliceAddress),
408+
testSpan('tx:mint', () =>
409+
this.bananaCoin.methods.mint_to_public(this.aliceAddress, this.ALICE_INITIAL_BANANAS).send({
410+
from: this.aliceAddress,
411+
}),
412+
),
413+
]);
410414
}
411415

412416
public async applyFundAliceWithPrivateBananas() {

0 commit comments

Comments
 (0)