From 6c24dd7edb41f9daf3fb5b83f7c0464b4d378516 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 17 Jan 2024 12:08:58 -0300 Subject: [PATCH 1/5] chore: Remove unused noir-version json --- yarn-project/aztec-sandbox/src/bin/index.ts | 9 ++++----- yarn-project/noir-compiler/src/noir-version.json | 4 ---- yarn-project/noir-compiler/src/versions.ts | 7 ------- 3 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 yarn-project/noir-compiler/src/noir-version.json diff --git a/yarn-project/aztec-sandbox/src/bin/index.ts b/yarn-project/aztec-sandbox/src/bin/index.ts index 75b8d3113474..97aa2d790ea1 100644 --- a/yarn-project/aztec-sandbox/src/bin/index.ts +++ b/yarn-project/aztec-sandbox/src/bin/index.ts @@ -7,7 +7,6 @@ import { init } from '@aztec/foundation/crypto'; import { createStatusRouter, startHttpRpcServer } from '@aztec/foundation/json-rpc/server'; import { createDebugLogger } from '@aztec/foundation/log'; import { fileURLToPath } from '@aztec/foundation/url'; -import { NoirCommit, NoirTag } from '@aztec/noir-compiler/versions'; import { BootstrapNode, getP2PConfigEnvVars } from '@aztec/p2p'; import { GrumpkinScalar, PXEService, createPXERpcServer } from '@aztec/pxe'; @@ -121,7 +120,7 @@ async function main() { // Code path for starting Sandbox if (mode === SandboxMode.Sandbox) { - logger.info(`Setting up Aztec Sandbox v${version} (noir ${NoirCommit} ${NoirTag}), please stand by...`); + logger.info(`Setting up Aztec Sandbox v${version} please stand by...`); const { pxe, node, stop, accounts } = await createAndInitialiseSandbox(deployTestAccounts); @@ -139,7 +138,7 @@ async function main() { const accountLogStrings = await createAccountLogs(accounts, pxe); logStrings.push(...accountLogStrings); } - logStrings.push(`Aztec Sandbox v${version} (noir ${NoirCommit}) is now ready for use!`); + logStrings.push(`Aztec Sandbox v${version} is now ready for use!`); } else if (mode === SandboxMode.Node) { // Code path for starting Node only const nodeConfig = getNodeConfigEnvVars(); @@ -170,7 +169,7 @@ async function main() { const httpServer = http.createServer(app.callback()); httpServer.listen(port); - logStrings.push(`Aztec Node v${version} (noir ${NoirCommit}) is now ready for use in port ${port}!`); + logStrings.push(`Aztec Node v${version} is now ready for use in port ${port}!`); } else if (mode === SandboxMode.PXE) { // Code path for starting PXE only @@ -190,7 +189,7 @@ async function main() { logStrings.push(...accountLogStrings); } - logStrings.push(`PXE v${version} (noir ${NoirCommit}) is now ready for use in port ${PXE_PORT}!`); + logStrings.push(`PXE v${version} is now ready for use in port ${PXE_PORT}!`); } else if (mode === SandboxMode.P2PBootstrap) { // Code path for starting a P2P bootstrap node const config = getP2PConfigEnvVars(); diff --git a/yarn-project/noir-compiler/src/noir-version.json b/yarn-project/noir-compiler/src/noir-version.json deleted file mode 100644 index e81ecb08315e..000000000000 --- a/yarn-project/noir-compiler/src/noir-version.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tag": "v0.18.0-aztec.5", - "commit": "6ca33a223ccce6a295414a3ce078180e8a22b68c" -} diff --git a/yarn-project/noir-compiler/src/versions.ts b/yarn-project/noir-compiler/src/versions.ts index 9cf6fd768b35..99a4015967c4 100644 --- a/yarn-project/noir-compiler/src/versions.ts +++ b/yarn-project/noir-compiler/src/versions.ts @@ -1,12 +1,5 @@ import { readFile } from 'node:fs/promises'; -import NoirVersion from './noir-version.json' assert { type: 'json' }; - // read package.json at runtime instead of compile time so that we keep rootDir as-is in tsconfig const pkg = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf-8')); - export const NoirWasmVersion = pkg.dependencies['@noir-lang/noir_wasm']; -export const NoirTag = NoirVersion.tag; -export const NoirCommit = NoirVersion.commit; - -export { NoirVersion }; From a0429c6505167cc541f07ff8b2497b180f78d5f6 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 17 Jan 2024 16:35:43 -0300 Subject: [PATCH 2/5] Remove noir version from docs --- docs/README.md | 11 ----------- docs/docs/dev_docs/contracts/main.md | 4 ---- .../getting_started/aztecnr-getting-started.md | 4 ---- docs/docusaurus.config.js | 10 +--------- .../src/components/InstallNargoInstructions/index.js | 12 ------------ docs/src/components/Version/index.js | 1 - docs/src/preprocess/include_version.js | 8 -------- docs/src/theme/MDXComponents.js | 8 +------- 8 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 docs/src/components/InstallNargoInstructions/index.js diff --git a/docs/README.md b/docs/README.md index d07cc7f39814..f1fae6d86ce5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -133,14 +133,3 @@ Alternatively, you can also use the `AztecPackagesVersion()` js function, which import { AztecPackagesVersion } from "@site/src/components/Version"; <>{AztecPackagesVersion()} ``` - - ### `#include_noir_version` - -This macros will be replaced inline with the required nargo version, which is `0.11.1-aztec.0` at the time of these writing. This value is sourced from `yarn-project/noir-compiler/src/noir-version.json`. - -Alternatively, you can also use the `NoirVersion()` js function, which you need to import explicitly: - -``` -import { NoirVersion } from "@site/src/components/Version"; -<>{NoirVersion()} -``` diff --git a/docs/docs/dev_docs/contracts/main.md b/docs/docs/dev_docs/contracts/main.md index d95211b3cd8f..9ff439e72fd5 100644 --- a/docs/docs/dev_docs/contracts/main.md +++ b/docs/docs/dev_docs/contracts/main.md @@ -30,10 +30,6 @@ For those coming from vanilla Noir, the version used for aztec.nr is tracked sep `aztec-nargo` comes with the Noir compiler, so installing `nargo` is not required, however it is recommended as it provides a better developer experience for writing contracts. You will need nargo installed to take advantage of the [Noir Language Server](https://noir-lang.org/docs/nargo/language_server), which provides syntax highlighting and formatting for your Aztec contracts. -You can install `nargo` with the following commands: - - - ## Install Noir tooling There are a number of tools to make writing Aztec.nr contracts in Noir more pleasant. See [here](https://github.com/noir-lang/awesome-noir#get-coding). diff --git a/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md b/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md index 954d60ff2b1c..c4f855126e56 100644 --- a/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md +++ b/docs/docs/dev_docs/getting_started/aztecnr-getting-started.md @@ -211,10 +211,6 @@ The CLI comes with the Noir compiler, so installing `nargo` is not required, how You will also need `nargo` if you want to run unit tests in Noir. -You can install `nargo` with the following commands: - - - ## What's next? Now you can explore. diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 5f19cd0a574d..efe1271187e8 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -82,13 +82,6 @@ const config = { name: "load-versions", async loadContent() { try { - const noirVersionPath = path.resolve( - __dirname, - "../yarn-project/noir-compiler/src/noir-version.json" - ); - const noirVersion = JSON.parse( - fs.readFileSync(noirVersionPath).toString() - ).tag; const aztecVersionPath = path.resolve( __dirname, "../.release-please-manifest.json" @@ -97,12 +90,11 @@ const config = { fs.readFileSync(aztecVersionPath).toString() )["."]; return { - noir: noirVersion, "aztec-packages": `aztec-packages-v${aztecVersion}`, }; } catch (err) { throw new Error( - `Error loading Noir version from noir-compiler in docusaurus build. Check load-versions in docusaurus.config.js.\n${err}` + `Error loading versions in docusaurus build. Check load-versions in docusaurus.config.js.\n${err}` ); } }, diff --git a/docs/src/components/InstallNargoInstructions/index.js b/docs/src/components/InstallNargoInstructions/index.js deleted file mode 100644 index 2ee7437259b1..000000000000 --- a/docs/src/components/InstallNargoInstructions/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; -import CodeBlock from "@theme/CodeBlock"; -import { NoirVersion } from "@site/src/components/Version"; - -export default function InstallNargoInstructions() { - return ( - - {`curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash -noirup -v ${NoirVersion()}`} - - ); -} diff --git a/docs/src/components/Version/index.js b/docs/src/components/Version/index.js index 01bf315f2221..36599d90c82d 100644 --- a/docs/src/components/Version/index.js +++ b/docs/src/components/Version/index.js @@ -7,5 +7,4 @@ export default function Version({ what }) { return Versions()[what]; } -export const NoirVersion = () => Versions()["noir"]; export const AztecPackagesVersion = () => Versions()["aztec-packages"]; \ No newline at end of file diff --git a/docs/src/preprocess/include_version.js b/docs/src/preprocess/include_version.js index afa372e0a047..529e93d0adbe 100644 --- a/docs/src/preprocess/include_version.js +++ b/docs/src/preprocess/include_version.js @@ -7,13 +7,6 @@ let versions; async function getVersions() { if (!versions) { try { - const noirVersionPath = path.resolve( - __dirname, - "../../../yarn-project/noir-compiler/src/noir-version.json" - ); - const noirVersion = JSON.parse( - fs.readFileSync(noirVersionPath).toString() - ).tag; const aztecVersionPath = path.resolve( __dirname, "../../../.release-please-manifest.json" @@ -22,7 +15,6 @@ async function getVersions() { fs.readFileSync(aztecVersionPath).toString() )["."]; versions = { - noir: noirVersion, aztec: `aztec-packages-v${aztecVersion}`, aztec_short: aztecVersion, }; diff --git a/docs/src/theme/MDXComponents.js b/docs/src/theme/MDXComponents.js index 4593ab51e685..28e247751f40 100644 --- a/docs/src/theme/MDXComponents.js +++ b/docs/src/theme/MDXComponents.js @@ -1,18 +1,12 @@ import React from "react"; import MDXComponents from "@theme-original/MDXComponents"; -import Version, { - NoirVersion, - AztecPackagesVersion, -} from "@site/src/components/Version"; -import InstallNargoInstructions from "@site/src/components/InstallNargoInstructions"; +import Version, { AztecPackagesVersion } from "@site/src/components/Version"; import CodeBlock from "@theme/CodeBlock"; // https://docusaurus.io/docs/markdown-features/react#mdx-component-scope export default { ...MDXComponents, Version, - NoirVersion, AztecPackagesVersion, - InstallNargoInstructions, CodeBlock, }; From 2a10eca594a324e3d159bcc03f8a0ac38ccc439b Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 17 Jan 2024 16:38:03 -0300 Subject: [PATCH 3/5] Remove from build manifest --- build_manifest.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/build_manifest.yml b/build_manifest.yml index 8924d81aa80e..ea8880f74d07 100644 --- a/build_manifest.yml +++ b/build_manifest.yml @@ -201,7 +201,6 @@ docs: - ^.*.hpp$ - ^.*.ts$ - ^.release-please-manifest.json$ - - ^.*/noir-version.json$ - ^.*.nr$ dependencies: - yarn-project From ddaf77a6fd65b9fc0358d43cb98766f5d8064609 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 17 Jan 2024 16:43:54 -0300 Subject: [PATCH 4/5] Remove references to include_noir_version macro --- .../docs/dev_docs/getting_started/aztecjs-getting-started.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/docs/dev_docs/getting_started/aztecjs-getting-started.md b/docs/docs/dev_docs/getting_started/aztecjs-getting-started.md index db038a695925..e00be8615d49 100644 --- a/docs/docs/dev_docs/getting_started/aztecjs-getting-started.md +++ b/docs/docs/dev_docs/getting_started/aztecjs-getting-started.md @@ -122,7 +122,6 @@ A successful run should show something like this: ``` token Aztec Sandbox Info { token sandboxVersion: '#include_aztec_short_version', - token compatibleNargoVersion: '#include_noir_version', token chainId: 31337, token protocolVersion: 1, token l1ContractAddresses: { @@ -171,7 +170,6 @@ Now that we have our accounts loaded, let's move on to deploy our pre-compiled t ``` token Aztec Sandbox Info { token sandboxVersion: '#include_aztec_short_version', - token compatibleNargoVersion: '#include_noir_version', token chainId: 31337, token protocolVersion: 1, token l1ContractAddresses: { @@ -226,7 +224,6 @@ Running now should yield output: ``` token Aztec Sandbox Info { token sandboxVersion: '#include_aztec_short_version', - token compatibleNargoVersion: '#include_noir_version', token chainId: 31337, token protocolVersion: 1, token l1ContractAddresses: { @@ -291,7 +288,6 @@ Our output should now look like this: ``` token Aztec Sandbox Info { token sandboxVersion: '#include_aztec_short_version', - token compatibleNargoVersion: '#include_noir_version', token chainId: 31337, token protocolVersion: 1, token l1ContractAddresses: { @@ -351,7 +347,6 @@ Our complete output should now be something like: ``` token Aztec Sandbox Info { token sandboxVersion: '#include_aztec_short_version', - token compatibleNargoVersion: '#include_noir_version', token chainId: 31337, token protocolVersion: 1, token l1ContractAddresses: { From 89ef4f3fecd8f2c9edbbdaf44529588a643f4465 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 17 Jan 2024 16:44:11 -0300 Subject: [PATCH 5/5] Remove noir version exported from noir-compiler --- yarn-project/aztec.js/src/contract/contract.test.ts | 1 - yarn-project/cli/src/cmds/get_node_info.ts | 1 - yarn-project/end-to-end/src/cli_docs_sandbox.test.ts | 1 - yarn-project/noir-compiler/package.json | 4 +--- yarn-project/noir-compiler/src/index.ts | 2 -- yarn-project/noir-compiler/src/versions.ts | 5 ----- yarn-project/pxe/src/pxe_service/pxe_service.ts | 2 -- yarn-project/types/src/interfaces/node-info.ts | 4 ---- yarn-project/yarn.lock | 9 --------- 9 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 yarn-project/noir-compiler/src/versions.ts diff --git a/yarn-project/aztec.js/src/contract/contract.test.ts b/yarn-project/aztec.js/src/contract/contract.test.ts index 14bdbe71f297..eea65713c5e3 100644 --- a/yarn-project/aztec.js/src/contract/contract.test.ts +++ b/yarn-project/aztec.js/src/contract/contract.test.ts @@ -30,7 +30,6 @@ describe('Contract Class', () => { }; const mockNodeInfo: NodeInfo = { nodeVersion: 'vx.x.x', - compatibleNargoVersion: 'vx.x.x-aztec.x', chainId: 1, protocolVersion: 2, l1ContractAddresses: l1Addresses, diff --git a/yarn-project/cli/src/cmds/get_node_info.ts b/yarn-project/cli/src/cmds/get_node_info.ts index 4d98da411cdf..2f14d5f5a24c 100644 --- a/yarn-project/cli/src/cmds/get_node_info.ts +++ b/yarn-project/cli/src/cmds/get_node_info.ts @@ -10,7 +10,6 @@ export async function getNodeInfo(rpcUrl: string, debugLogger: DebugLogger, log: const info = await client.getNodeInfo(); log(`\nNode Info:\n`); log(`Node Version: ${info.nodeVersion}\n`); - log(`Compatible Nargo Version: ${info.compatibleNargoVersion}\n`); log(`Chain Id: ${info.chainId}\n`); log(`Protocol Version: ${info.protocolVersion}\n`); log(`Rollup Address: ${info.l1ContractAddresses.rollupAddress.toString()}`); diff --git a/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts b/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts index 46411f3e3af6..c03353a9a889 100644 --- a/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts +++ b/yarn-project/end-to-end/src/cli_docs_sandbox.test.ts @@ -30,7 +30,6 @@ describe('CLI docs sandbox', () => { Node Info: Node Version: #include_aztec_short_version -Compatible Nargo Version: #include_noir_version Chain Id: 31337 Protocol Version: 1 Rollup Address: 0x0dcd1bf9a1b36ce34237eeafef220932846bcd82 diff --git a/yarn-project/noir-compiler/package.json b/yarn-project/noir-compiler/package.json index 71c96a4db416..dc90ce3ca625 100644 --- a/yarn-project/noir-compiler/package.json +++ b/yarn-project/noir-compiler/package.json @@ -4,8 +4,7 @@ "type": "module", "exports": { ".": "./dest/index.js", - "./cli": "./dest/cli/index.js", - "./versions": "./dest/versions.js" + "./cli": "./dest/cli/index.js" }, "typedocOptions": { "entryPoints": [ @@ -49,7 +48,6 @@ "@aztec/foundation": "workspace:^", "@aztec/types": "workspace:^", "@iarna/toml": "^2.2.5", - "@noir-lang/noir_wasm": "portal:../../noir/packages/noir_wasm", "base64-js": "^1.5.1", "commander": "^9.0.0", "fs-extra": "^11.1.1", diff --git a/yarn-project/noir-compiler/src/index.ts b/yarn-project/noir-compiler/src/index.ts index 88416ef42821..a28e4f093031 100644 --- a/yarn-project/noir-compiler/src/index.ts +++ b/yarn-project/noir-compiler/src/index.ts @@ -1,4 +1,2 @@ -export * from './versions.js'; - export { generateTypescriptContractInterface } from './contract-interface-gen/typescript.js'; export { generateNoirContractInterface } from './contract-interface-gen/noir.js'; diff --git a/yarn-project/noir-compiler/src/versions.ts b/yarn-project/noir-compiler/src/versions.ts deleted file mode 100644 index 99a4015967c4..000000000000 --- a/yarn-project/noir-compiler/src/versions.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { readFile } from 'node:fs/promises'; - -// read package.json at runtime instead of compile time so that we keep rootDir as-is in tsconfig -const pkg = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf-8')); -export const NoirWasmVersion = pkg.dependencies['@noir-lang/noir_wasm']; diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index 5ae775e29b90..871f50b137f7 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -52,7 +52,6 @@ import { Fr } from '@aztec/foundation/fields'; import { SerialQueue } from '@aztec/foundation/fifo'; import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { Timer } from '@aztec/foundation/timer'; -import { NoirWasmVersion } from '@aztec/noir-compiler/versions'; import { NodeInfo } from '@aztec/types/interfaces'; import { PXEServiceConfig, getPackageInfo } from '../config/index.js'; @@ -488,7 +487,6 @@ export class PXEService implements PXE { const nodeInfo: NodeInfo = { nodeVersion: this.nodeVersion, - compatibleNargoVersion: NoirWasmVersion, chainId, protocolVersion: version, l1ContractAddresses: contractAddresses, diff --git a/yarn-project/types/src/interfaces/node-info.ts b/yarn-project/types/src/interfaces/node-info.ts index 1831263c0e3f..48d77996d896 100644 --- a/yarn-project/types/src/interfaces/node-info.ts +++ b/yarn-project/types/src/interfaces/node-info.ts @@ -8,10 +8,6 @@ export interface NodeInfo { * Version as tracked in the aztec-packages repository. */ nodeVersion: string; - /** - * The nargo version compatible with this node version - */ - compatibleNargoVersion: string; /** * L1 chain id. */ diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index b5e32659fad3..305751891f58 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -611,7 +611,6 @@ __metadata: "@aztec/types": "workspace:^" "@iarna/toml": ^2.2.5 "@jest/globals": ^29.5.0 - "@noir-lang/noir_wasm": "portal:../../noir/packages/noir_wasm" "@types/fs-extra": ^11.0.1 "@types/jest": ^29.5.0 "@types/lodash.camelcase": ^4.3.7 @@ -2814,14 +2813,6 @@ __metadata: languageName: node linkType: soft -"@noir-lang/noir_wasm@portal:../noir/packages/noir_wasm::locator=%40aztec%2Faztec3-packages%40workspace%3A.": - version: 0.0.0-use.local - resolution: "@noir-lang/noir_wasm@portal:../noir/packages/noir_wasm::locator=%40aztec%2Faztec3-packages%40workspace%3A." - dependencies: - pako: ^2.1.0 - languageName: node - linkType: soft - "@noir-lang/noirc_abi@portal:../noir/packages/noirc_abi::locator=%40aztec%2Faztec3-packages%40workspace%3A.": version: 0.0.0-use.local resolution: "@noir-lang/noirc_abi@portal:../noir/packages/noirc_abi::locator=%40aztec%2Faztec3-packages%40workspace%3A."