-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Create an Oracle class that has all the apis needed by Aztec.nr. - Oracle names are now derived from the class instead of using a hard-coded type. - Create a TypedOracle that has typed input args and output values for real implementation based on the context (public, private, view). - Converting from and to ACVMField is handled in Oracle class. - Keep accumulated data in Public/ClientContexts instead of scattering between Contexts and Public/PrivateExecutions. Executions are stateless functions now. - Create a SideEffectCounter class to keep track of the number, which potentially fixes a bug in previous private_execution where the counter was not updated after calling another private function. # Checklist: Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge. - [ ] If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag. - [ ] I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code. - [ ] Every change is related to the PR description. - [ ] I have [linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue) this pull request to relevant issues (if any exist).
- Loading branch information
Showing
26 changed files
with
1,405 additions
and
1,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
yarn-project/acir-simulator/src/acvm/acvm_fields_reader.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export * from './acvm_fields_reader.js'; | ||
export * from './serialize.js'; | ||
export * from './acvm.js'; | ||
export * from './deserialize.js'; | ||
export * from './oracle/index.js'; | ||
export * from './serialize.js'; |
2 changes: 1 addition & 1 deletion
2
...roject/acir-simulator/src/client/debug.ts → ...t/acir-simulator/src/acvm/oracle/debug.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Oracle } from './oracle.js'; | ||
|
||
export * from './debug.js'; | ||
export * from './oracle.js'; | ||
export * from './typed_oracle.js'; | ||
|
||
/** | ||
* A conditional type that takes a type `T` and returns a union of its method names. | ||
*/ | ||
type MethodNames<T> = { | ||
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never; | ||
}[keyof T]; | ||
|
||
/** | ||
* Available oracle function names. | ||
*/ | ||
export type ORACLE_NAMES = MethodNames<Oracle>; |
Oops, something went wrong.