Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exposing nargo version via NodeInfo #2333

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions yarn-project/aztec-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -306,6 +307,7 @@ export class AztecRPCServer implements AztecRPC {
chainId,
rollupAddress,
client: this.clientInfo,
nargoVersion: NoirVersion.commit,
};
}

Expand Down
3 changes: 3 additions & 0 deletions yarn-project/aztec-rpc/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
{
"path": "../key-store"
},
{
"path": "../noir-compiler"
},
{
"path": "../types"
}
Expand Down
8 changes: 7 additions & 1 deletion yarn-project/aztec.js/src/contract/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 0 additions & 6 deletions yarn-project/boxes/private-token/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@
},
{
"path": "../../foundation"
},
{
"path": "../../noir-compiler"
},
{
"path": "../../types"
}
]
}
2 changes: 1 addition & 1 deletion yarn-project/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ Gets information of an Aztec node at the specified URL.

Syntax:

```shel
```shell
aztec-cli get-node-info
```

Expand Down
3 changes: 2 additions & 1 deletion yarn-project/noir-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
3 changes: 3 additions & 0 deletions yarn-project/noir-compiler/src/noir-version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import * as version from './noir-version.json' assert { type: 'json' };

export default version.default;
4 changes: 4 additions & 0 deletions yarn-project/types/src/interfaces/aztec_rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
1 change: 1 addition & 0 deletions yarn-project/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down