This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
feat: Add Brillig
opcode to introduce custom non-determinism to ACVM
#152
Merged
Conversation
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
kevaundray
changed the title
Add initial code for non-deterministic vm
feat: Add initial code for non-deterministic vm
Mar 24, 2023
Also spoke with Guillaume and it seems we could get the Oracle opcode into this instruction set rather than in the ACIR opcode set. We have two main goals for this:
The invert directive will be a full e2e test that shows that we can replace our current directives with this bytecode. Integrating the other directives will be fairly straightforward |
- use ValueKind - refactor opcodes needed
* add serialization for brillig * cargo fmt
* solve the brillig directive * move brilling_bytecode out of acvm * go back to correct process_opcodes * cargo fmt * switch to using insert_witness method
- RegisterIndex -> RegisterMemIndex
* trap opcode in Opcode enum * process trap opcode
* brillig jmp process_opcode * making jump test * starting jmp opcode test * test brillig jumps * debug cleanup * remove comments from Value in vm
* jmp if not opcode and test * jmp if not opode and test * fix jmpifnot test * carog fmt * remove unnecessary registers in jmpif test * cargo fmt
* MOV opcode in brillig and a basic test * cargo fmt * fixed move to not only move source into dest, not a full swap * cargo fmt
* add lt and lte comparisons to BinaryOp + tests * briefly delete test * cargo fmt * temp remove test
TomAFrench
changed the title
feat: Add initial code for non-deterministic vm
feat: Add May 23, 2023
Brillig
opcode which introduces non-determinism to ACVM
TomAFrench
changed the title
feat: Add
feat: Add May 23, 2023
Brillig
opcode which introduces non-determinism to ACVMBrillig
opcode to introduce custom non-determinism to ACVM
TomAFrench
reviewed
May 23, 2023
* chore: make fields private on `Value` and `RegisterIndex` * Update brillig_bytecode/src/value.rs --------- Co-authored-by: kevaundray <[email protected]>
Once #152 (comment) is resolved either way then I can remove the block from this PR. If we want to merge this today in UK time then we should prioritise this so we can resolve before I go to bed (otherwise I'll have to merge in the morning). |
Co-authored-by: Tom French <[email protected]>
Co-authored-by: Tom French <[email protected]>
Co-authored-by: Tom French <[email protected]>
Co-authored-by: Tom French <[email protected]>
Just resolved this |
TomAFrench
reviewed
May 23, 2023
TomAFrench
approved these changes
May 23, 2023
TomAFrench
suggested changes
May 23, 2023
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.
one nit
TomAFrench
approved these changes
May 23, 2023
Merged
1 task
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue(s)
(If it does not already exist, first create a GitHub issue that describes the problem this Pull Request (PR) solves before creating the PR and link it here.)
Resolves (link to issue)
Description
This is a generalization of our directive functions. Right now we have directives which are defined at compile time in the code, this VM will allow us to instead have the user write the non-deterministic in their frontend like Noir , this gets compiled down to this bytecode and then ran on the VM.
From conversations with Guillaume, the directive will then look like:
Summary of changes
(Describe the changes in this PR. Point out breaking changes if any.)
Dependency additions / changes
(If applicable.)
Test additions / changes
(If applicable.)
Checklist
cargo fmt
with default settings.Additional context
(If applicable.)