Skip to content

Commit

Permalink
Uniformize civc proof naming
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton committed Jan 23, 2025
1 parent b02ea01 commit 89e9d11
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions barretenberg/cpp/src/barretenberg/bb/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ void prove_tube(const std::string& output_path)
using Builder = UltraCircuitBuilder;
using GrumpkinVk = bb::VerifierCommitmentKey<curve::Grumpkin>;

std::string vkPath = output_path + "/client_ivc_vk";
std::string proofPath = output_path + "/client_ivc_proof";
std::string vkPath = output_path + "/vk";
std::string proofPath = output_path + "/proof";

// Note: this could be decreased once we optimise the size of the ClientIVC recursiveve rifier
init_bn254_crs(1 << 25);
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/bb-prover/src/bb/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ export async function generateTubeProof(
}

// // Paths for the inputs
const vkPath = join(workingDirectory, 'client_ivc_vk.bin');
const proofPath = join(workingDirectory, 'client_ivc_proof.bin');
const vkPath = join(workingDirectory, 'vk.bin');
const proofPath = join(workingDirectory, 'proof.bin');

// The proof is written to e.g. /workingDirectory/proof
const outputPath = workingDirectory;
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/bb-prover/src/prover/client_ivc_proof_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { join } from 'path';
*/
export async function readFromOutputDirectory(directory: string) {
const [clientIvcVkBuffer, clientIvcProofBuffer] = await Promise.all(
['client_ivc_vk', 'client_ivc_proof'].map(fileName => fs.readFile(join(directory, fileName))),
['vk', 'proof'].map(fileName => fs.readFile(join(directory, fileName))),
);
return new ClientIvcProof(clientIvcProofBuffer, clientIvcVkBuffer);
}
Expand All @@ -32,8 +32,8 @@ export async function readFromOutputDirectory(directory: string) {
export async function writeToOutputDirectory(clientIvcProof: ClientIvcProof, directory: string) {
const { clientIvcProofBuffer, clientIvcVkBuffer } = clientIvcProof;
const fileData = [
['client_ivc_proof', clientIvcProofBuffer],
['client_ivc_vk', clientIvcVkBuffer],
['proof', clientIvcProofBuffer],
['vk', clientIvcVkBuffer],
] as const;
await Promise.all(fileData.map(([fileName, buffer]) => fs.writeFile(join(directory, fileName), buffer)));
}

0 comments on commit 89e9d11

Please # to comment.