-
Notifications
You must be signed in to change notification settings - Fork 324
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: recording circuit inputs + oracles #12148
base: master
Are you sure you want to change the base?
Conversation
7066df6
to
9704d8c
Compare
8ff3a09
to
d4d63fe
Compare
getClientCircuitArtifactByName(artifact: ClientProtocolArtifact): Promise<NoirCompiledCircuit> { | ||
return Promise.resolve(ClientCircuitArtifacts[artifact]); | ||
getClientCircuitArtifactByName(artifact: ClientProtocolArtifact): Promise<NoirCompiledCircuitWithName> { | ||
return Promise.resolve({ ...ClientCircuitArtifacts[artifact], name: artifact.replace('Artifact', '') }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I introduced NoirCompiledCircuitWithName which as the name implies is just NoirCompiledCircuit
type with the name. This was necessary as I needed the name in the circuit recorder.
@@ -98,7 +98,7 @@ function generateVkImportFunction() { | |||
const main = async () => { | |||
const content = ` | |||
/* eslint-disable camelcase */ | |||
// GENERATED FILE - DO NOT EDIT. RUN \`yarn generate\` or \`yarn generate:client-artifacts-helper\` | |||
// GENERATED FILE - DO NOT EDIT. RUN \`yarn generate\` in the noir-protocol-circuits-types package to update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn generate:client-artifacts-helper
no longer exists so I updated it.
@@ -54,12 +54,12 @@ function generateCircuitArtifactImportFunction() { | |||
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS | |||
return `case '${artifactName}': { | |||
const { default: compiledCircuit } = await import(\"../artifacts/${artifactName}.json\"); | |||
return compiledCircuit as NoirCompiledCircuit; | |||
return { ...(compiledCircuit as NoirCompiledCircuit), name: '${artifactName}' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -75,7 +75,7 @@ export interface NoirCompiledContract { | |||
} | |||
|
|||
/** | |||
* The compilation result of an Aztec.nr contract. | |||
* The compilation result of a protocol (non-contract) circuit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was incorrect as it doesn't seem to ever be used with contracts. There is a lot of tech debt around.
dependencies: | ||
"@noir-lang/acvm_js": "npm:1.0.0-beta.3" | ||
"@noir-lang/noirc_abi": "npm:1.0.0-beta.3" | ||
"@noir-lang/types": "npm:1.0.0-beta.3" | ||
checksum: 10/4e756f69e5c8fcfe4f1243f026e37d68584852ad18887414ccc74de928ff2c019ea785ae06e48c523744676ccff2993b4d3ed8b971d6478e431af38574b4e924 | ||
checksum: 10/e544b07c369f63eb6513f11b3e4f203a2c4fd8cfca4965cecd576affc06ceee8c4ec817d220dcd24f8e31c896fc86eb3343f2a49744082c81808336567ac4882 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this change got triggered here - I just bootstrapped and it happened
cd417dc
to
e328450
Compare
* | ||
* @param aztecNode - The AztecNode instance to be used by the server. | ||
* @param config - The PXE Service Config to use | ||
* @param options - (Optional) Optional information for creating an PXEService. | ||
* @param proofCreator - An optional proof creator to use in place of any other configuration | ||
* @returns A Promise that resolves to the started PXEService instance. | ||
*/ | ||
export async function createPXEService( | ||
export function createPXEService( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split this function into 2 so that I can pass in the SimulationProviderRecorderWrapper into the PXE in tests.
*/ | ||
export async function setupPXEService( | ||
aztecNode: AztecNode, | ||
opts: Partial<PXEServiceConfig> = {}, | ||
logger = getLogger(), | ||
useLogSuffix = false, | ||
proofCreator?: BBNativePrivateKernelProver, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This param was never used so I nuked it.
aztecNode: AztecNode, | ||
config: PXEServiceConfig, | ||
useLogSuffix: string | boolean | undefined = undefined, | ||
proofCreator?: PrivateKernelProver, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This param was never used so I nuked it.
34b9dbf
to
b236395
Compare
b236395
to
1457278
Compare
Fixes #11855
This is an example of a (shortened) recoding: