-
Notifications
You must be signed in to change notification settings - Fork 219
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
chore: Extract bytecode from artifact files for backend integration test inputs #2356
Conversation
nargo compile
Is this just for the purposes of barretenberg testing? A better solution would be to extract the circuit from the json file inside |
I think this is also a less leaky abstraction because when backends run end to end tests, they will not want to parse the .json file because thats not a part of the ACVM interface |
Note, we could also just make a change in the bb script which runs the tests, so it downloads the main.json and then parses the bytecode and deletes it for a file with just the bytecode. Though then all backends would need to do that too. Orthogonally, we'd also want to change the interface of bb.js if its expecting more than just the bytecode. What are your thoughts? |
My point is that |
Unless we're expecting users to use this option in normal usage (in which case we need to discuss why) then it doesn't make sense for CI logic to leak into the binary we distribute to users. |
It should be hidden to the user in this PR -- in either case, you could make an argument that the user may want to just compile the bytecode and witness, then run it with a different backend/binary, ie they only use Noir for compilation and then they call some other binary to consume it -- ie dynamic backends. Unless we are also expecting backends dynamic backends to take in the prepropressedProgram as input? |
Yep I understand this argument -- lets fallback onto this based on the conclusions we make to my previous question |
Spoke with Tom and he made the good point that users will likely want to use the abi so they know how to encode the inputs. I think this is a good enough reason to switch to modifying the rebuild script and we can revisit adding bytecode-only flag when/if it ever comes up again as a viable workflow |
fe0da28
to
0db5119
Compare
nargo compile
...li/tests/execution_success/1327_concrete_in_generic/target/1327_concrete_in_generic.bytecode
Show resolved
Hide resolved
* master: feat(ssa): Merge slices in if statements with witness conditions (#2347) chore: Separate frontend `Visibility` and `Distinctness` from the ABI (#2369) feat: add syntax for specifying function type environments (#2357) chore: Remove unused `Directive::Log` (#2366) chore: clippy fixes (#2365) chore: Extract bytecode from artifact files for backend integration test inputs (#2356) feat: Add trait definition representation in DefCollector and HIR (#2338) chore: Remove unused `Intrinsic::Println` (#2358) fix: Remove duplicte `T` in `expected T, found T` error on tuple assignment (#2360) chore(brillig): Fix brillig radix instruction return vector size (#2350) fix: Show types in error message in same order as in source code (#2353)
* master: (46 commits) chore: Remove `serde` from `noirc_frontend` (#2390) chore: allow parenthesizing in two type locations (#2388) chore(ci): automatically delete cache entries associated with closed PRs (#2342) feat: Perform more checks for compile-time arithmetic (#2380) chore: Remove `noirc_abi::FunctionSignature` and define in terms of HIR (#2372) feat: Update to `acvm` 0.22.0 (#2363) chore: Update committed ACIR artifacts (#2376) feat(ssa): Merge slices in if statements with witness conditions (#2347) chore: Separate frontend `Visibility` and `Distinctness` from the ABI (#2369) feat: add syntax for specifying function type environments (#2357) chore: Remove unused `Directive::Log` (#2366) chore: clippy fixes (#2365) chore: Extract bytecode from artifact files for backend integration test inputs (#2356) feat: Add trait definition representation in DefCollector and HIR (#2338) chore: Remove unused `Intrinsic::Println` (#2358) fix: Remove duplicte `T` in `expected T, found T` error on tuple assignment (#2360) chore(brillig): Fix brillig radix instruction return vector size (#2350) fix: Show types in error message in same order as in source code (#2353) chore: update noir-source-resolver from `1.1.2` to `^1.1.3` (#2349) chore(ci): Avoid writing to cache in workflows triggered by the merge queue (#2341) ...
Description
This PR allows backends to not needed to parse the PreprocessedProgram. Instead they can parse the bytecode directly, this is inline with the fact that backends do not know about Noir, only ACIR.
Problem*
Resolves
Summary*
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.