You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: no longer recompute vk's in CIVC proofs (#13590)
Apologies for the big PR. Lots of the stuff in here ended up being
chicken and egg with wanting to do refactoring to make this process
smoother/help debug tricky issues, and wanting to see that those
refactorings actually make sense by the end.
We no longer compute VKs on the fly in CIVC. This saves ~25% of
computation. This is done throughout by consolidating IVC inputs into a
single ivc-inputs.msgpack structure which supports passing bytecode,
witness & vk information to the bb backend. Now attaches a name for each
function, as well.
Major features:
- IVC inputs passed thru native and wasm are always passed a single
file/buffer. This is encoded using msgpack and capture bytecode,
witness, vk, and function name (which is now printed, but only properly
passed by native) For native, the bincode and witnesses are gzipped, for
WASM they are uncompressed. For actions such as gates or write_vk, the
IVC inputs are used with same structure but witness and vk data can be
blank.
This has a bunch of implications, such as having to break away from the
rigid API base class in bb cli (which overall doesn't feel worthwhile
anyway as CIVC is fundamentally different than UH), having to string vk
info along, etc.
Other features:
Debuggability:
- Correct README.md instructions on WASM stack traces (give up on
getting line numbers working :/)
- clangd now properly shows all errors in a C++ file you're browsing,
instead of only showing you the first error.
Cleanup
- small cleanup to acir tests, but still not testing new ivc flow there.
Lightest weight test is ivc-integration in yarn-project
- Get rid of --input_type in bb cli for CIVC. now implied always to be
what was previously runtime_stack. Simplifies usages, other modes were
unused.
- more ignored linting in the clangd file. Maybe one day we can enforce
the remaining as errors.
- Clean up msgpack usage. Msgpack headers were leaking everywhere and it
is a chunky library.
- Consolidate with using msgpackr as our only typescript messagepack
library
Benches
- use wasmtime helper in bb bootstrap. deduplicate code in bench. bench
now honours NATIVE_PRESET, and if you do
```
export NATIVE_PRESET=op-count-time
./bootstrap.sh
./bootstrap.sh bench
```
you will get op count timings for our native ivc benches.
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: thunkar <[email protected]>
Co-authored-by: maramihali <[email protected]>
Co-authored-by: ledwards2225 <[email protected]>
If one doesn't provide the commit, it generates these IVC inputs on the fly (depends on yarn-project having been bootstrapped).
480
-
To use these inputs manually, just abort after input download and run ClientIVC proving with --input runtime_stack on those inputs (stored in `yarn-project/end-to-end/example-app-ivc-inputs-out`).
480
+
To use these inputs manually, just abort after input download and run ClientIVC proving on those inputs (stored in `yarn-project/end-to-end/example-app-ivc-inputs-out`).
481
481
482
482
#### Using Tracy to Profile Memory/CPU/Gate Counts
483
483
@@ -532,7 +532,7 @@ By default, the barretenberg.wasm.gz that is used by bb.js (aka barretenberg/ts)
532
532
One can get stack traces working from WASM by running root level ./bootstrap.sh (or otherwise building what you need) and then doing:
0 commit comments