Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
adc4c74
new types
lucasxia01 Mar 12, 2025
f79e79b
update prover output
lucasxia01 Mar 17, 2025
4eecccf
bb compiles
lucasxia01 Mar 17, 2025
240d1a9
Merge remote-tracking branch 'origin/master' into lx/split-public-inp…
lucasxia01 Mar 18, 2025
6f9666b
update acir tests bootstrap
lucasxia01 Mar 18, 2025
5327e57
update UH verify to take in public inputs from a separate file
lucasxia01 Mar 19, 2025
fe4e9f0
fix acir tests for solidity flows
lucasxia01 Mar 19, 2025
aba0481
changed vk hashes
lucasxia01 Mar 19, 2025
b9edfe4
Merge remote-tracking branch 'origin/master' into lx/split-public-inp…
lucasxia01 Mar 19, 2025
1cc406b
update to make plonk sol acir tests work
lucasxia01 Mar 19, 2025
bc0ffe9
Merge remote-tracking branch 'origin/master' into lx/split-public-inp…
lucasxia01 Mar 20, 2025
f1b2945
update public-inputs to public_inputs
lucasxia01 Mar 20, 2025
92f1d50
update the prove and verify to use the public_inputs_path
lucasxia01 Mar 20, 2025
df407ba
try to fix things
lucasxia01 Mar 20, 2025
25e097b
Merge remote-tracking branch 'origin/master' into lx/split-public-inp…
lucasxia01 Mar 20, 2025
4edea76
fix writing json for empty arrays
lucasxia01 Mar 20, 2025
0556524
fix sol acir tests
lucasxia01 Mar 20, 2025
5ab1dea
fix public inputs path
lucasxia01 Mar 21, 2025
3448f64
update bbjs_prove_bb_verify to split public inputs
lucasxia01 Mar 24, 2025
1bf4645
attempt to fix bbjs sol flow
lucasxia01 Mar 24, 2025
36a629f
oops, not the correct fix
lucasxia01 Mar 24, 2025
08c1dac
fix prove_tube
lucasxia01 Mar 24, 2025
3e04edf
Merge branch 'master' into lx/split-public-inputs-from-proof
lucasxia01 Mar 24, 2025
f78066c
Merge branch 'master' into lx/split-public-inputs-from-proof
lucasxia01 Mar 25, 2025
69de125
fix the gd full test
lucasxia01 Mar 26, 2025
90438e4
Merge branch 'lx/split-public-inputs-from-proof' of github.com:AztecP…
lucasxia01 Mar 26, 2025
dbd9ca8
reinstate extractPublicInputs
lucasxia01 Mar 26, 2025
fb775fe
fix execute.ts format
lucasxia01 Mar 26, 2025
31f0d17
fix prover node publisher test
lucasxia01 Mar 27, 2025
0245191
Merge branch 'master' into lx/split-public-inputs-from-proof
lucasxia01 Mar 27, 2025
52dd528
move the hack downward because typescript.
lucasxia01 Mar 27, 2025
175915b
Merge branch 'lx/split-public-inputs-from-proof' of github.com:AztecP…
lucasxia01 Mar 27, 2025
fc47c55
fix prove tube test
lucasxia01 Mar 28, 2025
09f2800
add comments and todos
lucasxia01 Mar 28, 2025
635971c
Merge remote-tracking branch 'origin/master' into lx/split-public-inp…
lucasxia01 Mar 31, 2025
68d1081
add TODO
lucasxia01 Mar 31, 2025
786889f
changing import to fix build
lucasxia01 Mar 31, 2025
15cdc65
fix bb prover full rollup test
lucasxia01 Mar 31, 2025
ea6e789
fix prover-node-publisher test
lucasxia01 Mar 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 29 additions & 9 deletions barretenberg/acir_tests/bbjs-test/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const BYTES_PER_FIELD = 32;
const UH_PROOF_LENGTH_IN_BYTES = UH_PROOF_FIELDS_LENGTH * BYTES_PER_FIELD;

const proofPath = (dir: string) => path.join(dir, "proof");
const publicInputsPath = (dir: string) => path.join(dir, "public-inputs");
const publicInputsAsFieldsPath = (dir: string) =>
Copy link
Contributor Author

@lucasxia01 lucasxia01 Mar 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was the only change in this file: publicInputsPath -> publicInputsAsFieldsPath.

path.join(dir, "public_inputs_fields.json");
const vkeyPath = (dir: string) => path.join(dir, "vk");

async function generateProof({
Expand All @@ -33,19 +34,33 @@ async function generateProof({
debug(`Generating proof for ${bytecodePath}...`);
const circuitArtifact = await fs.readFile(bytecodePath);
const bytecode = JSON.parse(circuitArtifact.toString()).bytecode;
const backend = new UltraHonkBackend(bytecode, { threads: multiThreaded ? 8 : 1 });
const backend = new UltraHonkBackend(bytecode, {
threads: multiThreaded ? 8 : 1,
});

const witness = await fs.readFile(witnessPath);
const proof = await backend.generateProof(new Uint8Array(witness), { keccak: (oracleHash === "keccak") });
assert(proof.proof.length === UH_PROOF_LENGTH_IN_BYTES, `Unexpected proof length ${proof.proof.length} for ${bytecodePath}`);
const proof = await backend.generateProof(new Uint8Array(witness), {
keccak: oracleHash === "keccak",
});
assert(
proof.proof.length === UH_PROOF_LENGTH_IN_BYTES,
`Unexpected proof length ${proof.proof.length} for ${bytecodePath}`
);

await fs.writeFile(proofPath(outputDirectory), Buffer.from(proof.proof));
debug("Proof written to " + proofPath(outputDirectory));

await fs.writeFile(publicInputsPath(outputDirectory), JSON.stringify(proof.publicInputs));
debug("Public inputs written to " + publicInputsPath(outputDirectory));
await fs.writeFile(
publicInputsAsFieldsPath(outputDirectory),
JSON.stringify(proof.publicInputs)
);
debug(
"Public inputs written to " + publicInputsAsFieldsPath(outputDirectory)
);

const verificationKey = await backend.getVerificationKey({ keccak: (oracleHash === "keccak") });
const verificationKey = await backend.getVerificationKey({
keccak: oracleHash === "keccak",
});
await fs.writeFile(vkeyPath(outputDirectory), Buffer.from(verificationKey));
debug("Verification key written to " + vkeyPath(outputDirectory));

Expand All @@ -58,9 +73,14 @@ async function verifyProof({ directory }: { directory: string }) {
const verifier = new BarretenbergVerifier();

const proof = await fs.readFile(proofPath(directory));
assert(proof.length === UH_PROOF_LENGTH_IN_BYTES, `Unexpected proof length ${proof.length}`);
assert(
proof.length === UH_PROOF_LENGTH_IN_BYTES,
`Unexpected proof length ${proof.length}`
);

const publicInputs = JSON.parse(await fs.readFile(publicInputsPath(directory), "utf8"));
const publicInputs = JSON.parse(
await fs.readFile(publicInputsAsFieldsPath(directory), "utf8")
);
const vkey = await fs.readFile(vkeyPath(directory));

const verified = await verifier.verifyUltraHonkProof(
Expand Down
20 changes: 9 additions & 11 deletions barretenberg/acir_tests/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ function run_proof_generation {
dump_fail "$prove_cmd"

local vk_fields=$(cat "$outdir/vk_fields.json")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplification of this logic to generate recursive proof inputs

local public_inputs_fields=$(cat "$outdir/public_inputs_fields.json")
local proof_fields=$(cat "$outdir/proof_fields.json")
local num_inner_public_inputs=$(( 16#$(echo "$vk_fields" | jq -r '.[1] | ltrimstr("0x")') - adjustment ))

echo "num_inner_public_inputs for $program = $num_inner_public_inputs"

generate_toml "$program" "$vk_fields" "$proof_fields" "$num_inner_public_inputs"
generate_toml "$program" "$vk_fields" "$proof_fields" "$public_inputs_fields"
}

function generate_toml {
Expand All @@ -56,15 +54,15 @@ function generate_toml {

jq -nr \
--arg key_hash "$key_hash" \
--argjson vkf "$vk_fields" \
--argjson prooff "$proof_fields" \
--argjson num_inner_public_inputs "$num_inner_public_inputs" \
--argjson vk_f "$vk_fields" \
--argjson public_inputs_f "$public_inputs_fields" \
--argjson proof_f "$proof_fields" \
'[
"key_hash = \($key_hash)",
"proof = [\($prooff | .[$num_inner_public_inputs:] | map("\"" + . + "\"") | join(", "))]",
"public_inputs = [\($prooff | .[:$num_inner_public_inputs] | map("\"" + . + "\"") | join(", "))]",
"verification_key = [\($vkf | map("\"" + . + "\"") | join(", "))]"
'"$( [[ $program == *"double"* ]] && echo ',"proof_b = [\($prooff | .[$num_inner_public_inputs:] | map("\"" + . + "\"") | join(", "))]"' )"'
"proof = [\($proof_f | map("\"" + . + "\"") | join(", "))]",
"public_inputs = [\($public_inputs_f | map("\"" + . + "\"") | join(", "))]",
"verification_key = [\($vk_f | map("\"" + . + "\"") | join(", "))]"
'"$( [[ $program == *"double"* ]] && echo ',"proof_b = [\($proof_f | map("\"" + . + "\"") | join(", "))]"' )"'
] | join("\n")' > "$output_file"
}

Expand Down
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/flows/bb_prove_bbjs_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $BIN write_vk \
PROOF_FIELDS_LENGTH=$(jq 'length' $output_dir/proof_fields.json)
UH_PROOF_FIELDS_LENGTH=440
NUM_PUBLIC_INPUTS=$((PROOF_FIELDS_LENGTH - UH_PROOF_FIELDS_LENGTH))
jq ".[:$NUM_PUBLIC_INPUTS]" $output_dir/proof_fields.json > $output_dir/public-inputs
jq ".[:$NUM_PUBLIC_INPUTS]" $output_dir/proof_fields.json > $output_dir/public_inputs_fields.json
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change file name to be more apt


# Remove public inputs from the proof (first NUM_PUBLIC_INPUTS*32 bytes)
# Also remove the first 4 bytes, which is the proof length in fields
Expand Down
25 changes: 17 additions & 8 deletions barretenberg/acir_tests/flows/bbjs_prove_bb_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ output_dir=$artifact_dir/bb-bbjs-tmp
mkdir -p $output_dir

# Cleanup on exit
trap "rm -rf $output_dir" EXIT
# trap "rm -rf $output_dir" EXIT
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should undo


# Writes the proof, public inputs ./target; this also writes the VK
node ../../bbjs-test prove \
Expand All @@ -24,25 +24,34 @@ node ../../bbjs-test prove \
# Join the proof and public inputs to a single file
# this will not be needed after #11024

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed some logic here to split up the public inputs and proof to be in separate files

NUM_PUBLIC_INPUTS=$(cat $output_dir/public-inputs | jq 'length')
NUM_PUBLIC_INPUTS=$(cat $output_dir/public_inputs_fields.json | jq 'length')
UH_PROOF_FIELDS_LENGTH=440
PROOF_AND_PI_LENGTH_IN_FIELDS=$((NUM_PUBLIC_INPUTS + UH_PROOF_FIELDS_LENGTH))
PROOF_LENGTH_IN_FIELDS=$((UH_PROOF_FIELDS_LENGTH))
PI_LENGTH_IN_FIELDS=$((NUM_PUBLIC_INPUTS))
# First 4 bytes is PROOF_AND_PI_LENGTH_IN_FIELDS
proof_header=$(printf "%08x" $PROOF_AND_PI_LENGTH_IN_FIELDS)
proof_header=$(printf "%08x" $PROOF_LENGTH_IN_FIELDS)
pi_header=$(printf "%08x" $PI_LENGTH_IN_FIELDS)

proof_bytes=$(cat $output_dir/proof | xxd -p)
public_inputs=$(cat $output_dir/public-inputs | jq -r '.[]')
public_inputs=$(cat $output_dir/public_inputs_fields.json | jq -r '.[]')

public_inputs_bytes=""
for input in $public_inputs; do
public_inputs_bytes+=$input
done

# Combine proof header, public inputs, and the proof to a single file
echo -n $proof_header$public_inputs_bytes$proof_bytes | xxd -r -p > $output_dir/proof
# Combine proof header and the proof to a single file
echo -n $proof_header$proof_bytes | xxd -r -p > $output_dir/proof
echo -n $pi_header$public_inputs_bytes | xxd -r -p > $output_dir/public_inputs
echo "$BIN verify \
--scheme ultra_honk \
-k $output_dir/vk \
-p $output_dir/proof \
-i $output_dir/public_inputs"

# Verify the proof with bb cli
$BIN verify \
--scheme ultra_honk \
-k $output_dir/vk \
-p $output_dir/proof
-p $output_dir/proof \
-i $output_dir/public_inputs
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/flows/bbjs_prove_sol_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $BIN write_solidity_verifier --scheme ultra_honk -k $VK -o $VERIFIER_PATH

# Verify the proof using the solidity verifier
export PROOF=$output_dir/proof
export PUBLIC_INPUTS=$output_dir/public-inputs
export PUBLIC_INPUTS_AS_FIELDS=$output_dir/public_inputs_fields.json
export TEST_PATH=$(realpath "../../sol-test/HonkTest.sol")
export TESTING_HONK="true"
export TEST_NAME=$(basename $(realpath ./))
Expand Down
7 changes: 6 additions & 1 deletion barretenberg/acir_tests/flows/prove_then_verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ case ${SYS:-} in
FLAGS+=" --scheme $SYS --oracle_hash ${HASH:-poseidon2}"
[ "${ROLLUP:-false}" = "true" ] && FLAGS+=" --ipa_accumulation"
[ "${RECURSIVE}" = "true" ] && FLAGS+=" --init_kzg_accumulator"

OUTDIR=$(mktemp -d)
trap "rm -rf $OUTDIR" EXIT
$BIN prove $FLAGS $BFLAG -o $OUTDIR
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prove now has two output files so can't just do what we did before

$BIN verify $FLAGS \
-k <($BIN write_vk $FLAGS $BFLAG -o - ) \
-p <($BIN prove $FLAGS $BFLAG -o - )
-p $OUTDIR/proof \
-i $OUTDIR/public_inputs
;;
"ultra_honk_deprecated")
# deprecated flow is necessary until we finish C++ api refactor and then align ts api
Expand Down
4 changes: 3 additions & 1 deletion barretenberg/acir_tests/flows/sol_honk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ outdir=$(mktemp -d)
trap "rm -rf $outdir" EXIT

# Export the paths to the environment variables for the js test runner
export PUBLIC_INPUTS="$outdir/public_inputs"
export PUBLIC_INPUTS_AS_FIELDS="$outdir/public_inputs_fields.json"
export PROOF="$outdir/proof"
export PROOF_AS_FIELDS="$outdir/proof_fields.json"
export VK="$outdir/vk"
export VERIFIER_CONTRACT="$outdir/Verifier.sol"

# Create a proof, write the solidity contract, write the proof as fields in order to extract the public inputs
$BIN prove $PROVE_FLAGS -o $outdir
$BIN verify $VERIFY_FLAGS -k $VK -p $PROOF
$BIN verify $VERIFY_FLAGS -i $PUBLIC_INPUTS -k $VK -p $PROOF
$BIN write_solidity_verifier $FLAGS -k $VK -o $VERIFIER_CONTRACT

# Export the paths to the environment variables for the js test runner
Expand Down
4 changes: 3 additions & 1 deletion barretenberg/acir_tests/flows/sol_honk_zk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ outdir=$(mktemp -d)
trap "rm -rf $outdir" EXIT

# Export the paths to the environment variables for the js test runner
export PUBLIC_INPUTS="$outdir/public_inputs"
export PUBLIC_INPUTS_AS_FIELDS="$outdir/public_inputs_fields.json"
export PROOF="$outdir/proof"
export PROOF_AS_FIELDS="$outdir/proof_fields.json"
export VK="$outdir/vk"
export VERIFIER_CONTRACT="$outdir/Verifier.sol"

# Create a proof, write the solidity contract, write the proof as fields in order to extract the public inputs
$BIN prove -o $outdir $FLAGS $BFLAG $PROTOCOL_FLAGS --output_format bytes_and_fields --write_vk
$BIN verify -k $VK -p $PROOF $FLAGS $PROTOCOL_FLAGS
$BIN verify -i $PUBLIC_INPUTS -k $VK -p $PROOF $FLAGS $PROTOCOL_FLAGS
$BIN write_solidity_verifier $FLAGS -k $VK -o $VERIFIER_CONTRACT --zk

# Export the paths to the environment variables for the js test runner
Expand Down
59 changes: 34 additions & 25 deletions barretenberg/acir_tests/sol-test/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,45 +216,54 @@ const killAnvil = () => {
console.log(testName, " complete");
};

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the issue with this code is that we're trying to use it for multiple different scenarios, for plonk, honk bb, and honk bbjs... As a result we have an insane mess of if statements (and try/catch clauses that act as if statements), just trying to handle each scenario. We need to unify these interfaces or be more explicit in separating how we handle each context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tagging @saleel since you recently edited this file and bbjs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add an issue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also I agree, hopefully at some point we stop handling the plonk scenario - also I'm surprised this has anything to do with bbjs, I regarded this file as only useful to unit test that we can deploy the verifier contract (after we ensured that all forge tests pass so the contract is presumably correct)

// TODO(https://github.com/AztecProtocol/barretenberg/issues/1316): Clean this code up. We are trying to use this logic for three different flows: bb plonk, bb honk, and bbjs honk, and all three have different setups.
try {
const proofPath = getEnvVar("PROOF");
let publicInputsPath;

let proofStr = "";

const proof = readFileSync(proofPath);
proofStr = proof.toString("hex");

let publicInputsAsFieldsPath; // PUBLIC_INPUTS_AS_FIELDS is not defined for bb plonk, but is for bb honk and bbjs honk.
try {
publicInputsPath = getEnvVar("PUBLIC_INPUTS");
publicInputsAsFieldsPath = getEnvVar("PUBLIC_INPUTS_AS_FIELDS");
} catch (e) {
// noop

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have some explicit error message in case we hit these catch-es?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really an error in this case. It's expected for some of the flows

}

let proofStr = '';
let publicInputs = [];

// If "path to public inputs" is provided, it means that the proof and public inputs are saved as separate files
// A bit hacky, but this can go away once BB CLI saves them as separate files - #11024
if (publicInputsPath) {
const proof = readFileSync(proofPath);
proofStr = proof.toString("hex");
publicInputs = JSON.parse(readFileSync(publicInputsPath).toString()); // assumes JSON array of PI hex strings
} else {
// Proof and public inputs are saved in a single file; we need to extract the PI from the proof
const proof = readFileSync(proofPath);
proofStr = proof.toString("hex");

const proofAsFieldsPath = getEnvVar("PROOF_AS_FIELDS");
var publicInputs;
let proofAsFieldsPath; // PROOF_AS_FIELDS is not defined for bbjs, but is for bb plonk and bb honk.
try {
proofAsFieldsPath = getEnvVar("PROOF_AS_FIELDS");
} catch (e) {
// noop
}
let numExtraPublicInputs = 0;
let extraPublicInputs = [];
if (proofAsFieldsPath) {
const proofAsFields = readFileSync(proofAsFieldsPath);

let numPublicInputs;
[numPublicInputs, publicInputs] = readPublicInputs(
// We need to extract the public inputs from the proof. This might be empty, or just the pairing point object, or be the entire public inputs...
[numExtraPublicInputs, extraPublicInputs] = readPublicInputs(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still have this logic to handle the aggregation object that is contained in the proof. It may or may not exist though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it may sometimes be nothing, or it may be just the aggregation object, or it might be all of the inner public inputs AND the aggregation object...

JSON.parse(proofAsFields.toString())
);

proofStr = proofStr.substring(32 * 2 * numPublicInputs); // Remove the publicInput bytes from the proof

// Honk proof from the CLI have field length as the first 4 bytes. This should go away in the future
if (testingHonk) {
// Honk proof from the CLI have field length as the first 4 bytes. This should go away in the future
proofStr = proofStr.substring(8);
}
}
// We need to do this because plonk doesn't define this path
if (publicInputsAsFieldsPath) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the public inputs aren't stored separately, which is the case for plonk, then just only use the extraPublicInputs

const innerPublicInputs = JSON.parse(
readFileSync(publicInputsAsFieldsPath).toString()
); // assumes JSON array of PI hex strings

publicInputs = innerPublicInputs.concat(extraPublicInputs);
} else {
// for plonk, the extraPublicInputs are all of the public inputs
publicInputs = extraPublicInputs;
}

proofStr = proofStr.substring(64 * numExtraPublicInputs);
proofStr = "0x" + proofStr;

const key =
Expand Down
1 change: 1 addition & 0 deletions barretenberg/cpp/src/barretenberg/api/api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class API {
const std::filesystem::path& output_dir) = 0;

virtual bool verify(const Flags& flags,
const std::filesystem::path& public_inputs_path,
const std::filesystem::path& proof_path,
const std::filesystem::path& vk_path) = 0;

Expand Down
5 changes: 4 additions & 1 deletion barretenberg/cpp/src/barretenberg/api/api_client_ivc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ void write_standalone_vk(const std::string& output_data_type,
auto proving_key = std::make_shared<DeciderProvingKey>(builder, trace_settings);
Prover prover{ proving_key };
init_bn254_crs(prover.proving_key->proving_key.circuit_size);
ProofAndKey<VerificationKey> to_write{ {}, std::make_shared<VerificationKey>(prover.proving_key->proving_key) };
PubInputsProofAndKey<VerificationKey> to_write{
PublicInputsVector{}, HonkProof{}, std::make_shared<VerificationKey>(prover.proving_key->proving_key)
};

write(to_write, output_data_type, "vk", output_path);
}
Expand Down Expand Up @@ -283,6 +285,7 @@ void ClientIVCAPI::prove(const Flags& flags,
}

bool ClientIVCAPI::verify([[maybe_unused]] const Flags& flags,
[[maybe_unused]] const std::filesystem::path& public_inputs_path,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another hack to unify the api. We don't use this for client IVC

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will you add TODOs (+issues) in all places that have hacks to not lose track of them?

const std::filesystem::path& proof_path,
const std::filesystem::path& vk_path)
{
Expand Down
1 change: 1 addition & 0 deletions barretenberg/cpp/src/barretenberg/api/api_client_ivc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class ClientIVCAPI : public API {
const std::filesystem::path& output_dir) override;

bool verify(const Flags& flags,
const std::filesystem::path& public_inputs_path,
const std::filesystem::path& proof_path,
const std::filesystem::path& vk_path) override;

Expand Down
Loading