Skip to content

Commit

Permalink
chore: Remove unused noir-version json (AztecProtocol#4105)
Browse files Browse the repository at this point in the history
Given we're now releasing aztec nargo from the monorepo with the same
versioning as the other packages, `noir-version.json` is no longer
needed.

As part of this changeset, removes all references to noir versions from
the docs (last ones were around installing nargo just for LSP, which are
being removed
[here](AztecProtocol#4110)),
removes the exported noir-version from noir-compiler, and removes the
`compatibleNargoVersion` from node-info since it's no longer used. And
besides, we were returning the string
`portal:../../noir/packages/noir_wasm` as `compatibleNargoVersion` from
the pxe 🤦.
  • Loading branch information
spalladino authored Jan 18, 2024
1 parent 07974e2 commit afca819
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 106 deletions.
1 change: 0 additions & 1 deletion build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ docs:
- ^.*.hpp$
- ^.*.ts$
- ^.release-please-manifest.json$
- ^.*/noir-version.json$
- ^.*.nr$
dependencies:
- yarn-project
Expand Down
11 changes: 0 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()}</>
```
4 changes: 0 additions & 4 deletions docs/docs/dev_docs/contracts/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/getting_started/tooling/language_server), which provides syntax highlighting and formatting for your Aztec contracts.

You can install `nargo` with the following commands:

<InstallNargoInstructions />

## 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).
Expand Down
5 changes: 0 additions & 5 deletions docs/docs/dev_docs/getting_started/aztecjs-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -168,7 +167,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: {
Expand Down Expand Up @@ -220,7 +218,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: {
Expand Down Expand Up @@ -282,7 +279,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: {
Expand Down Expand Up @@ -339,7 +335,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: {
Expand Down
4 changes: 0 additions & 4 deletions docs/docs/dev_docs/getting_started/aztecnr-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

<InstallNargoInstructions />

## What's next?

Now you can explore.
Expand Down
10 changes: 1 addition & 9 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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}`
);
}
},
Expand Down
12 changes: 0 additions & 12 deletions docs/src/components/InstallNargoInstructions/index.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/src/components/Version/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ export default function Version({ what }) {
return Versions()[what];
}

export const NoirVersion = () => Versions()["noir"];
export const AztecPackagesVersion = () => Versions()["aztec-packages"];
8 changes: 0 additions & 8 deletions docs/src/preprocess/include_version.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,7 +15,6 @@ async function getVersions() {
fs.readFileSync(aztecVersionPath).toString()
)["."];
versions = {
noir: noirVersion,
aztec: `aztec-packages-v${aztecVersion}`,
aztec_short: aztecVersion,
};
Expand Down
8 changes: 1 addition & 7 deletions docs/src/theme/MDXComponents.js
Original file line number Diff line number Diff line change
@@ -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,
};
9 changes: 4 additions & 5 deletions yarn-project/aztec-sandbox/src/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);

Expand All @@ -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();
Expand Down Expand Up @@ -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

Expand All @@ -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();
Expand Down
1 change: 0 additions & 1 deletion yarn-project/aztec.js/src/contract/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ describe('Contract Class', () => {
};
const mockNodeInfo: NodeInfo = {
nodeVersion: 'vx.x.x',
compatibleNargoVersion: 'vx.x.x-aztec.x',
chainId: 1,
protocolVersion: 2,
l1ContractAddresses: l1Addresses,
Expand Down
1 change: 0 additions & 1 deletion yarn-project/cli/src/cmds/get_node_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`);
Expand Down
1 change: 0 additions & 1 deletion yarn-project/end-to-end/src/cli_docs_sandbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions yarn-project/noir-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions yarn-project/noir-compiler/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
export * from './versions.js';

export { generateTypescriptContractInterface } from './contract-interface-gen/typescript.js';
export { generateNoirContractInterface } from './contract-interface-gen/noir.js';
4 changes: 0 additions & 4 deletions yarn-project/noir-compiler/src/noir-version.json

This file was deleted.

12 changes: 0 additions & 12 deletions yarn-project/noir-compiler/src/versions.ts

This file was deleted.

2 changes: 0 additions & 2 deletions yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -488,7 +487,6 @@ export class PXEService implements PXE {

const nodeInfo: NodeInfo = {
nodeVersion: this.nodeVersion,
compatibleNargoVersion: NoirWasmVersion,
chainId,
protocolVersion: version,
l1ContractAddresses: contractAddresses,
Expand Down
4 changes: 0 additions & 4 deletions yarn-project/types/src/interfaces/node-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
9 changes: 0 additions & 9 deletions yarn-project/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit afca819

Please sign in to comment.