Skip to content

Commit 045a909

Browse files
committed
update cli to allow nonstructured hiding circuit VK
1 parent cb6e829 commit 045a909

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,9 @@ void ClientIVCAPI::write_vk(const Flags& flags,
213213
auto bytecode = get_bytecode(bytecode_path);
214214
write_civc_vk(flags.output_format, bytecode, output_path);
215215
} else if (flags.verifier_type == "standalone") {
216-
write_standalone_vk(flags.output_format, bytecode_path, output_path);
216+
write_standalone_vk(flags.output_format, bytecode_path, output_path, /*use_structured_trace=*/true);
217+
} else if (flags.verifier_type == "hiding") {
218+
write_standalone_vk(flags.output_format, bytecode_path, output_path, /*use_structured_trace=*/false);
217219
} else {
218220
const std::string msg = std::string("Can't write vk for verifier type ") + flags.verifier_type;
219221
throw_or_abort(msg);

barretenberg/cpp/src/barretenberg/bb/cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ int parse_and_run_cli_command(int argc, char* argv[])
256256
"use case where an IVC scheme is manually constructed via recursive UltraHonk proof "
257257
"verification). `ivc` produces a verification key for verifying the stack of run though a "
258258
"dedicated ivc verifier class (currently the only option is the ClientIVC class) ")
259-
->check(CLI::IsMember({ "standalone", "ivc" }).name("is_member"));
259+
->check(CLI::IsMember({ "standalone", "hiding", "ivc" }).name("is_member"));
260260
};
261261

262262
const auto add_verbose_flag = [&](CLI::App* subcommand) {

noir-projects/noir-protocol-circuits/bootstrap.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ export circuits_hash=$(hash_str "$NOIR_HASH" $(cache_content_hash "^noir-project
2929

3030
# Circuits matching these patterns we have client-ivc keys computed, rather than ultra-honk.
3131
readarray -t ivc_patterns < <(jq -r '.[]' "../client_ivc_circuits.json")
32-
readarray -t ivc_tail_patterns < <(jq -r '.[]' "../client_ivc_tail_circuits.json")
32+
ivc_hiding_pattern=("hiding")
3333
readarray -t rollup_honk_patterns < <(jq -r '.[]' "../rollup_honk_circuits.json")
3434
# Convert to regex string here and export for use in exported functions.
3535
export ivc_regex=$(IFS="|"; echo "${ivc_patterns[*]}")
36-
export private_tail_regex=$(IFS="|"; echo "${ivc_tail_patterns[*]}")
36+
export hiding_kernel_regex=$(IFS="|"; echo "${ivc_hiding_pattern[*]}")
3737
export rollup_honk_regex=$(IFS="|"; echo "${rollup_honk_patterns[*]}")
3838

3939
function on_exit {
@@ -74,10 +74,10 @@ function compile {
7474
cache_upload circuit-$hash.tar.gz $json_path &> /dev/null
7575
fi
7676

77-
if echo "$name" | grep -qE "${private_tail_regex}"; then
77+
if echo "$name" | grep -qE "${hiding_kernel_regex}"; then
7878
local proto="client_ivc_tail"
7979
# We still need the standalone IVC vk. We also create the final IVC vk from the tail (specifically, the number of public inputs is used from it).
80-
local write_vk_cmd="write_vk --scheme client_ivc --verifier_type standalone"
80+
local write_vk_cmd="write_vk --scheme client_ivc --verifier_type hiding"
8181
elif echo "$name" | grep -qE "${ivc_regex}"; then
8282
local proto="client_ivc"
8383
local write_vk_cmd="write_vk --scheme client_ivc --verifier_type standalone"
@@ -123,7 +123,7 @@ function compile {
123123
echo_stderr "Root rollup verifier at: $verifier_path (${SECONDS}s)"
124124
# Include the verifier path if we create it.
125125
cache_upload vk-$hash.tar.gz $key_path $verifier_path &> /dev/null
126-
elif echo "$name" | grep -qE "${private_tail_regex}"; then
126+
elif echo "$name" | grep -qE "${hiding_kernel_regex}"; then
127127
# If we are a tail kernel circuit, we also need to generate the ivc vk.
128128
SECONDS=0
129129
local ivc_vk_path="$key_dir/${name}.ivc.vk"

0 commit comments

Comments
 (0)