@@ -21,12 +21,13 @@ namespace bb {
2121namespace { // anonymous namespace
2222
2323/* *
24- * @brief Compute and write to file a MegaHonk VK for a circuit to be accumulated in the IVC
24+ * @brief Compute and write to file a MegaHonk VK for a circuit to be accumulated by Chonk.
2525 * @note This method differes from write_vk_honk<MegaFlavor> in that it handles kernel circuits which require special
2626 * treatment (i.e. construction of mock IVC state to correctly complete the kernel logic).
27+
2728 *
28- * @param bytecode_path
29- * @param witness_path
29+ * @param bytecode ACIR bytecode of the circuit
30+ * @param output_path Directory to write the VK (or "-" for stdout)
3031 */
3132void write_standalone_vk (std::vector<uint8_t > bytecode, const std::filesystem::path& output_path)
3233{
@@ -41,9 +42,19 @@ void write_standalone_vk(std::vector<uint8_t> bytecode, const std::filesystem::p
4142 write_file (output_path / " vk" , response.bytes );
4243 }
4344}
45+
46+ /* *
47+ * @brief Compute and write the Chonk verification key.
48+ *
49+ * @details Computes the VK for the hiding kernel circuit. The bytecode parameter should be
50+ * the last circuit in the IVC chain (e.g., private-tail in Aztec), as this determines
51+ * the public inputs structure of the hiding kernel.
52+ *
53+ * @param bytecode ACIR bytecode of the final circuit in the IVC chain
54+ * @param output_dir Directory to write the VK (or "-" for stdout)
55+ */
4456void write_chonk_vk (std::vector<uint8_t > bytecode, const std::filesystem::path& output_dir)
4557{
46- // compute the hiding kernel's vk
4758 info (" Chonk: computing IVC vk for hiding kernel circuit" );
4859 auto response = bbapi::ChonkComputeIvcVk{ .circuit { .bytecode = std::move (bytecode) } }.execute ();
4960 const bool output_to_stdout = output_dir == " -" ;
0 commit comments