Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Only construct circuit once when writing two vks. #1260

Closed
codygunton opened this issue Feb 15, 2025 · 0 comments · Fixed by AztecProtocol/aztec-packages#11459
Closed

Only construct circuit once when writing two vks. #1260

codygunton opened this issue Feb 15, 2025 · 0 comments · Fixed by AztecProtocol/aztec-packages#11459

Comments

@codygunton
Copy link
Collaborator

codygunton commented Feb 15, 2025

As part of the CLI11 introduction work, in noir-protocol-circuits bootstrap and in noir-bb-bench generate_artifacts.sh, I replaced a call to write_vk + a call to vk_as_fields by two calls to write_vk with different output types. This is inefficient because it constructs the circuit twice. Should fix by using the bytes_and_fields option and using the disk, or doing a command line conversion as in (head -c $((32*10)) /dev/urandom | od -t x1 -An | tr -d ' \n' | sed 's/\(.\{64\}\)/0x\1\n/g' | jq -R -s 'split("\n") | map(select(. != ""))')

AztecBot pushed a commit that referenced this issue Feb 21, 2025
Overhaul the Barretenberg binary and its API.
- Breaks up bb main into different files organized by proving system /
IVC scheme.
- Make UltraHonk conform to the new API interface introduced earlier for
Client IVC.
- Refines the API a bit.
- Introduces [CLI11](https://github.com/CLIUtils/CLI11) to: provide help
/ documentation; validate opts (options can be required, exlusive of
each other, validated against predicates like "path exists" or "string
is in list"); also allows for easy environment variable aliasing.

This could definitely use some more a help. 
 - Lots of documentation needed
- Defaults are set in a weird and inconsistent way and that information
isn't included in the documentation.
- The help menus are perhaps too verbose. Subcommands can't inherit
options or flags so we end up repeating.
- Empty string cannot be passed and parsed to a "nothing argument" which
can lead to frustrating debugging...
 - Little option validation is actually implemented.
 - Deprecated options aren't noted but they could be.

It was requested that the default change from UltraPlonk to UltraHonk,
but we get rid of a default set of commands altogether. As a workaround,
we can have users set `BB_SCHEME=ultra_honk`.

Newly created issues:
#1252,
#1253,
#1254,
#1255,
#1256,
#1257,
#1258,
#1259

Resolves #1260

NB the line count is large because 1) CLI11 is a single 11k-line header;
2) I moved a lot of functions and some git mvs didn't show up as such.
Main new code is api_ultra_honk.hpp.

---------

Co-authored-by: ludamad <adam.domurad@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant