Skip to content
11 changes: 11 additions & 0 deletions yarn-project/circuits.js/src/structs/client_ivc_proof.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { randomBytes } from '@aztec/foundation/crypto';
import { bufferSchemaFor } from '@aztec/foundation/schemas';
import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize';

const CLIENT_IVC_PROOF_LENGTH = 172052;
const CLIENT_IVC_VK_LENGTH = 2730;

/**
* TODO(https://github.com/AztecProtocol/aztec-packages/issues/7370) refactory this to
* eventually we read all these VKs from the data tree instead of passing them
Expand All @@ -26,6 +30,13 @@ export class ClientIvcProof {
return new ClientIvcProof(Buffer.alloc(1, fill), Buffer.alloc(1, fill));
}

static random() {
return new ClientIvcProof(
Buffer.from(randomBytes(CLIENT_IVC_PROOF_LENGTH)),
Buffer.from(randomBytes(CLIENT_IVC_VK_LENGTH)),
);
}

static get schema() {
return bufferSchemaFor(ClientIvcProof);
}
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/kernel_prover/kernel_prover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class KernelProver {
const ivcProof = await this.proofCreator.createClientIvcProof(acirs, witnessStack);
tailOutput.clientIvcProof = ivcProof;
} else {
tailOutput.clientIvcProof = ClientIvcProof.empty();
tailOutput.clientIvcProof = ClientIvcProof.random();
}

return tailOutput;
Expand Down