Skip to content

Commit

Permalink
chore: Add test to reproduce #8306
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Aug 30, 2024
1 parent be2169d commit 41d418c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions yarn-project/end-to-end/src/e2e_block_building.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,39 @@ describe('e2e_block_building', () => {
const account = getSchnorrAccount(pxe, Fr.random(), Fq.random(), Fr.random());
await account.waitSetup();
});

// Regression for https://github.com/AztecProtocol/aztec-packages/issues/8306
it.skip('can simulate public txs while building a block', async () => {
({
teardown,
pxe,
logger,
aztecNode,
wallet: owner,
} = await setup(1, {
minTxsPerBlock: 1,
skipProtocolContracts: true,
}));

logger.info('Deploying token contract');
const token = await TokenContract.deploy(owner, owner.getCompleteAddress(), 'TokenName', 'TokenSymbol', 18)
.send()
.deployed();

logger.info('Updating min txs per block to 4');
await aztecNode.setConfig({ minTxsPerBlock: 4 });

logger.info('Spamming the network with public txs');
const txs = [];
for (let i = 0; i < 30; i++) {
const tx = token.methods.mint_public(owner.getAddress(), 10n);
await tx.create({ skipPublicSimulation: false });
txs.push(tx.send());
}

logger.info('Waiting for txs to be mined');
await Promise.all(txs.map(tx => tx.wait()));
});
});
});

Expand Down

0 comments on commit 41d418c

Please sign in to comment.