From 346593909f4c78b65a7e4b5b03d4146c3887ee38 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 12:30:02 +0000 Subject: [PATCH 1/7] Migrate the prover client test to earthly --- .circleci/config.yml | 14 -------------- .github/workflows/ci.yml | 16 ++++++++++++++++ yarn-project/Earthfile | 4 ++++ 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 70b0393270e..ebd4c696517 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -407,18 +407,6 @@ jobs: command: create_ecr_manifest yarn-project x86_64,arm64 aztec_manifest_key: yarn-project - prover-client-test: - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small - steps: - - *checkout - - *setup_env - - run: - name: "Build and test" - command: cond_spot_run_build prover-client-test 128 - aztec_manifest_key: prover-client-test - aztec-package: machine: image: default @@ -682,7 +670,6 @@ workflows: - noir-projects <<: *defaults - end-to-end: *defaults_yarn_project - - prover-client-test: *defaults_yarn_project - yarn-project-x86_64: *defaults_yarn_project_pre_join - yarn-project-arm64: *defaults_yarn_project_pre_join - yarn-project-ecr-manifest: @@ -730,7 +717,6 @@ workflows: - boxes-vanilla - boxes-react - noir-packages-tests - - prover-client-test - e2e-join <<: *defaults diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9f0f8c5699..c4327a4850f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -178,6 +178,22 @@ jobs: timeout-minutes: 25 run: earthly-ci --no-output ./yarn-project/+test + prover-client-test: + needs: noir-projects + runs-on: ${{ github.actor }}-x86 + steps: + - { + uses: actions/checkout@v4, + with: { ref: "${{ github.event.pull_request.head.sha }}" }, + } + - uses: ./.github/ci-setup-action + with: + dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}" + concurrency_key: prover-client-test-${{ github.actor }}-x86 + - name: "Prover Client Tests" + timeout-minutes: 25 + run: earthly-ci --no-output ./yarn-project/+prover-client-test + docs-preview: needs: setup runs-on: ${{ inputs.username || github.actor }}-x86 diff --git a/yarn-project/Earthfile b/yarn-project/Earthfile index 6da55e013d9..0815f990c98 100644 --- a/yarn-project/Earthfile +++ b/yarn-project/Earthfile @@ -133,3 +133,7 @@ run-e2e: ARG test FROM +end-to-end RUN DEBUG=aztec:* yarn test $test + +prover-client-test: + FROM +build + RUN cd prover-client && yarn test From 7d8ecb1a813859b0b796b9b12908632248961a8e Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 12:50:13 +0000 Subject: [PATCH 2/7] Use default test timeouts --- yarn-project/prover-client/package.json | 2 +- .../src/orchestrator/orchestrator_errors.test.ts | 14 +++++++------- .../src/orchestrator/orchestrator_failures.test.ts | 5 ++--- .../orchestrator/orchestrator_lifecycle.test.ts | 6 +++--- .../orchestrator/orchestrator_mixed_blocks.test.ts | 4 ++-- .../orchestrator_mixed_blocks_2.test.ts | 3 +-- .../orchestrator_multi_public_functions.test.ts | 3 +-- .../orchestrator_multiple_blocks.test.ts | 4 ++-- .../orchestrator_public_functions.test.ts | 5 ++--- .../orchestrator_single_blocks.test.ts | 8 ++++---- .../src/prover/bb_prover_base_rollup.test.ts | 6 +++--- .../src/prover/bb_prover_full_rollup.test.ts | 6 +++--- .../src/prover/bb_prover_parity.test.ts | 6 +++--- .../src/prover/bb_prover_public_kernel.test.ts | 6 +++--- 14 files changed, 37 insertions(+), 41 deletions(-) diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 64580446844..815862820fa 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -23,7 +23,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "bb": "node --no-warnings ./dest/bb/index.js", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --passWithNoTests", "generate-and-test": "yarn bb-cli write-server-vks && yarn test" }, "inherits": [ diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_errors.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_errors.test.ts index 8f23bd02b3b..b4269bfc453 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_errors.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_errors.test.ts @@ -12,7 +12,7 @@ describe('prover/orchestrator/errors', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -49,25 +49,25 @@ describe('prover/orchestrator/errors', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - }, 40_000); + }); it('throws if adding a transaction before start', async () => { await expect( async () => await context.orchestrator.addNewTx(await makeEmptyProcessedTestTx(context.actualDb)), ).rejects.toThrow(`Invalid proving state, call startNewBlock before adding transactions`); - }, 1000); + }); it('throws if completing a block before start', async () => { await expect(async () => await context.orchestrator.setBlockCompleted()).rejects.toThrow( 'Invalid proving state, call startNewBlock before adding transactions or completing the block', ); - }, 1000); + }); it('throws if finalising an incomplete block', async () => { await expect(async () => await context.orchestrator.finaliseBlock()).rejects.toThrow( 'Invalid proving state, a block must be proven before it can be finalised', ); - }, 1000); + }); it('throws if finalising an already finalised block', async () => { const txs = await Promise.all([ @@ -91,7 +91,7 @@ describe('prover/orchestrator/errors', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); await expect(async () => await context.orchestrator.finaliseBlock()).rejects.toThrow('Block already finalised'); - }, 60000); + }); it('throws if adding to a cancelled block', async () => { await context.orchestrator.startNewBlock( @@ -106,7 +106,7 @@ describe('prover/orchestrator/errors', () => { await expect( async () => await context.orchestrator.addNewTx(await makeEmptyProcessedTestTx(context.actualDb)), ).rejects.toThrow('Rollup not accepting further transactions'); - }, 10000); + }); it.each([[-4], [0], [1], [3], [8.1], [7]] as const)( 'fails to start a block with %i transactions', diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts index 5b06d8418fe..4c484823398 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts @@ -22,7 +22,7 @@ describe('prover/orchestrator/failures', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -97,8 +97,7 @@ describe('prover/orchestrator/failures', () => { await orchestrator.addNewTx(tx); } await expect(blockTicket.provingPromise).resolves.toEqual({ status: PROVING_STATUS.FAILURE, reason: message }); - }, - 60000, + } ); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_lifecycle.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_lifecycle.test.ts index 898e3aab9bb..f380b7cbef9 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_lifecycle.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_lifecycle.test.ts @@ -14,7 +14,7 @@ describe('prover/orchestrator/lifecycle', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -75,7 +75,7 @@ describe('prover/orchestrator/lifecycle', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(101); - }, 40000); + }); it('automatically cancels an incomplete block when starting a new one', async () => { const txs1 = await Promise.all([ @@ -123,6 +123,6 @@ describe('prover/orchestrator/lifecycle', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(101); - }, 60000); + }); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks.test.ts index 53a6959b710..8c63265a8e5 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks.test.ts @@ -14,7 +14,7 @@ describe('prover/orchestrator/mixed-blocks', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -49,6 +49,6 @@ describe('prover/orchestrator/mixed-blocks', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - }, 60_000); + }); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks_2.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks_2.test.ts index 1233bbe30f7..0a0ae2abb2f 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks_2.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_mixed_blocks_2.test.ts @@ -19,7 +19,7 @@ describe('prover/orchestrator/mixed-blocks', () => { beforeEach(async () => { context = await TestContext.new(logger); expectsDb = await MerkleTrees.new(openTmpStore()).then(t => t.asLatest()); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -70,7 +70,6 @@ describe('prover/orchestrator/mixed-blocks', () => { const expectedNoteHashTreeAfter = await expectsDb.getTreeInfo(MerkleTreeId.NOTE_HASH_TREE).then(t => t.root); expect(noteHashTreeAfter.root).toEqual(expectedNoteHashTreeAfter); }, - 60000, ); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_multi_public_functions.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_multi_public_functions.test.ts index 6e1054032b1..d9c7e24b0e9 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_multi_public_functions.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_multi_public_functions.test.ts @@ -12,7 +12,7 @@ describe('prover/orchestrator/public-functions', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -56,7 +56,6 @@ describe('prover/orchestrator/public-functions', () => { expect(finalisedBlock.block.number).toEqual(context.blockNumber); }, - 60_000, ); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_multiple_blocks.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_multiple_blocks.test.ts index 1525aeff740..4626edffac3 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_multiple_blocks.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_multiple_blocks.test.ts @@ -11,7 +11,7 @@ describe('prover/orchestrator/multi-block', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -49,6 +49,6 @@ describe('prover/orchestrator/multi-block', () => { await context.actualDb.commit(); } - }, 60_000); + }); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts index 2f7679b973b..b962f90a648 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts @@ -11,7 +11,7 @@ describe('prover/orchestrator/public-functions', () => { beforeEach(async () => { context = await TestContext.new(logger); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -58,8 +58,7 @@ describe('prover/orchestrator/public-functions', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - }, - 60_000, + } ); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_single_blocks.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_single_blocks.test.ts index 959a6105c6a..dc3212195a4 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_single_blocks.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_single_blocks.test.ts @@ -19,7 +19,7 @@ describe('prover/orchestrator/blocks', () => { beforeEach(async () => { context = await TestContext.new(logger); expectsDb = await MerkleTrees.new(openTmpStore()).then(t => t.asLatest()); - }, 20_000); + }); afterEach(async () => { await context.cleanup(); @@ -48,7 +48,7 @@ describe('prover/orchestrator/blocks', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - }, 60_000); + }); it('builds a block with 1 transaction', async () => { const txs = await Promise.all([makeBloatedProcessedTx(context.actualDb, 1)]); @@ -75,7 +75,7 @@ describe('prover/orchestrator/blocks', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - }, 60_000); + }); it('builds a block concurrently with transaction simulation', async () => { const txs = await Promise.all([ @@ -104,6 +104,6 @@ describe('prover/orchestrator/blocks', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - }, 60_000); + }); }); }); diff --git a/yarn-project/prover-client/src/prover/bb_prover_base_rollup.test.ts b/yarn-project/prover-client/src/prover/bb_prover_base_rollup.test.ts index 7e05cba9871..f560008db23 100644 --- a/yarn-project/prover-client/src/prover/bb_prover_base_rollup.test.ts +++ b/yarn-project/prover-client/src/prover/bb_prover_base_rollup.test.ts @@ -16,11 +16,11 @@ describe('prover/bb_prover/base-rollup', () => { return BBNativeRollupProver.new(bbConfig); }; context = await TestContext.new(logger, 1, buildProver); - }, 60_000); + }); afterAll(async () => { await context.cleanup(); - }, 5000); + }); it('proves the base rollup', async () => { const tx = await makeBloatedProcessedTx(context.actualDb, 1); @@ -31,5 +31,5 @@ describe('prover/bb_prover/base-rollup', () => { const proofOutputs = await context.prover.getBaseRollupProof(baseRollupInputs); logger.verbose('Verifying base rollups'); await expect(context.prover.verifyProof('BaseRollupArtifact', proofOutputs.proof)).resolves.not.toThrow(); - }, 200_000); + }); }); diff --git a/yarn-project/prover-client/src/prover/bb_prover_full_rollup.test.ts b/yarn-project/prover-client/src/prover/bb_prover_full_rollup.test.ts index dca24b599fb..8fda8107161 100644 --- a/yarn-project/prover-client/src/prover/bb_prover_full_rollup.test.ts +++ b/yarn-project/prover-client/src/prover/bb_prover_full_rollup.test.ts @@ -14,11 +14,11 @@ describe('prover/bb_prover/full-rollup', () => { beforeAll(async () => { context = await TestContext.new(logger, 1, BBNativeRollupProver.new); - }, 60_000); + }); afterAll(async () => { await context.cleanup(); - }, 5000); + }); it('proves all circuits', async () => { const numTransactions = 4; @@ -58,5 +58,5 @@ describe('prover/bb_prover/full-rollup', () => { const blockResult = await context.orchestrator.finaliseBlock(); await expect(context.prover.verifyProof('RootRollupArtifact', blockResult.proof)).resolves.not.toThrow(); - }, 600_000); + }); }); diff --git a/yarn-project/prover-client/src/prover/bb_prover_parity.test.ts b/yarn-project/prover-client/src/prover/bb_prover_parity.test.ts index 2300450f495..091f00662c1 100644 --- a/yarn-project/prover-client/src/prover/bb_prover_parity.test.ts +++ b/yarn-project/prover-client/src/prover/bb_prover_parity.test.ts @@ -31,11 +31,11 @@ describe('prover/bb_prover/parity', () => { return bbProver; }; context = await TestContext.new(logger, 1, buildProver); - }, 60_000); + }); afterAll(async () => { await context.cleanup(); - }, 5000); + }); it('proves the parity circuits', async () => { const l1ToL2Messages = makeTuple( @@ -134,5 +134,5 @@ describe('prover/bb_prover/parity', () => { ]).toContainEqual(error); } } - }, 200_000); + }); }); diff --git a/yarn-project/prover-client/src/prover/bb_prover_public_kernel.test.ts b/yarn-project/prover-client/src/prover/bb_prover_public_kernel.test.ts index 251b1f19706..59c6a5786e3 100644 --- a/yarn-project/prover-client/src/prover/bb_prover_public_kernel.test.ts +++ b/yarn-project/prover-client/src/prover/bb_prover_public_kernel.test.ts @@ -22,11 +22,11 @@ describe('prover/bb_prover/public-kernel', () => { return BBNativeRollupProver.new(bbConfig); }; context = await TestContext.new(logger, 1, buildProver); - }, 60_000); + }); afterAll(async () => { await context.cleanup(); - }, 5000); + }); it('proves the public kernel circuits', async () => { const tx = mockTx(1000, { @@ -83,5 +83,5 @@ describe('prover/bb_prover/public-kernel', () => { logger.verbose(`Verifying kernel type: ${PublicKernelType[request.type]}`); await expect(context.prover.verifyProof(artifact, proof)).resolves.not.toThrow(); } - }, 60_000); + }); }); From af34ebb22084d3876ee330349bf4afdc0d903cba Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 12:51:39 +0000 Subject: [PATCH 3/7] Update GA dependencies --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4327a4850f..ad26c91b495 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -273,6 +273,7 @@ jobs: - bb-bench - yarn-project-formatting - yarn-project-test + - prover-client-test if: always() steps: - run: | @@ -295,6 +296,7 @@ jobs: bb-bench, yarn-project-formatting, yarn-project-test, + prover-client-test, ] runs-on: ubuntu-latest if: ${{ github.ref == 'refs/heads/master' && failure() }} From 779d81ad868f5865c1f742809fbc51ce77b928b6 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 13:29:55 +0000 Subject: [PATCH 4/7] Provide local package json in prover client --- yarn-project/prover-client/package.json | 2 +- yarn-project/prover-client/package.local.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 yarn-project/prover-client/package.local.json diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 815862820fa..64580446844 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -23,7 +23,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "bb": "node --no-warnings ./dest/bb/index.js", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", "generate-and-test": "yarn bb-cli write-server-vks && yarn test" }, "inherits": [ diff --git a/yarn-project/prover-client/package.local.json b/yarn-project/prover-client/package.local.json new file mode 100644 index 00000000000..7920e12412a --- /dev/null +++ b/yarn-project/prover-client/package.local.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "test": "LOG_LEVEL=${LOG_LEVEL:-silent} DEBUG_COLORS=1 NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit" + } +} From 3c2315ad6dc3ca4cca0d3ffc8cf7058b29632146 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 15:15:01 +0000 Subject: [PATCH 5/7] Fixed package json --- yarn-project/prover-client/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 64580446844..342f087e7d7 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -16,6 +16,10 @@ "name": "Prover Client", "tsconfig": "./tsconfig.json" }, + "inherits": [ + "../package.common.json", + "./package.local.json" + ], "scripts": { "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", @@ -23,12 +27,8 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "bb": "node --no-warnings ./dest/bb/index.js", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests", - "generate-and-test": "yarn bb-cli write-server-vks && yarn test" + "test": "LOG_LEVEL=${LOG_LEVEL:-silent} DEBUG_COLORS=1 NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit" }, - "inherits": [ - "../package.common.json" - ], "jest": { "moduleNameMapper": { "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" From 6223a4027830a376c5f6a856c5486516302d607e Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 15:18:36 +0000 Subject: [PATCH 6/7] Increase prover test times --- yarn-project/prover-client/package.json | 2 +- yarn-project/prover-client/package.local.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 342f087e7d7..3bdf4749602 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -27,7 +27,7 @@ "formatting": "run -T prettier --check ./src && run -T eslint ./src", "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src", "bb": "node --no-warnings ./dest/bb/index.js", - "test": "LOG_LEVEL=${LOG_LEVEL:-silent} DEBUG_COLORS=1 NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit" + "test": "LOG_LEVEL=${LOG_LEVEL:-silent} DEBUG_COLORS=1 NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=600000 --forceExit" }, "jest": { "moduleNameMapper": { diff --git a/yarn-project/prover-client/package.local.json b/yarn-project/prover-client/package.local.json index 7920e12412a..5eeed2af06a 100644 --- a/yarn-project/prover-client/package.local.json +++ b/yarn-project/prover-client/package.local.json @@ -1,5 +1,5 @@ { "scripts": { - "test": "LOG_LEVEL=${LOG_LEVEL:-silent} DEBUG_COLORS=1 NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=300000 --forceExit" + "test": "LOG_LEVEL=${LOG_LEVEL:-silent} DEBUG_COLORS=1 NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --testTimeout=600000 --forceExit" } } From 41899d8bc8d30e1795389b92f45e56cdf198c347 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 1 May 2024 15:47:37 +0000 Subject: [PATCH 7/7] Formatting --- .../orchestrator_failures.test.ts | 39 +++++++++---------- .../orchestrator_public_functions.test.ts | 2 +- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts index 4c484823398..0c56061d87a 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_failures.test.ts @@ -75,29 +75,26 @@ describe('prover/orchestrator/failures', () => { jest.spyOn(mockProver, 'getRootParityProof').mockRejectedValue('Root Parity Failed'); }, ], - ] as const)( - 'handles a %s error', - async (message: string, fn: () => void) => { - fn(); - const txs = await Promise.all([ - makeEmptyProcessedTestTx(context.actualDb), - makeEmptyProcessedTestTx(context.actualDb), - makeEmptyProcessedTestTx(context.actualDb), - makeEmptyProcessedTestTx(context.actualDb), - ]); + ] as const)('handles a %s error', async (message: string, fn: () => void) => { + fn(); + const txs = await Promise.all([ + makeEmptyProcessedTestTx(context.actualDb), + makeEmptyProcessedTestTx(context.actualDb), + makeEmptyProcessedTestTx(context.actualDb), + makeEmptyProcessedTestTx(context.actualDb), + ]); - const blockTicket = await orchestrator.startNewBlock( - txs.length, - context.globalVariables, - [], - await makeEmptyProcessedTestTx(context.actualDb), - ); + const blockTicket = await orchestrator.startNewBlock( + txs.length, + context.globalVariables, + [], + await makeEmptyProcessedTestTx(context.actualDb), + ); - for (const tx of txs) { - await orchestrator.addNewTx(tx); - } - await expect(blockTicket.provingPromise).resolves.toEqual({ status: PROVING_STATUS.FAILURE, reason: message }); + for (const tx of txs) { + await orchestrator.addNewTx(tx); } - ); + await expect(blockTicket.provingPromise).resolves.toEqual({ status: PROVING_STATUS.FAILURE, reason: message }); + }); }); }); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts index b962f90a648..fa75b9d7ae0 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator_public_functions.test.ts @@ -58,7 +58,7 @@ describe('prover/orchestrator/public-functions', () => { const finalisedBlock = await context.orchestrator.finaliseBlock(); expect(finalisedBlock.block.number).toEqual(context.blockNumber); - } + }, ); }); });