Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion yarn-project/archiver/src/archiver-sync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ describe('Archiver Sync', () => {

// Verify data from checkpoint 2 is removed
const txHash = cp2.blocks[0].body.txEffects[0].txHash;
expect(await archiver.getTxEffect(txHash)).resolves.toBeUndefined;
expect(await archiver.getTxEffect(txHash)).toBeUndefined();
expect(await archiver.getCheckpoints({ from: CheckpointNumber(2), limit: 1 })).toEqual([]);

expect((await archiver.getPublicLogs({ fromBlock: 2, toBlock: 3 })).logs).toEqual([]);
Expand Down
1 change: 0 additions & 1 deletion yarn-project/cli/src/cmds/l1/update_l1_validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export interface LoggerArgs {
export function generateL1Account() {
const privateKey = generatePrivateKey();
const account = privateKeyToAccount(privateKey);
account.address;
return {
privateKey,
address: account.address,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,5 @@ describe('e2e_cross_chain_messaging token_bridge_private', () => {
.send({ from: user2Address });

await crossChainTestHarness.expectPrivateBalanceOnL2(ownerAddress, initialPrivateBalance + bridgeAmount);
}),
90_000;
}, 90_000);
});
16 changes: 8 additions & 8 deletions yarn-project/end-to-end/src/e2e_synching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,10 @@ describe('e2e_synching', () => {
);
for (let i = 0; i < contracts.length; i++) {
expect(contractInstances[i]).not.toBeUndefined();
expect(contractClassIds.some(id => id.equals(contractInstances[i].currentContractClassId))).toBeTrue;
expect(contractClassIds.some(id => id.equals(contractInstances[i].currentContractClassId))).toBeTrue();
}

expect(await archiver.getTxEffect(txHash)).not.toBeUndefined;
expect(await archiver.getTxEffect(txHash)).not.toBeUndefined();
expect(
await archiver.getPublicLogs({ fromBlock: blockTip.number, toBlock: blockTip.number + 1 }),
).not.toEqual([]);
Expand All @@ -649,18 +649,18 @@ describe('e2e_synching', () => {

const contractClassIdsAfter = await archiver.getContractClassIds();

expect(contractClassIdsAfter.some(id => id.equals(contractInstances[0].currentContractClassId))).toBeTrue;
expect(contractClassIdsAfter.some(id => id.equals(contractInstances[1].currentContractClassId))).toBeFalse;
expect(await archiver.getContract(contracts[0].address)).not.toBeUndefined;
expect(await archiver.getContract(contracts[1].address)).toBeUndefined;
expect(await archiver.getContract(contracts[2].address)).toBeUndefined;
expect(contractClassIdsAfter.some(id => id.equals(contractInstances[0].currentContractClassId))).toBeTrue();
expect(contractClassIdsAfter.some(id => id.equals(contractInstances[1].currentContractClassId))).toBeFalse();
expect(await archiver.getContract(contracts[0].address)).not.toBeUndefined();
expect(await archiver.getContract(contracts[1].address)).toBeUndefined();
expect(await archiver.getContract(contracts[2].address)).toBeUndefined();

// Only the hardcoded schnorr is pruned since the contract class also existed before prune.
expect(contractClassIdsAfter).toEqual(
contractClassIds.filter(c => !c.equals(contractInstances[1].currentContractClassId)),
);

expect(await archiver.getTxEffect(txHash)).toBeUndefined;
expect(await archiver.getTxEffect(txHash)).toBeUndefined();
expect(await archiver.getPublicLogs({ fromBlock: blockTip.number, toBlock: blockTip.number + 1 })).toEqual(
[],
);
Expand Down
7 changes: 4 additions & 3 deletions yarn-project/end-to-end/src/spartan/mempool_limit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Fr } from '@aztec/aztec.js/fields';
import { createAztecNodeClient } from '@aztec/aztec.js/node';
import { Tx, TxStatus } from '@aztec/aztec.js/tx';
import { asyncPool } from '@aztec/foundation/async-pool';
import { times } from '@aztec/foundation/collection';
import { times, timesAsync } from '@aztec/foundation/collection';
import { createLogger } from '@aztec/foundation/log';
import { retryUntil } from '@aztec/foundation/retry';
import { TokenContract } from '@aztec/noir-contracts.js/Token';
Expand Down Expand Up @@ -199,11 +199,12 @@ describe('mempool limiter test', () => {

it('evicts txs to keep mempool under specified limit', async () => {
if (!config.REAL_VERIFIER) {
const txs = times(TX_FLOOD_SIZE, () => {
const txs = await timesAsync(TX_FLOOD_SIZE, async () => {
const tx = Tx.fromBuffer(sampleTx.toBuffer());
// this only works on unproven networks, otherwise this will fail verification
tx.data.forPublic!.nonRevertibleAccumulatedData.nullifiers[0] = Fr.random();
tx.txHash;
// The nullifier mutation means the hash is outdated
await tx.recomputeHash();
return tx;
});

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export default [
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
Expand All @@ -85,6 +84,7 @@ export default [
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'require-await': 'error',
'no-console': 'error',
curly: ['error', 'all'],
Expand Down
5 changes: 4 additions & 1 deletion yarn-project/foundation/src/committable/committable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ describe('committable', () => {
expect(committableNumber.get(true)).toBe(3);
expect(committableNumber.get(false)).toBe(2);
committableNumber.rollback();
expect(committableNumber.get()).toBe(2);
// After rollback the uncommitted value must be discarded, so reading with includeUncommitted falls back to the
// committed value. Asserting on get(true) here is what actually exercises rollback.
expect(committableNumber.get(true)).toBe(2);
expect(committableNumber.get(false)).toBe(2);
});
});
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/committable/committable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class Committable<T> {
* Rolls back the uncommitted value.
*/
public rollback() {
this.nextValue === undefined;
this.nextValue = undefined;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,6 @@ export class ProvingOrchestrator extends TopTreeProvingScheduler implements Epoc

const txProvingState = provingState.getTxProvingState(txIndex);
const txHash = txProvingState.processedTx.hash.toString();
NESTED_RECURSIVE_ROLLUP_HONK_PROOF_LENGTH;
const handleResult = (
result: PublicInputsAndRecursiveProof<
PublicChonkVerifierPublicInputs,
Expand Down
Loading