From e559bea521941bd8109cefdcdf2a8d6f97f737a3 Mon Sep 17 00:00:00 2001 From: Rodrigo Ferreira Date: Tue, 7 Jan 2025 17:56:39 -0300 Subject: [PATCH] Parameterizes test_sumcheck_circuit to also test UltraStarknetHonk --- tests/hydra/circuits/test_honk.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/hydra/circuits/test_honk.py b/tests/hydra/circuits/test_honk.py index c87dd32d..d9d1e3f5 100644 --- a/tests/hydra/circuits/test_honk.py +++ b/tests/hydra/circuits/test_honk.py @@ -1,5 +1,5 @@ import garaga.hints.io as io -from garaga.definitions import G1G2Pair +from garaga.definitions import G1G2Pair, ProofSystem from garaga.precompiled_circuits.honk import ( CONST_PROOF_SIZE_LOG_N, G2_POINT_KZG_1, @@ -16,10 +16,14 @@ PATH = "hydra/garaga/starknet/honk_contract_generator/examples" -def test_sumcheck_circuit(): +@pytest.mark.parametrize( + "system", [ProofSystem.UltraKeccakHonk, ProofSystem.UltraStarknetHonk] +) +def test_sumcheck_circuit(system: ProofSystem): vk = HonkVk.from_bytes(open(f"{PATH}/vk_ultra_keccak.bin", "rb").read()) - proof = HonkProof.from_bytes(open(f"{PATH}/proof_ultra_keccak.bin", "rb").read()) - tp = HonkTranscript.from_proof(proof) + flavor = "keccak" if system == ProofSystem.UltraKeccakHonk else "starknet" + proof = HonkProof.from_bytes(open(f"{PATH}/proof_ultra_{flavor}.bin", "rb").read()) + tp = HonkTranscript.from_proof(proof, system) circuit = HonkVerifierCircuits(name="test", log_n=vk.log_circuit_size)