From 0f5c48e91c5f61c48835a0c26767d0a4e2f7ec61 Mon Sep 17 00:00:00 2001 From: Rodrigo Ferreira Date: Fri, 10 Jan 2025 11:23:37 -0300 Subject: [PATCH] Update main of generator_honk.py to produce both keccak and starknet honk flavors --- .../honk_contract_generator/generator_honk.py | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/hydra/garaga/starknet/honk_contract_generator/generator_honk.py b/hydra/garaga/starknet/honk_contract_generator/generator_honk.py index ca57fd88..941dcde5 100644 --- a/hydra/garaga/starknet/honk_contract_generator/generator_honk.py +++ b/hydra/garaga/starknet/honk_contract_generator/generator_honk.py @@ -451,17 +451,21 @@ def gen_honk_verifier( if __name__ == "__main__": - VK_PATH = ( - "hydra/garaga/starknet/honk_contract_generator/examples/vk_ultra_keccak.bin" - ) - VK_LARGE_PATH = ( - "hydra/garaga/starknet/honk_contract_generator/examples/vk_large.bin" - ) - CONTRACTS_FOLDER = "src/contracts/" # Do not change this + for system in [ProofSystem.UltraKeccakHonk, ProofSystem.UltraStarknetHonk]: - FOLDER_NAME = ( - "noir_ultra_keccak_honk_example" # '_curve_id' is appended in the end. - ) + flavor = "keccak" if system == ProofSystem.UltraKeccakHonk else "starknet" + + VK_PATH = ( + "hydra/garaga/starknet/honk_contract_generator/examples/vk_ultra_keccak.bin" + ) + VK_LARGE_PATH = ( + "hydra/garaga/starknet/honk_contract_generator/examples/vk_large.bin" + ) + CONTRACTS_FOLDER = "src/contracts/" # Do not change this + + FOLDER_NAME = ( + f"noir_ultra_{flavor}_honk_example" # '_curve_id' is appended in the end. + ) - gen_honk_verifier(VK_PATH, CONTRACTS_FOLDER, FOLDER_NAME) - # gen_honk_verifier(VK_LARGE_PATH, CONTRACTS_FOLDER, FOLDER_NAME + "_large") + gen_honk_verifier(VK_PATH, CONTRACTS_FOLDER, FOLDER_NAME, system=system) + # gen_honk_verifier(VK_LARGE_PATH, CONTRACTS_FOLDER, FOLDER_NAME + "_large", system=system)