From 4a4eb7516036f8932538df754a628cf5f0fe5cfc Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 30 Mar 2023 14:41:14 +0100 Subject: [PATCH 01/33] chore: refactor tsconfig layout --- .gitignore | 3 +- circuits | 2 +- scripts/update-tsconfig-references | 36 -- yarn-project/acir-simulator/package.json | 7 +- .../acir-simulator/tsconfig.dest.json | 9 - yarn-project/acir-simulator/tsconfig.json | 4 +- yarn-project/archiver/package.json | 9 +- yarn-project/archiver/tsconfig.dest.json | 21 - yarn-project/archiver/tsconfig.json | 12 +- yarn-project/aztec-cli/package.json | 7 +- yarn-project/aztec-cli/tsconfig.dest.json | 4 - yarn-project/aztec-cli/tsconfig.json | 5 +- yarn-project/aztec-node/package.json | 7 +- yarn-project/aztec-node/tsconfig.dest.json | 33 -- yarn-project/aztec-node/tsconfig.json | 28 +- yarn-project/aztec-rpc/package.json | 10 +- .../src/aztec_rpc_server/aztec_rpc_server.ts | 31 +- .../create_aztec_rpc_server.ts | 3 +- yarn-project/aztec-rpc/tsconfig.dest.json | 27 -- yarn-project/aztec-rpc/tsconfig.json | 21 +- yarn-project/aztec.js/package.json | 7 +- yarn-project/aztec.js/tsconfig.dest.json | 15 - yarn-project/aztec.js/tsconfig.json | 18 +- yarn-project/barretenberg.js/package.json | 7 +- .../barretenberg.js/tsconfig.dest.json | 9 - yarn-project/barretenberg.js/tsconfig.json | 4 +- yarn-project/circuits.js/package.json | 10 +- .../src/abis/__snapshots__/abis.test.ts.snap | 282 -------------- .../circuits.js/src/abis/abis.test.ts | 62 --- yarn-project/circuits.js/src/abis/abis.ts | 83 ---- yarn-project/circuits.js/src/abis/index.ts | 1 - .../circuits.js/src/tests/factories.ts | 16 +- .../circuits.js/src/utils/serialize.ts | 2 +- yarn-project/circuits.js/tsconfig.dest.json | 15 - yarn-project/circuits.js/tsconfig.json | 7 +- yarn-project/docs/README.md | 7 +- yarn-project/end-to-end/Dockerfile | 1 - yarn-project/end-to-end/tsconfig.json | 11 +- .../ethereum.js/example/tsconfig.json | 12 +- yarn-project/ethereum.js/package.json | 2 +- yarn-project/ethereum.js/tsconfig.dest.json | 12 - yarn-project/ethereum.js/tsconfig.json | 4 +- yarn-project/foundation/package.json | 4 +- yarn-project/foundation/src/fields/fields.ts | 6 +- yarn-project/foundation/tsconfig.dest.json | 4 - yarn-project/foundation/tsconfig.json | 5 +- yarn-project/kernel-prover/package.json | 7 +- yarn-project/kernel-prover/tsconfig.dest.json | 12 - yarn-project/kernel-prover/tsconfig.json | 9 +- yarn-project/key-store/package.json | 7 +- yarn-project/key-store/tsconfig.dest.json | 4 - yarn-project/key-store/tsconfig.json | 9 +- yarn-project/l1-contracts/package.json | 7 +- yarn-project/l1-contracts/tsconfig.dest.json | 9 - yarn-project/l1-contracts/tsconfig.json | 4 +- yarn-project/l2-block/package.json | 7 +- yarn-project/l2-block/tsconfig.dest.json | 12 - yarn-project/l2-block/tsconfig.json | 6 +- yarn-project/merkle-tree/package.json | 4 +- yarn-project/merkle-tree/tsconfig.dest.json | 15 - yarn-project/merkle-tree/tsconfig.json | 6 +- yarn-project/noir-contracts/package.json | 7 +- .../noir-contracts/tsconfig.dest.json | 4 - yarn-project/noir-contracts/tsconfig.json | 9 +- yarn-project/p2p/package.json | 9 +- yarn-project/p2p/tsconfig.dest.json | 9 - yarn-project/p2p/tsconfig.json | 14 +- yarn-project/package.json | 3 + yarn-project/prover-client/package.json | 7 +- yarn-project/prover-client/tsconfig.dest.json | 4 - yarn-project/prover-client/tsconfig.json | 5 +- .../jest.integration.config.json | 13 - yarn-project/sequencer-client/package.json | 12 +- .../sequencer-client/tsconfig.dest.json | 14 - yarn-project/sequencer-client/tsconfig.json | 37 +- .../{tsconfig.json => tsconfig.base.json} | 3 +- yarn-project/tsconfig.test.json | 37 +- yarn-project/tx/package.json | 9 +- yarn-project/tx/tsconfig.dest.json | 7 - yarn-project/tx/tsconfig.json | 9 +- yarn-project/world-state/package.json | 4 +- yarn-project/world-state/tsconfig.dest.json | 24 -- yarn-project/world-state/tsconfig.json | 15 +- yarn-project/yarn.lock | 368 +++++++++++++++++- 84 files changed, 616 insertions(+), 1010 deletions(-) delete mode 100755 scripts/update-tsconfig-references delete mode 100644 yarn-project/acir-simulator/tsconfig.dest.json delete mode 100644 yarn-project/archiver/tsconfig.dest.json delete mode 100644 yarn-project/aztec-cli/tsconfig.dest.json delete mode 100644 yarn-project/aztec-node/tsconfig.dest.json delete mode 100644 yarn-project/aztec-rpc/tsconfig.dest.json delete mode 100644 yarn-project/aztec.js/tsconfig.dest.json delete mode 100644 yarn-project/barretenberg.js/tsconfig.dest.json delete mode 100644 yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap delete mode 100644 yarn-project/circuits.js/src/abis/abis.test.ts delete mode 100644 yarn-project/circuits.js/src/abis/abis.ts delete mode 100644 yarn-project/circuits.js/src/abis/index.ts delete mode 100644 yarn-project/circuits.js/tsconfig.dest.json delete mode 100644 yarn-project/ethereum.js/tsconfig.dest.json delete mode 100644 yarn-project/foundation/tsconfig.dest.json delete mode 100644 yarn-project/kernel-prover/tsconfig.dest.json delete mode 100644 yarn-project/key-store/tsconfig.dest.json delete mode 100644 yarn-project/l1-contracts/tsconfig.dest.json delete mode 100644 yarn-project/l2-block/tsconfig.dest.json delete mode 100644 yarn-project/merkle-tree/tsconfig.dest.json delete mode 100644 yarn-project/noir-contracts/tsconfig.dest.json delete mode 100644 yarn-project/p2p/tsconfig.dest.json delete mode 100644 yarn-project/prover-client/tsconfig.dest.json delete mode 100644 yarn-project/sequencer-client/jest.integration.config.json delete mode 100644 yarn-project/sequencer-client/tsconfig.dest.json rename yarn-project/{tsconfig.json => tsconfig.base.json} (89%) delete mode 100644 yarn-project/tx/tsconfig.dest.json delete mode 100644 yarn-project/world-state/tsconfig.dest.json diff --git a/.gitignore b/.gitignore index e92624db15f..e425a787357 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ dest node_modules .cache .pnp.cjs -.pnp.loader.mjs -build/ \ No newline at end of file +.pnp.loader.mjs \ No newline at end of file diff --git a/circuits b/circuits index 5b336c54fcf..aaaa41e001f 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit 5b336c54fcf5cde039339f1682ece2988cfdaa74 +Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 diff --git a/scripts/update-tsconfig-references b/scripts/update-tsconfig-references deleted file mode 100755 index 0feb336fe29..00000000000 --- a/scripts/update-tsconfig-references +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# Script for updating tsconfig project references. - -if [ $# -eq 0 ]; then - echo "Usage: $0 path/to/tsconfig.json" - exit 1 -fi - -TSCONFIG_FILE="$1" - -if [ ! -f "$TSCONFIG_FILE" ]; then - echo "Error: $TSCONFIG_FILE not found." - exit 2 -fi - -TSCONFIG_DIR=$(dirname "$TSCONFIG_FILE") -TS_FILES=$(find "$TSCONFIG_DIR" -type f -name "*.ts" -o -name "*.tsx") -IMPORT_REGEX='^import.*@aztec.([a-zA-Z0-9_\-\.]+)' - -REFERENCES="[" -for FILE in $TS_FILES; do - while read -r LINE; do - if [[ $LINE =~ $IMPORT_REGEX ]]; then - PACKAGE_NAME="${BASH_REMATCH[1]}" - REFERENCE="{ \"path\": \"../${PACKAGE_NAME}/tsconfig.dest.json\" }," - if [[ $REFERENCES != *"${REFERENCE}"* ]]; then - REFERENCES+=$REFERENCE - fi - fi - done < "$FILE" -done - -REFERENCES=${REFERENCES%,} -REFERENCES+="]" - -jq --argjson references "$REFERENCES" '.references = $references' "$TSCONFIG_FILE" > "${TSCONFIG_FILE}.tmp" && mv "${TSCONFIG_FILE}.tmp" "$TSCONFIG_FILE" \ No newline at end of file diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 170a065e2d7..152d6a731a2 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -5,12 +5,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Acir Simulator", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Acir Simulator" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/acir-simulator/tsconfig.dest.json b/yarn-project/acir-simulator/tsconfig.dest.json deleted file mode 100644 index 924fe6549e6..00000000000 --- a/yarn-project/acir-simulator/tsconfig.dest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"], - "references": [ - { - "path": "../circuits.js/tsconfig.dest.json" - } - ] -} diff --git a/yarn-project/acir-simulator/tsconfig.json b/yarn-project/acir-simulator/tsconfig.json index 687c3e5874f..8e7b6be3ce7 100644 --- a/yarn-project/acir-simulator/tsconfig.json +++ b/yarn-project/acir-simulator/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,7 +7,7 @@ }, "references": [ { - "path": "../circuits.js/tsconfig.dest.json" + "path": "../circuits.js" } ], "include": ["src"] diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 502a29b5e53..ac5fbee1587 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -5,14 +5,13 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Archiver", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Archiver" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "start": "node ./dest", - "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", + "start:dev": "tsc-watch --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/archiver/tsconfig.dest.json b/yarn-project/archiver/tsconfig.dest.json deleted file mode 100644 index a967ab8e67f..00000000000 --- a/yarn-project/archiver/tsconfig.dest.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"], - "references": [ - { - "path": "../ethereum.js/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../circuits.js/tsconfig.dest.json" - }, - { - "path": "../l1-contracts/tsconfig.dest.json" - }, - { - "path": "../l2-block/tsconfig.dest.json" - } - ] -} diff --git a/yarn-project/archiver/tsconfig.json b/yarn-project/archiver/tsconfig.json index 80a2a3c62b4..33cabe36d61 100644 --- a/yarn-project/archiver/tsconfig.json +++ b/yarn-project/archiver/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,19 +7,19 @@ }, "references": [ { - "path": "../ethereum.js/tsconfig.dest.json" + "path": "../circuits.js" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../ethereum.js" }, { - "path": "../circuits.js/tsconfig.dest.json" + "path": "../foundation" }, { - "path": "../l1-contracts/tsconfig.dest.json" + "path": "../l1-contracts" }, { - "path": "../l2-block/tsconfig.dest.json" + "path": "../l2-block" } ], "include": ["src", "test"] diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 1343af35a4b..26c0171b7f8 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -5,15 +5,14 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec cli", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Aztec cli" }, "bin": { "aztec_cli": "index.js" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -p tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/aztec-cli/tsconfig.dest.json b/yarn-project/aztec-cli/tsconfig.dest.json deleted file mode 100644 index 965aaa1c433..00000000000 --- a/yarn-project/aztec-cli/tsconfig.dest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/aztec-cli/tsconfig.json b/yarn-project/aztec-cli/tsconfig.json index f67ddec9fd6..48b2558873c 100644 --- a/yarn-project/aztec-cli/tsconfig.json +++ b/yarn-project/aztec-cli/tsconfig.json @@ -1,9 +1,10 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"] + "include": ["src"], + "references": [] } diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 593cb45ddcf..341bc4916e7 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -6,12 +6,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec Node", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Aztec Node" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/aztec-node/tsconfig.dest.json b/yarn-project/aztec-node/tsconfig.dest.json deleted file mode 100644 index e8332baf132..00000000000 --- a/yarn-project/aztec-node/tsconfig.dest.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../archiver/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../p2p/tsconfig.dest.json" - }, - { - "path": "../world-state/tsconfig.dest.json" - }, - { - "path": "../ethereum.js/tsconfig.dest.json" - }, - { - "path": "../l1-contracts/tsconfig.dest.json" - }, - { - "path": "../sequencer-client/tsconfig.dest.json" - }, - { - "path": "../tx/tsconfig.dest.json" - } - ], - "exclude": [ - "**/*.test.*", - "**/fixtures/*" - ] -} \ No newline at end of file diff --git a/yarn-project/aztec-node/tsconfig.json b/yarn-project/aztec-node/tsconfig.json index 576c35070ab..00d217f72c4 100644 --- a/yarn-project/aztec-node/tsconfig.json +++ b/yarn-project/aztec-node/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,32 +7,32 @@ }, "references": [ { - "path": "../archiver/tsconfig.dest.json" + "path": "../archiver" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../ethereum.js" }, { - "path": "../p2p/tsconfig.dest.json" + "path": "../foundation" }, { - "path": "../world-state/tsconfig.dest.json" + "path": "../l1-contracts" }, { - "path": "../ethereum.js/tsconfig.dest.json" + "path": "../l2-block" }, { - "path": "../l1-contracts/tsconfig.dest.json" + "path": "../p2p" }, { - "path": "../sequencer-client/tsconfig.dest.json" + "path": "../sequencer-client" }, { - "path": "../tx/tsconfig.dest.json" + "path": "../tx" + }, + { + "path": "../world-state" } ], - "include": [ - "src", - "test" - ] -} \ No newline at end of file + "include": ["src", "test"] +} diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index 400c03a4498..eed5d7352f4 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -5,12 +5,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Wallet", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Wallet" }, "scripts": { - "build": "tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 10 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" @@ -19,7 +18,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts b/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts index eac3f3ad81e..b492e41984c 100644 --- a/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts +++ b/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts @@ -11,8 +11,6 @@ import { TxRequest, UInt8Vector, } from '@aztec/circuits.js'; -import { CircuitsWasm } from '@aztec/circuits.js/wasm'; -import { hashVK, computeFunctionLeaf, computeFunctionTreeRoot } from '@aztec/circuits.js/abis'; import { createDebugLogger, Fr } from '@aztec/foundation'; import { KernelProver } from '@aztec/kernel-prover'; import { Tx, TxHash } from '@aztec/tx'; @@ -25,7 +23,6 @@ import { TxReceipt, TxStatus } from '../tx/index.js'; import { KeyStore } from '../key_store/index.js'; import { ContractAbi, FunctionType } from '../noir.js'; import { Synchroniser } from '../synchroniser/index.js'; -import { keccak256 } from '../foundation.js'; /** * Implements a remote Aztec RPC client provider. @@ -33,14 +30,12 @@ import { keccak256 } from '../foundation.js'; */ export class AztecRPCServer implements AztecRPCClient { private synchroniser: Synchroniser; - constructor( private keyStore: KeyStore, private acirSimulator: AcirSimulator, private kernelProver: KernelProver, private node: AztecNode, private db: Database, - private circuitsWasm: CircuitsWasm, private log = createDebugLogger('aztec:rpc_server'), ) { this.synchroniser = new Synchroniser(node, db); @@ -91,23 +86,17 @@ export class AztecRPCServer implements AztecRPCClient { throw new Error('Cannot find constructor in the ABI.'); } - if (!constructorAbi.verificationKey) { - throw new Error('Missing verification key for the constructor.'); - } - const functionData = new FunctionData( selectorToNumber(generateFunctionSelector(constructorAbi.name, constructorAbi.parameters)), true, true, ); - const constructorVkHash = Fr.fromBuffer( - hashVK(this.circuitsWasm, Buffer.from(constructorAbi.verificationKey, 'hex')), - ); - + const constructorVkHash = Fr.ZERO; + const functionTreeRoot = Fr.ZERO; const contractDeploymentData = new ContractDeploymentData( constructorVkHash, - this.generateFunctionTreeRoot(abi), + functionTreeRoot, contractAddressSalt, portalContract, ); @@ -282,18 +271,4 @@ export class AztecRPCServer implements AztecRPCClient { status: TxStatus.DROPPED, }; } - - private generateFunctionTreeRoot(abi: ContractAbi) { - const leaves = abi.functions - .filter(f => f.functionType !== FunctionType.UNCONSTRAINED) - .map(f => { - const selector = generateFunctionSelector(f.name, f.parameters); - const isPrivate = Buffer.from([f.functionType === FunctionType.SECRET ? 1 : 0]); - // All non-unconstrained functions have vks - const vkHash = hashVK(this.circuitsWasm, Buffer.from(f.verificationKey!, 'hex')); - const acirHash = keccak256(Buffer.from(f.bytecode, 'hex')); - return computeFunctionLeaf(this.circuitsWasm, Buffer.concat([selector, isPrivate, vkHash, acirHash])); - }); - return Fr.fromBuffer(computeFunctionTreeRoot(this.circuitsWasm, leaves)); - } } diff --git a/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts b/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts index 2f9334acbfb..df78a4c81a6 100644 --- a/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts +++ b/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts @@ -1,6 +1,5 @@ import { AcirSimulator } from '@aztec/acir-simulator'; import { AztecNode } from '@aztec/aztec-node'; -import { CircuitsWasm } from '@aztec/circuits.js/wasm'; import { KernelProver } from '@aztec/kernel-prover'; import { MemoryDB } from '../database/index.js'; import { KeyStore, TestKeyStore } from '../key_store/index.js'; @@ -26,5 +25,5 @@ export async function createAztecRPCServer( acirSimulator = acirSimulator || new AcirSimulator(new SimulatorOracle(db, keyStore)); kernelProver = kernelProver || new KernelProver(); - return new AztecRPCServer(keyStore, acirSimulator, kernelProver, aztecNode, db, await CircuitsWasm.new()); + return await Promise.resolve(new AztecRPCServer(keyStore, acirSimulator, kernelProver, aztecNode, db)); } diff --git a/yarn-project/aztec-rpc/tsconfig.dest.json b/yarn-project/aztec-rpc/tsconfig.dest.json deleted file mode 100644 index 45604193152..00000000000 --- a/yarn-project/aztec-rpc/tsconfig.dest.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../barretenberg.js/tsconfig.dest.json" - }, - { - "path": "../acir-simulator/tsconfig.dest.json" - }, - { - "path": "../aztec-node/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../kernel-prover/tsconfig.dest.json" - }, - { - "path": "../tx/tsconfig.dest.json" - } - ], - "exclude": [ - "**/*.test.*", - "**/fixtures/*" - ] -} \ No newline at end of file diff --git a/yarn-project/aztec-rpc/tsconfig.json b/yarn-project/aztec-rpc/tsconfig.json index efdeeba6f22..5ed3dc7804e 100644 --- a/yarn-project/aztec-rpc/tsconfig.json +++ b/yarn-project/aztec-rpc/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,25 +7,20 @@ }, "references": [ { - "path": "../barretenberg.js/tsconfig.dest.json" + "path": "../acir-simulator" }, { - "path": "../acir-simulator/tsconfig.dest.json" + "path": "../aztec-node" }, { - "path": "../aztec-node/tsconfig.dest.json" + "path": "../foundation" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../kernel-prover" }, { - "path": "../kernel-prover/tsconfig.dest.json" - }, - { - "path": "../tx/tsconfig.dest.json" + "path": "../tx" } ], - "include": [ - "src" - ] -} \ No newline at end of file + "include": ["src"] +} diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 355088819b8..9b94bc96b4d 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -5,12 +5,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec.js", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Aztec.js" }, "scripts": { - "build": "tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 10 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/aztec.js/tsconfig.dest.json b/yarn-project/aztec.js/tsconfig.dest.json deleted file mode 100644 index db25faf96af..00000000000 --- a/yarn-project/aztec.js/tsconfig.dest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../aztec-rpc/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - } - ], - "exclude": [ - "**/*.test.*", - "**/fixtures/*" - ] -} \ No newline at end of file diff --git a/yarn-project/aztec.js/tsconfig.json b/yarn-project/aztec.js/tsconfig.json index 1207b40ad7a..0f9221f6d71 100644 --- a/yarn-project/aztec.js/tsconfig.json +++ b/yarn-project/aztec.js/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,13 +7,17 @@ }, "references": [ { - "path": "../aztec-rpc/tsconfig.dest.json" + "path": "../aztec-rpc" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../foundation" + }, + { + "path": "../sequencer-client" + }, + { + "path": "../tx" } ], - "include": [ - "src" - ] -} \ No newline at end of file + "include": ["src"] +} diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 71a4269a1bb..93a578f8e48 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -9,12 +9,11 @@ }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Barretenberg.js", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Barretenberg.js" }, "scripts": { - "build": "tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 0 ./src", "formatting:fix": "prettier -w ./src", diff --git a/yarn-project/barretenberg.js/tsconfig.dest.json b/yarn-project/barretenberg.js/tsconfig.dest.json deleted file mode 100644 index 3d70bf6e79a..00000000000 --- a/yarn-project/barretenberg.js/tsconfig.dest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.json", - "references": [ - { - "path": "../foundation/tsconfig.dest.json" - } - ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/barretenberg.js/tsconfig.json b/yarn-project/barretenberg.js/tsconfig.json index daaa3c1decc..3b01865577a 100644 --- a/yarn-project/barretenberg.js/tsconfig.json +++ b/yarn-project/barretenberg.js/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,7 +7,7 @@ }, "references": [ { - "path": "../foundation/tsconfig.dest.json" + "path": "../foundation" } ], "include": ["src"] diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 6593118e05c..a44954a7ffb 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -4,19 +4,15 @@ "type": "module", "exports": { ".": "./dest/index.js", - "./abis": "./dest/abis/index.js", "./factories": "./dest/tests/factories.js", - "./utils": "./dest/utils/index.js", - "./wasm": "./dest/wasm/index.js" + "./utils": "./dest/utils/index.js" }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Circuits.js", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Circuits.js" }, "scripts": { - "redo-ts-refs": "../../scripts/update-tsconfig-references tsconfig.dest.json", - "build": "yarn redo-ts-refs && tsc -b tsconfig.dest.json", + "build": "tsc -b", "build:dev": "tsc -b tsconfig.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 278 ./src", diff --git a/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap b/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap deleted file mode 100644 index fd426b4cefd..00000000000 --- a/yarn-project/circuits.js/src/abis/__snapshots__/abis.test.ts.snap +++ /dev/null @@ -1,282 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`abis wasm bindings computes a contract address 1`] = ` -AztecAddress { - "buffer": Object { - "data": Array [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - ], - "type": "Buffer", - }, -} -`; - -exports[`abis wasm bindings computes a function leaf 1`] = ` -Object { - "data": Array [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - ], - "type": "Buffer", -} -`; - -exports[`abis wasm bindings computes a function selector 1`] = ` -Object { - "data": Array [ - 169, - 5, - 156, - 187, - 42, - 176, - 158, - 178, - 25, - 88, - 63, - 74, - 89, - 165, - 208, - 98, - 58, - 222, - 52, - 109, - 150, - 43, - 205, - 78, - 70, - 177, - 29, - 160, - 71, - 201, - 4, - ], - "type": "Buffer", -} -`; - -exports[`abis wasm bindings computes contract leaf 1`] = ` -Object { - "data": Array [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - ], - "type": "Buffer", -} -`; - -exports[`abis wasm bindings computes function tree root 1`] = ` -Object { - "data": Array [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - ], - "type": "Buffer", -} -`; - -exports[`abis wasm bindings hashes VK 1`] = ` -Object { - "data": Array [ - 40, - 221, - 88, - 34, - 147, - 30, - 212, - 40, - 78, - 215, - 171, - 187, - 195, - 165, - 189, - 248, - 159, - 129, - 116, - 79, - 198, - 206, - 240, - 79, - 47, - 188, - 249, - 53, - 89, - 172, - 150, - 107, - ], - "type": "Buffer", -} -`; - -exports[`abis wasm bindings hashes a tx request 1`] = ` -Object { - "data": Array [ - 5, - 199, - 203, - 145, - 207, - 222, - 103, - 152, - 109, - 43, - 192, - 197, - 0, - 230, - 66, - 174, - 222, - 157, - 84, - 111, - 45, - 217, - 9, - 63, - 92, - 243, - 5, - 178, - 78, - 169, - 61, - 50, - ], - "type": "Buffer", -} -`; diff --git a/yarn-project/circuits.js/src/abis/abis.test.ts b/yarn-project/circuits.js/src/abis/abis.test.ts deleted file mode 100644 index 9b73983752a..00000000000 --- a/yarn-project/circuits.js/src/abis/abis.test.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { fr, makeAztecAddress, makeTxRequest, makeVerificationKey } from '../tests/factories.js'; -import { CircuitsWasm } from '../wasm/circuits_wasm.js'; -import { - computeContractAddress, - computeContractLeaf, - computeFunctionLeaf, - computeFunctionSelector, - computeFunctionTreeRoot, - hashTxRequest, - hashVK, -} from './abis.js'; -import { NullifierLeafPreimage } from '../index.js'; - -describe('abis wasm bindings', () => { - let wasm: CircuitsWasm; - beforeEach(async () => { - wasm = await CircuitsWasm.new(); - }); - it('hashes a tx request', () => { - const txRequest = makeTxRequest(); - const hash = hashTxRequest(wasm, txRequest); - expect(hash).toMatchSnapshot(); - }); - - it('computes a function selector', () => { - const funcSig = 'transfer(address,uint256)'; - const res = computeFunctionSelector(wasm, funcSig); - expect(res).toMatchSnapshot(); - }); - - it('hashes VK', () => { - const vk = makeVerificationKey(); - const res = hashVK(wasm, vk.toBuffer()); - expect(res).toMatchSnapshot(); - }); - - it('computes a function leaf', () => { - const leaf = Buffer.alloc(32); - const res = computeFunctionLeaf(wasm, leaf); - expect(res).toMatchSnapshot(); - }); - - it('computes function tree root', () => { - const res = computeFunctionTreeRoot(wasm, [Buffer.alloc(32), Buffer.alloc(32), Buffer.alloc(32), Buffer.alloc(32)]); - expect(res).toMatchSnapshot(); - }); - - it('computes a contract address', () => { - const deployerAddr = makeAztecAddress(1); - const contractAddr = makeAztecAddress(2); - const treeRoot = Buffer.alloc(32); - const constructorHash = Buffer.alloc(32); - const res = computeContractAddress(wasm, deployerAddr, contractAddr, treeRoot, constructorHash); - expect(res).toMatchSnapshot(); - }); - - it('computes contract leaf', () => { - const leafPreImage = new NullifierLeafPreimage(fr(2), fr(2 + 0x100), 2 + 0x200); - const res = computeContractLeaf(wasm, leafPreImage); - expect(res).toMatchSnapshot(); - }); -}); diff --git a/yarn-project/circuits.js/src/abis/abis.ts b/yarn-project/circuits.js/src/abis/abis.ts deleted file mode 100644 index 2b020819d4e..00000000000 --- a/yarn-project/circuits.js/src/abis/abis.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Buffer } from 'buffer'; -import { AztecAddress, serializeBufferArrayToVector } from '@aztec/foundation'; -import { CircuitsWasm } from '../wasm/index.js'; -import { FUNCTION_SELECTOR_NUM_BYTES, NullifierLeafPreimage, TxRequest } from '../index.js'; - -export function hashTxRequest(wasm: CircuitsWasm, txRequest: TxRequest) { - const data = txRequest.toBuffer(); - wasm.call('pedersen__init'); - wasm.writeMemory(0, data); - wasm.call('abis__hash_tx_request', 0, data.length); - return Buffer.from(wasm.getMemorySlice(data.length, data.length + 32)); -} - -export function computeFunctionSelector(wasm: CircuitsWasm, funcSig: string) { - const buf = Buffer.from(funcSig); - wasm.writeMemory(0, buf); - wasm.call('abis__compute_function_selector', 0, buf.length); - return Buffer.from(wasm.getMemorySlice(buf.length, buf.length + FUNCTION_SELECTOR_NUM_BYTES)); -} - -export function hashVK(wasm: CircuitsWasm, vkBuf: Uint8Array) { - wasm.call('pedersen__init'); - wasm.writeMemory(0, vkBuf); - wasm.call('abis__hash_vk', 0, vkBuf.length); - return Buffer.from(wasm.getMemorySlice(vkBuf.length, vkBuf.length + 32)); -} - -export function computeFunctionLeaf(wasm: CircuitsWasm, fnLeaf: Uint8Array) { - wasm.call('pedersen__init'); - wasm.writeMemory(0, fnLeaf); - wasm.call('abis__compute_function_leaf', fnLeaf.length); - return Buffer.from(wasm.getMemorySlice(fnLeaf.length, fnLeaf.length + 32)); -} - -export function computeFunctionTreeRoot(wasm: CircuitsWasm, fnLeafs: Buffer[]) { - const inputVector = serializeBufferArrayToVector(fnLeafs); - wasm.call('pedersen__init'); - wasm.writeMemory(0, inputVector); - wasm.call('abis__compute_function_tree_root', 0, fnLeafs.length); - return Buffer.from(wasm.getMemorySlice(inputVector.length, inputVector.length + 32)); -} - -export function hashConstructor(wasm: CircuitsWasm, funcSigBuf: Uint8Array, args: Buffer[], constructorVK: Uint8Array) { - const inputVector = serializeBufferArrayToVector(args); - wasm.call('pedersen__init'); - wasm.writeMemory(0, funcSigBuf); - wasm.writeMemory(funcSigBuf.length, inputVector); - wasm.writeMemory(funcSigBuf.length + inputVector.length, constructorVK); - wasm.call('abis__hash_constructor', 0, funcSigBuf.length, funcSigBuf.length + inputVector.length); - const memLoc = funcSigBuf.length + inputVector.length + constructorVK.length; - return Buffer.from(wasm.getMemorySlice(memLoc, memLoc + 32)); -} - -export function computeContractAddress( - wasm: CircuitsWasm, - deployerAddr: AztecAddress, - contractAddr: AztecAddress, - fnTreeRoot: Buffer, - constructorHash: Buffer, -) { - const deployerAddrBuf = deployerAddr.toBuffer(); - const contractAddrBuf = contractAddr.toBuffer(); - const memLoc1 = deployerAddrBuf.length; - const memLoc2 = memLoc1 + contractAddrBuf.length; - const memLoc3 = memLoc2 + fnTreeRoot.length; - const memLoc4 = memLoc3 + constructorHash.length; - wasm.call('pedersen__init'); - wasm.writeMemory(0, deployerAddrBuf); - wasm.writeMemory(memLoc1, contractAddrBuf); - wasm.writeMemory(memLoc2, fnTreeRoot); - wasm.writeMemory(memLoc3, constructorHash); - wasm.call('abis__compute_contract_address', 0, memLoc1, memLoc2, memLoc3); - const resultBuf = Buffer.from(wasm.getMemorySlice(memLoc4, memLoc4 + 32)); - return AztecAddress.fromBuffer(resultBuf); -} - -export function computeContractLeaf(wasm: CircuitsWasm, leafPreimage: NullifierLeafPreimage) { - const data = leafPreimage.toBuffer(); - wasm.call('pedersen__init'); - wasm.writeMemory(0, leafPreimage.toBuffer()); - wasm.call('abis__compute_contract_leaf', 0); - return Buffer.from(wasm.getMemorySlice(data.length, data.length + 32)); -} diff --git a/yarn-project/circuits.js/src/abis/index.ts b/yarn-project/circuits.js/src/abis/index.ts deleted file mode 100644 index 9c432c09e53..00000000000 --- a/yarn-project/circuits.js/src/abis/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './abis.js'; diff --git a/yarn-project/circuits.js/src/tests/factories.ts b/yarn-project/circuits.js/src/tests/factories.ts index f00c6c580af..7ca3e5698d3 100644 --- a/yarn-project/circuits.js/src/tests/factories.ts +++ b/yarn-project/circuits.js/src/tests/factories.ts @@ -1,11 +1,5 @@ import { AztecAddress, EthAddress, Fq, Fr } from '@aztec/foundation'; -import { - CallContext, - PreviousRollupData, - PrivateCircuitPublicInputs, - RootRollupInputs, - RootRollupPublicInputs, -} from '../index.js'; +import { CallContext, PreviousRollupData, PrivateCircuitPublicInputs, RootRollupInputs, RootRollupPublicInputs } from '../index.js'; import { AppendOnlyTreeSnapshot, BaseRollupPublicInputs, ConstantBaseRollupData } from '../structs/base_rollup.js'; import { ARGS_LENGTH, @@ -28,7 +22,7 @@ import { PUBLIC_CALL_STACK_LENGTH, RETURN_VALUES_LENGTH, ROLLUP_VK_TREE_HEIGHT, - VK_TREE_HEIGHT, + VK_TREE_HEIGHT } from '../structs/constants.js'; import { FunctionData } from '../structs/function_data.js'; import { @@ -40,7 +34,7 @@ import { PreviousKernelData, PrivateCallData, PrivateKernelInputs, - PrivateKernelPublicInputs, + PrivateKernelPublicInputs } from '../structs/kernel.js'; import { PrivateCallStackItem } from '../structs/private_call_stack_item.js'; import { @@ -49,7 +43,7 @@ import { ComposerType, EcdsaSignature, MembershipWitness, - UInt8Vector, + UInt8Vector } from '../structs/shared.js'; import { ContractDeploymentData, SignedTxRequest, TxContext, TxRequest } from '../structs/tx.js'; import { CommitmentMap, G1AffineElement, VerificationKey } from '../structs/verification_key.js'; @@ -266,7 +260,7 @@ export function makePreviousBaseRollupData(seed = 0) { makeVerificationKey(), seed + 0x110, makeMembershipWitness(ROLLUP_VK_TREE_HEIGHT, seed + 0x120), - ); + ) } export function makeRootRollupInputs(seed = 0) { diff --git a/yarn-project/circuits.js/src/utils/serialize.ts b/yarn-project/circuits.js/src/utils/serialize.ts index 527a45cfbaa..834f8c64395 100644 --- a/yarn-project/circuits.js/src/utils/serialize.ts +++ b/yarn-project/circuits.js/src/utils/serialize.ts @@ -119,7 +119,7 @@ export type Bufferable = } | Bufferable[]; -function isSerializableToBuffer32(obj: object): obj is { toBuffer32: () => Buffer } { +function isSerializableToBuffer32(obj: Object): obj is { toBuffer32: () => Buffer } { return !!(obj as { toBuffer32: () => Buffer }).toBuffer32; } diff --git a/yarn-project/circuits.js/tsconfig.dest.json b/yarn-project/circuits.js/tsconfig.dest.json deleted file mode 100644 index ee1837edd89..00000000000 --- a/yarn-project/circuits.js/tsconfig.dest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": ".", - "exclude": [ - "**/*.test.*", - "**/fixtures/*" - ], - "references": [ - { - "path": "../barretenberg.js/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - } - ] -} diff --git a/yarn-project/circuits.js/tsconfig.json b/yarn-project/circuits.js/tsconfig.json index 3d4d6ba324c..3b01865577a 100644 --- a/yarn-project/circuits.js/tsconfig.json +++ b/yarn-project/circuits.js/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,10 +7,7 @@ }, "references": [ { - "path": "../barretenberg.js/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" + "path": "../foundation" } ], "include": ["src"] diff --git a/yarn-project/docs/README.md b/yarn-project/docs/README.md index 9d12761b69a..cb1ac25a743 100644 --- a/yarn-project/docs/README.md +++ b/yarn-project/docs/README.md @@ -1,17 +1,20 @@ # Docs To generate docs. Go to the root of `yarn-project` and run: + ```bash yarn docs ``` + This will generate the html, and start a server to expose it on port `8080`, if run from external server (the mainframe) you can add `LocalForward 8080 :8080` to your ssh-config, and access it from your browser. ## Adding a new package + To include a new package in the set that we generate documentation for add it to the `entrypoints` list in the `yarn-project/typedoc.json`, then in the `package.json` for the new package add typedoc similar to example below: + ```json "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec cli", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Aztec cli" }, ``` diff --git a/yarn-project/end-to-end/Dockerfile b/yarn-project/end-to-end/Dockerfile index 6272f9f1348..9c330dcfd5d 100644 --- a/yarn-project/end-to-end/Dockerfile +++ b/yarn-project/end-to-end/Dockerfile @@ -8,7 +8,6 @@ WORKDIR /usr/src/yarn-project/end-to-end RUN yarn build && yarn formatting # (4) copy bb.js wasm binaries RUN cp /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/yarn-project/barretenberg.js/dest/wasm/barretenberg.wasm -RUN cp /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm /usr/src/yarn-project/circuits.js/dest/wasm/aztec3-circuits.wasm # (5) Prune dev dependencies. See comment in base image. RUN yarn cache clean diff --git a/yarn-project/end-to-end/tsconfig.json b/yarn-project/end-to-end/tsconfig.json index b2c99fd1ac6..fb5b1024072 100644 --- a/yarn-project/end-to-end/tsconfig.json +++ b/yarn-project/end-to-end/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,13 +7,16 @@ }, "references": [ { - "path": "../aztec-node/tsconfig.dest.json" + "path": "../aztec-node" }, { - "path": "../aztec.js/tsconfig.dest.json" + "path": "../aztec.js" }, { - "path": "../noir-contracts/tsconfig.dest.json" + "path": "../ethereum.js" + }, + { + "path": "../noir-contracts" } ], "include": ["src"] diff --git a/yarn-project/ethereum.js/example/tsconfig.json b/yarn-project/ethereum.js/example/tsconfig.json index f67ddec9fd6..cd588abd4a6 100644 --- a/yarn-project/ethereum.js/example/tsconfig.json +++ b/yarn-project/ethereum.js/example/tsconfig.json @@ -1,9 +1,17 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"] + "include": ["src"], + "references": [ + { + "path": "../tsconfig.base.json" + }, + { + "path": "../../foundation" + } + ] } diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index b2683ba4088..c951f5a542e 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -23,7 +23,7 @@ "./crypto": "./dest/crypto/index.js" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", + "build": "yarn clean && tsc -b", "build:dev": "yarn build --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", diff --git a/yarn-project/ethereum.js/tsconfig.dest.json b/yarn-project/ethereum.js/tsconfig.dest.json deleted file mode 100644 index 87af7f6c1c8..00000000000 --- a/yarn-project/ethereum.js/tsconfig.dest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../foundation/tsconfig.dest.json" - } - ], - "exclude": [ - "src/**/*.test.ts", - "src/**/fixtures/*" - ] -} \ No newline at end of file diff --git a/yarn-project/ethereum.js/tsconfig.json b/yarn-project/ethereum.js/tsconfig.json index 41e78a215e3..afc7889a5ad 100644 --- a/yarn-project/ethereum.js/tsconfig.json +++ b/yarn-project/ethereum.js/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "noImplicitAny": false, "outDir": "dest", @@ -9,7 +9,7 @@ }, "references": [ { - "path": "../foundation/tsconfig.dest.json" + "path": "../foundation" } ], "include": ["src", "src/eth_typed_data/fixtures/*.json"] diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index b2e11d95698..23d274daa7b 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -27,8 +27,8 @@ "./wasm": "./dest/wasm/index.js" }, "scripts": { - "build": "tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 309 ./src", "formatting:fix": "prettier -w ./src", diff --git a/yarn-project/foundation/src/fields/fields.ts b/yarn-project/foundation/src/fields/fields.ts index a6aa305cad9..4d1892b2da5 100644 --- a/yarn-project/foundation/src/fields/fields.ts +++ b/yarn-project/foundation/src/fields/fields.ts @@ -9,9 +9,9 @@ export class Fr { static SIZE_IN_BYTES = 32; constructor(public readonly value: bigint) { - // if (value > Fr.MAX_VALUE) { - // throw new Error(`Fr out of range ${value}.`); - // } + if (value > Fr.MAX_VALUE) { + throw new Error(`Fr out of range ${value}.`); + } } static random() { diff --git a/yarn-project/foundation/tsconfig.dest.json b/yarn-project/foundation/tsconfig.dest.json deleted file mode 100644 index 965aaa1c433..00000000000 --- a/yarn-project/foundation/tsconfig.dest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/foundation/tsconfig.json b/yarn-project/foundation/tsconfig.json index f67ddec9fd6..48b2558873c 100644 --- a/yarn-project/foundation/tsconfig.json +++ b/yarn-project/foundation/tsconfig.json @@ -1,9 +1,10 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"] + "include": ["src"], + "references": [] } diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 0af5858f8c0..5e09541f1d8 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -5,12 +5,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Kernel Simulator", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Kernel Simulator" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/kernel-prover/tsconfig.dest.json b/yarn-project/kernel-prover/tsconfig.dest.json deleted file mode 100644 index 972422b99ee..00000000000 --- a/yarn-project/kernel-prover/tsconfig.dest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../acir-simulator/tsconfig.dest.json" - }, - { - "path": "../circuits.js/tsconfig.dest.json" - } - ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/kernel-prover/tsconfig.json b/yarn-project/kernel-prover/tsconfig.json index b3e4c475ad0..58faff75d06 100644 --- a/yarn-project/kernel-prover/tsconfig.json +++ b/yarn-project/kernel-prover/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,10 +7,13 @@ }, "references": [ { - "path": "../acir-simulator/tsconfig.dest.json" + "path": "../acir-simulator" }, { - "path": "../circuits.js/tsconfig.dest.json" + "path": "../circuits.js" + }, + { + "path": "../foundation" } ], "include": ["src"] diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 490b1ec2cbd..a0246551b04 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -5,12 +5,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "KeyStore", - "tsconfig": "./tsconfig.dest.json" + "displayName": "KeyStore" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/key-store/tsconfig.dest.json b/yarn-project/key-store/tsconfig.dest.json deleted file mode 100644 index 965aaa1c433..00000000000 --- a/yarn-project/key-store/tsconfig.dest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/key-store/tsconfig.json b/yarn-project/key-store/tsconfig.json index f67ddec9fd6..f0104160e49 100644 --- a/yarn-project/key-store/tsconfig.json +++ b/yarn-project/key-store/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"] + "include": ["src"], + "references": [ + { + "path": "../foundation" + } + ] } diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index b0899bc566e..8a56f2e8b60 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -8,12 +8,11 @@ }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "L1 Contracts", - "tsconfig": "./tsconfig.dest.json" + "displayName": "L1 Contracts" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "generate": "contract_gen_def && bash scripts/update-viem-abis.sh && yarn formatting:fix", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", diff --git a/yarn-project/l1-contracts/tsconfig.dest.json b/yarn-project/l1-contracts/tsconfig.dest.json deleted file mode 100644 index 4bbb1a84393..00000000000 --- a/yarn-project/l1-contracts/tsconfig.dest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"], - "references": [ - { - "path": "../ethereum.js/tsconfig.dest.json" - } - ] -} diff --git a/yarn-project/l1-contracts/tsconfig.json b/yarn-project/l1-contracts/tsconfig.json index dfb32325688..971712f28bc 100644 --- a/yarn-project/l1-contracts/tsconfig.json +++ b/yarn-project/l1-contracts/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,7 +7,7 @@ }, "references": [ { - "path": "../ethereum.js/tsconfig.dest.json" + "path": "../ethereum.js" } ], "include": ["src"] diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index 35bf1f3cb21..7443cf313ab 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -4,12 +4,11 @@ "type": "module", "exports": "./dest/index.js", "typedoc": { - "entryPoint": "./src/index.ts", - "tsconfig": "./tsconfig.dest.json" + "entryPoint": "./src/index.ts" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 31 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/l2-block/tsconfig.dest.json b/yarn-project/l2-block/tsconfig.dest.json deleted file mode 100644 index e241b982c7a..00000000000 --- a/yarn-project/l2-block/tsconfig.dest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../circuits.js/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - } - ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/l2-block/tsconfig.json b/yarn-project/l2-block/tsconfig.json index d3bea5d6e5b..ea120e13a2b 100644 --- a/yarn-project/l2-block/tsconfig.json +++ b/yarn-project/l2-block/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,10 +7,10 @@ }, "references": [ { - "path": "../circuits.js/tsconfig.dest.json" + "path": "../circuits.js" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../foundation" } ], "include": ["src"] diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 3abdc18a8c9..f1656d4dbef 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -4,8 +4,8 @@ "type": "module", "exports": "./dest/index.js", "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/merkle-tree/tsconfig.dest.json b/yarn-project/merkle-tree/tsconfig.dest.json deleted file mode 100644 index cb5bfa42834..00000000000 --- a/yarn-project/merkle-tree/tsconfig.dest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": ".", - "exclude": [ - "**/*.test.*", - "**/fixtures/*" - ], - "references": [ - { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../barretenberg.js/tsconfig.dest.json" - } - ] -} \ No newline at end of file diff --git a/yarn-project/merkle-tree/tsconfig.json b/yarn-project/merkle-tree/tsconfig.json index 862dee21d28..1a25ef0e20f 100644 --- a/yarn-project/merkle-tree/tsconfig.json +++ b/yarn-project/merkle-tree/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,10 +7,10 @@ }, "references": [ { - "path": "../foundation/tsconfig.dest.json" + "path": "../barretenberg.js" }, { - "path": "../barretenberg.js/tsconfig.dest.json" + "path": "../foundation" } ], "include": ["src"] diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index f04af359a0f..c8d4542ce90 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -8,12 +8,11 @@ }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Noir contracts", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Noir contracts" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -p tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/noir-contracts/tsconfig.dest.json b/yarn-project/noir-contracts/tsconfig.dest.json deleted file mode 100644 index 965aaa1c433..00000000000 --- a/yarn-project/noir-contracts/tsconfig.dest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/noir-contracts/tsconfig.json b/yarn-project/noir-contracts/tsconfig.json index faaf1f8265a..e8d2b93f34d 100644 --- a/yarn-project/noir-contracts/tsconfig.json +++ b/yarn-project/noir-contracts/tsconfig.json @@ -1,9 +1,14 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src", "src/**/*.json"] + "include": ["src", "src/**/*.json"], + "references": [ + { + "path": "../foundation" + } + ] } diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index fa8a3a5feed..4f5826d80b8 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -5,14 +5,13 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "P2P", - "tsconfig": "./tsconfig.dest.json" + "displayName": "P2P" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "start": "node ./dest", - "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", + "start:dev": "tsc-watch --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/p2p/tsconfig.dest.json b/yarn-project/p2p/tsconfig.dest.json deleted file mode 100644 index 2ac294ca2d1..00000000000 --- a/yarn-project/p2p/tsconfig.dest.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ".", - "references": [ - { "path": "../foundation/tsconfig.dest.json" }, - { "path": "../l2-block/tsconfig.dest.json" }, - { "path": "../tx/tsconfig.dest.json" } - ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/p2p/tsconfig.json b/yarn-project/p2p/tsconfig.json index d699ed27896..33d207e03e3 100644 --- a/yarn-project/p2p/tsconfig.json +++ b/yarn-project/p2p/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -8,9 +8,15 @@ "types": ["node", "jest"] }, "references": [ - { "path": "../foundation/tsconfig.dest.json" }, - { "path": "../l2-block/tsconfig.dest.json" }, - { "path": "../tx/tsconfig.dest.json" } + { + "path": "../foundation" + }, + { + "path": "../l2-block" + }, + { + "path": "../tx" + } ], "include": ["src"] } diff --git a/yarn-project/package.json b/yarn-project/package.json index bcfb601448b..d9acbb9014f 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -3,9 +3,11 @@ "packageManager": "yarn@3.4.1", "private": true, "scripts": { + "prepare": "workspaces-to-typescript-project-references", "docs": "typedoc --out docs/dist && cd docs && yarn serve", "formatting": "yarn workspaces foreach run formatting", "formatting:fix": "yarn workspaces foreach run formatting:fix", + "test": "yarn workspaces foreach run test", "build": "yarn workspaces foreach run build" }, "workspaces": [ @@ -36,6 +38,7 @@ ], "prettier": "@aztec/foundation/prettier", "devDependencies": { + "@monorepo-utils/workspaces-to-typescript-project-references": "^2.9.0", "eslint": "^8.21.0", "prettier": "^2.7.1", "typedoc": "^0.23.26", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 511ab85227f..9938265a69e 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -5,12 +5,11 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Prover Client", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Prover Client" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/prover-client/tsconfig.dest.json b/yarn-project/prover-client/tsconfig.dest.json deleted file mode 100644 index 965aaa1c433..00000000000 --- a/yarn-project/prover-client/tsconfig.dest.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/prover-client/tsconfig.json b/yarn-project/prover-client/tsconfig.json index f67ddec9fd6..48b2558873c 100644 --- a/yarn-project/prover-client/tsconfig.json +++ b/yarn-project/prover-client/tsconfig.json @@ -1,9 +1,10 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"] + "include": ["src"], + "references": [] } diff --git a/yarn-project/sequencer-client/jest.integration.config.json b/yarn-project/sequencer-client/jest.integration.config.json deleted file mode 100644 index f89093c1acf..00000000000 --- a/yarn-project/sequencer-client/jest.integration.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "preset": "ts-jest/presets/default-esm", - "globals": { - "ts-jest": { - "useESM": true - } - }, - "moduleNameMapper": { - "^(\\.{1,2}/.*)\\.js$": "$1" - }, - "testRegex": "./test/.*\\.test\\.ts$", - "rootDir": "./test" -} \ No newline at end of file diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 316726e6920..06ef0c4296c 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -5,16 +5,15 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Sequencer Client", - "tsconfig": "./tsconfig.dest.json" + "displayName": "Sequencer Client" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint ./src", "formatting:fix": "prettier -w ./src", - "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests", + "test": "jest --passWithNoTests", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json" }, @@ -22,7 +21,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/sequencer-client/tsconfig.dest.json b/yarn-project/sequencer-client/tsconfig.dest.json deleted file mode 100644 index 8e697e3d954..00000000000 --- a/yarn-project/sequencer-client/tsconfig.dest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": ".", - "exclude": ["**/*.test.*", "**/fixtures/*"], - "references": [ - { "path": "../archiver/tsconfig.dest.json" }, - { "path": "../circuits.js/tsconfig.dest.json" }, - { "path": "../l1-contracts/tsconfig.dest.json" }, - { "path": "../l2-block/tsconfig.dest.json" }, - { "path": "../merkle-tree/tsconfig.dest.json" }, - { "path": "../p2p/tsconfig.dest.json" }, - { "path": "../tx/tsconfig.dest.json" }, - { "path": "../world-state/tsconfig.dest.json" } - ] -} diff --git a/yarn-project/sequencer-client/tsconfig.json b/yarn-project/sequencer-client/tsconfig.json index 0a94134774e..5b9835534e3 100644 --- a/yarn-project/sequencer-client/tsconfig.json +++ b/yarn-project/sequencer-client/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,13 +7,32 @@ }, "include": ["src", "test"], "references": [ - { "path": "../archiver/tsconfig.dest.json" }, - { "path": "../circuits.js/tsconfig.dest.json" }, - { "path": "../l1-contracts/tsconfig.dest.json" }, - { "path": "../l2-block/tsconfig.dest.json" }, - { "path": "../merkle-tree/tsconfig.dest.json" }, - { "path": "../p2p/tsconfig.dest.json" }, - { "path": "../tx/tsconfig.dest.json" }, - { "path": "../world-state/tsconfig.dest.json" } + { + "path": "../circuits.js" + }, + { + "path": "../ethereum.js" + }, + { + "path": "../foundation" + }, + { + "path": "../l1-contracts" + }, + { + "path": "../l2-block" + }, + { + "path": "../merkle-tree" + }, + { + "path": "../p2p" + }, + { + "path": "../tx" + }, + { + "path": "../world-state" + } ] } diff --git a/yarn-project/tsconfig.json b/yarn-project/tsconfig.base.json similarity index 89% rename from yarn-project/tsconfig.json rename to yarn-project/tsconfig.base.json index 6bbb3b53fa7..0455864d20c 100644 --- a/yarn-project/tsconfig.json +++ b/yarn-project/tsconfig.base.json @@ -14,5 +14,6 @@ "importHelpers": true, "resolveJsonModule": true, "composite": true - } + }, + "exclude": ["**/*.test.*", "**/fixtures/*"] } diff --git a/yarn-project/tsconfig.test.json b/yarn-project/tsconfig.test.json index ae31f8e07a8..de0fa054bdd 100644 --- a/yarn-project/tsconfig.test.json +++ b/yarn-project/tsconfig.test.json @@ -1,30 +1,19 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "es2020", - "lib": ["dom", "esnext", "es2017.object"], - "module": "NodeNext", - "rootDir": "..", - "moduleResolution": "NodeNext", - "strict": true, - "declaration": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "downlevelIteration": true, - "inlineSourceMap": true, - "declarationMap": true, - "importHelpers": true, - "resolveJsonModule": true, - "composite": true + "rootDir": "." }, "include": ["**/*.ts", "**/*.tsx"], + "exclude": [], "references": [ - { "path": "archiver/tsconfig.dest.json" }, - { "path": "barretenberg.js/tsconfig.dest.json" }, - { "path": "l1-contracts/tsconfig.dest.json" }, - { "path": "l2-block/tsconfig.dest.json" }, - { "path": "merkle-tree/tsconfig.dest.json" }, - { "path": "p2p/tsconfig.dest.json" }, - { "path": "tx/tsconfig.dest.json" }, - { "path": "world-state/tsconfig.dest.json" } - ] + { "path": "archiver" }, + { "path": "barretenberg.js" }, + { "path": "l1-contracts" }, + { "path": "l2-block" }, + { "path": "merkle-tree" }, + { "path": "p2p" }, + { "path": "tx" }, + { "path": "world-state" } + ], + "files": [] } diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 9a0f23cb16e..13ab62ee104 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -5,14 +5,13 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "TXs", - "tsconfig": "./tsconfig.dest.json" + "displayName": "TXs" }, "scripts": { - "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "yarn clean && tsc -b", + "build:dev": "tsc -b --watch", "start": "node ./dest", - "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", + "start:dev": "tsc-watch --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/tx/tsconfig.dest.json b/yarn-project/tx/tsconfig.dest.json deleted file mode 100644 index 4699b81cbb0..00000000000 --- a/yarn-project/tx/tsconfig.dest.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ".", - "references": [ - { "path": "../l2-block/tsconfig.dest.json" } - ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/tx/tsconfig.json b/yarn-project/tx/tsconfig.json index 53e00432d3b..dc75d240003 100644 --- a/yarn-project/tx/tsconfig.json +++ b/yarn-project/tx/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -8,7 +8,12 @@ "types": ["node", "jest"] }, "references": [ - { "path": "../l2-block/tsconfig.dest.json" } + { + "path": "../circuits.js" + }, + { + "path": "../l2-block" + } ], "include": ["src"] } diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index b7e7550a759..54b5720cc91 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -4,8 +4,8 @@ "type": "module", "exports": "./dest/index.js", "scripts": { - "build": "tsc -b tsconfig.dest.json", - "build:dev": "tsc -b tsconfig.dest.json --watch", + "build": "tsc -b", + "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/world-state/tsconfig.dest.json b/yarn-project/world-state/tsconfig.dest.json deleted file mode 100644 index fc521a84c2e..00000000000 --- a/yarn-project/world-state/tsconfig.dest.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "extends": ".", - "references": [ - { - "path": "../barretenberg.js/tsconfig.dest.json" - }, - { - "path": "../l1-contracts/tsconfig.dest.json" - }, - { - "path": "../l2-block/tsconfig.dest.json" - }, - { - "path": "../merkle-tree/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../circuits.js/tsconfig.dest.json" - } - ], - "exclude": ["**/*.test.*", "**/fixtures/*"] -} diff --git a/yarn-project/world-state/tsconfig.json b/yarn-project/world-state/tsconfig.json index 85ba5f79008..dfa626cd32e 100644 --- a/yarn-project/world-state/tsconfig.json +++ b/yarn-project/world-state/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "..", + "extends": "../tsconfig.base.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -7,22 +7,19 @@ }, "references": [ { - "path": "../barretenberg.js/tsconfig.dest.json" + "path": "../barretenberg.js" }, { - "path": "../l1-contracts/tsconfig.dest.json" + "path": "../circuits.js" }, { - "path": "../l2-block/tsconfig.dest.json" + "path": "../foundation" }, { - "path": "../merkle-tree/tsconfig.dest.json" + "path": "../l2-block" }, { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../circuits.js/tsconfig.dest.json" + "path": "../merkle-tree" } ], "include": ["src"] diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 31125c162a2..60a54d1062f 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -157,6 +157,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/aztec3-packages@workspace:." dependencies: + "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 eslint: ^8.21.0 prettier: ^2.7.1 typedoc: ^0.23.26 @@ -1776,6 +1777,33 @@ __metadata: languageName: node linkType: hard +"@monorepo-utils/package-utils@npm:^2.9.0": + version: 2.9.0 + resolution: "@monorepo-utils/package-utils@npm:2.9.0" + dependencies: + globby: ^11.0.1 + load-json-file: ^6.2.0 + upath: ^2.0.1 + yaml: ^2.1.3 + checksum: 6d167ad9f402bab8c4bfa11b1a6bdd741e1d9d4745ced6b58eae34a6d4f74fd033578f42657ff72aedac442499ac5890e15c0cb94820d3b9873361778925728e + languageName: node + linkType: hard + +"@monorepo-utils/workspaces-to-typescript-project-references@npm:^2.9.0": + version: 2.9.0 + resolution: "@monorepo-utils/workspaces-to-typescript-project-references@npm:2.9.0" + dependencies: + "@monorepo-utils/package-utils": ^2.9.0 + comment-json: ^3.0.3 + meow: ^7.1.1 + semver-match: 0.1.1 + upath: ^2.0.1 + bin: + workspaces-to-typescript-project-references: bin/cmd.js + checksum: 0cd4ceaaddaa5fe0398578c164cf718056a8158f5576538f8b57606cb6919cdf50f165ba7091c88ce4dc21336572dba8cfddba3b9392183d2e7d3dda6c19230b + languageName: node + linkType: hard + "@noble/hashes@npm:^1.1.2, @noble/hashes@npm:^1.2.0": version: 1.3.0 resolution: "@noble/hashes@npm:1.3.0" @@ -2325,6 +2353,13 @@ __metadata: languageName: node linkType: hard +"@types/minimist@npm:^1.2.0": + version: 1.2.2 + resolution: "@types/minimist@npm:1.2.2" + checksum: b8da83c66eb4aac0440e64674b19564d9d86c80ae273144db9681e5eeff66f238ade9515f5006ffbfa955ceff8b89ad2bd8ec577d7caee74ba101431fb07045d + languageName: node + linkType: hard + "@types/ms@npm:*": version: 0.7.31 resolution: "@types/ms@npm:0.7.31" @@ -2339,6 +2374,13 @@ __metadata: languageName: node linkType: hard +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.1 + resolution: "@types/normalize-package-data@npm:2.4.1" + checksum: e87bccbf11f95035c89a132b52b79ce69a1e3652fe55962363063c9c0dae0fe2477ebc585e03a9652adc6f381d24ba5589cc5e51849df4ced3d3e004a7d40ed5 + languageName: node + linkType: hard + "@types/prettier@npm:^2.1.5": version: 2.7.2 resolution: "@types/prettier@npm:2.7.2" @@ -2793,6 +2835,13 @@ __metadata: languageName: node linkType: hard +"arrify@npm:^1.0.1": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 + languageName: node + linkType: hard + "asap@npm:^2.0.0": version: 2.0.6 resolution: "asap@npm:2.0.6" @@ -3171,7 +3220,18 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^5.3.1": +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: ^5.3.1 + map-obj: ^4.0.0 + quick-lru: ^4.0.1 + checksum: 43c9af1adf840471e54c68ab3e5fe8a62719a6b7dbf4e2e86886b7b0ff96112c945736342b837bd2529ec9d1c7d1934e5653318478d98e0cf22c475c04658e2a + languageName: node + linkType: hard + +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b @@ -3366,6 +3426,18 @@ __metadata: languageName: node linkType: hard +"comment-json@npm:^3.0.3": + version: 3.0.3 + resolution: "comment-json@npm:3.0.3" + dependencies: + core-util-is: ^1.0.2 + esprima: ^4.0.1 + has-own-prop: ^2.0.0 + repeat-string: ^1.6.1 + checksum: c8e92e820b73e7bd83890e38680617b21028eca9a7e83a2af72750eae8c7e2570dd40e5848148b1e1d34d58ce62a0cb4e2b5836df0f8daa1d6bceca8666936cd + languageName: node + linkType: hard + "comment-parser@npm:1.3.1": version: 1.3.1 resolution: "comment-parser@npm:1.3.1" @@ -3491,6 +3563,13 @@ __metadata: languageName: node linkType: hard +"core-util-is@npm:^1.0.2": + version: 1.0.3 + resolution: "core-util-is@npm:1.0.3" + checksum: 9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 + languageName: node + linkType: hard + "create-hash@npm:^1.1.0, create-hash@npm:^1.1.2": version: 1.2.0 resolution: "create-hash@npm:1.2.0" @@ -3564,6 +3643,23 @@ __metadata: languageName: node linkType: hard +"decamelize-keys@npm:^1.1.0": + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" + dependencies: + decamelize: ^1.1.0 + map-obj: ^1.0.0 + checksum: fc645fe20b7bda2680bbf9481a3477257a7f9304b1691036092b97ab04c0ab53e3bf9fcc2d2ae382536568e402ec41fb11e1d4c3836a9abe2d813dd9ef4311e0 + languageName: node + linkType: hard + +"decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "decamelize@npm:1.2.0" + checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa + languageName: node + linkType: hard + "dedent@npm:^0.7.0": version: 0.7.0 resolution: "dedent@npm:0.7.0" @@ -4044,7 +4140,7 @@ __metadata: languageName: node linkType: hard -"esprima@npm:^4.0.0": +"esprima@npm:^4.0.0, esprima@npm:^4.0.1": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -4485,7 +4581,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.1.0": +"globby@npm:^11.0.1, globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -4499,7 +4595,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.15, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -4513,6 +4609,13 @@ __metadata: languageName: node linkType: hard +"hard-rejection@npm:^2.1.0": + version: 2.1.0 + resolution: "hard-rejection@npm:2.1.0" + checksum: 7baaf80a0c7fff4ca79687b4060113f1529589852152fa935e6787a2bc96211e784ad4588fb3048136ff8ffc9dfcf3ae385314a5b24db32de20bea0d1597f9dc + languageName: node + linkType: hard + "has-flag@npm:^3.0.0": version: 3.0.0 resolution: "has-flag@npm:3.0.0" @@ -4527,6 +4630,13 @@ __metadata: languageName: node linkType: hard +"has-own-prop@npm:^2.0.0": + version: 2.0.0 + resolution: "has-own-prop@npm:2.0.0" + checksum: ca6336e85ead2295c9603880cbc199e2d3ff7eaea0e9035d68fbc79892e9cf681abc62c0909520f112c671dad9961be2173b21dff951358cc98425c560e789e0 + languageName: node + linkType: hard + "has-symbols@npm:^1.0.2, has-symbols@npm:^1.0.3": version: 1.0.3 resolution: "has-symbols@npm:1.0.3" @@ -4610,6 +4720,13 @@ __metadata: languageName: node linkType: hard +"hosted-git-info@npm:^2.1.4": + version: 2.8.9 + resolution: "hosted-git-info@npm:2.8.9" + checksum: c955394bdab888a1e9bb10eb33029e0f7ce5a2ac7b3f158099dc8c486c99e73809dca609f5694b223920ca2174db33d32b12f9a2a47141dc59607c29da5a62dd + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -4895,6 +5012,13 @@ __metadata: languageName: node linkType: hard +"is-plain-obj@npm:^1.1.0": + version: 1.1.0 + resolution: "is-plain-obj@npm:1.1.0" + checksum: 0ee04807797aad50859652a7467481816cbb57e5cc97d813a7dcd8915da8195dc68c436010bf39d195226cde6a2d352f4b815f16f26b7bf486a5754290629931 + languageName: node + linkType: hard + "is-stream@npm:^2.0.0": version: 2.0.1 resolution: "is-stream@npm:2.0.1" @@ -5957,6 +6081,13 @@ __metadata: languageName: node linkType: hard +"kind-of@npm:^6.0.3": + version: 6.0.3 + resolution: "kind-of@npm:6.0.3" + checksum: 3ab01e7b1d440b22fe4c31f23d8d38b4d9b91d9f291df683476576493d5dfd2e03848a8b05813dd0c3f0e835bc63f433007ddeceb71f05cb25c45ae1b19c6d3b + languageName: node + linkType: hard + "kleur@npm:^3.0.3": version: 3.0.3 resolution: "kleur@npm:3.0.3" @@ -6137,6 +6268,18 @@ __metadata: languageName: node linkType: hard +"load-json-file@npm:^6.2.0": + version: 6.2.0 + resolution: "load-json-file@npm:6.2.0" + dependencies: + graceful-fs: ^4.1.15 + parse-json: ^5.0.0 + strip-bom: ^4.0.0 + type-fest: ^0.6.0 + checksum: 4429e430ebb99375fc7cd936348e4f7ba729486080ced4272091c1e386a7f5f738ea3337d8ffd4b01c2f5bc3ddde92f2c780045b66838fe98bdb79f901884643 + languageName: node + linkType: hard + "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -6278,6 +6421,20 @@ __metadata: languageName: node linkType: hard +"map-obj@npm:^1.0.0": + version: 1.0.1 + resolution: "map-obj@npm:1.0.1" + checksum: 9949e7baec2a336e63b8d4dc71018c117c3ce6e39d2451ccbfd3b8350c547c4f6af331a4cbe1c83193d7c6b786082b6256bde843db90cb7da2a21e8fcc28afed + languageName: node + linkType: hard + +"map-obj@npm:^4.0.0": + version: 4.3.0 + resolution: "map-obj@npm:4.3.0" + checksum: fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e + languageName: node + linkType: hard + "map-stream@npm:~0.1.0": version: 0.1.0 resolution: "map-stream@npm:0.1.0" @@ -6325,6 +6482,25 @@ __metadata: languageName: node linkType: hard +"meow@npm:^7.1.1": + version: 7.1.1 + resolution: "meow@npm:7.1.1" + dependencies: + "@types/minimist": ^1.2.0 + camelcase-keys: ^6.2.2 + decamelize-keys: ^1.1.0 + hard-rejection: ^2.1.0 + minimist-options: 4.1.0 + normalize-package-data: ^2.5.0 + read-pkg-up: ^7.0.1 + redent: ^3.0.0 + trim-newlines: ^3.0.0 + type-fest: ^0.13.1 + yargs-parser: ^18.1.3 + checksum: 87bba177ab858a9b606ee52220e6bf395277beebafefe8ab5dbdf178f5825274a24ca16dca7e0ddd41e5ac3533164ee52e3d0eec87b66d78aae796d24a817842 + languageName: node + linkType: hard + "merge-stream@npm:^2.0.0": version: 2.0.0 resolution: "merge-stream@npm:2.0.0" @@ -6388,6 +6564,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + "minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": version: 1.0.1 resolution: "minimalistic-assert@npm:1.0.1" @@ -6429,6 +6612,17 @@ __metadata: languageName: node linkType: hard +"minimist-options@npm:4.1.0": + version: 4.1.0 + resolution: "minimist-options@npm:4.1.0" + dependencies: + arrify: ^1.0.1 + is-plain-obj: ^1.1.0 + kind-of: ^6.0.3 + checksum: 8c040b3068811e79de1140ca2b708d3e203c8003eb9a414c1ab3cd467fc5f17c9ca02a5aef23bedc51a7f8bfbe77f87e9a7e31ec81fba304cda675b019496f4e + languageName: node + linkType: hard + "minipass-collect@npm:^1.0.2": version: 1.0.2 resolution: "minipass-collect@npm:1.0.2" @@ -6652,6 +6846,18 @@ __metadata: languageName: node linkType: hard +"normalize-package-data@npm:^2.5.0": + version: 2.5.0 + resolution: "normalize-package-data@npm:2.5.0" + dependencies: + hosted-git-info: ^2.1.4 + resolve: ^1.10.0 + semver: 2 || 3 || 4 || 5 + validate-npm-package-license: ^3.0.1 + checksum: 7999112efc35a6259bc22db460540cae06564aa65d0271e3bdfa86876d08b0e578b7b5b0028ee61b23f1cae9fc0e7847e4edc0948d3068a39a2a82853efc8499 + languageName: node + linkType: hard + "normalize-path@npm:^3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -6796,7 +7002,7 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^5.2.0": +"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" dependencies: @@ -7027,6 +7233,13 @@ __metadata: languageName: node linkType: hard +"quick-lru@npm:^4.0.1": + version: 4.0.1 + resolution: "quick-lru@npm:4.0.1" + checksum: bea46e1abfaa07023e047d3cf1716a06172c4947886c053ede5c50321893711577cb6119360f810cc3ffcd70c4d7db4069c3cee876b358ceff8596e062bd1154 + languageName: node + linkType: hard + "raw-body@npm:^2.3.3": version: 2.5.2 resolution: "raw-body@npm:2.5.2" @@ -7046,6 +7259,29 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: ^4.1.0 + read-pkg: ^5.2.0 + type-fest: ^0.8.1 + checksum: e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 + languageName: node + linkType: hard + +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" + dependencies: + "@types/normalize-package-data": ^2.4.0 + normalize-package-data: ^2.5.0 + parse-json: ^5.0.0 + type-fest: ^0.6.0 + checksum: eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 + languageName: node + linkType: hard + "readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" @@ -7057,6 +7293,23 @@ __metadata: languageName: node linkType: hard +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: ^4.0.0 + strip-indent: ^3.0.0 + checksum: fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + +"repeat-string@npm:^1.6.1": + version: 1.6.1 + resolution: "repeat-string@npm:1.6.1" + checksum: 1b809fc6db97decdc68f5b12c4d1a671c8e3f65ec4a40c238bc5200e44e85bcc52a54f78268ab9c29fcf5fe4f1343e805420056d1f30fa9a9ee4c2d93e3cc6c0 + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -7101,7 +7354,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.20.0, resolve@npm:^1.22.1": +"resolve@npm:^1.10.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1": version: 1.22.1 resolution: "resolve@npm:1.22.1" dependencies: @@ -7124,7 +7377,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": +"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin": version: 1.22.1 resolution: "resolve@patch:resolve@npm%3A1.22.1#~builtin::version=1.22.1&hash=c3c19d" dependencies: @@ -7249,6 +7502,24 @@ __metadata: languageName: node linkType: hard +"semver-match@npm:0.1.1": + version: 0.1.1 + resolution: "semver-match@npm:0.1.1" + dependencies: + semver: ^5.1.0 + checksum: 624968a1d0b665fb08d3e7a4d28b62332ae1695c19f4b7f7cddb34c07bf8e5b6f19d393249bb1b96b09746651bd20d754fc2d64318fd7f959f6bec6abfa883dd + languageName: node + linkType: hard + +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.1.0": + version: 5.7.1 + resolution: "semver@npm:5.7.1" + bin: + semver: ./bin/semver + checksum: 57fd0acfd0bac382ee87cd52cd0aaa5af086a7dc8d60379dfe65fea491fb2489b6016400813930ecd61fd0952dae75c115287a1b16c234b1550887117744dfaf + languageName: node + linkType: hard + "semver@npm:7.x, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8": version: 7.3.8 resolution: "semver@npm:7.3.8" @@ -7450,6 +7721,16 @@ __metadata: languageName: node linkType: hard +"spdx-correct@npm:^3.0.0": + version: 3.2.0 + resolution: "spdx-correct@npm:3.2.0" + dependencies: + spdx-expression-parse: ^3.0.0 + spdx-license-ids: ^3.0.0 + checksum: e9ae98d22f69c88e7aff5b8778dc01c361ef635580e82d29e5c60a6533cc8f4d820803e67d7432581af0cc4fb49973125076ee3b90df191d153e223c004193b2 + languageName: node + linkType: hard + "spdx-exceptions@npm:^2.1.0": version: 2.3.0 resolution: "spdx-exceptions@npm:2.3.0" @@ -7457,7 +7738,7 @@ __metadata: languageName: node linkType: hard -"spdx-expression-parse@npm:^3.0.1": +"spdx-expression-parse@npm:^3.0.0, spdx-expression-parse@npm:^3.0.1": version: 3.0.1 resolution: "spdx-expression-parse@npm:3.0.1" dependencies: @@ -7591,6 +7872,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: ^1.0.0 + checksum: 18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -7772,6 +8062,13 @@ __metadata: languageName: node linkType: hard +"trim-newlines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-newlines@npm:3.0.1" + checksum: b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 + languageName: node + linkType: hard + "ts-dedent@npm:^2.2.0": version: 2.2.0 resolution: "ts-dedent@npm:2.2.0" @@ -7989,6 +8286,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: e6bf2e3c449f27d4ef5d56faf8b86feafbc3aec3025fc9a5fbe2db0a2587c44714521f9c30d8516a833c8c506d6263f5cc11267522b10c6ccdb6cc55b0a9d1c4 + languageName: node + linkType: hard + "type-fest@npm:^0.20.2": version: 0.20.2 resolution: "type-fest@npm:0.20.2" @@ -8003,6 +8307,20 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: b2188e6e4b21557f6e92960ec496d28a51d68658018cba8b597bd3ef757721d1db309f120ae987abeeda874511d14b776157ff809f23c6d1ce8f83b9b2b7d60f + languageName: node + linkType: hard + +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 + languageName: node + linkType: hard + "type-is@npm:^1.6.16": version: 1.6.18 resolution: "type-is@npm:1.6.18" @@ -8074,6 +8392,13 @@ __metadata: languageName: node linkType: hard +"upath@npm:^2.0.1": + version: 2.0.1 + resolution: "upath@npm:2.0.1" + checksum: 2db04f24a03ef72204c7b969d6991abec9e2cb06fb4c13a1fd1c59bc33b46526b16c3325e55930a11ff86a77a8cbbcda8f6399bf914087028c5beae21ecdb33c + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.0.10": version: 1.0.10 resolution: "update-browserslist-db@npm:1.0.10" @@ -8131,6 +8456,16 @@ __metadata: languageName: node linkType: hard +"validate-npm-package-license@npm:^3.0.1": + version: 3.0.4 + resolution: "validate-npm-package-license@npm:3.0.4" + dependencies: + spdx-correct: ^3.0.0 + spdx-expression-parse: ^3.0.0 + checksum: 35703ac889d419cf2aceef63daeadbe4e77227c39ab6287eeb6c1b36a746b364f50ba22e88591f5d017bc54685d8137bc2d328d0a896e4d3fd22093c0f32a9ad + languageName: node + linkType: hard + "vary@npm:^1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" @@ -8322,6 +8657,23 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.1.3": + version: 2.2.1 + resolution: "yaml@npm:2.2.1" + checksum: 84f68cbe462d5da4e7ded4a8bded949ffa912bc264472e5a684c3d45b22d8f73a3019963a32164023bdf3d83cfb6f5b58ff7b2b10ef5b717c630f40bd6369a23 + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.3": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + "yargs-parser@npm:^21.0.1, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" From 53f73c0cab9253a8ace13d3a752c388992de83bf Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 30 Mar 2023 14:42:23 +0100 Subject: [PATCH 02/33] chore: refactor tsconfig layout --- .gitignore | 3 ++- circuits | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index e425a787357..e92624db15f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ dest node_modules .cache .pnp.cjs -.pnp.loader.mjs \ No newline at end of file +.pnp.loader.mjs +build/ \ No newline at end of file diff --git a/circuits b/circuits index aaaa41e001f..5b336c54fcf 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 +Subproject commit 5b336c54fcf5cde039339f1682ece2988cfdaa74 From 62b7f09ac97e0e568c756ccee4e8eb0a229be459 Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 30 Mar 2023 15:21:49 +0100 Subject: [PATCH 03/33] chore: package.json deriver --- scripts/derive-package-deps.py | 51 +++++++++++++++++++ scripts/update-tsconfig-references | 36 +++++++++++++ .../jest.integration.config.json | 13 +++++ 3 files changed, 100 insertions(+) create mode 100755 scripts/derive-package-deps.py create mode 100755 scripts/update-tsconfig-references create mode 100644 yarn-project/sequencer-client/jest.integration.config.json diff --git a/scripts/derive-package-deps.py b/scripts/derive-package-deps.py new file mode 100755 index 00000000000..16b06fef394 --- /dev/null +++ b/scripts/derive-package-deps.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python3 + +import sys +import os +import json +import re +from pathlib import Path + +def update_dependencies(package_json_file: str): + if not os.path.isfile(package_json_file): + print(f"Error: {package_json_file} not found.") + sys.exit(2) + + tsconfig_dir = os.path.dirname(package_json_file) + ts_files = list(Path(tsconfig_dir).rglob("*.ts*")) + + import_regex = r'^import.*from.*@aztec/([a-zA-Z0-9\-\._]+)' + + dependencies = {} + for file in ts_files: + with open(file, "r") as f: + for line in f: + match = re.match(import_regex, line) + if match: + package_name = match.group(1) + if package_name not in dependencies: + dependencies[package_name] = "workspace:^" + + with open(package_json_file) as f: + package_data = json.load(f) + + # Filter out existing Aztec dependencies + existing_dependencies = { + key: value for key, value in package_data["dependencies"].items() + if not key.startswith("@aztec/") + } + + # Add new Aztec dependencies to the beginning of the list + new_aztec_dependencies = {f"@aztec/{package}": version for package, version in dependencies.items()} + package_data["dependencies"] = {**new_aztec_dependencies, **existing_dependencies} + + with open(package_json_file, "w") as f: + json.dump(package_data, f, indent=2) + +if __name__ == "__main__": + if len(sys.argv) == 1: + print(f"Usage: {sys.argv[0]} path/to/package.json") + sys.exit(1) + + package_json_file = sys.argv[1] + update_dependencies(package_json_file) diff --git a/scripts/update-tsconfig-references b/scripts/update-tsconfig-references new file mode 100755 index 00000000000..0feb336fe29 --- /dev/null +++ b/scripts/update-tsconfig-references @@ -0,0 +1,36 @@ +#!/bin/bash +# Script for updating tsconfig project references. + +if [ $# -eq 0 ]; then + echo "Usage: $0 path/to/tsconfig.json" + exit 1 +fi + +TSCONFIG_FILE="$1" + +if [ ! -f "$TSCONFIG_FILE" ]; then + echo "Error: $TSCONFIG_FILE not found." + exit 2 +fi + +TSCONFIG_DIR=$(dirname "$TSCONFIG_FILE") +TS_FILES=$(find "$TSCONFIG_DIR" -type f -name "*.ts" -o -name "*.tsx") +IMPORT_REGEX='^import.*@aztec.([a-zA-Z0-9_\-\.]+)' + +REFERENCES="[" +for FILE in $TS_FILES; do + while read -r LINE; do + if [[ $LINE =~ $IMPORT_REGEX ]]; then + PACKAGE_NAME="${BASH_REMATCH[1]}" + REFERENCE="{ \"path\": \"../${PACKAGE_NAME}/tsconfig.dest.json\" }," + if [[ $REFERENCES != *"${REFERENCE}"* ]]; then + REFERENCES+=$REFERENCE + fi + fi + done < "$FILE" +done + +REFERENCES=${REFERENCES%,} +REFERENCES+="]" + +jq --argjson references "$REFERENCES" '.references = $references' "$TSCONFIG_FILE" > "${TSCONFIG_FILE}.tmp" && mv "${TSCONFIG_FILE}.tmp" "$TSCONFIG_FILE" \ No newline at end of file diff --git a/yarn-project/sequencer-client/jest.integration.config.json b/yarn-project/sequencer-client/jest.integration.config.json new file mode 100644 index 00000000000..f89093c1acf --- /dev/null +++ b/yarn-project/sequencer-client/jest.integration.config.json @@ -0,0 +1,13 @@ +{ + "preset": "ts-jest/presets/default-esm", + "globals": { + "ts-jest": { + "useESM": true + } + }, + "moduleNameMapper": { + "^(\\.{1,2}/.*)\\.js$": "$1" + }, + "testRegex": "./test/.*\\.test\\.ts$", + "rootDir": "./test" +} \ No newline at end of file From be02af89215630399a13e3e50a6375238734c342 Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 30 Mar 2023 15:25:42 +0100 Subject: [PATCH 04/33] Fix jest --- yarn-project/acir-simulator/package.json | 3 ++- yarn-project/aztec-cli/package.json | 3 ++- yarn-project/aztec-node/package.json | 3 ++- yarn-project/aztec.js/package.json | 3 ++- yarn-project/barretenberg.js/package.json | 3 ++- yarn-project/circuits.js/package.json | 3 ++- yarn-project/end-to-end/package.json | 3 ++- yarn-project/ethereum.js/package.json | 3 ++- yarn-project/foundation/package.json | 3 ++- yarn-project/kernel-prover/package.json | 3 ++- yarn-project/key-store/package.json | 3 ++- yarn-project/l1-contracts/package.json | 3 ++- yarn-project/l2-block/package.json | 3 ++- yarn-project/merkle-tree/package.json | 3 ++- yarn-project/noir-contracts/package.json | 3 ++- yarn-project/p2p/package.json | 3 ++- yarn-project/prover-client/package.json | 3 ++- yarn-project/sequencer-client/package.json | 16 +++++++++------- yarn-project/tx/package.json | 3 ++- yarn-project/world-state/package.json | 3 ++- 20 files changed, 47 insertions(+), 26 deletions(-) diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 152d6a731a2..59af47d8b69 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -18,7 +18,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 26c0171b7f8..fd621a2120e 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -21,7 +21,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 341bc4916e7..045aec34e9e 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -22,7 +22,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 9b94bc96b4d..a3f36e08fd3 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -18,7 +18,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 93a578f8e48..ab8351b726c 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -24,7 +24,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index a44954a7ffb..0613465480b 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -24,7 +24,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 3d03c15d625..d99f39dc348 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -15,7 +15,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index c951f5a542e..f6da9e3572b 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -37,7 +37,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 23d274daa7b..9b6c33531bf 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -38,7 +38,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 5e09541f1d8..67e822ba92a 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -18,7 +18,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index a0246551b04..4ac42a1bd8f 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -18,7 +18,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 8a56f2e8b60..4290c0862fe 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -23,7 +23,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index 7443cf313ab..0d5a8206312 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -17,7 +17,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index f1656d4dbef..7c81f783256 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -15,7 +15,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index c8d4542ce90..8d0a94727c7 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -21,7 +21,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 4f5826d80b8..508537c4018 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -21,7 +21,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 9938265a69e..5c05441a176 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -18,7 +18,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 06ef0c4296c..2df6f8ffe3f 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -8,12 +8,13 @@ "displayName": "Sequencer Client" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json && cd .. && yarn prepare", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint ./src", "formatting:fix": "prettier -w ./src", - "test": "jest --passWithNoTests", + "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests", "test:integration": "concurrently -k -s first -c reset,dim -n test,anvil \"yarn test:integration:run\" \"anvil\"", "test:integration:run": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --config jest.integration.config.json" }, @@ -32,15 +33,16 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/circuits.js": "workspace:^", + "@aztec/archiver": "workspace:^", "@aztec/ethereum.js": "workspace:^", - "@aztec/foundation": "workspace:^", "@aztec/l1-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", - "@aztec/merkle-tree": "workspace:^", - "@aztec/p2p": "workspace:^", - "@aztec/tx": "workspace:^", + "@aztec/circuits.js": "workspace:^", "@aztec/world-state": "workspace:^", + "@aztec/tx": "workspace:^", + "@aztec/barretenberg.js": "workspace:^", + "@aztec/p2p": "workspace:^", + "@aztec/foundation": "workspace:^", "lodash.flatmap": "^4.5.0", "lodash.times": "^4.3.2", "tslib": "^2.4.0" @@ -61,4 +63,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 13ab62ee104..57e98afd2d0 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -21,7 +21,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 54b5720cc91..d451e39f8f7 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -15,7 +15,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.test.json" } }, "moduleNameMapper": { From 47fd8e22553f5beae1dbea547ac52c56a312f2e5 Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 30 Mar 2023 15:26:35 +0100 Subject: [PATCH 05/33] Post refactor fixes --- circuits | 2 +- scripts/update-tsconfig-references | 36 ------------------- .../src/wasm/barretenberg_wasm.ts | 7 +++- .../ethereum.js/example/tsconfig.json | 2 +- yarn-project/sequencer-client/tsconfig.json | 24 ++++++++----- yarn-project/tsconfig.test.json | 3 -- yarn-project/yarn.lock | 4 ++- 7 files changed, 26 insertions(+), 52 deletions(-) delete mode 100755 scripts/update-tsconfig-references diff --git a/circuits b/circuits index 5b336c54fcf..aaaa41e001f 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit 5b336c54fcf5cde039339f1682ece2988cfdaa74 +Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 diff --git a/scripts/update-tsconfig-references b/scripts/update-tsconfig-references deleted file mode 100755 index 0feb336fe29..00000000000 --- a/scripts/update-tsconfig-references +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# Script for updating tsconfig project references. - -if [ $# -eq 0 ]; then - echo "Usage: $0 path/to/tsconfig.json" - exit 1 -fi - -TSCONFIG_FILE="$1" - -if [ ! -f "$TSCONFIG_FILE" ]; then - echo "Error: $TSCONFIG_FILE not found." - exit 2 -fi - -TSCONFIG_DIR=$(dirname "$TSCONFIG_FILE") -TS_FILES=$(find "$TSCONFIG_DIR" -type f -name "*.ts" -o -name "*.tsx") -IMPORT_REGEX='^import.*@aztec.([a-zA-Z0-9_\-\.]+)' - -REFERENCES="[" -for FILE in $TS_FILES; do - while read -r LINE; do - if [[ $LINE =~ $IMPORT_REGEX ]]; then - PACKAGE_NAME="${BASH_REMATCH[1]}" - REFERENCE="{ \"path\": \"../${PACKAGE_NAME}/tsconfig.dest.json\" }," - if [[ $REFERENCES != *"${REFERENCE}"* ]]; then - REFERENCES+=$REFERENCE - fi - fi - done < "$FILE" -done - -REFERENCES=${REFERENCES%,} -REFERENCES+="]" - -jq --argjson references "$REFERENCES" '.references = $references' "$TSCONFIG_FILE" > "${TSCONFIG_FILE}.tmp" && mv "${TSCONFIG_FILE}.tmp" "$TSCONFIG_FILE" \ No newline at end of file diff --git a/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts b/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts index b6879d7507c..1f194dcf8f5 100644 --- a/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts +++ b/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts @@ -7,6 +7,7 @@ import { fileURLToPath } from 'url'; import { numToUInt32LE } from './serialize.js'; import { Crs } from '../crs/index.js'; +import { existsSync } from 'fs'; /** * Get the WASM binary for barretenberg. @@ -15,7 +16,11 @@ import { Crs } from '../crs/index.js'; export async function fetchCode() { if (isNode) { const __dirname = dirname(fileURLToPath(import.meta.url)); - return await readFile(__dirname + '/barretenberg.wasm'); + let path = __dirname + '/barretenberg.wasm'; + if (!existsSync(path)) { + path = __dirname + '/../src/wasm/barretenberg.wasm'; + } + return await readFile(path); } else { const res = await fetch('/barretenberg.wasm'); return Buffer.from(await res.arrayBuffer()); diff --git a/yarn-project/ethereum.js/example/tsconfig.json b/yarn-project/ethereum.js/example/tsconfig.json index cd588abd4a6..c3a019f2f23 100644 --- a/yarn-project/ethereum.js/example/tsconfig.json +++ b/yarn-project/ethereum.js/example/tsconfig.json @@ -8,7 +8,7 @@ "include": ["src"], "references": [ { - "path": "../tsconfig.base.json" + "path": ".." }, { "path": "../../foundation" diff --git a/yarn-project/sequencer-client/tsconfig.json b/yarn-project/sequencer-client/tsconfig.json index 5b9835534e3..b2eb8576c5a 100644 --- a/yarn-project/sequencer-client/tsconfig.json +++ b/yarn-project/sequencer-client/tsconfig.json @@ -5,17 +5,17 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src", "test"], + "include": [ + "src", + "test" + ], "references": [ { - "path": "../circuits.js" + "path": "../archiver" }, { "path": "../ethereum.js" }, - { - "path": "../foundation" - }, { "path": "../l1-contracts" }, @@ -23,16 +23,22 @@ "path": "../l2-block" }, { - "path": "../merkle-tree" + "path": "../circuits.js" }, { - "path": "../p2p" + "path": "../world-state" }, { "path": "../tx" }, { - "path": "../world-state" + "path": "../barretenberg.js" + }, + { + "path": "../p2p" + }, + { + "path": "../foundation" } ] -} +} \ No newline at end of file diff --git a/yarn-project/tsconfig.test.json b/yarn-project/tsconfig.test.json index de0fa054bdd..61051fb7301 100644 --- a/yarn-project/tsconfig.test.json +++ b/yarn-project/tsconfig.test.json @@ -1,8 +1,5 @@ { "extends": "./tsconfig.base.json", - "compilerOptions": { - "rootDir": "." - }, "include": ["**/*.ts", "**/*.tsx"], "exclude": [], "references": [ diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 60a54d1062f..21e7c7e7a22 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -490,16 +490,18 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/sequencer-client@workspace:sequencer-client" dependencies: + "@aztec/archiver": "workspace:^" + "@aztec/barretenberg.js": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/l1-contracts": "workspace:^" "@aztec/l2-block": "workspace:^" - "@aztec/merkle-tree": "workspace:^" "@aztec/p2p": "workspace:^" "@aztec/tx": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.4.3 + "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 "@types/lodash.flatmap": ^4.5.7 From 6ef74f5c16a883fd3181e5c1da61394a38e9dc41 Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 30 Mar 2023 15:28:40 +0100 Subject: [PATCH 06/33] Revert circuits --- circuits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits b/circuits index aaaa41e001f..5b336c54fcf 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 +Subproject commit 5b336c54fcf5cde039339f1682ece2988cfdaa74 From dfd43dea37ff72bcee9187cc54fef3c2d50c8c6b Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 11:38:25 +0100 Subject: [PATCH 07/33] chore: refactor after tsconfig changes --- yarn-project/acir-simulator/package.json | 2 +- yarn-project/aztec-cli/package.json | 2 +- yarn-project/aztec-node/package.json | 2 +- yarn-project/aztec-rpc/package.json | 2 +- yarn-project/aztec.js/package.json | 2 +- yarn-project/barretenberg.js/package.json | 2 +- .../src/wasm/barretenberg_wasm.ts | 1 + yarn-project/circuits.js/package.json | 2 +- .../circuits.js/src/wasm/circuits_wasm.ts | 3 +- yarn-project/end-to-end/package.json | 2 +- yarn-project/ethereum.js/package.json | 2 +- yarn-project/foundation/.eslintrc.cjs | 2 +- yarn-project/foundation/package.json | 2 +- yarn-project/kernel-prover/package.json | 2 +- yarn-project/key-store/package.json | 2 +- yarn-project/l1-contracts/package.json | 2 +- yarn-project/l2-block/package.json | 2 +- yarn-project/merkle-tree/package.json | 2 +- yarn-project/noir-contracts/package.json | 2 +- yarn-project/p2p/package.json | 2 +- yarn-project/package.json | 2 +- yarn-project/prover-client/package.json | 2 +- yarn-project/sequencer-client/package.json | 5 ++- .../sequencer-client/tsconfig.dest.json | 13 ++++++ yarn-project/sequencer-client/tsconfig.json | 44 ------------------- .../{tsconfig.test.json => tsconfig.json} | 0 yarn-project/tx/package.json | 2 +- yarn-project/world-state/package.json | 2 +- 28 files changed, 41 insertions(+), 69 deletions(-) create mode 100644 yarn-project/sequencer-client/tsconfig.dest.json delete mode 100644 yarn-project/sequencer-client/tsconfig.json rename yarn-project/{tsconfig.test.json => tsconfig.json} (100%) diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 59af47d8b69..a96acc1b563 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -19,7 +19,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index fd621a2120e..08626fa0a34 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -22,7 +22,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 045aec34e9e..f229910d48d 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -23,7 +23,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index eed5d7352f4..2e41c946562 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -19,7 +19,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index a3f36e08fd3..fba67d65258 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -19,7 +19,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index ab8351b726c..163eb78a9b1 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -25,7 +25,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts b/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts index 1f194dcf8f5..4a2f7cf72bc 100644 --- a/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts +++ b/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts @@ -15,6 +15,7 @@ import { existsSync } from 'fs'; */ export async function fetchCode() { if (isNode) { + throw new Error(); const __dirname = dirname(fileURLToPath(import.meta.url)); let path = __dirname + '/barretenberg.wasm'; if (!existsSync(path)) { diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 0613465480b..fb8143c3435 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -25,7 +25,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/circuits.js/src/wasm/circuits_wasm.ts b/yarn-project/circuits.js/src/wasm/circuits_wasm.ts index a180918e563..85d2d5a7e43 100644 --- a/yarn-project/circuits.js/src/wasm/circuits_wasm.ts +++ b/yarn-project/circuits.js/src/wasm/circuits_wasm.ts @@ -15,7 +15,8 @@ import { Crs } from '../crs/index.js'; export async function fetchCode() { if (isNode) { const __dirname = dirname(fileURLToPath(import.meta.url)); - return await readFile(__dirname + '/aztec3-circuits.wasm'); + // TODO properly package this + return await readFile(__dirname + '/../../../circuits/cpp/build-wasm/bin/aztec3-circuits.wasm'); } else { const res = await fetch('/aztec3-circuits.wasm'); return Buffer.from(await res.arrayBuffer()); diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index d99f39dc348..3ece535aef4 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -16,7 +16,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index f6da9e3572b..c3fd308703c 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -38,7 +38,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/foundation/.eslintrc.cjs b/yarn-project/foundation/.eslintrc.cjs index 6194b55cfb6..3c738f34190 100644 --- a/yarn-project/foundation/.eslintrc.cjs +++ b/yarn-project/foundation/.eslintrc.cjs @@ -43,7 +43,7 @@ module.exports = { files: ['*.test.ts', '*.test.tsx'], parserOptions: { tsconfigRootDir: __dirname + '/..', - project: __dirname + '/../tsconfig.test.json', + project: __dirname + '/../tsconfig.json', }, }, ], diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 9b6c33531bf..0c43d5ca905 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -39,7 +39,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 67e822ba92a..4e66af8e51e 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -19,7 +19,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 4ac42a1bd8f..8ff1f471477 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -19,7 +19,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 4290c0862fe..763a6a64199 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -24,7 +24,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index 0d5a8206312..cde7636067d 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -18,7 +18,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 7c81f783256..924ddfcfdd9 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -16,7 +16,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 8d0a94727c7..dae2c74a640 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -22,7 +22,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 508537c4018..342db4648ff 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -22,7 +22,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/package.json b/yarn-project/package.json index d9acbb9014f..6f736b85ab4 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -3,7 +3,7 @@ "packageManager": "yarn@3.4.1", "private": true, "scripts": { - "prepare": "workspaces-to-typescript-project-references", + "prepare": "workspaces-to-typescript-project-references --tsconfigPath tsconfig.dest.json", "docs": "typedoc --out docs/dist && cd docs && yarn serve", "formatting": "yarn workspaces foreach run formatting", "formatting:fix": "yarn workspaces foreach run formatting:fix", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 5c05441a176..e66133ce45a 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -19,7 +19,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 2df6f8ffe3f..e02ddd2822e 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -23,7 +23,8 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "rootDir": "..", + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { @@ -63,4 +64,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/sequencer-client/tsconfig.dest.json b/yarn-project/sequencer-client/tsconfig.dest.json new file mode 100644 index 00000000000..e2c1bc106c4 --- /dev/null +++ b/yarn-project/sequencer-client/tsconfig.dest.json @@ -0,0 +1,13 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "dest", + "rootDir": "src", + "tsBuildInfoFile": ".tsbuildinfo" + }, + "include": [ + "src", + "test" + ], + "references": [] +} diff --git a/yarn-project/sequencer-client/tsconfig.json b/yarn-project/sequencer-client/tsconfig.json deleted file mode 100644 index b2eb8576c5a..00000000000 --- a/yarn-project/sequencer-client/tsconfig.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "extends": "../tsconfig.base.json", - "compilerOptions": { - "outDir": "dest", - "rootDir": "src", - "tsBuildInfoFile": ".tsbuildinfo" - }, - "include": [ - "src", - "test" - ], - "references": [ - { - "path": "../archiver" - }, - { - "path": "../ethereum.js" - }, - { - "path": "../l1-contracts" - }, - { - "path": "../l2-block" - }, - { - "path": "../circuits.js" - }, - { - "path": "../world-state" - }, - { - "path": "../tx" - }, - { - "path": "../barretenberg.js" - }, - { - "path": "../p2p" - }, - { - "path": "../foundation" - } - ] -} \ No newline at end of file diff --git a/yarn-project/tsconfig.test.json b/yarn-project/tsconfig.json similarity index 100% rename from yarn-project/tsconfig.test.json rename to yarn-project/tsconfig.json diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 57e98afd2d0..9330de1ee08 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -22,7 +22,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index d451e39f8f7..7336b8c8712 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -16,7 +16,7 @@ "globals": { "ts-jest": { "useESM": true, - "tsconfig": "../tsconfig.test.json" + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { From 3aff26625c4ac8ae50fbef1d3d0717b99f0216fa Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:21:36 +0100 Subject: [PATCH 08/33] chore: update tsconfig to tsconfig.dest.json --- circuits | 2 +- scripts/derive-package-deps.py | 44 ++++++++++++++++++- .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../p2p/{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 .../tx/{tsconfig.json => tsconfig.dest.json} | 0 .../{tsconfig.json => tsconfig.dest.json} | 0 20 files changed, 44 insertions(+), 2 deletions(-) rename yarn-project/archiver/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/aztec-cli/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/aztec-node/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/barretenberg.js/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/circuits.js/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/end-to-end/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/ethereum.js/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/foundation/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/kernel-prover/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/key-store/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/l1-contracts/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/l2-block/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/merkle-tree/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/noir-contracts/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/p2p/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/prover-client/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/tx/{tsconfig.json => tsconfig.dest.json} (100%) rename yarn-project/world-state/{tsconfig.json => tsconfig.dest.json} (100%) diff --git a/circuits b/circuits index aa05e75e912..aaaa41e001f 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aa05e75e912c7f3dc5aa243d455bdfb7f855438a +Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 diff --git a/scripts/derive-package-deps.py b/scripts/derive-package-deps.py index 16b06fef394..67bcde6a79b 100755 --- a/scripts/derive-package-deps.py +++ b/scripts/derive-package-deps.py @@ -6,22 +6,29 @@ import re from pathlib import Path +# updates dependencies in the package.json file by scanning imports def update_dependencies(package_json_file: str): + # Verify the provided package.json file exists, otherwise exit with an error if not os.path.isfile(package_json_file): print(f"Error: {package_json_file} not found.") sys.exit(2) + # Locate the directory of the package.json file to search for TypeScript files tsconfig_dir = os.path.dirname(package_json_file) ts_files = list(Path(tsconfig_dir).rglob("*.ts*")) + # Regular expression pattern to match import statements from @aztec packages import_regex = r'^import.*from.*@aztec/([a-zA-Z0-9\-\._]+)' + # Dictionary to store detected dependencies dependencies = {} for file in ts_files: with open(file, "r") as f: for line in f: + # Check if the line is an import statement from an @aztec package match = re.match(import_regex, line) if match: + # Add the package to the dependencies dictionary if not already present package_name = match.group(1) if package_name not in dependencies: dependencies[package_name] = "workspace:^" @@ -41,11 +48,46 @@ def update_dependencies(package_json_file: str): with open(package_json_file, "w") as f: json.dump(package_data, f, indent=2) + return dependencies +# update build_manifest.json +def update_build_manifest(build_manifest_file: str, dependencies: dict, project_key: str): + if not os.path.isfile(build_manifest_file): + print(f"Error: {build_manifest_file} not found.") + sys.exit(2) + + with open(build_manifest_file, "r") as f: + build_manifest_data = json.load(f) + + if project_key in build_manifest_data: + # Convert the dictionary of dependencies into a list of package names + new_dependencies = [f"{package}" for package in dependencies.keys()] + + # Update the "dependencies" key in the corresponding section of the build_manifest_data + build_manifest_data[project_key]["dependencies"] = new_dependencies + + with open(build_manifest_file, "w") as f: + json.dump(build_manifest_data, f, indent=2) + else: + print(f"Error: '{project_key}' not found in build_manifest.json") + sys.exit(3) + +# Entry point for the script if __name__ == "__main__": + # Check if the path to the package.json file is provided as a command-line argument if len(sys.argv) == 1: print(f"Usage: {sys.argv[0]} path/to/package.json") sys.exit(1) + # Call the update_dependencies function with the provided package.json file path package_json_file = sys.argv[1] - update_dependencies(package_json_file) + dependencies = update_dependencies(package_json_file) + + # Get the directory name of the directory that holds package.json + project_key = os.path.basename(os.path.dirname(package_json_file)) + + # Add the path to the build-manifest.json file + build_manifest_file = os.path.join(os.path.dirname(package_json_file), '..', 'build-manifest.json') + + # Call the update_build_manifest function with the provided build_manifest file path, the dependencies, and the project_key + update_build_manifest(build_manifest_file, dependencies, project_key) \ No newline at end of file diff --git a/yarn-project/archiver/tsconfig.json b/yarn-project/archiver/tsconfig.dest.json similarity index 100% rename from yarn-project/archiver/tsconfig.json rename to yarn-project/archiver/tsconfig.dest.json diff --git a/yarn-project/aztec-cli/tsconfig.json b/yarn-project/aztec-cli/tsconfig.dest.json similarity index 100% rename from yarn-project/aztec-cli/tsconfig.json rename to yarn-project/aztec-cli/tsconfig.dest.json diff --git a/yarn-project/aztec-node/tsconfig.json b/yarn-project/aztec-node/tsconfig.dest.json similarity index 100% rename from yarn-project/aztec-node/tsconfig.json rename to yarn-project/aztec-node/tsconfig.dest.json diff --git a/yarn-project/barretenberg.js/tsconfig.json b/yarn-project/barretenberg.js/tsconfig.dest.json similarity index 100% rename from yarn-project/barretenberg.js/tsconfig.json rename to yarn-project/barretenberg.js/tsconfig.dest.json diff --git a/yarn-project/circuits.js/tsconfig.json b/yarn-project/circuits.js/tsconfig.dest.json similarity index 100% rename from yarn-project/circuits.js/tsconfig.json rename to yarn-project/circuits.js/tsconfig.dest.json diff --git a/yarn-project/end-to-end/tsconfig.json b/yarn-project/end-to-end/tsconfig.dest.json similarity index 100% rename from yarn-project/end-to-end/tsconfig.json rename to yarn-project/end-to-end/tsconfig.dest.json diff --git a/yarn-project/ethereum.js/tsconfig.json b/yarn-project/ethereum.js/tsconfig.dest.json similarity index 100% rename from yarn-project/ethereum.js/tsconfig.json rename to yarn-project/ethereum.js/tsconfig.dest.json diff --git a/yarn-project/foundation/tsconfig.json b/yarn-project/foundation/tsconfig.dest.json similarity index 100% rename from yarn-project/foundation/tsconfig.json rename to yarn-project/foundation/tsconfig.dest.json diff --git a/yarn-project/kernel-prover/tsconfig.json b/yarn-project/kernel-prover/tsconfig.dest.json similarity index 100% rename from yarn-project/kernel-prover/tsconfig.json rename to yarn-project/kernel-prover/tsconfig.dest.json diff --git a/yarn-project/key-store/tsconfig.json b/yarn-project/key-store/tsconfig.dest.json similarity index 100% rename from yarn-project/key-store/tsconfig.json rename to yarn-project/key-store/tsconfig.dest.json diff --git a/yarn-project/l1-contracts/tsconfig.json b/yarn-project/l1-contracts/tsconfig.dest.json similarity index 100% rename from yarn-project/l1-contracts/tsconfig.json rename to yarn-project/l1-contracts/tsconfig.dest.json diff --git a/yarn-project/l2-block/tsconfig.json b/yarn-project/l2-block/tsconfig.dest.json similarity index 100% rename from yarn-project/l2-block/tsconfig.json rename to yarn-project/l2-block/tsconfig.dest.json diff --git a/yarn-project/merkle-tree/tsconfig.json b/yarn-project/merkle-tree/tsconfig.dest.json similarity index 100% rename from yarn-project/merkle-tree/tsconfig.json rename to yarn-project/merkle-tree/tsconfig.dest.json diff --git a/yarn-project/noir-contracts/tsconfig.json b/yarn-project/noir-contracts/tsconfig.dest.json similarity index 100% rename from yarn-project/noir-contracts/tsconfig.json rename to yarn-project/noir-contracts/tsconfig.dest.json diff --git a/yarn-project/p2p/tsconfig.json b/yarn-project/p2p/tsconfig.dest.json similarity index 100% rename from yarn-project/p2p/tsconfig.json rename to yarn-project/p2p/tsconfig.dest.json diff --git a/yarn-project/prover-client/tsconfig.json b/yarn-project/prover-client/tsconfig.dest.json similarity index 100% rename from yarn-project/prover-client/tsconfig.json rename to yarn-project/prover-client/tsconfig.dest.json diff --git a/yarn-project/tx/tsconfig.json b/yarn-project/tx/tsconfig.dest.json similarity index 100% rename from yarn-project/tx/tsconfig.json rename to yarn-project/tx/tsconfig.dest.json diff --git a/yarn-project/world-state/tsconfig.json b/yarn-project/world-state/tsconfig.dest.json similarity index 100% rename from yarn-project/world-state/tsconfig.json rename to yarn-project/world-state/tsconfig.dest.json From 81518b016a85c514e7da513f4e3c2e88e41e48c1 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:22:37 +0100 Subject: [PATCH 09/33] chore: revert circuits --- circuits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits b/circuits index aaaa41e001f..aa05e75e912 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 +Subproject commit aa05e75e912c7f3dc5aa243d455bdfb7f855438a From b4e936f9da7281295a027ed636453297a95118c5 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:25:45 +0100 Subject: [PATCH 10/33] chore: prepare script --- yarn-project/acir-simulator/package.json | 1 + yarn-project/archiver/package.json | 1 + yarn-project/aztec-cli/package.json | 1 + yarn-project/aztec-node/package.json | 1 + yarn-project/aztec-rpc/package.json | 1 + yarn-project/aztec.js/package.json | 1 + yarn-project/barretenberg.js/package.json | 1 + yarn-project/docs/package.json | 1 + yarn-project/end-to-end/package.json | 1 + yarn-project/ethereum.js/example/package.json | 1 + yarn-project/ethereum.js/package.json | 1 + yarn-project/foundation/package.json | 1 + yarn-project/kernel-prover/package.json | 1 + yarn-project/key-store/package.json | 1 + yarn-project/l1-contracts/package.json | 1 + yarn-project/l2-block/package.json | 1 + yarn-project/merkle-tree/package.json | 1 + yarn-project/noir-contracts/package.json | 1 + yarn-project/p2p/package.json | 1 + yarn-project/package.json | 2 +- yarn-project/prover-client/package.json | 1 + yarn-project/sequencer-client/package.json | 2 +- yarn-project/tx/package.json | 1 + yarn-project/world-state/package.json | 1 + 24 files changed, 24 insertions(+), 2 deletions(-) diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 4416874c45b..b1baa362c12 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -8,6 +8,7 @@ "displayName": "Acir Simulator" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index ac5fbee1587..1bd1dbb52a4 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -8,6 +8,7 @@ "displayName": "Archiver" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "start": "node ./dest", diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 08626fa0a34..a20ee991edd 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -11,6 +11,7 @@ "aztec_cli": "index.js" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index f229910d48d..117e9954a03 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -9,6 +9,7 @@ "displayName": "Aztec Node" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index aff3f9e1263..7a8aafdc2fc 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -8,6 +8,7 @@ "displayName": "Wallet" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index c50496c3449..1440749aff7 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -8,6 +8,7 @@ "displayName": "Aztec.js" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 163eb78a9b1..7b2a18c5318 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -12,6 +12,7 @@ "displayName": "Barretenberg.js" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/docs/package.json b/yarn-project/docs/package.json index bec74fc8569..64333489b57 100644 --- a/yarn-project/docs/package.json +++ b/yarn-project/docs/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "packageManager": "yarn@3.2.2", "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "serve": "vite preview --port 8080 --host 0.0.0.0" }, "devDependencies": { diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 3ece535aef4..009b9f5399b 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -4,6 +4,7 @@ "type": "module", "exports": "./dest/index.js", "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b tsconfig.json", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", diff --git a/yarn-project/ethereum.js/example/package.json b/yarn-project/ethereum.js/example/package.json index c396ababa2c..0200ada3e1d 100644 --- a/yarn-project/ethereum.js/example/package.json +++ b/yarn-project/ethereum.js/example/package.json @@ -5,6 +5,7 @@ "license": "MIT", "type": "module", "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "start": "yarn build && NODE_NO_WARNINGS=1 node ./dest", "build": "tsc -b tsconfig.json", "clean": "rm -rf ./dest .tsbuildinfo" diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index c3fd308703c..9af73db187b 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -23,6 +23,7 @@ "./crypto": "./dest/crypto/index.js" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "yarn build --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 0c43d5ca905..1f2dbb4f731 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -27,6 +27,7 @@ "./wasm": "./dest/wasm/index.js" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 4e66af8e51e..92975ace029 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -8,6 +8,7 @@ "displayName": "Kernel Simulator" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 8ff1f471477..37935076309 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -8,6 +8,7 @@ "displayName": "KeyStore" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 763a6a64199..30fbffb3ea2 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -11,6 +11,7 @@ "displayName": "L1 Contracts" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "generate": "contract_gen_def && bash scripts/update-viem-abis.sh && yarn formatting:fix", diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index cde7636067d..4d72e9dc0b6 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -7,6 +7,7 @@ "entryPoint": "./src/index.ts" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 924ddfcfdd9..30f4e07c4b9 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -4,6 +4,7 @@ "type": "module", "exports": "./dest/index.js", "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index dae2c74a640..1bf0a1c4f2e 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -11,6 +11,7 @@ "displayName": "Noir contracts" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 342db4648ff..b691c83aca5 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -8,6 +8,7 @@ "displayName": "P2P" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "start": "node ./dest", diff --git a/yarn-project/package.json b/yarn-project/package.json index 6f736b85ab4..adb08cf1e71 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -3,7 +3,7 @@ "packageManager": "yarn@3.4.1", "private": true, "scripts": { - "prepare": "workspaces-to-typescript-project-references --tsconfigPath tsconfig.dest.json", + "prepare": "yarn workspaces foreach run prepare && workspaces-to-typescript-project-references --tsconfigPath tsconfig.dest.json", "docs": "typedoc --out docs/dist && cd docs && yarn serve", "formatting": "yarn workspaces foreach run formatting", "formatting:fix": "yarn workspaces foreach run formatting:fix", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index e66133ce45a..8a0a7183f8e 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -8,6 +8,7 @@ "displayName": "Prover Client" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index e02ddd2822e..a748a8e7ece 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -8,7 +8,7 @@ "displayName": "Sequencer Client" }, "scripts": { - "prepare": "../../scripts/derive-package-deps.py package.json && cd .. && yarn prepare", + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 9330de1ee08..6f78748d32a 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -8,6 +8,7 @@ "displayName": "TXs" }, "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b", "build:dev": "tsc -b --watch", "start": "node ./dest", diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 7336b8c8712..9bcec0f3472 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -4,6 +4,7 @@ "type": "module", "exports": "./dest/index.js", "scripts": { + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b", "build:dev": "tsc -b --watch", "clean": "rm -rf ./dest .tsbuildinfo", From ca26a6ff10b4e2b7eec05b3f316b88d9ea0b3ce7 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:31:15 +0100 Subject: [PATCH 11/33] Intermediate commit --- README.md | 20 ++++---------------- build_manifest.json | 11 +++++++++-- circuits | 2 +- scripts/derive-package-deps.py | 4 ++-- yarn-project/acir-simulator/package.json | 2 +- yarn-project/archiver/package.json | 5 ++--- yarn-project/aztec-cli/package.json | 2 +- yarn-project/aztec-node/package.json | 9 +++++---- yarn-project/aztec-rpc/package.json | 11 +++++++---- yarn-project/aztec.js/package.json | 7 +++---- yarn-project/barretenberg.js/package.json | 2 +- yarn-project/circuits.js/package.json | 10 ++-------- yarn-project/end-to-end/package.json | 6 ++++-- yarn-project/ethereum.js/package.json | 4 ++-- yarn-project/foundation/package.json | 2 +- yarn-project/kernel-prover/package.json | 4 +--- yarn-project/key-store/package.json | 3 +-- yarn-project/l1-contracts/package.json | 3 ++- yarn-project/l2-block/package.json | 3 ++- yarn-project/merkle-tree/package.json | 2 +- yarn-project/noir-contracts/package.json | 3 +-- yarn-project/p2p/package.json | 7 ++++--- yarn-project/prover-client/package.json | 2 +- yarn-project/sequencer-client/package.json | 2 +- yarn-project/tx/package.json | 5 +++-- yarn-project/world-state/package.json | 8 ++++---- 26 files changed, 66 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index c46589b10e5..fe2fa866961 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,7 @@ # AZTEC 3 Monorepo -The Aztec 3 system consists of the following sub projects. +To update dependencies, do -- `acir-simulator` -- `archiver` -- `aztec-cli` -- `aztec-rpc` -- `aztec.js` -- `ethereum.js` -- `kernel-prover` -- `key-store` -- `l1-contracts` -- `l2-block` -- `p2p` -- `prover-client` -- `aztec-node` -- `sequencer-client` -- `tx` +- yarn prepare + from the root folder. This updates tsconfig.dest.json project references, package.json and the build_manifest.json file, all by scanning local project imports ("@aztec/circuits.js" e.g.). + Note this only handles imports to @aztec/\* packages. diff --git a/build_manifest.json b/build_manifest.json index a477bbef626..b3f32b53e2c 100644 --- a/build_manifest.json +++ b/build_manifest.json @@ -76,15 +76,22 @@ "barretenberg.js": { "buildDir": "yarn-project", "projectDir": "yarn-project/barretenberg.js", - "dockerfile": "aztec.js/Dockerfile", + "dockerfile": "barretenberg.js/Dockerfile", "rebuildPatterns": ["^yarn-project/barretenberg.js/"], "dependencies": [] }, + "circuits.js": { + "buildDir": "yarn-project", + "projectDir": "yarn-project/circuits.js", + "dockerfile": "circuits.js/Dockerfile", + "rebuildPatterns": ["^yarn-project/circuits.js/"], + "dependencies": [] + }, "end-to-end": { "buildDir": "yarn-project", "projectDir": "yarn-project/end-to-end", "dockerfile": "end-to-end/Dockerfile", - "rebuildPatterns": ["^yarn-project/end-to-end/"], + "rebuildPatterns": ["^yarn-project/end-to-end/"], "dependencies": ["aztec.js", "noir-contracts"] }, "ethereum.js": { diff --git a/circuits b/circuits index aa05e75e912..aaaa41e001f 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aa05e75e912c7f3dc5aa243d455bdfb7f855438a +Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 diff --git a/scripts/derive-package-deps.py b/scripts/derive-package-deps.py index 67bcde6a79b..f2e07efa96c 100755 --- a/scripts/derive-package-deps.py +++ b/scripts/derive-package-deps.py @@ -84,10 +84,10 @@ def update_build_manifest(build_manifest_file: str, dependencies: dict, project_ dependencies = update_dependencies(package_json_file) # Get the directory name of the directory that holds package.json - project_key = os.path.basename(os.path.dirname(package_json_file)) + project_key = os.path.basename(os.path.dirname(os.path.abspath(package_json_file))) # Add the path to the build-manifest.json file - build_manifest_file = os.path.join(os.path.dirname(package_json_file), '..', 'build-manifest.json') + build_manifest_file = os.path.join(os.path.dirname(package_json_file), '..', '..', 'build_manifest.json') # Call the update_build_manifest function with the provided build_manifest file path, the dependencies, and the project_key update_build_manifest(build_manifest_file, dependencies, project_key) \ No newline at end of file diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index b1baa362c12..780df5b51d0 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -50,4 +50,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 1bd1dbb52a4..67d8a7c10a1 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -29,11 +29,10 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/circuits.js": "workspace:^", "@aztec/ethereum.js": "workspace:^", - "@aztec/foundation": "workspace:^", "@aztec/l1-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", + "@aztec/foundation": "workspace:^", "debug": "^4.3.4", "tsc-watch": "^6.0.0", "tslib": "^2.5.0", @@ -54,4 +53,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index a20ee991edd..0685ff1ba38 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -46,4 +46,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 117e9954a03..9123cc50288 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -34,15 +34,16 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/archiver": "workspace:^", "@aztec/ethereum.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l1-contracts": "workspace:^", + "@aztec/tx": "workspace:^", + "@aztec/archiver": "workspace:^", "@aztec/l2-block": "workspace:^", "@aztec/p2p": "workspace:^", - "@aztec/sequencer-client": "workspace:^", - "@aztec/tx": "workspace:^", "@aztec/world-state": "workspace:^", + "@aztec/sequencer-client": "workspace:^", + "@aztec/merkle-tree": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -56,4 +57,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index 7a8aafdc2fc..3b7f8557adf 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -30,12 +30,15 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/acir-simulator": "workspace:^", - "@aztec/aztec-node": "workspace:^", + "@aztec/circuits.js": "workspace:^", + "@aztec/tx": "workspace:^", "@aztec/foundation": "workspace:^", + "@aztec/aztec-node": "workspace:^", + "@aztec/acir-simulator": "workspace:^", "@aztec/kernel-prover": "workspace:^", + "@aztec/barretenberg.js": "workspace:^", "@aztec/noir-contracts": "workspace:^", - "@aztec/tx": "workspace:^", + "@aztec/l2-block": "workspace:^", "browserify-cipher": "^1.0.1", "sha3": "^2.1.4", "tslib": "^2.4.0" @@ -50,4 +53,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 1440749aff7..2f6fa4d119f 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -31,10 +31,9 @@ }, "dependencies": { "@aztec/aztec-rpc": "workspace:^", - "@aztec/foundation": "workspace:^", + "@aztec/circuits.js": "workspace:^", "@aztec/noir-contracts": "workspace:^", - "@aztec/sequencer-client": "workspace:^", - "@aztec/tx": "workspace:^", + "@aztec/foundation": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -48,4 +47,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 7b2a18c5318..61a4cd34393 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -56,4 +56,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 0fd47c49d79..af0dbcddd9c 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -12,15 +12,9 @@ "displayName": "Circuits.js" }, "scripts": { -<<<<<<< HEAD + "prepare": "../../scripts/derive-package-deps.py package.json", "build": "tsc -b", "build:dev": "tsc -b tsconfig.json --watch", -======= - "build": "yarn redo-ts-refs && tsc -b tsconfig.dest.json && yarn build:link", - "build:dev": "tsc -b tsconfig.dest.json --watch", - "build:link": "ln -nf src/wasm/aztec3-circuits.wasm dest/wasm/aztec3-circuits.wasm", - "redo-ts-refs": "../../scripts/update-tsconfig-references tsconfig.dest.json", ->>>>>>> origin/master "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 278 ./src", "formatting:fix": "prettier -w ./src", @@ -64,4 +58,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 009b9f5399b..faaac50ad74 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -28,9 +28,11 @@ }, "dependencies": { "@aztec/aztec-node": "workspace:^", - "@aztec/aztec.js": "workspace:^", "@aztec/ethereum.js": "workspace:^", + "@aztec/aztec.js": "workspace:^", + "@aztec/foundation": "workspace:^", "@aztec/noir-contracts": "workspace:^", + "@aztec/l1-contracts": "workspace:^", "@types/jest": "^29.4.0", "jest": "^28.1.3", "ts-jest": "^28.0.7", @@ -44,4 +46,4 @@ "concurrently": "^7.6.0", "ts-node": "^10.9.1" } -} +} \ No newline at end of file diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index 9af73db187b..b8714d2a7b3 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -49,7 +49,7 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/foundation": "workspace:^", + "@aztec/ethereum.js": "workspace:^", "bip39": "^3.0.4", "browserify-aes": "^1.2.0", "debug": "^4.3.4", @@ -75,4 +75,4 @@ "ts-jest": "28.0.7", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 1f2dbb4f731..ed7d5fb11c6 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -93,4 +93,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 92975ace029..8df04b0e11a 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -31,8 +31,6 @@ }, "dependencies": { "@aztec/acir-simulator": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/foundation": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -45,4 +43,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 37935076309..69849d25f3c 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -30,7 +30,6 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/foundation": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -43,4 +42,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 30fbffb3ea2..7f32cb9e489 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -35,6 +35,7 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/ethereum.js": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -48,4 +49,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index 4d72e9dc0b6..daac041caef 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -31,6 +31,7 @@ "dependencies": { "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", + "@aztec/l1-contracts": "workspace:^", "tslib": "^2.5.0" }, "devDependencies": { @@ -44,4 +45,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 30f4e07c4b9..5d068e0c957 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -47,4 +47,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 1bf0a1c4f2e..87d5694c217 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -33,7 +33,6 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/foundation": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -49,4 +48,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index b691c83aca5..54d7117e860 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -33,9 +33,10 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/foundation": "workspace:^", - "@aztec/l2-block": "workspace:^", "@aztec/tx": "workspace:^", + "@aztec/l2-block": "workspace:^", + "@aztec/foundation": "workspace:^", + "@aztec/circuits.js": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" }, @@ -49,4 +50,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 8a0a7183f8e..cbbbec46107 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -42,4 +42,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index a748a8e7ece..c79362af59f 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -64,4 +64,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 6f78748d32a..5bf1181686f 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -33,8 +33,9 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/circuits.js": "workspace:^", "@aztec/l2-block": "workspace:^", + "@aztec/circuits.js": "workspace:^", + "@aztec/foundation": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" }, @@ -48,4 +49,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 9bcec0f3472..9a26357cc38 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -27,11 +27,11 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/barretenberg.js": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/foundation": "workspace:^", "@aztec/l2-block": "workspace:^", "@aztec/merkle-tree": "workspace:^", + "@aztec/foundation": "workspace:^", + "@aztec/circuits.js": "workspace:^", + "@aztec/barretenberg.js": "workspace:^", "levelup": "^5.1.1", "memdown": "^6.1.1", "tslib": "^2.4.0" @@ -48,4 +48,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file From 3d7be9b7cd7a92356e43f5b3b37d36816a4cfcf8 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:40:37 +0100 Subject: [PATCH 12/33] chore: Fix all package builds --- build_manifest.json | 236 ++++++++++++++---- scripts/derive-package-deps.py | 40 +-- yarn-project/archiver/tsconfig.dest.json | 16 +- yarn-project/aztec-node/tsconfig.dest.json | 26 +- .../barretenberg.js/tsconfig.dest.json | 6 +- yarn-project/circuits.js/tsconfig.dest.json | 6 +- yarn-project/docs/package.json | 5 +- yarn-project/end-to-end/tsconfig.dest.json | 15 +- yarn-project/ethereum.js/example/package.json | 2 +- yarn-project/ethereum.js/tsconfig.dest.json | 7 +- yarn-project/kernel-prover/tsconfig.dest.json | 16 +- yarn-project/key-store/tsconfig.dest.json | 10 +- yarn-project/l2-block/tsconfig.dest.json | 11 +- yarn-project/merkle-tree/tsconfig.dest.json | 8 +- .../noir-contracts/tsconfig.dest.json | 11 +- yarn-project/p2p/tsconfig.dest.json | 18 +- .../sequencer-client/tsconfig.dest.json | 33 ++- yarn-project/tx/tsconfig.dest.json | 16 +- yarn-project/world-state/tsconfig.dest.json | 14 +- 19 files changed, 348 insertions(+), 148 deletions(-) diff --git a/build_manifest.json b/build_manifest.json index b3f32b53e2c..6eff1458818 100644 --- a/build_manifest.json +++ b/build_manifest.json @@ -2,32 +2,44 @@ "aztec3-circuits-wasm-linux-clang": { "buildDir": "circuits/cpp", "dockerfile": "dockerfiles/Dockerfile.wasm-linux-clang", - "rebuildPatterns": ["^circuits/"], + "rebuildPatterns": [ + "^circuits/" + ], "dependencies": [] }, "circuits-x86_64-linux-clang": { "buildDir": "circuits", "dockerfile": "dockerfiles/Dockerfile.x86_64-linux-clang", - "rebuildPatterns": ["^circuits/"], + "rebuildPatterns": [ + "^circuits/" + ], "dependencies": [] }, "circuits-x86_64-linux-clang-assert": { "buildDir": "circuits", "dockerfile": "dockerfiles/Dockerfile.x86_64-linux-clang-assert", - "rebuildPatterns": ["^circuits/"], + "rebuildPatterns": [ + "^circuits/" + ], "dependencies": [] }, "circuits-x86_64-linux-gcc": { "buildDir": "circuits", "dockerfile": "dockerfiles/Dockerfile.x86_64-linux-gcc", - "rebuildPatterns": ["^circuits/"], + "rebuildPatterns": [ + "^circuits/" + ], "dependencies": [] }, "l1-contracts": { "buildDir": "l1-contracts", "dockerfile": "Dockerfile", - "rebuildPatterns": ["^l1-contracts/"], - "dependencies": [] + "rebuildPatterns": [ + "^l1-contracts/" + ], + "dependencies": [ + "ethereum.js" + ] }, "yarn-project-base": { "buildDir": "yarn-project", @@ -42,160 +54,280 @@ "buildDir": "yarn-project", "projectDir": "yarn-project/acir-simulator", "dockerfile": "acir-simulator/Dockerfile", - "rebuildPatterns": ["^yarn-project/acir-simulator/"], - "dependencies": ["yarn-project-base", "circuits.js"] + "rebuildPatterns": [ + "^yarn-project/acir-simulator/" + ], + "dependencies": [ + "circuits.js", + "noir-contracts" + ] }, "archiver": { "buildDir": "yarn-project", "projectDir": "yarn-project/archiver", "dockerfile": "archiver/Dockerfile", - "rebuildPatterns": ["^yarn-project/archiver/"], - "dependencies": ["foundation", "ethereum.js", "l1-contracts", "l2-block"] + "rebuildPatterns": [ + "^yarn-project/archiver/" + ], + "dependencies": [ + "ethereum.js", + "l1-contracts", + "l2-block", + "foundation" + ] }, "aztec-cli": { "buildDir": "yarn-project", "projectDir": "yarn-project/aztec-cli", "dockerfile": "aztec-cli/Dockerfile", - "rebuildPatterns": ["^yarn-project/aztec-cli/"], - "dependencies": ["aztec.js"] + "rebuildPatterns": [ + "^yarn-project/aztec-cli/" + ], + "dependencies": [] }, "aztec-rpc": { "buildDir": "yarn-project", "projectDir": "yarn-project/aztec-rpc", "dockerfile": "aztec-rpc/Dockerfile", - "rebuildPatterns": ["^yarn-project/aztec-rpc/"], - "dependencies": ["aztec-node"] + "rebuildPatterns": [ + "^yarn-project/aztec-rpc/" + ], + "dependencies": [ + "circuits.js", + "tx", + "foundation", + "aztec-node", + "acir-simulator", + "kernel-prover", + "barretenberg.js", + "noir-contracts", + "l2-block" + ] }, "aztec.js": { "buildDir": "yarn-project", "projectDir": "yarn-project/aztec.js", "dockerfile": "aztec.js/Dockerfile", - "rebuildPatterns": ["^yarn-project/aztec.js/"], - "dependencies": ["aztec-rpc"] + "rebuildPatterns": [ + "^yarn-project/aztec.js/" + ], + "dependencies": [ + "aztec-rpc", + "circuits.js", + "noir-contracts", + "foundation" + ] }, "barretenberg.js": { "buildDir": "yarn-project", "projectDir": "yarn-project/barretenberg.js", "dockerfile": "barretenberg.js/Dockerfile", - "rebuildPatterns": ["^yarn-project/barretenberg.js/"], - "dependencies": [] + "rebuildPatterns": [ + "^yarn-project/barretenberg.js/" + ], + "dependencies": [ + "foundation" + ] }, "circuits.js": { "buildDir": "yarn-project", "projectDir": "yarn-project/circuits.js", "dockerfile": "circuits.js/Dockerfile", - "rebuildPatterns": ["^yarn-project/circuits.js/"], - "dependencies": [] + "rebuildPatterns": [ + "^yarn-project/circuits.js/" + ], + "dependencies": [ + "foundation" + ] }, "end-to-end": { "buildDir": "yarn-project", "projectDir": "yarn-project/end-to-end", "dockerfile": "end-to-end/Dockerfile", - "rebuildPatterns": ["^yarn-project/end-to-end/"], - "dependencies": ["aztec.js", "noir-contracts"] + "rebuildPatterns": [ + "^yarn-project/end-to-end/" + ], + "dependencies": [ + "aztec-node", + "ethereum.js", + "aztec.js", + "foundation", + "noir-contracts", + "l1-contracts" + ] + }, + "docs": { + "buildDir": "yarn-project", + "projectDir": "yarn-project/docs", + "dockerfile": "docs/Dockerfile", + "rebuildPatterns": [ + "^yarn-project/docs/" + ], + "dependencies": [] }, "ethereum.js": { "buildDir": "yarn-project", "projectDir": "yarn-project/ethereum.js", "dockerfile": "ethereum.js/Dockerfile", - "rebuildPatterns": ["^yarn-project/ethereum.js/"], - "dependencies": ["foundation"] + "rebuildPatterns": [ + "^yarn-project/ethereum.js/" + ], + "dependencies": [ + "ethereum.js" + ] }, "foundation": { "buildDir": "yarn-project", "projectDir": "yarn-project/foundation", "dockerfile": "foundation/Dockerfile", - "rebuildPatterns": ["^yarn-project/foundation/"], - "dependencies": ["yarn-project-base"] + "rebuildPatterns": [ + "^yarn-project/foundation/" + ], + "dependencies": [] }, "kernel-prover": { "buildDir": "yarn-project", "projectDir": "yarn-project/kernel-prover", "dockerfile": "kernel-prover/Dockerfile", - "rebuildPatterns": ["^yarn-project/kernel-prover/"], - "dependencies": ["acir-simulator"] + "rebuildPatterns": [ + "^yarn-project/kernel-prover/" + ], + "dependencies": [ + "acir-simulator" + ] }, "key-store": { "buildDir": "yarn-project", "projectDir": "yarn-project/key-store", "dockerfile": "key-store/Dockerfile", - "rebuildPatterns": ["^yarn-project/key-store/"], - "dependencies": ["foundation"] + "rebuildPatterns": [ + "^yarn-project/key-store/" + ], + "dependencies": [] }, "l2-block": { "buildDir": "yarn-project", "projectDir": "yarn-project/l2-block", "dockerfile": "l2-block/Dockerfile", - "rebuildPatterns": ["^yarn-project/l2-block/"], - "dependencies": ["foundation"] + "rebuildPatterns": [ + "^yarn-project/l2-block/" + ], + "dependencies": [ + "circuits.js", + "foundation", + "l1-contracts" + ] }, "merkle-tree": { "buildDir": "yarn-project", "projectDir": "yarn-project/merkle-tree", "dockerfile": "merkle-tree/Dockerfile", - "rebuildPatterns": ["^yarn-project/merkle-tree/"], - "dependencies": ["foundation", "barretenberg.js"] + "rebuildPatterns": [ + "^yarn-project/merkle-tree/" + ], + "dependencies": [ + "barretenberg.js", + "foundation" + ] }, "noir-contracts": { "buildDir": "yarn-project", "projectDir": "yarn-project/noir-contracts", "dockerfile": "noir-contracts/Dockerfile", - "rebuildPatterns": ["^yarn-project/noir-contracts/"], - "dependencies": ["foundation"] + "rebuildPatterns": [ + "^yarn-project/noir-contracts/" + ], + "dependencies": [] }, "p2p": { "buildDir": "yarn-project", "projectDir": "yarn-project/p2p", "dockerfile": "p2p/Dockerfile", - "rebuildPatterns": ["^yarn-project/p2p/"], - "dependencies": ["foundation", "l2-block"] + "rebuildPatterns": [ + "^yarn-project/p2p/" + ], + "dependencies": [ + "tx", + "l2-block", + "foundation", + "circuits.js" + ] }, "prover-client": { "buildDir": "yarn-project", "projectDir": "yarn-project/prover-client", "dockerfile": "prover-client/Dockerfile", - "rebuildPatterns": ["^yarn-project/prover-client/"], - "dependencies": ["yarn-project-base"] + "rebuildPatterns": [ + "^yarn-project/prover-client/" + ], + "dependencies": [] }, "aztec-node": { "buildDir": "yarn-project", "projectDir": "yarn-project/aztec-node", "dockerfile": "aztec-node/Dockerfile", - "rebuildPatterns": ["^yarn-project/aztec-node/"], + "rebuildPatterns": [ + "^yarn-project/aztec-node/" + ], "dependencies": [ + "ethereum.js", "foundation", + "l1-contracts", + "tx", "archiver", - "world-state", + "l2-block", "p2p", + "world-state", "sequencer-client", - "ethereum.js" + "merkle-tree" ] }, "sequencer-client": { "buildDir": "yarn-project", "projectDir": "yarn-project/sequencer-client", "dockerfile": "sequencer-client/Dockerfile", - "rebuildPatterns": ["^yarn-project/sequencer-client/"], + "rebuildPatterns": [ + "^yarn-project/sequencer-client/" + ], "dependencies": [ - "foundation", - "world-state", + "archiver", "ethereum.js", + "l1-contracts", + "l2-block", + "circuits.js", + "world-state", + "tx", + "barretenberg.js", "p2p", - "l2-block" + "foundation" ] }, "tx": { "buildDir": "yarn-project", "projectDir": "yarn-project/tx", "dockerfile": "tx/Dockerfile", - "rebuildPatterns": ["^yarn-project/tx/"], - "dependencies": ["circuits.js", "l2-block"] + "rebuildPatterns": [ + "^yarn-project/tx/" + ], + "dependencies": [ + "l2-block", + "circuits.js", + "foundation" + ] }, "world-state": { "buildDir": "yarn-project", "projectDir": "yarn-project/world-state", "dockerfile": "world-state/Dockerfile", - "rebuildPatterns": ["^yarn-project/world-state/"], - "dependencies": ["foundation", "merkle-tree", "l2-block"] + "rebuildPatterns": [ + "^yarn-project/world-state/" + ], + "dependencies": [ + "l2-block", + "merkle-tree", + "foundation", + "circuits.js", + "barretenberg.js" + ] } -} +} \ No newline at end of file diff --git a/scripts/derive-package-deps.py b/scripts/derive-package-deps.py index f2e07efa96c..c9a8d343641 100755 --- a/scripts/derive-package-deps.py +++ b/scripts/derive-package-deps.py @@ -38,7 +38,7 @@ def update_dependencies(package_json_file: str): # Filter out existing Aztec dependencies existing_dependencies = { - key: value for key, value in package_data["dependencies"].items() + key: value for key, value in package_data.get("dependencies", {}).items() if not key.startswith("@aztec/") } @@ -74,20 +74,24 @@ def update_build_manifest(build_manifest_file: str, dependencies: dict, project_ # Entry point for the script if __name__ == "__main__": - # Check if the path to the package.json file is provided as a command-line argument - if len(sys.argv) == 1: - print(f"Usage: {sys.argv[0]} path/to/package.json") - sys.exit(1) - - # Call the update_dependencies function with the provided package.json file path - package_json_file = sys.argv[1] - dependencies = update_dependencies(package_json_file) - - # Get the directory name of the directory that holds package.json - project_key = os.path.basename(os.path.dirname(os.path.abspath(package_json_file))) - - # Add the path to the build-manifest.json file - build_manifest_file = os.path.join(os.path.dirname(package_json_file), '..', '..', 'build_manifest.json') - - # Call the update_build_manifest function with the provided build_manifest file path, the dependencies, and the project_key - update_build_manifest(build_manifest_file, dependencies, project_key) \ No newline at end of file + try: + # Check if the path to the package.json file is provided as a command-line argument + if len(sys.argv) == 1: + print(f"Usage: {sys.argv[0]} path/to/package.json") + sys.exit(1) + + # Call the update_dependencies function with the provided package.json file path + package_json_file = sys.argv[1] + dependencies = update_dependencies(package_json_file) + + # Get the directory name of the directory that holds package.json + project_key = os.path.basename(os.path.dirname(os.path.abspath(package_json_file))) + + # Add the path to the build-manifest.json file + build_manifest_file = os.path.join(os.path.dirname(package_json_file), '..', '..', 'build_manifest.json') + + # Call the update_build_manifest function with the provided build_manifest file path, the dependencies, and the project_key + update_build_manifest(build_manifest_file, dependencies, project_key) + except Exception as err: + print("Failed updating " + os.path.abspath(sys.argv[1])) + print(err) \ No newline at end of file diff --git a/yarn-project/archiver/tsconfig.dest.json b/yarn-project/archiver/tsconfig.dest.json index 33cabe36d61..4166ce41348 100644 --- a/yarn-project/archiver/tsconfig.dest.json +++ b/yarn-project/archiver/tsconfig.dest.json @@ -7,20 +7,20 @@ }, "references": [ { - "path": "../circuits.js" + "path": "../ethereum.js/tsconfig.dest.json" }, { - "path": "../ethereum.js" + "path": "../l1-contracts/tsconfig.dest.json" }, { - "path": "../foundation" + "path": "../l2-block/tsconfig.dest.json" }, { - "path": "../l1-contracts" - }, - { - "path": "../l2-block" + "path": "../foundation/tsconfig.dest.json" } ], - "include": ["src", "test"] + "include": [ + "src", + "test" + ] } diff --git a/yarn-project/aztec-node/tsconfig.dest.json b/yarn-project/aztec-node/tsconfig.dest.json index 00d217f72c4..68d76a0002e 100644 --- a/yarn-project/aztec-node/tsconfig.dest.json +++ b/yarn-project/aztec-node/tsconfig.dest.json @@ -7,32 +7,38 @@ }, "references": [ { - "path": "../archiver" + "path": "../ethereum.js/tsconfig.dest.json" }, { - "path": "../ethereum.js" + "path": "../foundation/tsconfig.dest.json" }, { - "path": "../foundation" + "path": "../l1-contracts/tsconfig.dest.json" }, { - "path": "../l1-contracts" + "path": "../tx/tsconfig.dest.json" }, { - "path": "../l2-block" + "path": "../archiver/tsconfig.dest.json" }, { - "path": "../p2p" + "path": "../l2-block/tsconfig.dest.json" }, { - "path": "../sequencer-client" + "path": "../p2p/tsconfig.dest.json" }, { - "path": "../tx" + "path": "../world-state/tsconfig.dest.json" }, { - "path": "../world-state" + "path": "../sequencer-client/tsconfig.dest.json" + }, + { + "path": "../merkle-tree/tsconfig.dest.json" } ], - "include": ["src", "test"] + "include": [ + "src", + "test" + ] } diff --git a/yarn-project/barretenberg.js/tsconfig.dest.json b/yarn-project/barretenberg.js/tsconfig.dest.json index 3b01865577a..6d48e0917e9 100644 --- a/yarn-project/barretenberg.js/tsconfig.dest.json +++ b/yarn-project/barretenberg.js/tsconfig.dest.json @@ -7,8 +7,10 @@ }, "references": [ { - "path": "../foundation" + "path": "../foundation/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/circuits.js/tsconfig.dest.json b/yarn-project/circuits.js/tsconfig.dest.json index 3b01865577a..6d48e0917e9 100644 --- a/yarn-project/circuits.js/tsconfig.dest.json +++ b/yarn-project/circuits.js/tsconfig.dest.json @@ -7,8 +7,10 @@ }, "references": [ { - "path": "../foundation" + "path": "../foundation/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/docs/package.json b/yarn-project/docs/package.json index 64333489b57..ac968bf8540 100644 --- a/yarn-project/docs/package.json +++ b/yarn-project/docs/package.json @@ -3,10 +3,11 @@ "version": "0.0.0", "packageManager": "yarn@3.2.2", "scripts": { - "prepare": "../../scripts/derive-package-deps.py package.json", + "prepare": "", "serve": "vite preview --port 8080 --host 0.0.0.0" }, "devDependencies": { "vite": "^4.1.4" - } + }, + "dependencies": {} } diff --git a/yarn-project/end-to-end/tsconfig.dest.json b/yarn-project/end-to-end/tsconfig.dest.json index fb5b1024072..fa2e5fea780 100644 --- a/yarn-project/end-to-end/tsconfig.dest.json +++ b/yarn-project/end-to-end/tsconfig.dest.json @@ -7,17 +7,22 @@ }, "references": [ { - "path": "../aztec-node" + "path": "../aztec-node/tsconfig.dest.json" }, { - "path": "../aztec.js" + "path": "../ethereum.js/tsconfig.dest.json" }, { - "path": "../ethereum.js" + "path": "../foundation/tsconfig.dest.json" }, { - "path": "../noir-contracts" + "path": "../noir-contracts/tsconfig.dest.json" + }, + { + "path": "../l1-contracts/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/ethereum.js/example/package.json b/yarn-project/ethereum.js/example/package.json index 0200ada3e1d..965eb31ea38 100644 --- a/yarn-project/ethereum.js/example/package.json +++ b/yarn-project/ethereum.js/example/package.json @@ -5,7 +5,7 @@ "license": "MIT", "type": "module", "scripts": { - "prepare": "../../scripts/derive-package-deps.py package.json", + "prepare": "", "start": "yarn build && NODE_NO_WARNINGS=1 node ./dest", "build": "tsc -b tsconfig.json", "clean": "rm -rf ./dest .tsbuildinfo" diff --git a/yarn-project/ethereum.js/tsconfig.dest.json b/yarn-project/ethereum.js/tsconfig.dest.json index afc7889a5ad..5dddce007f3 100644 --- a/yarn-project/ethereum.js/tsconfig.dest.json +++ b/yarn-project/ethereum.js/tsconfig.dest.json @@ -9,8 +9,11 @@ }, "references": [ { - "path": "../foundation" + "path": "tsconfig.dest.json" } ], - "include": ["src", "src/eth_typed_data/fixtures/*.json"] + "include": [ + "src", + "src/eth_typed_data/fixtures/*.json" + ] } diff --git a/yarn-project/kernel-prover/tsconfig.dest.json b/yarn-project/kernel-prover/tsconfig.dest.json index 58faff75d06..bf87b8ab0af 100644 --- a/yarn-project/kernel-prover/tsconfig.dest.json +++ b/yarn-project/kernel-prover/tsconfig.dest.json @@ -5,16 +5,8 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "references": [ - { - "path": "../acir-simulator" - }, - { - "path": "../circuits.js" - }, - { - "path": "../foundation" - } - ], - "include": ["src"] + "references": [], + "include": [ + "src" + ] } diff --git a/yarn-project/key-store/tsconfig.dest.json b/yarn-project/key-store/tsconfig.dest.json index f0104160e49..79189449d7b 100644 --- a/yarn-project/key-store/tsconfig.dest.json +++ b/yarn-project/key-store/tsconfig.dest.json @@ -5,10 +5,8 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src"], - "references": [ - { - "path": "../foundation" - } - ] + "include": [ + "src" + ], + "references": [] } diff --git a/yarn-project/l2-block/tsconfig.dest.json b/yarn-project/l2-block/tsconfig.dest.json index ea120e13a2b..2cb1ebc32c5 100644 --- a/yarn-project/l2-block/tsconfig.dest.json +++ b/yarn-project/l2-block/tsconfig.dest.json @@ -7,11 +7,16 @@ }, "references": [ { - "path": "../circuits.js" + "path": "../circuits.js/tsconfig.dest.json" }, { - "path": "../foundation" + "path": "../foundation/tsconfig.dest.json" + }, + { + "path": "../l1-contracts/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/merkle-tree/tsconfig.dest.json b/yarn-project/merkle-tree/tsconfig.dest.json index 1a25ef0e20f..809332f4dcc 100644 --- a/yarn-project/merkle-tree/tsconfig.dest.json +++ b/yarn-project/merkle-tree/tsconfig.dest.json @@ -7,11 +7,13 @@ }, "references": [ { - "path": "../barretenberg.js" + "path": "../barretenberg.js/tsconfig.dest.json" }, { - "path": "../foundation" + "path": "../foundation/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/noir-contracts/tsconfig.dest.json b/yarn-project/noir-contracts/tsconfig.dest.json index e8d2b93f34d..358273c800f 100644 --- a/yarn-project/noir-contracts/tsconfig.dest.json +++ b/yarn-project/noir-contracts/tsconfig.dest.json @@ -5,10 +5,9 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": ["src", "src/**/*.json"], - "references": [ - { - "path": "../foundation" - } - ] + "include": [ + "src", + "src/**/*.json" + ], + "references": [] } diff --git a/yarn-project/p2p/tsconfig.dest.json b/yarn-project/p2p/tsconfig.dest.json index 33d207e03e3..e3ab1b589c2 100644 --- a/yarn-project/p2p/tsconfig.dest.json +++ b/yarn-project/p2p/tsconfig.dest.json @@ -5,18 +5,26 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo", "moduleResolution": "nodenext", - "types": ["node", "jest"] + "types": [ + "node", + "jest" + ] }, "references": [ { - "path": "../foundation" + "path": "../tx/tsconfig.dest.json" }, { - "path": "../l2-block" + "path": "../l2-block/tsconfig.dest.json" }, { - "path": "../tx" + "path": "../foundation/tsconfig.dest.json" + }, + { + "path": "../circuits.js/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/sequencer-client/tsconfig.dest.json b/yarn-project/sequencer-client/tsconfig.dest.json index e2c1bc106c4..6ae5bc4054a 100644 --- a/yarn-project/sequencer-client/tsconfig.dest.json +++ b/yarn-project/sequencer-client/tsconfig.dest.json @@ -9,5 +9,36 @@ "src", "test" ], - "references": [] + "references": [ + { + "path": "../archiver/tsconfig.dest.json" + }, + { + "path": "../ethereum.js/tsconfig.dest.json" + }, + { + "path": "../l1-contracts/tsconfig.dest.json" + }, + { + "path": "../l2-block/tsconfig.dest.json" + }, + { + "path": "../circuits.js/tsconfig.dest.json" + }, + { + "path": "../world-state/tsconfig.dest.json" + }, + { + "path": "../tx/tsconfig.dest.json" + }, + { + "path": "../barretenberg.js/tsconfig.dest.json" + }, + { + "path": "../p2p/tsconfig.dest.json" + }, + { + "path": "../foundation/tsconfig.dest.json" + } + ] } diff --git a/yarn-project/tx/tsconfig.dest.json b/yarn-project/tx/tsconfig.dest.json index dc75d240003..38c92c9e656 100644 --- a/yarn-project/tx/tsconfig.dest.json +++ b/yarn-project/tx/tsconfig.dest.json @@ -5,15 +5,23 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo", "moduleResolution": "nodenext", - "types": ["node", "jest"] + "types": [ + "node", + "jest" + ] }, "references": [ { - "path": "../circuits.js" + "path": "../l2-block/tsconfig.dest.json" }, { - "path": "../l2-block" + "path": "../circuits.js/tsconfig.dest.json" + }, + { + "path": "../foundation/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/world-state/tsconfig.dest.json b/yarn-project/world-state/tsconfig.dest.json index dfa626cd32e..4d957cc6aae 100644 --- a/yarn-project/world-state/tsconfig.dest.json +++ b/yarn-project/world-state/tsconfig.dest.json @@ -7,20 +7,22 @@ }, "references": [ { - "path": "../barretenberg.js" + "path": "../l2-block/tsconfig.dest.json" }, { - "path": "../circuits.js" + "path": "../merkle-tree/tsconfig.dest.json" }, { - "path": "../foundation" + "path": "../foundation/tsconfig.dest.json" }, { - "path": "../l2-block" + "path": "../circuits.js/tsconfig.dest.json" }, { - "path": "../merkle-tree" + "path": "../barretenberg.js/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } From 1f1fdb2ce0deb8bd0a5fc2af96010ce73c606d99 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:49:29 +0100 Subject: [PATCH 13/33] Run yarn prepare --- build_manifest.json | 13 +++++-------- scripts/derive-package-deps.py | 2 ++ yarn-project/acir-simulator/package.json | 4 ++-- yarn-project/archiver/package.json | 4 ++-- yarn-project/aztec-cli/package.json | 2 +- yarn-project/aztec-node/package.json | 4 ++-- yarn-project/aztec-rpc/package.json | 4 ++-- yarn-project/aztec.js/package.json | 4 ++-- yarn-project/barretenberg.js/package.json | 4 ++-- yarn-project/circuits.js/package.json | 4 ++-- yarn-project/end-to-end/package.json | 2 +- yarn-project/ethereum.js/package.json | 3 +-- yarn-project/ethereum.js/tsconfig.dest.json | 6 +----- yarn-project/foundation/package.json | 4 ++-- yarn-project/kernel-prover/package.json | 4 ++-- yarn-project/key-store/package.json | 4 ++-- yarn-project/l1-contracts/package.json | 5 ++--- yarn-project/l1-contracts/tsconfig.dest.json | 6 ++++-- yarn-project/l2-block/package.json | 4 ++-- yarn-project/merkle-tree/package.json | 4 ++-- yarn-project/noir-contracts/package.json | 2 +- yarn-project/p2p/package.json | 6 +++--- yarn-project/p2p/tsconfig.dest.json | 4 ++-- yarn-project/prover-client/package.json | 4 ++-- yarn-project/sequencer-client/package.json | 10 +++++----- yarn-project/sequencer-client/tsconfig.dest.json | 10 +++++----- yarn-project/tx/package.json | 5 ++--- yarn-project/tx/tsconfig.dest.json | 3 --- yarn-project/world-state/package.json | 4 ++-- 29 files changed, 63 insertions(+), 72 deletions(-) diff --git a/build_manifest.json b/build_manifest.json index 6eff1458818..028393d127a 100644 --- a/build_manifest.json +++ b/build_manifest.json @@ -172,9 +172,7 @@ "rebuildPatterns": [ "^yarn-project/ethereum.js/" ], - "dependencies": [ - "ethereum.js" - ] + "dependencies": [] }, "foundation": { "buildDir": "yarn-project", @@ -248,8 +246,8 @@ ], "dependencies": [ "tx", - "l2-block", "foundation", + "l2-block", "circuits.js" ] }, @@ -294,12 +292,12 @@ "ethereum.js", "l1-contracts", "l2-block", + "foundation", "circuits.js", - "world-state", "tx", - "barretenberg.js", "p2p", - "foundation" + "world-state", + "barretenberg.js" ] }, "tx": { @@ -311,7 +309,6 @@ ], "dependencies": [ "l2-block", - "circuits.js", "foundation" ] }, diff --git a/scripts/derive-package-deps.py b/scripts/derive-package-deps.py index c9a8d343641..3e513ba374b 100755 --- a/scripts/derive-package-deps.py +++ b/scripts/derive-package-deps.py @@ -16,6 +16,8 @@ def update_dependencies(package_json_file: str): # Locate the directory of the package.json file to search for TypeScript files tsconfig_dir = os.path.dirname(package_json_file) ts_files = list(Path(tsconfig_dir).rglob("*.ts*")) + # TODO hack + ts_files = filter(lambda f: "example" not in str(f), ts_files) # Regular expression pattern to match import statements from @aztec packages import_regex = r'^import.*from.*@aztec/([a-zA-Z0-9\-\._]+)' diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 780df5b51d0..44fe9b2a840 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 67d8a7c10a1..f6a3cf647d9 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "start": "node ./dest", "start:dev": "tsc-watch --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 0685ff1ba38..dc24c02ae19 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -12,7 +12,7 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", + "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 9123cc50288..dc7cc58e015 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -10,8 +10,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index 3b7f8557adf..434ca97517d 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b", - "build:dev": "tsc -b --watch", + "build": "tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 10 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 2f6fa4d119f..9c597279dae 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b", - "build:dev": "tsc -b --watch", + "build": "tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 10 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 61a4cd34393..54c5903e7ec 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -13,8 +13,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b", - "build:dev": "tsc -b --watch", + "build": "tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 0 ./src", "formatting:fix": "prettier -w ./src", diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index af0dbcddd9c..1ef098d574d 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -13,8 +13,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b", - "build:dev": "tsc -b tsconfig.json --watch", + "build": "tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 278 ./src", "formatting:fix": "prettier -w ./src", diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index faaac50ad74..9d97a9177e8 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -5,7 +5,7 @@ "exports": "./dest/index.js", "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b tsconfig.json", + "build": "tsc -b tsconfig.dest.json tsconfig.json", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "./scripts/start_e2e.sh", diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index b8714d2a7b3..af326357b6a 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -24,7 +24,7 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", + "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "yarn build --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", @@ -49,7 +49,6 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/ethereum.js": "workspace:^", "bip39": "^3.0.4", "browserify-aes": "^1.2.0", "debug": "^4.3.4", diff --git a/yarn-project/ethereum.js/tsconfig.dest.json b/yarn-project/ethereum.js/tsconfig.dest.json index 5dddce007f3..003dc2b6013 100644 --- a/yarn-project/ethereum.js/tsconfig.dest.json +++ b/yarn-project/ethereum.js/tsconfig.dest.json @@ -7,11 +7,7 @@ "tsBuildInfoFile": ".tsbuildinfo", "skipLibCheck": true }, - "references": [ - { - "path": "tsconfig.dest.json" - } - ], + "references": [], "include": [ "src", "src/eth_typed_data/fixtures/*.json" diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index ed7d5fb11c6..126504d009d 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -28,8 +28,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b", - "build:dev": "tsc -b --watch", + "build": "tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 309 ./src", "formatting:fix": "prettier -w ./src", diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 8df04b0e11a..aa87ae5600a 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 69849d25f3c..582a11bd590 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 7f32cb9e489..9badc051b49 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -12,8 +12,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "generate": "contract_gen_def && bash scripts/update-viem-abis.sh && yarn formatting:fix", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", @@ -39,7 +39,6 @@ "tslib": "^2.4.0" }, "devDependencies": { - "@aztec/ethereum.js": "workspace:^", "@jest/globals": "^29.4.3", "@rushstack/eslint-patch": "^1.1.4", "@types/jest": "^29.4.0", diff --git a/yarn-project/l1-contracts/tsconfig.dest.json b/yarn-project/l1-contracts/tsconfig.dest.json index 971712f28bc..0f8b3b56077 100644 --- a/yarn-project/l1-contracts/tsconfig.dest.json +++ b/yarn-project/l1-contracts/tsconfig.dest.json @@ -7,8 +7,10 @@ }, "references": [ { - "path": "../ethereum.js" + "path": "../ethereum.js/tsconfig.dest.json" } ], - "include": ["src"] + "include": [ + "src" + ] } diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index daac041caef..b24fa3fe0cb 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -8,8 +8,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 31 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 5d068e0c957..fec8ef69843 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -5,8 +5,8 @@ "exports": "./dest/index.js", "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 87d5694c217..86727f7e09a 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -12,7 +12,7 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", + "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 54d7117e860..35cc75027fc 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "start": "node ./dest", "start:dev": "tsc-watch --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", @@ -34,8 +34,8 @@ }, "dependencies": { "@aztec/tx": "workspace:^", - "@aztec/l2-block": "workspace:^", "@aztec/foundation": "workspace:^", + "@aztec/l2-block": "workspace:^", "@aztec/circuits.js": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" diff --git a/yarn-project/p2p/tsconfig.dest.json b/yarn-project/p2p/tsconfig.dest.json index e3ab1b589c2..863b1bbba02 100644 --- a/yarn-project/p2p/tsconfig.dest.json +++ b/yarn-project/p2p/tsconfig.dest.json @@ -15,10 +15,10 @@ "path": "../tx/tsconfig.dest.json" }, { - "path": "../l2-block/tsconfig.dest.json" + "path": "../foundation/tsconfig.dest.json" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../l2-block/tsconfig.dest.json" }, { "path": "../circuits.js/tsconfig.dest.json" diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index cbbbec46107..8af97066f46 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index c79362af59f..4b37f731943 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint ./src", "formatting:fix": "prettier -w ./src", @@ -38,12 +38,12 @@ "@aztec/ethereum.js": "workspace:^", "@aztec/l1-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", + "@aztec/foundation": "workspace:^", "@aztec/circuits.js": "workspace:^", - "@aztec/world-state": "workspace:^", "@aztec/tx": "workspace:^", - "@aztec/barretenberg.js": "workspace:^", "@aztec/p2p": "workspace:^", - "@aztec/foundation": "workspace:^", + "@aztec/world-state": "workspace:^", + "@aztec/barretenberg.js": "workspace:^", "lodash.flatmap": "^4.5.0", "lodash.times": "^4.3.2", "tslib": "^2.4.0" diff --git a/yarn-project/sequencer-client/tsconfig.dest.json b/yarn-project/sequencer-client/tsconfig.dest.json index 6ae5bc4054a..ed04377d5f8 100644 --- a/yarn-project/sequencer-client/tsconfig.dest.json +++ b/yarn-project/sequencer-client/tsconfig.dest.json @@ -23,22 +23,22 @@ "path": "../l2-block/tsconfig.dest.json" }, { - "path": "../circuits.js/tsconfig.dest.json" + "path": "../foundation/tsconfig.dest.json" }, { - "path": "../world-state/tsconfig.dest.json" + "path": "../circuits.js/tsconfig.dest.json" }, { "path": "../tx/tsconfig.dest.json" }, { - "path": "../barretenberg.js/tsconfig.dest.json" + "path": "../p2p/tsconfig.dest.json" }, { - "path": "../p2p/tsconfig.dest.json" + "path": "../world-state/tsconfig.dest.json" }, { - "path": "../foundation/tsconfig.dest.json" + "path": "../barretenberg.js/tsconfig.dest.json" } ] } diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 5bf1181686f..e2bac74f696 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -9,8 +9,8 @@ }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "yarn clean && tsc -b", - "build:dev": "tsc -b --watch", + "build": "yarn clean && tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "start": "node ./dest", "start:dev": "tsc-watch --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", @@ -34,7 +34,6 @@ }, "dependencies": { "@aztec/l2-block": "workspace:^", - "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" diff --git a/yarn-project/tx/tsconfig.dest.json b/yarn-project/tx/tsconfig.dest.json index 38c92c9e656..90001d26ea3 100644 --- a/yarn-project/tx/tsconfig.dest.json +++ b/yarn-project/tx/tsconfig.dest.json @@ -14,9 +14,6 @@ { "path": "../l2-block/tsconfig.dest.json" }, - { - "path": "../circuits.js/tsconfig.dest.json" - }, { "path": "../foundation/tsconfig.dest.json" } diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 9a26357cc38..40dfffffd53 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -5,8 +5,8 @@ "exports": "./dest/index.js", "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b", - "build:dev": "tsc -b --watch", + "build": "tsc -b tsconfig.dest.json", + "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", From f9edc48a23d8e6fd7b76b5631587c0bca9b4cf8b Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:50:32 +0100 Subject: [PATCH 14/33] chore: revert circuits --- circuits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits b/circuits index aaaa41e001f..aa05e75e912 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 +Subproject commit aa05e75e912c7f3dc5aa243d455bdfb7f855438a From 55c3d882f15a1bfe9408e84206b8d3f3c5ffba7e Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:52:13 +0100 Subject: [PATCH 15/33] Fix acir --- yarn-project/acir-simulator/package.json | 3 +-- .../acir-simulator/tsconfig.dest.json | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 yarn-project/acir-simulator/tsconfig.dest.json diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 44fe9b2a840..0b0ea946ae2 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -37,7 +37,6 @@ "tslib": "^2.4.0" }, "devDependencies": { - "@aztec/noir-contracts": "workspace:^", "@jest/globals": "^29.4.3", "@noir-lang/noir-source-resolver": "^1.1.0", "@noir-lang/noir_wasm": "0.3.2-29b1f7df", @@ -50,4 +49,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/acir-simulator/tsconfig.dest.json b/yarn-project/acir-simulator/tsconfig.dest.json new file mode 100644 index 00000000000..8a6e67affd8 --- /dev/null +++ b/yarn-project/acir-simulator/tsconfig.dest.json @@ -0,0 +1,23 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "dest", + "rootDir": "src", + "tsBuildInfoFile": ".tsbuildinfo" + }, + "references": [ + { + "path": "../ethereum.js/tsconfig.dest.json" + }, + { + "path": "../l1-contracts/tsconfig.dest.json" + }, + { + "path": "../l2-block/tsconfig.dest.json" + }, + { + "path": "../foundation/tsconfig.dest.json" + } + ], + "include": ["src", "test"] +} From 177ad30569c2447ad38e3aaafd753dfef590ebb5 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 12:53:39 +0100 Subject: [PATCH 16/33] add missing tsconfig.dest.json files --- yarn-project/acir-simulator/package.json | 2 +- .../acir-simulator/tsconfig.dest.json | 15 +++---- yarn-project/aztec-rpc/tsconfig.dest.json | 41 +++++++++++++++++ yarn-project/aztec.js/tsconfig.dest.json | 44 +++++++++++++++++++ yarn-project/kernel-prover/tsconfig.dest.json | 6 ++- 5 files changed, 97 insertions(+), 11 deletions(-) create mode 100644 yarn-project/aztec-rpc/tsconfig.dest.json create mode 100644 yarn-project/aztec.js/tsconfig.dest.json diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 0b0ea946ae2..78ae617f222 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -49,4 +49,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} +} \ No newline at end of file diff --git a/yarn-project/acir-simulator/tsconfig.dest.json b/yarn-project/acir-simulator/tsconfig.dest.json index 8a6e67affd8..42da4179631 100644 --- a/yarn-project/acir-simulator/tsconfig.dest.json +++ b/yarn-project/acir-simulator/tsconfig.dest.json @@ -7,17 +7,14 @@ }, "references": [ { - "path": "../ethereum.js/tsconfig.dest.json" + "path": "../circuits.js/tsconfig.dest.json" }, { - "path": "../l1-contracts/tsconfig.dest.json" - }, - { - "path": "../l2-block/tsconfig.dest.json" - }, - { - "path": "../foundation/tsconfig.dest.json" + "path": "../noir-contracts/tsconfig.dest.json" } ], - "include": ["src", "test"] + "include": [ + "src", + "test" + ] } diff --git a/yarn-project/aztec-rpc/tsconfig.dest.json b/yarn-project/aztec-rpc/tsconfig.dest.json new file mode 100644 index 00000000000..06df435c78b --- /dev/null +++ b/yarn-project/aztec-rpc/tsconfig.dest.json @@ -0,0 +1,41 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "dest", + "rootDir": "src", + "tsBuildInfoFile": ".tsbuildinfo" + }, + "references": [ + { + "path": "../ethereum.js/tsconfig.dest.json" + }, + { + "path": "../foundation/tsconfig.dest.json" + }, + { + "path": "../l1-contracts/tsconfig.dest.json" + }, + { + "path": "../tx/tsconfig.dest.json" + }, + { + "path": "../archiver/tsconfig.dest.json" + }, + { + "path": "../l2-block/tsconfig.dest.json" + }, + { + "path": "../p2p/tsconfig.dest.json" + }, + { + "path": "../world-state/tsconfig.dest.json" + }, + { + "path": "../sequencer-client/tsconfig.dest.json" + }, + { + "path": "../merkle-tree/tsconfig.dest.json" + } + ], + "include": ["src", "test"] +} diff --git a/yarn-project/aztec.js/tsconfig.dest.json b/yarn-project/aztec.js/tsconfig.dest.json new file mode 100644 index 00000000000..68d76a0002e --- /dev/null +++ b/yarn-project/aztec.js/tsconfig.dest.json @@ -0,0 +1,44 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "outDir": "dest", + "rootDir": "src", + "tsBuildInfoFile": ".tsbuildinfo" + }, + "references": [ + { + "path": "../ethereum.js/tsconfig.dest.json" + }, + { + "path": "../foundation/tsconfig.dest.json" + }, + { + "path": "../l1-contracts/tsconfig.dest.json" + }, + { + "path": "../tx/tsconfig.dest.json" + }, + { + "path": "../archiver/tsconfig.dest.json" + }, + { + "path": "../l2-block/tsconfig.dest.json" + }, + { + "path": "../p2p/tsconfig.dest.json" + }, + { + "path": "../world-state/tsconfig.dest.json" + }, + { + "path": "../sequencer-client/tsconfig.dest.json" + }, + { + "path": "../merkle-tree/tsconfig.dest.json" + } + ], + "include": [ + "src", + "test" + ] +} diff --git a/yarn-project/kernel-prover/tsconfig.dest.json b/yarn-project/kernel-prover/tsconfig.dest.json index bf87b8ab0af..de817d844b2 100644 --- a/yarn-project/kernel-prover/tsconfig.dest.json +++ b/yarn-project/kernel-prover/tsconfig.dest.json @@ -5,7 +5,11 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "references": [], + "references": [ + { + "path": "../acir-simulator/tsconfig.dest.json" + } + ], "include": [ "src" ] From 176fcaed0d0cbc7b5dc8e9c5213301877a6b217c Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:05:33 +0100 Subject: [PATCH 17/33] Update --- circuits | 2 +- yarn-project/acir-simulator/package.json | 2 +- yarn-project/archiver/package.json | 4 +-- yarn-project/aztec-cli/package.json | 2 +- yarn-project/aztec-node/package.json | 10 ++++---- yarn-project/aztec-rpc/package.json | 12 ++++----- yarn-project/aztec-rpc/tsconfig.dest.json | 21 +++++++-------- yarn-project/aztec.js/package.json | 4 +-- yarn-project/aztec.js/tsconfig.dest.json | 26 +++---------------- yarn-project/barretenberg.js/package.json | 2 +- yarn-project/circuits.js/package.json | 2 +- yarn-project/docs/package.json | 3 +-- yarn-project/end-to-end/package.json | 6 ++--- yarn-project/end-to-end/tsconfig.dest.json | 3 +++ yarn-project/ethereum.js/package.json | 2 +- yarn-project/foundation/package.json | 2 +- yarn-project/kernel-prover/package.json | 2 +- yarn-project/key-store/package.json | 2 +- yarn-project/l1-contracts/package.json | 2 +- yarn-project/l2-block/package.json | 2 +- yarn-project/merkle-tree/package.json | 2 +- yarn-project/noir-contracts/package.json | 2 +- yarn-project/p2p/package.json | 6 ++--- yarn-project/prover-client/package.json | 2 +- yarn-project/sequencer-client/package.json | 10 ++++---- yarn-project/tsconfig.json | 30 ++++++++++++++++------ yarn-project/tx/package.json | 4 +-- yarn-project/world-state/package.json | 8 +++--- yarn-project/yarn.lock | 20 +++++++-------- 29 files changed, 95 insertions(+), 100 deletions(-) diff --git a/circuits b/circuits index aa05e75e912..aaaa41e001f 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aa05e75e912c7f3dc5aa243d455bdfb7f855438a +Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 78ae617f222..0b0ea946ae2 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -49,4 +49,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index f6a3cf647d9..e86847e1271 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -30,9 +30,9 @@ }, "dependencies": { "@aztec/ethereum.js": "workspace:^", + "@aztec/foundation": "workspace:^", "@aztec/l1-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", - "@aztec/foundation": "workspace:^", "debug": "^4.3.4", "tsc-watch": "^6.0.0", "tslib": "^2.5.0", @@ -53,4 +53,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index dc24c02ae19..37a8a956041 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -46,4 +46,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index dc7cc58e015..c51fd24e195 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -34,16 +34,16 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/archiver": "workspace:^", "@aztec/ethereum.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l1-contracts": "workspace:^", - "@aztec/tx": "workspace:^", - "@aztec/archiver": "workspace:^", "@aztec/l2-block": "workspace:^", + "@aztec/merkle-tree": "workspace:^", "@aztec/p2p": "workspace:^", - "@aztec/world-state": "workspace:^", "@aztec/sequencer-client": "workspace:^", - "@aztec/merkle-tree": "workspace:^", + "@aztec/tx": "workspace:^", + "@aztec/world-state": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -57,4 +57,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index 434ca97517d..a9a93d36f64 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -30,15 +30,15 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/acir-simulator": "workspace:^", + "@aztec/aztec-node": "workspace:^", + "@aztec/barretenberg.js": "workspace:^", "@aztec/circuits.js": "workspace:^", - "@aztec/tx": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/aztec-node": "workspace:^", - "@aztec/acir-simulator": "workspace:^", "@aztec/kernel-prover": "workspace:^", - "@aztec/barretenberg.js": "workspace:^", - "@aztec/noir-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", + "@aztec/noir-contracts": "workspace:^", + "@aztec/tx": "workspace:^", "browserify-cipher": "^1.0.1", "sha3": "^2.1.4", "tslib": "^2.4.0" @@ -53,4 +53,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/aztec-rpc/tsconfig.dest.json b/yarn-project/aztec-rpc/tsconfig.dest.json index 06df435c78b..f3efc9db83b 100644 --- a/yarn-project/aztec-rpc/tsconfig.dest.json +++ b/yarn-project/aztec-rpc/tsconfig.dest.json @@ -7,34 +7,31 @@ }, "references": [ { - "path": "../ethereum.js/tsconfig.dest.json" + "path": "../circuits.js/tsconfig.dest.json" }, { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../l1-contracts/tsconfig.dest.json" + "path": "../tx/tsconfig.dest.json" }, { - "path": "../tx/tsconfig.dest.json" + "path": "../foundation/tsconfig.dest.json" }, { - "path": "../archiver/tsconfig.dest.json" + "path": "../aztec-node/tsconfig.dest.json" }, { - "path": "../l2-block/tsconfig.dest.json" + "path": "../acir-simulator/tsconfig.dest.json" }, { - "path": "../p2p/tsconfig.dest.json" + "path": "../kernel-prover/tsconfig.dest.json" }, { - "path": "../world-state/tsconfig.dest.json" + "path": "../barretenberg.js/tsconfig.dest.json" }, { - "path": "../sequencer-client/tsconfig.dest.json" + "path": "../noir-contracts/tsconfig.dest.json" }, { - "path": "../merkle-tree/tsconfig.dest.json" + "path": "../l2-block/tsconfig.dest.json" } ], "include": ["src", "test"] diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 9c597279dae..fd70c9f369f 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -32,8 +32,8 @@ "dependencies": { "@aztec/aztec-rpc": "workspace:^", "@aztec/circuits.js": "workspace:^", - "@aztec/noir-contracts": "workspace:^", "@aztec/foundation": "workspace:^", + "@aztec/noir-contracts": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { @@ -47,4 +47,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/aztec.js/tsconfig.dest.json b/yarn-project/aztec.js/tsconfig.dest.json index 68d76a0002e..64d603ea38c 100644 --- a/yarn-project/aztec.js/tsconfig.dest.json +++ b/yarn-project/aztec.js/tsconfig.dest.json @@ -7,34 +7,16 @@ }, "references": [ { - "path": "../ethereum.js/tsconfig.dest.json" + "path": "../aztec-rpc/tsconfig.dest.json" }, { - "path": "../foundation/tsconfig.dest.json" - }, - { - "path": "../l1-contracts/tsconfig.dest.json" - }, - { - "path": "../tx/tsconfig.dest.json" - }, - { - "path": "../archiver/tsconfig.dest.json" + "path": "../circuits.js/tsconfig.dest.json" }, { - "path": "../l2-block/tsconfig.dest.json" + "path": "../noir-contracts/tsconfig.dest.json" }, { - "path": "../p2p/tsconfig.dest.json" - }, - { - "path": "../world-state/tsconfig.dest.json" - }, - { - "path": "../sequencer-client/tsconfig.dest.json" - }, - { - "path": "../merkle-tree/tsconfig.dest.json" + "path": "../foundation/tsconfig.dest.json" } ], "include": [ diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 54c5903e7ec..684b991a366 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -56,4 +56,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 1ef098d574d..bf3e6cba1c3 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -58,4 +58,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/docs/package.json b/yarn-project/docs/package.json index ac968bf8540..e606738393c 100644 --- a/yarn-project/docs/package.json +++ b/yarn-project/docs/package.json @@ -8,6 +8,5 @@ }, "devDependencies": { "vite": "^4.1.4" - }, - "dependencies": {} + } } diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 9d97a9177e8..dc7aa363194 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -28,11 +28,11 @@ }, "dependencies": { "@aztec/aztec-node": "workspace:^", - "@aztec/ethereum.js": "workspace:^", "@aztec/aztec.js": "workspace:^", + "@aztec/ethereum.js": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/noir-contracts": "workspace:^", "@aztec/l1-contracts": "workspace:^", + "@aztec/noir-contracts": "workspace:^", "@types/jest": "^29.4.0", "jest": "^28.1.3", "ts-jest": "^28.0.7", @@ -46,4 +46,4 @@ "concurrently": "^7.6.0", "ts-node": "^10.9.1" } -} \ No newline at end of file +} diff --git a/yarn-project/end-to-end/tsconfig.dest.json b/yarn-project/end-to-end/tsconfig.dest.json index fa2e5fea780..40b4339cc66 100644 --- a/yarn-project/end-to-end/tsconfig.dest.json +++ b/yarn-project/end-to-end/tsconfig.dest.json @@ -12,6 +12,9 @@ { "path": "../ethereum.js/tsconfig.dest.json" }, + { + "path": "../aztec.js/tsconfig.dest.json" + }, { "path": "../foundation/tsconfig.dest.json" }, diff --git a/yarn-project/ethereum.js/package.json b/yarn-project/ethereum.js/package.json index af326357b6a..8322c18f9c8 100644 --- a/yarn-project/ethereum.js/package.json +++ b/yarn-project/ethereum.js/package.json @@ -74,4 +74,4 @@ "ts-jest": "28.0.7", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 126504d009d..8cc4c86baa7 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -93,4 +93,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index aa87ae5600a..0021ebfc1bc 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -43,4 +43,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 582a11bd590..2f347f2f554 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -42,4 +42,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 9badc051b49..3cee6b3d468 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -48,4 +48,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index b24fa3fe0cb..dad4e182bb8 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -45,4 +45,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index fec8ef69843..300abe361b0 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -47,4 +47,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 86727f7e09a..85a5cd08ecd 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -48,4 +48,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 35cc75027fc..ffc0e0e6130 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -33,10 +33,10 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/tx": "workspace:^", + "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l2-block": "workspace:^", - "@aztec/circuits.js": "workspace:^", + "@aztec/tx": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" }, @@ -50,4 +50,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 8af97066f46..8bff49121fa 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -42,4 +42,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 4b37f731943..a0c4d665ea7 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -35,15 +35,15 @@ }, "dependencies": { "@aztec/archiver": "workspace:^", + "@aztec/barretenberg.js": "workspace:^", + "@aztec/circuits.js": "workspace:^", "@aztec/ethereum.js": "workspace:^", + "@aztec/foundation": "workspace:^", "@aztec/l1-contracts": "workspace:^", "@aztec/l2-block": "workspace:^", - "@aztec/foundation": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/tx": "workspace:^", "@aztec/p2p": "workspace:^", + "@aztec/tx": "workspace:^", "@aztec/world-state": "workspace:^", - "@aztec/barretenberg.js": "workspace:^", "lodash.flatmap": "^4.5.0", "lodash.times": "^4.3.2", "tslib": "^2.4.0" @@ -64,4 +64,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/tsconfig.json b/yarn-project/tsconfig.json index 61051fb7301..efd95b76e6f 100644 --- a/yarn-project/tsconfig.json +++ b/yarn-project/tsconfig.json @@ -3,14 +3,28 @@ "include": ["**/*.ts", "**/*.tsx"], "exclude": [], "references": [ - { "path": "archiver" }, - { "path": "barretenberg.js" }, - { "path": "l1-contracts" }, - { "path": "l2-block" }, - { "path": "merkle-tree" }, - { "path": "p2p" }, - { "path": "tx" }, - { "path": "world-state" } + { "path": "acir-simulator/tsconfig.dest.json" }, + { "path": "kernel-prover/tsconfig.dest.json" }, + { "path": "archiver/tsconfig.dest.json" }, + { "path": "key-store/tsconfig.dest.json" }, + { "path": "aztec-cli/tsconfig.dest.json" }, + { "path": "l1-contracts/tsconfig.dest.json" }, + { "path": "aztec-node/tsconfig.dest.json" }, + { "path": "l2-block/tsconfig.dest.json" }, + { "path": "aztec-rpc/tsconfig.dest.json" }, + { "path": "merkle-tree/tsconfig.dest.json" }, + { "path": "aztec.js/tsconfig.dest.json" }, + { "path": "noir-contracts/tsconfig.dest.json" }, + { "path": "barretenberg.js/tsconfig.dest.json" }, + { "path": "p2p/tsconfig.dest.json" }, + { "path": "circuits.js/tsconfig.dest.json" }, + { "path": "prover-client/tsconfig.dest.json" }, + { "path": "end-to-end/tsconfig.dest.json" }, + { "path": "sequencer-client/tsconfig.dest.json" }, + { "path": "ethereum.js/tsconfig.dest.json" }, + { "path": "tx/tsconfig.dest.json" }, + { "path": "foundation/tsconfig.dest.json" }, + { "path": "world-state/tsconfig.dest.json" } ], "files": [] } diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index e2bac74f696..48200168bc6 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -33,8 +33,8 @@ "rootDir": "./src" }, "dependencies": { - "@aztec/l2-block": "workspace:^", "@aztec/foundation": "workspace:^", + "@aztec/l2-block": "workspace:^", "sha3": "^2.1.4", "tslib": "^2.4.0" }, @@ -48,4 +48,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 40dfffffd53..6d4bd0bef4d 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -27,11 +27,11 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/barretenberg.js": "workspace:^", + "@aztec/circuits.js": "workspace:^", + "@aztec/foundation": "workspace:^", "@aztec/l2-block": "workspace:^", "@aztec/merkle-tree": "workspace:^", - "@aztec/foundation": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/barretenberg.js": "workspace:^", "levelup": "^5.1.1", "memdown": "^6.1.1", "tslib": "^2.4.0" @@ -48,4 +48,4 @@ "ts-node": "^10.9.1", "typescript": "^4.9.5" } -} \ No newline at end of file +} diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index a052fb66814..dd279ab4355 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -42,7 +42,6 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/archiver@workspace:archiver" dependencies: - "@aztec/circuits.js": "workspace:^" "@aztec/ethereum.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/l1-contracts": "workspace:^" @@ -95,6 +94,7 @@ __metadata: "@aztec/foundation": "workspace:^" "@aztec/l1-contracts": "workspace:^" "@aztec/l2-block": "workspace:^" + "@aztec/merkle-tree": "workspace:^" "@aztec/p2p": "workspace:^" "@aztec/sequencer-client": "workspace:^" "@aztec/tx": "workspace:^" @@ -118,8 +118,11 @@ __metadata: dependencies: "@aztec/acir-simulator": "workspace:^" "@aztec/aztec-node": "workspace:^" + "@aztec/barretenberg.js": "workspace:^" + "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/kernel-prover": "workspace:^" + "@aztec/l2-block": "workspace:^" "@aztec/noir-contracts": "workspace:^" "@aztec/tx": "workspace:^" "@jest/globals": ^29.4.3 @@ -141,10 +144,9 @@ __metadata: resolution: "@aztec/aztec.js@workspace:aztec.js" dependencies: "@aztec/aztec-rpc": "workspace:^" + "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/noir-contracts": "workspace:^" - "@aztec/sequencer-client": "workspace:^" - "@aztec/tx": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -235,6 +237,8 @@ __metadata: "@aztec/aztec-node": "workspace:^" "@aztec/aztec.js": "workspace:^" "@aztec/ethereum.js": "workspace:^" + "@aztec/foundation": "workspace:^" + "@aztec/l1-contracts": "workspace:^" "@aztec/noir-contracts": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 @@ -266,7 +270,6 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/ethereum.js@workspace:ethereum.js" dependencies: - "@aztec/foundation": "workspace:^" "@jest/globals": ^29.5.0 "@rushstack/eslint-patch": ^1.2.0 "@types/elliptic": ^6.4.14 @@ -346,8 +349,6 @@ __metadata: resolution: "@aztec/kernel-prover@workspace:kernel-prover" dependencies: "@aztec/acir-simulator": "workspace:^" - "@aztec/circuits.js": "workspace:^" - "@aztec/foundation": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -364,7 +365,6 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/key-store@workspace:key-store" dependencies: - "@aztec/foundation": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -400,6 +400,7 @@ __metadata: dependencies: "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" + "@aztec/l1-contracts": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 @@ -441,7 +442,6 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/noir-contracts@workspace:noir-contracts" dependencies: - "@aztec/foundation": "workspace:^" "@jest/globals": ^29.4.3 "@noir-lang/noir-source-resolver": ^1.1.0 "@noir-lang/noir_wasm": 0.3.2-29b1f7df @@ -461,6 +461,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/p2p@workspace:p2p" dependencies: + "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/l2-block": "workspace:^" "@aztec/tx": "workspace:^" @@ -508,7 +509,6 @@ __metadata: "@aztec/tx": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.4.3 - "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 "@rushstack/eslint-patch": ^1.1.4 "@types/jest": ^29.4.0 "@types/lodash.flatmap": ^4.5.7 @@ -532,7 +532,7 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/tx@workspace:tx" dependencies: - "@aztec/circuits.js": "workspace:^" + "@aztec/foundation": "workspace:^" "@aztec/l2-block": "workspace:^" "@jest/globals": ^29.4.3 "@rushstack/eslint-patch": ^1.1.4 From a93d92a627440bc027b5c3e16b27e2102049c313 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:10:31 +0100 Subject: [PATCH 18/33] Fixes --- .../src/wasm/barretenberg_wasm.ts | 1 - .../barretenberg.js/tsconfig.dest.json | 4 +--- yarn-project/merkle-tree/tsconfig.dest.json | 4 +--- yarn-project/tsconfig.json | 20 +++++++++---------- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts b/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts index 4a2f7cf72bc..1f194dcf8f5 100644 --- a/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts +++ b/yarn-project/barretenberg.js/src/wasm/barretenberg_wasm.ts @@ -15,7 +15,6 @@ import { existsSync } from 'fs'; */ export async function fetchCode() { if (isNode) { - throw new Error(); const __dirname = dirname(fileURLToPath(import.meta.url)); let path = __dirname + '/barretenberg.wasm'; if (!existsSync(path)) { diff --git a/yarn-project/barretenberg.js/tsconfig.dest.json b/yarn-project/barretenberg.js/tsconfig.dest.json index 6d48e0917e9..6518eee8fdc 100644 --- a/yarn-project/barretenberg.js/tsconfig.dest.json +++ b/yarn-project/barretenberg.js/tsconfig.dest.json @@ -10,7 +10,5 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/merkle-tree/tsconfig.dest.json b/yarn-project/merkle-tree/tsconfig.dest.json index 809332f4dcc..4a43d82b22c 100644 --- a/yarn-project/merkle-tree/tsconfig.dest.json +++ b/yarn-project/merkle-tree/tsconfig.dest.json @@ -13,7 +13,5 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/tsconfig.json b/yarn-project/tsconfig.json index efd95b76e6f..be0506028ad 100644 --- a/yarn-project/tsconfig.json +++ b/yarn-project/tsconfig.json @@ -4,26 +4,26 @@ "exclude": [], "references": [ { "path": "acir-simulator/tsconfig.dest.json" }, - { "path": "kernel-prover/tsconfig.dest.json" }, { "path": "archiver/tsconfig.dest.json" }, - { "path": "key-store/tsconfig.dest.json" }, { "path": "aztec-cli/tsconfig.dest.json" }, - { "path": "l1-contracts/tsconfig.dest.json" }, + { "path": "aztec.js/tsconfig.dest.json" }, { "path": "aztec-node/tsconfig.dest.json" }, - { "path": "l2-block/tsconfig.dest.json" }, { "path": "aztec-rpc/tsconfig.dest.json" }, + { "path": "barretenberg.js/tsconfig.dest.json" }, + { "path": "circuits.js/tsconfig.dest.json" }, + { "path": "end-to-end/tsconfig.dest.json" }, + { "path": "ethereum.js/tsconfig.dest.json" }, + { "path": "foundation/tsconfig.dest.json" }, + { "path": "kernel-prover/tsconfig.dest.json" }, + { "path": "key-store/tsconfig.dest.json" }, + { "path": "l1-contracts/tsconfig.dest.json" }, + { "path": "l2-block/tsconfig.dest.json" }, { "path": "merkle-tree/tsconfig.dest.json" }, - { "path": "aztec.js/tsconfig.dest.json" }, { "path": "noir-contracts/tsconfig.dest.json" }, - { "path": "barretenberg.js/tsconfig.dest.json" }, { "path": "p2p/tsconfig.dest.json" }, - { "path": "circuits.js/tsconfig.dest.json" }, { "path": "prover-client/tsconfig.dest.json" }, - { "path": "end-to-end/tsconfig.dest.json" }, { "path": "sequencer-client/tsconfig.dest.json" }, - { "path": "ethereum.js/tsconfig.dest.json" }, { "path": "tx/tsconfig.dest.json" }, - { "path": "foundation/tsconfig.dest.json" }, { "path": "world-state/tsconfig.dest.json" } ], "files": [] From 2bdf99077cc37a88c2714fb9b4820a7a486c0f92 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:23:02 +0100 Subject: [PATCH 19/33] Fixes --- circuits | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circuits b/circuits index aaaa41e001f..aa05e75e912 160000 --- a/circuits +++ b/circuits @@ -1 +1 @@ -Subproject commit aaaa41e001fba8e96143f0c96c7e108962436328 +Subproject commit aa05e75e912c7f3dc5aa243d455bdfb7f855438a From fb550ccfde8b8a3cf9f208a14b7ddb67c140c71a Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:31:53 +0100 Subject: [PATCH 20/33] Fix merge --- .../src/aztec_rpc_server/create_aztec_rpc_server.ts | 3 ++- yarn-project/circuits.js/src/abis/index.ts | 1 + yarn-project/circuits.js/src/tests/factories.ts | 8 ++++---- yarn-project/circuits.js/src/utils/serialize.ts | 2 +- yarn-project/circuits.js/src/wasm/circuits_wasm.ts | 3 +-- yarn-project/foundation/src/fields/fields.ts | 6 +++--- yarn-project/yarn-project-base/Dockerfile | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 yarn-project/circuits.js/src/abis/index.ts diff --git a/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts b/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts index 4dda4c685f9..94fb553799e 100644 --- a/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts +++ b/yarn-project/aztec-rpc/src/aztec_rpc_server/create_aztec_rpc_server.ts @@ -1,5 +1,6 @@ import { AcirSimulator } from '@aztec/acir-simulator'; import { AztecNode } from '@aztec/aztec-node'; +import { CircuitsWasm } from '@aztec/circuits.js/wasm'; import { BarretenbergWasm } from '@aztec/barretenberg.js/wasm'; import { KernelProver } from '@aztec/kernel-prover'; import { MemoryDB } from '../database/index.js'; @@ -30,5 +31,5 @@ export async function createAztecRPCServer( acirSimulator = acirSimulator || new AcirSimulator(new SimulatorOracle(db, keyStore)); kernelProver = kernelProver || new KernelProver(); - return await Promise.resolve(new AztecRPCServer(keyStore, acirSimulator, kernelProver, aztecNode, db)); + return new AztecRPCServer(keyStore, acirSimulator, kernelProver, aztecNode, db, await CircuitsWasm.new()); } diff --git a/yarn-project/circuits.js/src/abis/index.ts b/yarn-project/circuits.js/src/abis/index.ts new file mode 100644 index 00000000000..9c432c09e53 --- /dev/null +++ b/yarn-project/circuits.js/src/abis/index.ts @@ -0,0 +1 @@ +export * from './abis.js'; diff --git a/yarn-project/circuits.js/src/tests/factories.ts b/yarn-project/circuits.js/src/tests/factories.ts index 7693828e91d..da5e04e710b 100644 --- a/yarn-project/circuits.js/src/tests/factories.ts +++ b/yarn-project/circuits.js/src/tests/factories.ts @@ -36,7 +36,7 @@ import { PUBLIC_CALL_STACK_LENGTH, RETURN_VALUES_LENGTH, ROLLUP_VK_TREE_HEIGHT, - VK_TREE_HEIGHT + VK_TREE_HEIGHT, } from '../structs/constants.js'; import { FunctionData } from '../structs/function_data.js'; import { @@ -48,7 +48,7 @@ import { PreviousKernelData, PrivateCallData, PrivateKernelInputs, - PrivateKernelPublicInputs + PrivateKernelPublicInputs, } from '../structs/kernel.js'; import { PrivateCallStackItem } from '../structs/private_call_stack_item.js'; import { @@ -57,7 +57,7 @@ import { ComposerType, EcdsaSignature, MembershipWitness, - UInt8Vector + UInt8Vector, } from '../structs/shared.js'; import { ContractDeploymentData, SignedTxRequest, TxContext, TxRequest } from '../structs/tx.js'; import { CommitmentMap, G1AffineElement, VerificationKey } from '../structs/verification_key.js'; @@ -280,7 +280,7 @@ export function makePreviousBaseRollupData(seed = 0) { makeVerificationKey(), seed + 0x110, makeMembershipWitness(ROLLUP_VK_TREE_HEIGHT, seed + 0x120), - ) + ); } export function makeRootRollupInputs(seed = 0) { diff --git a/yarn-project/circuits.js/src/utils/serialize.ts b/yarn-project/circuits.js/src/utils/serialize.ts index 834f8c64395..527a45cfbaa 100644 --- a/yarn-project/circuits.js/src/utils/serialize.ts +++ b/yarn-project/circuits.js/src/utils/serialize.ts @@ -119,7 +119,7 @@ export type Bufferable = } | Bufferable[]; -function isSerializableToBuffer32(obj: Object): obj is { toBuffer32: () => Buffer } { +function isSerializableToBuffer32(obj: object): obj is { toBuffer32: () => Buffer } { return !!(obj as { toBuffer32: () => Buffer }).toBuffer32; } diff --git a/yarn-project/circuits.js/src/wasm/circuits_wasm.ts b/yarn-project/circuits.js/src/wasm/circuits_wasm.ts index d23d307e6e6..907ece18def 100644 --- a/yarn-project/circuits.js/src/wasm/circuits_wasm.ts +++ b/yarn-project/circuits.js/src/wasm/circuits_wasm.ts @@ -15,8 +15,7 @@ import { Crs } from '../crs/index.js'; export async function fetchCode() { if (isNode) { const __dirname = dirname(fileURLToPath(import.meta.url)); - // TODO properly package this - return await readFile(__dirname + '/../../../circuits/cpp/build-wasm/bin/aztec3-circuits.wasm'); + return await readFile(__dirname + '/aztec3-circuits.wasm'); } else { const res = await fetch('/aztec3-circuits.wasm'); return Buffer.from(await res.arrayBuffer()); diff --git a/yarn-project/foundation/src/fields/fields.ts b/yarn-project/foundation/src/fields/fields.ts index b56f906d520..6cf204887ac 100644 --- a/yarn-project/foundation/src/fields/fields.ts +++ b/yarn-project/foundation/src/fields/fields.ts @@ -9,9 +9,9 @@ export class Fr { static SIZE_IN_BYTES = 32; constructor(public readonly value: bigint) { - if (value > Fr.MAX_VALUE) { - throw new Error(`Fr out of range ${value}.`); - } + // if (value > Fr.MAX_VALUE) { + // throw new Error(`Fr out of range ${value}.`); + // } } static random() { diff --git a/yarn-project/yarn-project-base/Dockerfile b/yarn-project/yarn-project-base/Dockerfile index 30bb5e82c6e..93e02c8f597 100644 --- a/yarn-project/yarn-project-base/Dockerfile +++ b/yarn-project/yarn-project-base/Dockerfile @@ -41,7 +41,7 @@ COPY prover-client/package.json prover-client/package.json COPY sequencer-client/package.json sequencer-client/package.json COPY tx/package.json tx/package.json COPY world-state/package.json world-state/package.json -COPY package.json tsconfig.json tsconfig.test.json yarn.lock .yarnrc.yml ./ +COPY package.json tsconfig.json tsconfig.base.json yarn.lock .yarnrc.yml ./ COPY .yarn .yarn # Although we're attempting to be "zero-install", in practice we still need to build arch specific packages. From 4e31b5195accc6e59647e302748bfebd626106ec Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:43:55 +0100 Subject: [PATCH 21/33] Fix merge --- yarn-project/circuits.js/package.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index bf3e6cba1c3..6da10844d73 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -4,17 +4,21 @@ "type": "module", "exports": { ".": "./dest/index.js", + "./abis": "./dest/abis/index.js", "./factories": "./dest/tests/factories.js", - "./utils": "./dest/utils/index.js" + "./utils": "./dest/utils/index.js", + "./wasm": "./dest/wasm/index.js" }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Circuits.js" + "displayName": "Circuits.js", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { - "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b tsconfig.dest.json", + "build": "yarn redo-ts-refs && tsc -b tsconfig.dest.json && yarn build:link", "build:dev": "tsc -b tsconfig.dest.json --watch", + "build:link": "ln -nf src/wasm/aztec3-circuits.wasm dest/wasm/aztec3-circuits.wasm", + "redo-ts-refs": "../../scripts/update-tsconfig-references tsconfig.dest.json", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "prettier --check ./src && eslint --max-warnings 278 ./src", "formatting:fix": "prettier -w ./src", @@ -25,8 +29,7 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true, - "tsconfig": "../tsconfig.json" + "useESM": true } }, "moduleNameMapper": { From 7a9c899230b797beaa620d60ba2bf1d007ba1413 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:45:36 +0100 Subject: [PATCH 22/33] Fix merge --- yarn-project/acir-simulator/package.json | 8 ++++---- yarn-project/archiver/package.json | 3 ++- yarn-project/aztec-cli/package.json | 3 ++- yarn-project/aztec-node/package.json | 3 ++- yarn-project/aztec-rpc/package.json | 3 ++- yarn-project/aztec.js/package.json | 3 ++- yarn-project/barretenberg.js/package.json | 3 ++- yarn-project/circuits.js/package.json | 3 ++- yarn-project/circuits.js/tsconfig.dest.json | 4 +--- yarn-project/docs/README.md | 3 ++- yarn-project/kernel-prover/package.json | 3 ++- yarn-project/key-store/package.json | 3 ++- yarn-project/l1-contracts/package.json | 3 ++- yarn-project/l2-block/package.json | 4 +++- yarn-project/noir-contracts/package.json | 3 ++- yarn-project/p2p/package.json | 3 ++- yarn-project/prover-client/package.json | 3 ++- yarn-project/sequencer-client/package.json | 3 ++- yarn-project/tx/package.json | 3 ++- 19 files changed, 40 insertions(+), 24 deletions(-) diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 0b0ea946ae2..e101b7f40fd 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -5,10 +5,10 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Acir Simulator" + "displayName": "Acir Simulator", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { - "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc -b tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", @@ -19,8 +19,7 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true, - "tsconfig": "../tsconfig.json" + "useESM": true } }, "moduleNameMapper": { @@ -37,6 +36,7 @@ "tslib": "^2.4.0" }, "devDependencies": { + "@aztec/noir-contracts": "workspace:^", "@jest/globals": "^29.4.3", "@noir-lang/noir-source-resolver": "^1.1.0", "@noir-lang/noir_wasm": "0.3.2-29b1f7df", diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index e86847e1271..a437e86a6c4 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Archiver" + "displayName": "Archiver", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 37a8a956041..8ec334d3161 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec cli" + "displayName": "Aztec cli", + "tsconfig": "./tsconfig.dest.json" }, "bin": { "aztec_cli": "index.js" diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index c51fd24e195..d3c39207f1f 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -6,7 +6,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec Node" + "displayName": "Aztec Node", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index a9a93d36f64..4b86ac9f908 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Wallet" + "displayName": "Wallet", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index fd70c9f369f..3b85c7d4457 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec.js" + "displayName": "Aztec.js", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/barretenberg.js/package.json b/yarn-project/barretenberg.js/package.json index 684b991a366..e9027d0f69f 100644 --- a/yarn-project/barretenberg.js/package.json +++ b/yarn-project/barretenberg.js/package.json @@ -9,7 +9,8 @@ }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Barretenberg.js" + "displayName": "Barretenberg.js", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/circuits.js/package.json b/yarn-project/circuits.js/package.json index 6da10844d73..8d653d2b4c2 100644 --- a/yarn-project/circuits.js/package.json +++ b/yarn-project/circuits.js/package.json @@ -29,7 +29,8 @@ "preset": "ts-jest/presets/default-esm", "globals": { "ts-jest": { - "useESM": true + "useESM": true, + "tsconfig": "../tsconfig.json" } }, "moduleNameMapper": { diff --git a/yarn-project/circuits.js/tsconfig.dest.json b/yarn-project/circuits.js/tsconfig.dest.json index 6d48e0917e9..6518eee8fdc 100644 --- a/yarn-project/circuits.js/tsconfig.dest.json +++ b/yarn-project/circuits.js/tsconfig.dest.json @@ -10,7 +10,5 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/docs/README.md b/yarn-project/docs/README.md index cb1ac25a743..9561bbfdde6 100644 --- a/yarn-project/docs/README.md +++ b/yarn-project/docs/README.md @@ -15,6 +15,7 @@ To include a new package in the set that we generate documentation for add it to ```json "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Aztec cli" + "displayName": "Aztec cli", + "tsconfig": "./tsconfig.dest.json" }, ``` diff --git a/yarn-project/kernel-prover/package.json b/yarn-project/kernel-prover/package.json index 0021ebfc1bc..6ac129042d3 100644 --- a/yarn-project/kernel-prover/package.json +++ b/yarn-project/kernel-prover/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Kernel Simulator" + "displayName": "Kernel Simulator", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index 2f347f2f554..4308fa0727c 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "KeyStore" + "displayName": "KeyStore", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/l1-contracts/package.json b/yarn-project/l1-contracts/package.json index 3cee6b3d468..8e0fdd3e9e3 100644 --- a/yarn-project/l1-contracts/package.json +++ b/yarn-project/l1-contracts/package.json @@ -8,7 +8,8 @@ }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "L1 Contracts" + "displayName": "L1 Contracts", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/l2-block/package.json b/yarn-project/l2-block/package.json index dad4e182bb8..32484eac0ea 100644 --- a/yarn-project/l2-block/package.json +++ b/yarn-project/l2-block/package.json @@ -4,7 +4,9 @@ "type": "module", "exports": "./dest/index.js", "typedoc": { - "entryPoint": "./src/index.ts" + "entryPoint": "./src/index.ts", + "displayName": "L2 Block", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 85a5cd08ecd..13d7b59062b 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -8,7 +8,8 @@ }, "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Noir contracts" + "displayName": "Noir contracts", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index ffc0e0e6130..6a6621549f7 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "P2P" + "displayName": "P2P", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/prover-client/package.json b/yarn-project/prover-client/package.json index 8bff49121fa..cbcf527c147 100644 --- a/yarn-project/prover-client/package.json +++ b/yarn-project/prover-client/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Prover Client" + "displayName": "Prover Client", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index a0c4d665ea7..1381624590f 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "Sequencer Client" + "displayName": "Sequencer Client", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index 48200168bc6..f5ecea17690 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -5,7 +5,8 @@ "exports": "./dest/index.js", "typedoc": { "entryPoint": "./src/index.ts", - "displayName": "TXs" + "displayName": "TXs", + "tsconfig": "./tsconfig.dest.json" }, "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", From f1f0d2259c35830883bf74aeb714c4fb3583668e Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:46:03 +0100 Subject: [PATCH 23/33] Fix merge --- yarn-project/archiver/package.json | 2 +- yarn-project/p2p/package.json | 2 +- yarn-project/tx/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index a437e86a6c4..e7371efba70 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -13,7 +13,7 @@ "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc -b tsconfig.dest.json --watch", "start": "node ./dest", - "start:dev": "tsc-watch --onSuccess 'yarn start'", + "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 6a6621549f7..065f38fb199 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -13,7 +13,7 @@ "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc -b tsconfig.dest.json --watch", "start": "node ./dest", - "start:dev": "tsc-watch --onSuccess 'yarn start'", + "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", diff --git a/yarn-project/tx/package.json b/yarn-project/tx/package.json index f5ecea17690..50bb1fcf573 100644 --- a/yarn-project/tx/package.json +++ b/yarn-project/tx/package.json @@ -13,7 +13,7 @@ "build": "yarn clean && tsc -b tsconfig.dest.json", "build:dev": "tsc -b tsconfig.dest.json --watch", "start": "node ./dest", - "start:dev": "tsc-watch --onSuccess 'yarn start'", + "start:dev": "tsc-watch -p tsconfig.dest.json --onSuccess 'yarn start'", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "formatting:fix": "run -T prettier -w ./src", From 19f3df61555e42c2d7871814ae3f0916dde2b6ee Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:47:10 +0100 Subject: [PATCH 24/33] Fix merge --- yarn-project/aztec-cli/package.json | 2 +- yarn-project/noir-contracts/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/aztec-cli/package.json b/yarn-project/aztec-cli/package.json index 8ec334d3161..b32b78454e1 100644 --- a/yarn-project/aztec-cli/package.json +++ b/yarn-project/aztec-cli/package.json @@ -14,7 +14,7 @@ "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc --watch", + "build:dev": "tsc -p tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" diff --git a/yarn-project/noir-contracts/package.json b/yarn-project/noir-contracts/package.json index 13d7b59062b..69253c84f15 100644 --- a/yarn-project/noir-contracts/package.json +++ b/yarn-project/noir-contracts/package.json @@ -14,7 +14,7 @@ "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", "build": "yarn clean && tsc -b tsconfig.dest.json", - "build:dev": "tsc --watch", + "build:dev": "tsc -p tsconfig.dest.json --watch", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --no-cache --passWithNoTests" From 8487a129f0ab05ae2ef666647a754cffa50cd6f9 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:48:48 +0100 Subject: [PATCH 25/33] Fix merge --- yarn-project/end-to-end/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index dc7aa363194..9faa5f600f4 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -5,7 +5,7 @@ "exports": "./dest/index.js", "scripts": { "prepare": "../../scripts/derive-package-deps.py package.json", - "build": "tsc -b tsconfig.dest.json tsconfig.json", + "build": "tsc -b tsconfig.dest.json", "clean": "rm -rf ./dest .tsbuildinfo", "formatting": "run -T prettier --check ./src && run -T eslint --max-warnings 0 ./src", "test": "./scripts/start_e2e.sh", From fcc7a093817b92b33fc290cad5e91843e3eac08e Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:50:14 +0100 Subject: [PATCH 26/33] Fix merge --- yarn-project/sequencer-client/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 1381624590f..14e0019b99d 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -24,7 +24,6 @@ "globals": { "ts-jest": { "useESM": true, - "rootDir": "..", "tsconfig": "../tsconfig.json" } }, From 931708d795289bee611bcddfc637f619addb603f Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:55:28 +0100 Subject: [PATCH 27/33] Fix merge --- yarn-project/ethereum.js/Dockerfile | 1 + yarn-project/foundation/Dockerfile | 1 + yarn-project/merkle-tree/Dockerfile | 5 +---- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/yarn-project/ethereum.js/Dockerfile b/yarn-project/ethereum.js/Dockerfile index dc4ab6be25f..354a90ecb28 100644 --- a/yarn-project/ethereum.js/Dockerfile +++ b/yarn-project/ethereum.js/Dockerfile @@ -11,3 +11,4 @@ RUN yarn workspaces focus --production > /dev/null FROM alpine:latest COPY --from=builder /usr/src/yarn-project/ethereum.js /usr/src/yarn-project/ethereum.js +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json diff --git a/yarn-project/foundation/Dockerfile b/yarn-project/foundation/Dockerfile index a7b01d7666c..d3af8b08016 100644 --- a/yarn-project/foundation/Dockerfile +++ b/yarn-project/foundation/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/foundation /usr/src/yarn-project/foundation +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/foundation ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/merkle-tree/Dockerfile b/yarn-project/merkle-tree/Dockerfile index 30cf2f54f1b..73e5c03e2f4 100644 --- a/yarn-project/merkle-tree/Dockerfile +++ b/yarn-project/merkle-tree/Dockerfile @@ -4,10 +4,6 @@ COPY foundation foundation COPY merkle-tree merkle-tree COPY barretenberg.js barretenberg.js -WORKDIR /usr/src/yarn-project/foundation -RUN yarn build -WORKDIR /usr/src/yarn-project/barretenberg.js -RUN yarn build RUN cp /usr/src/circuits/cpp/build-wasm/bin/aztec3-circuits.wasm dest/wasm/barretenberg.wasm WORKDIR /usr/src/yarn-project/merkle-tree @@ -19,5 +15,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/merkle-tree /usr/src/yarn-project/merkle-tree +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/merkle-tree ENTRYPOINT ["yarn"] \ No newline at end of file From c415be561594cac5aab8d15c8f99a34d7c619c4e Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 13:57:18 +0100 Subject: [PATCH 28/33] Fix merge --- yarn-project/kernel-prover/Dockerfile | 1 + yarn-project/key-store/Dockerfile | 1 + yarn-project/l1-contracts/Dockerfile | 1 + yarn-project/l2-block/Dockerfile | 1 + yarn-project/noir-contracts/Dockerfile | 1 + yarn-project/p2p/Dockerfile | 1 + yarn-project/prover-client/Dockerfile | 1 + yarn-project/tx/Dockerfile | 1 + yarn-project/world-state/Dockerfile | 1 + 9 files changed, 9 insertions(+) diff --git a/yarn-project/kernel-prover/Dockerfile b/yarn-project/kernel-prover/Dockerfile index 0738898f443..5551d1bd51b 100644 --- a/yarn-project/kernel-prover/Dockerfile +++ b/yarn-project/kernel-prover/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/kernel-prover /usr/src/yarn-project/kernel-prover +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/kernel-prover ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/key-store/Dockerfile b/yarn-project/key-store/Dockerfile index c084a82e57d..5ee033d3d13 100644 --- a/yarn-project/key-store/Dockerfile +++ b/yarn-project/key-store/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/key-store /usr/src/yarn-project/key-store +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/key-store ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/l1-contracts/Dockerfile b/yarn-project/l1-contracts/Dockerfile index 8c4489541f8..e5fe28cdc06 100644 --- a/yarn-project/l1-contracts/Dockerfile +++ b/yarn-project/l1-contracts/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/l1-contracts /usr/src/yarn-project/l1-contracts +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/l1-contracts ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/l2-block/Dockerfile b/yarn-project/l2-block/Dockerfile index de655ec33cc..ad6bf24319c 100644 --- a/yarn-project/l2-block/Dockerfile +++ b/yarn-project/l2-block/Dockerfile @@ -11,5 +11,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/l2-block /usr/src/yarn-project/l2-block +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/l2-block ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/noir-contracts/Dockerfile b/yarn-project/noir-contracts/Dockerfile index 0de2e52bf6f..e8011d458f8 100644 --- a/yarn-project/noir-contracts/Dockerfile +++ b/yarn-project/noir-contracts/Dockerfile @@ -11,5 +11,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/noir-contracts /usr/src/yarn-project/noir-contracts +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/noir-contracts ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/p2p/Dockerfile b/yarn-project/p2p/Dockerfile index d86ccdd3a1a..273eb979e94 100644 --- a/yarn-project/p2p/Dockerfile +++ b/yarn-project/p2p/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/p2p /usr/src/yarn-project/p2p +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/p2p ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/prover-client/Dockerfile b/yarn-project/prover-client/Dockerfile index 39dfe45153c..cc9a3cde45c 100644 --- a/yarn-project/prover-client/Dockerfile +++ b/yarn-project/prover-client/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/prover-client /usr/src/yarn-project/prover-client +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/prover-client ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/tx/Dockerfile b/yarn-project/tx/Dockerfile index 04a9602280d..c15816f2eff 100644 --- a/yarn-project/tx/Dockerfile +++ b/yarn-project/tx/Dockerfile @@ -10,5 +10,6 @@ RUN yarn workspaces focus --production > /dev/null FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/tx /usr/src/yarn-project/tx +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/tx ENTRYPOINT ["yarn"] \ No newline at end of file diff --git a/yarn-project/world-state/Dockerfile b/yarn-project/world-state/Dockerfile index ebdfa07c62c..ff3e315bc05 100644 --- a/yarn-project/world-state/Dockerfile +++ b/yarn-project/world-state/Dockerfile @@ -24,5 +24,6 @@ RUN yarn workspaces focus --production > /dev/null # (6) set up entry point FROM node:18-alpine COPY --from=builder /usr/src/yarn-project/world-state /usr/src/yarn-project/world-state +COPY --from=builder /usr/src/yarn-project/tsconfig.json /usr/src/yarn-project/tsconfig.json WORKDIR /usr/src/yarn-project/world-state ENTRYPOINT ["yarn", "test"] \ No newline at end of file From fd7624cfa52c49037a7ef6038660d2d8fe9125d2 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 14:03:43 +0100 Subject: [PATCH 29/33] Fix merge --- yarn-project/foundation/.eslintrc.cjs | 2 +- yarn-project/noir-contracts/tsconfig.dest.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/yarn-project/foundation/.eslintrc.cjs b/yarn-project/foundation/.eslintrc.cjs index 3c738f34190..93052830b71 100644 --- a/yarn-project/foundation/.eslintrc.cjs +++ b/yarn-project/foundation/.eslintrc.cjs @@ -36,7 +36,7 @@ module.exports = { { files: ['*.ts', '*.tsx'], parserOptions: { - project: true, + project: 'tsconfig.dest.json', }, }, { diff --git a/yarn-project/noir-contracts/tsconfig.dest.json b/yarn-project/noir-contracts/tsconfig.dest.json index 358273c800f..ae29af846de 100644 --- a/yarn-project/noir-contracts/tsconfig.dest.json +++ b/yarn-project/noir-contracts/tsconfig.dest.json @@ -5,9 +5,6 @@ "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": [ - "src", - "src/**/*.json" - ], + "include": ["src", "src/**/*.json"], "references": [] } From bf828a357338d475f75a3f0aa3e1091ae7326d59 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 14:07:17 +0100 Subject: [PATCH 30/33] Fix merge --- yarn-project/acir-simulator/src/index.test.ts | 1 - yarn-project/acir-simulator/tsconfig.dest.json | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/yarn-project/acir-simulator/src/index.test.ts b/yarn-project/acir-simulator/src/index.test.ts index 9499e2491c9..98f88e28e72 100644 --- a/yarn-project/acir-simulator/src/index.test.ts +++ b/yarn-project/acir-simulator/src/index.test.ts @@ -1,5 +1,4 @@ import { - ARGS_LENGTH, AztecAddress, ContractDeploymentData, EthAddress, diff --git a/yarn-project/acir-simulator/tsconfig.dest.json b/yarn-project/acir-simulator/tsconfig.dest.json index 42da4179631..67aa5206946 100644 --- a/yarn-project/acir-simulator/tsconfig.dest.json +++ b/yarn-project/acir-simulator/tsconfig.dest.json @@ -13,8 +13,5 @@ "path": "../noir-contracts/tsconfig.dest.json" } ], - "include": [ - "src", - "test" - ] + "include": ["src", "test"] } From a237ff80a53f3cb75becb816b3c6b085fc939dcc Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 14:13:02 +0100 Subject: [PATCH 31/33] Fix merge --- yarn-project/acir-simulator/src/index.test.ts | 1 + yarn-project/foundation/.eslintrc.cjs | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn-project/acir-simulator/src/index.test.ts b/yarn-project/acir-simulator/src/index.test.ts index 98f88e28e72..0ae296d5e93 100644 --- a/yarn-project/acir-simulator/src/index.test.ts +++ b/yarn-project/acir-simulator/src/index.test.ts @@ -9,6 +9,7 @@ import { TxContext, TxRequest, } from '@aztec/circuits.js'; + import { FunctionAbi } from '@aztec/noir-contracts'; import { TestContractAbi, ZkTokenContractAbi } from '@aztec/noir-contracts/examples'; import { DBOracle } from './db_oracle.js'; diff --git a/yarn-project/foundation/.eslintrc.cjs b/yarn-project/foundation/.eslintrc.cjs index 93052830b71..fdaeb319fb9 100644 --- a/yarn-project/foundation/.eslintrc.cjs +++ b/yarn-project/foundation/.eslintrc.cjs @@ -36,16 +36,15 @@ module.exports = { { files: ['*.ts', '*.tsx'], parserOptions: { - project: 'tsconfig.dest.json', - }, - }, - { - files: ['*.test.ts', '*.test.tsx'], - parserOptions: { - tsconfigRootDir: __dirname + '/..', - project: __dirname + '/../tsconfig.json', + project: true, }, }, + // { + // files: ['*.test.ts', '*.test.tsx'], + // parserOptions: { + // project: true, + // }, + // }, ], env: { node: true, From 622316697445326899dcc4c6fac078f034b31673 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 14:20:26 +0100 Subject: [PATCH 32/33] Fix merge --- README.md | 8 ++++++++ tsconfig.dest.json | 1 + yarn-project/ethereum.js/example/tsconfig.json | 2 +- yarn-project/foundation/.eslintrc.cjs | 14 +++++++------- yarn-project/tsconfig.json | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) create mode 120000 tsconfig.dest.json diff --git a/README.md b/README.md index fe2fa866961..c587f3373a7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,15 @@ # AZTEC 3 Monorepo +tsconfig management: To update dependencies, do - yarn prepare from the root folder. This updates tsconfig.dest.json project references, package.json and the build_manifest.json file, all by scanning local project imports ("@aztec/circuits.js" e.g.). Note this only handles imports to @aztec/\* packages. + +tsconfig is read by the following tools: + +- command line ESLint (./tsconfig.dest.json) +- VSCode ESLint (tsconfig.dest.json in the root - linked to yarn-project/tsconfig.json) +- VSCode tsserver (always reads nearest tsconfig.json) +- we excplitiy build with ./tsconfig.dest.json diff --git a/tsconfig.dest.json b/tsconfig.dest.json new file mode 120000 index 00000000000..92604e74d62 --- /dev/null +++ b/tsconfig.dest.json @@ -0,0 +1 @@ +yarn-project/tsconfig.base.json \ No newline at end of file diff --git a/yarn-project/ethereum.js/example/tsconfig.json b/yarn-project/ethereum.js/example/tsconfig.json index c3a019f2f23..d8dc764d018 100644 --- a/yarn-project/ethereum.js/example/tsconfig.json +++ b/yarn-project/ethereum.js/example/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/foundation/.eslintrc.cjs b/yarn-project/foundation/.eslintrc.cjs index fdaeb319fb9..deb333195dd 100644 --- a/yarn-project/foundation/.eslintrc.cjs +++ b/yarn-project/foundation/.eslintrc.cjs @@ -36,15 +36,15 @@ module.exports = { { files: ['*.ts', '*.tsx'], parserOptions: { - project: true, + project: 'tsconfig.dest.json', + }, + }, + { + files: ['*.test.ts', '*.test.tsx'], + parserOptions: { + project: '../tsconfig.json', }, }, - // { - // files: ['*.test.ts', '*.test.tsx'], - // parserOptions: { - // project: true, - // }, - // }, ], env: { node: true, diff --git a/yarn-project/tsconfig.json b/yarn-project/tsconfig.json index be0506028ad..a2f6c416d83 100644 --- a/yarn-project/tsconfig.json +++ b/yarn-project/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base.json", + "extends": "./tsconfig.dest.json", "include": ["**/*.ts", "**/*.tsx"], "exclude": [], "references": [ From 9e9e5af1bf1acc6013ae75bfbd951322dc59cbec Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 31 Mar 2023 14:22:56 +0100 Subject: [PATCH 33/33] Fix merge --- yarn-project/acir-simulator/tsconfig.dest.json | 2 +- yarn-project/archiver/tsconfig.dest.json | 7 ++----- yarn-project/aztec-cli/tsconfig.dest.json | 2 +- yarn-project/aztec-node/tsconfig.dest.json | 7 ++----- yarn-project/aztec-rpc/tsconfig.dest.json | 2 +- yarn-project/aztec.js/tsconfig.dest.json | 7 ++----- yarn-project/barretenberg.js/tsconfig.dest.json | 2 +- yarn-project/circuits.js/tsconfig.dest.json | 2 +- yarn-project/end-to-end/tsconfig.dest.json | 6 ++---- yarn-project/ethereum.js/tsconfig.dest.json | 7 ++----- yarn-project/foundation/tsconfig.dest.json | 2 +- yarn-project/kernel-prover/tsconfig.dest.json | 6 ++---- yarn-project/key-store/tsconfig.dest.json | 6 ++---- yarn-project/l1-contracts/tsconfig.dest.json | 6 ++---- yarn-project/l2-block/tsconfig.dest.json | 6 ++---- yarn-project/merkle-tree/tsconfig.dest.json | 2 +- yarn-project/noir-contracts/tsconfig.dest.json | 2 +- yarn-project/p2p/tsconfig.dest.json | 11 +++-------- yarn-project/prover-client/tsconfig.dest.json | 2 +- yarn-project/sequencer-client/tsconfig.dest.json | 7 ++----- .../{tsconfig.base.json => tsconfig.dest.json} | 0 yarn-project/tx/tsconfig.dest.json | 11 +++-------- yarn-project/world-state/tsconfig.dest.json | 6 ++---- yarn-project/yarn-project-base/Dockerfile | 2 +- 24 files changed, 38 insertions(+), 75 deletions(-) rename yarn-project/{tsconfig.base.json => tsconfig.dest.json} (100%) diff --git a/yarn-project/acir-simulator/tsconfig.dest.json b/yarn-project/acir-simulator/tsconfig.dest.json index 67aa5206946..9305b3744a6 100644 --- a/yarn-project/acir-simulator/tsconfig.dest.json +++ b/yarn-project/acir-simulator/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/archiver/tsconfig.dest.json b/yarn-project/archiver/tsconfig.dest.json index 4166ce41348..87d3444d35b 100644 --- a/yarn-project/archiver/tsconfig.dest.json +++ b/yarn-project/archiver/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -19,8 +19,5 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": [ - "src", - "test" - ] + "include": ["src", "test"] } diff --git a/yarn-project/aztec-cli/tsconfig.dest.json b/yarn-project/aztec-cli/tsconfig.dest.json index 48b2558873c..60615da64eb 100644 --- a/yarn-project/aztec-cli/tsconfig.dest.json +++ b/yarn-project/aztec-cli/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/aztec-node/tsconfig.dest.json b/yarn-project/aztec-node/tsconfig.dest.json index 68d76a0002e..3f733fe18b4 100644 --- a/yarn-project/aztec-node/tsconfig.dest.json +++ b/yarn-project/aztec-node/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -37,8 +37,5 @@ "path": "../merkle-tree/tsconfig.dest.json" } ], - "include": [ - "src", - "test" - ] + "include": ["src", "test"] } diff --git a/yarn-project/aztec-rpc/tsconfig.dest.json b/yarn-project/aztec-rpc/tsconfig.dest.json index f3efc9db83b..4cca5ea5601 100644 --- a/yarn-project/aztec-rpc/tsconfig.dest.json +++ b/yarn-project/aztec-rpc/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/aztec.js/tsconfig.dest.json b/yarn-project/aztec.js/tsconfig.dest.json index 64d603ea38c..27f0c10ace8 100644 --- a/yarn-project/aztec.js/tsconfig.dest.json +++ b/yarn-project/aztec.js/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -19,8 +19,5 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": [ - "src", - "test" - ] + "include": ["src", "test"] } diff --git a/yarn-project/barretenberg.js/tsconfig.dest.json b/yarn-project/barretenberg.js/tsconfig.dest.json index 6518eee8fdc..4eec4b8b99e 100644 --- a/yarn-project/barretenberg.js/tsconfig.dest.json +++ b/yarn-project/barretenberg.js/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/circuits.js/tsconfig.dest.json b/yarn-project/circuits.js/tsconfig.dest.json index 6518eee8fdc..4eec4b8b99e 100644 --- a/yarn-project/circuits.js/tsconfig.dest.json +++ b/yarn-project/circuits.js/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/end-to-end/tsconfig.dest.json b/yarn-project/end-to-end/tsconfig.dest.json index 40b4339cc66..29fe56fa31e 100644 --- a/yarn-project/end-to-end/tsconfig.dest.json +++ b/yarn-project/end-to-end/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -25,7 +25,5 @@ "path": "../l1-contracts/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/ethereum.js/tsconfig.dest.json b/yarn-project/ethereum.js/tsconfig.dest.json index 003dc2b6013..56e0f795a3f 100644 --- a/yarn-project/ethereum.js/tsconfig.dest.json +++ b/yarn-project/ethereum.js/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "noImplicitAny": false, "outDir": "dest", @@ -8,8 +8,5 @@ "skipLibCheck": true }, "references": [], - "include": [ - "src", - "src/eth_typed_data/fixtures/*.json" - ] + "include": ["src", "src/eth_typed_data/fixtures/*.json"] } diff --git a/yarn-project/foundation/tsconfig.dest.json b/yarn-project/foundation/tsconfig.dest.json index 48b2558873c..60615da64eb 100644 --- a/yarn-project/foundation/tsconfig.dest.json +++ b/yarn-project/foundation/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/kernel-prover/tsconfig.dest.json b/yarn-project/kernel-prover/tsconfig.dest.json index de817d844b2..24baabe08ff 100644 --- a/yarn-project/kernel-prover/tsconfig.dest.json +++ b/yarn-project/kernel-prover/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -10,7 +10,5 @@ "path": "../acir-simulator/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/key-store/tsconfig.dest.json b/yarn-project/key-store/tsconfig.dest.json index 79189449d7b..60615da64eb 100644 --- a/yarn-project/key-store/tsconfig.dest.json +++ b/yarn-project/key-store/tsconfig.dest.json @@ -1,12 +1,10 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": [ - "src" - ], + "include": ["src"], "references": [] } diff --git a/yarn-project/l1-contracts/tsconfig.dest.json b/yarn-project/l1-contracts/tsconfig.dest.json index 0f8b3b56077..785256e3860 100644 --- a/yarn-project/l1-contracts/tsconfig.dest.json +++ b/yarn-project/l1-contracts/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -10,7 +10,5 @@ "path": "../ethereum.js/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/l2-block/tsconfig.dest.json b/yarn-project/l2-block/tsconfig.dest.json index 2cb1ebc32c5..28164029b4e 100644 --- a/yarn-project/l2-block/tsconfig.dest.json +++ b/yarn-project/l2-block/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -16,7 +16,5 @@ "path": "../l1-contracts/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/merkle-tree/tsconfig.dest.json b/yarn-project/merkle-tree/tsconfig.dest.json index 4a43d82b22c..a13d6ff99d3 100644 --- a/yarn-project/merkle-tree/tsconfig.dest.json +++ b/yarn-project/merkle-tree/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/noir-contracts/tsconfig.dest.json b/yarn-project/noir-contracts/tsconfig.dest.json index ae29af846de..efaa45155ea 100644 --- a/yarn-project/noir-contracts/tsconfig.dest.json +++ b/yarn-project/noir-contracts/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/p2p/tsconfig.dest.json b/yarn-project/p2p/tsconfig.dest.json index 863b1bbba02..ff1457f5e30 100644 --- a/yarn-project/p2p/tsconfig.dest.json +++ b/yarn-project/p2p/tsconfig.dest.json @@ -1,14 +1,11 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo", "moduleResolution": "nodenext", - "types": [ - "node", - "jest" - ] + "types": ["node", "jest"] }, "references": [ { @@ -24,7 +21,5 @@ "path": "../circuits.js/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/prover-client/tsconfig.dest.json b/yarn-project/prover-client/tsconfig.dest.json index 48b2558873c..60615da64eb 100644 --- a/yarn-project/prover-client/tsconfig.dest.json +++ b/yarn-project/prover-client/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", diff --git a/yarn-project/sequencer-client/tsconfig.dest.json b/yarn-project/sequencer-client/tsconfig.dest.json index ed04377d5f8..090f4b34b3a 100644 --- a/yarn-project/sequencer-client/tsconfig.dest.json +++ b/yarn-project/sequencer-client/tsconfig.dest.json @@ -1,14 +1,11 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo" }, - "include": [ - "src", - "test" - ], + "include": ["src", "test"], "references": [ { "path": "../archiver/tsconfig.dest.json" diff --git a/yarn-project/tsconfig.base.json b/yarn-project/tsconfig.dest.json similarity index 100% rename from yarn-project/tsconfig.base.json rename to yarn-project/tsconfig.dest.json diff --git a/yarn-project/tx/tsconfig.dest.json b/yarn-project/tx/tsconfig.dest.json index 90001d26ea3..f5d5e4a6ef2 100644 --- a/yarn-project/tx/tsconfig.dest.json +++ b/yarn-project/tx/tsconfig.dest.json @@ -1,14 +1,11 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", "tsBuildInfoFile": ".tsbuildinfo", "moduleResolution": "nodenext", - "types": [ - "node", - "jest" - ] + "types": ["node", "jest"] }, "references": [ { @@ -18,7 +15,5 @@ "path": "../foundation/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/world-state/tsconfig.dest.json b/yarn-project/world-state/tsconfig.dest.json index 4d957cc6aae..c9992554759 100644 --- a/yarn-project/world-state/tsconfig.dest.json +++ b/yarn-project/world-state/tsconfig.dest.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.dest.json", "compilerOptions": { "outDir": "dest", "rootDir": "src", @@ -22,7 +22,5 @@ "path": "../barretenberg.js/tsconfig.dest.json" } ], - "include": [ - "src" - ] + "include": ["src"] } diff --git a/yarn-project/yarn-project-base/Dockerfile b/yarn-project/yarn-project-base/Dockerfile index 93e02c8f597..dde5bcf806b 100644 --- a/yarn-project/yarn-project-base/Dockerfile +++ b/yarn-project/yarn-project-base/Dockerfile @@ -41,7 +41,7 @@ COPY prover-client/package.json prover-client/package.json COPY sequencer-client/package.json sequencer-client/package.json COPY tx/package.json tx/package.json COPY world-state/package.json world-state/package.json -COPY package.json tsconfig.json tsconfig.base.json yarn.lock .yarnrc.yml ./ +COPY package.json tsconfig.json tsconfig.dest.json yarn.lock .yarnrc.yml ./ COPY .yarn .yarn # Although we're attempting to be "zero-install", in practice we still need to build arch specific packages.