diff --git a/yarn-project/aztec-rpc/package.json b/yarn-project/aztec-rpc/package.json index 78f906e82b5..9c477cf34f1 100644 --- a/yarn-project/aztec-rpc/package.json +++ b/yarn-project/aztec-rpc/package.json @@ -35,6 +35,7 @@ "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/key-store": "workspace:^", + "@aztec/noir-compiler": "workspace:^", "@aztec/types": "workspace:^", "lodash.omit": "^4.5.0", "lodash.partition": "^4.6.0", 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 d2dd9501e8c..ee0275850d6 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 @@ -20,6 +20,7 @@ import { encodeArguments } from '@aztec/foundation/abi'; import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr, Point } from '@aztec/foundation/fields'; import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import NoirVersion from '@aztec/noir-compiler/noir-version'; import { AuthWitness, AztecNode, @@ -306,6 +307,7 @@ export class AztecRPCServer implements AztecRPC { chainId, rollupAddress, client: this.clientInfo, + nargoVersion: NoirVersion.commit, }; } diff --git a/yarn-project/aztec-rpc/tsconfig.json b/yarn-project/aztec-rpc/tsconfig.json index 3969b165c61..8f298d5722d 100644 --- a/yarn-project/aztec-rpc/tsconfig.json +++ b/yarn-project/aztec-rpc/tsconfig.json @@ -18,6 +18,9 @@ { "path": "../key-store" }, + { + "path": "../noir-compiler" + }, { "path": "../types" } diff --git a/yarn-project/aztec.js/src/contract/contract.test.ts b/yarn-project/aztec.js/src/contract/contract.test.ts index 411635fbd79..b14a8d57121 100644 --- a/yarn-project/aztec.js/src/contract/contract.test.ts +++ b/yarn-project/aztec.js/src/contract/contract.test.ts @@ -28,7 +28,13 @@ describe('Contract Class', () => { const mockTxHash = { type: 'TxHash' } as any as TxHash; const mockTxReceipt = { type: 'TxReceipt' } as any as TxReceipt; const mockViewResultValue = 1; - const mockNodeInfo: NodeInfo = { version: 1, chainId: 2, rollupAddress: EthAddress.random(), client: '' }; + const mockNodeInfo: NodeInfo = { + version: 1, + chainId: 2, + rollupAddress: EthAddress.random(), + client: '', + nargoVersion: 'sdlhahf823', + }; const defaultAbi: ContractAbi = { name: 'FooContract', diff --git a/yarn-project/boxes/private-token/tsconfig.json b/yarn-project/boxes/private-token/tsconfig.json index 5d087f2521d..cc958d6c6f1 100644 --- a/yarn-project/boxes/private-token/tsconfig.json +++ b/yarn-project/boxes/private-token/tsconfig.json @@ -41,12 +41,6 @@ }, { "path": "../../foundation" - }, - { - "path": "../../noir-compiler" - }, - { - "path": "../../types" } ] } diff --git a/yarn-project/cli/README.md b/yarn-project/cli/README.md index 87f643a669f..c3dd94eb054 100644 --- a/yarn-project/cli/README.md +++ b/yarn-project/cli/README.md @@ -441,7 +441,7 @@ Gets information of an Aztec node at the specified URL. Syntax: -```shel +```shell aztec-cli get-node-info ``` diff --git a/yarn-project/noir-compiler/package.json b/yarn-project/noir-compiler/package.json index d9efa71dc52..d7b01d1fafc 100644 --- a/yarn-project/noir-compiler/package.json +++ b/yarn-project/noir-compiler/package.json @@ -4,7 +4,8 @@ "type": "module", "exports": { ".": "./dest/index.js", - "./cli": "./dest/cli/index.js" + "./cli": "./dest/cli/index.js", + "./noir-version": "./dest/noir-version.js" }, "typedocOptions": { "entryPoints": [ diff --git a/yarn-project/noir-compiler/src/noir-version.ts b/yarn-project/noir-compiler/src/noir-version.ts new file mode 100644 index 00000000000..aad45f07eef --- /dev/null +++ b/yarn-project/noir-compiler/src/noir-version.ts @@ -0,0 +1,3 @@ +import * as version from './noir-version.json' assert { type: 'json' }; + +export default version.default; diff --git a/yarn-project/types/src/interfaces/aztec_rpc.ts b/yarn-project/types/src/interfaces/aztec_rpc.ts index 9ff597b8d87..4f593a2d99c 100644 --- a/yarn-project/types/src/interfaces/aztec_rpc.ts +++ b/yarn-project/types/src/interfaces/aztec_rpc.ts @@ -52,6 +52,10 @@ export type NodeInfo = { * Identifier of the client software. */ client: string; + /** + * The nargo version compatible with this node. + */ + nargoVersion: string; }; /** Provides up to which block has been synced by different components. */ diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 375e0596fac..eba3982548e 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -156,6 +156,7 @@ __metadata: "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/key-store": "workspace:^" + "@aztec/noir-compiler": "workspace:^" "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@rushstack/eslint-patch": ^1.1.4