diff --git a/hydra/garaga/starknet/groth16_contract_generator/generator.py b/hydra/garaga/starknet/groth16_contract_generator/generator.py index a01c5509..6090ac3a 100644 --- a/hydra/garaga/starknet/groth16_contract_generator/generator.py +++ b/hydra/garaga/starknet/groth16_contract_generator/generator.py @@ -8,7 +8,7 @@ from garaga.starknet.cli.utils import create_directory, get_package_version from garaga.starknet.groth16_contract_generator.parsing_utils import Groth16VerifyingKey -ECIP_OPS_CLASS_HASH = 0xC4B7AA28A27B5FB8D7D43928B2A3EE960CF5B4E06CB9AE1EE3F102400B1700 +ECIP_OPS_CLASS_HASH = 0x684D2756A4440C190A5FE54E367C0ABE33AEFA75084DEC2FFFC791B620C80E3 def precompute_lines_from_vk(vk: Groth16VerifyingKey) -> StructArray: diff --git a/hydra/garaga/starknet/honk_contract_generator/generator_honk.py b/hydra/garaga/starknet/honk_contract_generator/generator_honk.py index 6f22c840..09e75ceb 100644 --- a/hydra/garaga/starknet/honk_contract_generator/generator_honk.py +++ b/hydra/garaga/starknet/honk_contract_generator/generator_honk.py @@ -38,15 +38,14 @@ def gen_honk_circuits_code(vk: HonkVk) -> str: """ header = """ use core::circuit::{ - RangeCheck96, AddMod, MulMod, u384, u96, circuit_add, circuit_sub, circuit_mul, circuit_inverse, - EvalCircuitTrait, CircuitOutputsTrait, CircuitModulus, AddInputResultTrait, CircuitInputs, + u384, circuit_add, circuit_sub, circuit_mul, circuit_inverse, + EvalCircuitTrait, CircuitOutputsTrait, CircuitInputs, }; use garaga::core::circuit::AddInputResultTrait2; use garaga::ec_ops::FunctionFelt; use core::circuit::CircuitElement as CE; use core::circuit::CircuitInput as CI; -use garaga::definitions::{ - get_b, G1Point, u288, get_GRUMPKIN_modulus, get_BN254_modulus}; +use garaga::definitions::{G1Point, get_GRUMPKIN_modulus, get_BN254_modulus}; use core::option::Option;\n """ code = header @@ -121,7 +120,7 @@ def gen_honk_verifier( precomputed_lines = precompute_lines_honk() constants_code = f""" - use garaga::definitions::{{G1Point, G2Point, G2Line, u384, u288}}; + use garaga::definitions::{{G1Point, G2Line, u384, u288}}; use garaga::utils::noir::HonkVk; {vk.serialize_to_cairo()}\n @@ -156,10 +155,9 @@ def gen_honk_verifier( #[starknet::contract] mod UltraKeccakHonkVerifier {{ - use garaga::definitions::{{G1Point, G1G2Pair, BN254_G1_GENERATOR, get_a, get_modulus, u384}}; + use garaga::definitions::{{G1Point, G1G2Pair, BN254_G1_GENERATOR, get_a, get_modulus}}; use garaga::pairing_check::{{multi_pairing_check_bn254_2P_2F, MPCheckHintBN254}}; - use garaga::ec_ops::{{G1PointTrait, ec_safe_add, FunctionFelt,FunctionFeltTrait, DerivePointFromXHint, MSMHintBatched, compute_rhs_ecip, derive_ec_point_from_X, SlopeInterceptOutput}}; - use garaga::ec_ops_g2::{{G2PointTrait}}; + use garaga::ec_ops::{{G1PointTrait, ec_safe_add,FunctionFeltTrait, DerivePointFromXHint, MSMHintBatched, compute_rhs_ecip, derive_ec_point_from_X, SlopeInterceptOutput}}; use garaga::basic_field_ops::{{batch_3_mod_p}}; use garaga::circuits::ec; use garaga::utils::neg_3; @@ -458,4 +456,4 @@ def gen_honk_verifier( ) gen_honk_verifier(VK_PATH, CONTRACTS_FOLDER, FOLDER_NAME) - gen_honk_verifier(VK_LARGE_PATH, CONTRACTS_FOLDER, FOLDER_NAME + "_large") + # gen_honk_verifier(VK_LARGE_PATH, CONTRACTS_FOLDER, FOLDER_NAME + "_large") diff --git a/src/contracts/groth16_example_bls12_381/src/groth16_verifier.cairo b/src/contracts/groth16_example_bls12_381/src/groth16_verifier.cairo index 42912b0c..e71b19a8 100644 --- a/src/contracts/groth16_example_bls12_381/src/groth16_verifier.cairo +++ b/src/contracts/groth16_example_bls12_381/src/groth16_verifier.cairo @@ -18,7 +18,7 @@ mod Groth16VerifierBLS12_381 { use super::{N_PUBLIC_INPUTS, vk, ic, precomputed_lines}; const ECIP_OPS_CLASS_HASH: felt252 = - 0xc4b7aa28a27b5fb8d7d43928b2a3ee960cf5b4e06cb9ae1ee3f102400b1700; + 0x684d2756a4440c190a5fe54e367c0abe33aefa75084dec2fffc791b620c80e3; #[storage] struct Storage {} diff --git a/src/contracts/groth16_example_bn254/src/groth16_verifier.cairo b/src/contracts/groth16_example_bn254/src/groth16_verifier.cairo index 8445e912..237d7fc6 100644 --- a/src/contracts/groth16_example_bn254/src/groth16_verifier.cairo +++ b/src/contracts/groth16_example_bn254/src/groth16_verifier.cairo @@ -18,7 +18,7 @@ mod Groth16VerifierBN254 { use super::{N_PUBLIC_INPUTS, vk, ic, precomputed_lines}; const ECIP_OPS_CLASS_HASH: felt252 = - 0xc4b7aa28a27b5fb8d7d43928b2a3ee960cf5b4e06cb9ae1ee3f102400b1700; + 0x684d2756a4440c190a5fe54e367c0abe33aefa75084dec2fffc791b620c80e3; #[storage] struct Storage {} diff --git a/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier.cairo b/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier.cairo index 43024d10..a6e4f474 100644 --- a/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier.cairo +++ b/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier.cairo @@ -14,13 +14,12 @@ trait IUltraKeccakHonkVerifier { #[starknet::contract] mod UltraKeccakHonkVerifier { - use garaga::definitions::{G1Point, G1G2Pair, BN254_G1_GENERATOR, get_a, get_modulus, u384}; + use garaga::definitions::{G1Point, G1G2Pair, BN254_G1_GENERATOR, get_a, get_modulus}; use garaga::pairing_check::{multi_pairing_check_bn254_2P_2F, MPCheckHintBN254}; use garaga::ec_ops::{ - G1PointTrait, ec_safe_add, FunctionFelt, FunctionFeltTrait, DerivePointFromXHint, - MSMHintBatched, compute_rhs_ecip, derive_ec_point_from_X, SlopeInterceptOutput, + G1PointTrait, ec_safe_add, FunctionFeltTrait, DerivePointFromXHint, MSMHintBatched, + compute_rhs_ecip, derive_ec_point_from_X, SlopeInterceptOutput, }; - use garaga::ec_ops_g2::{G2PointTrait}; use garaga::basic_field_ops::{batch_3_mod_p}; use garaga::circuits::ec; use garaga::utils::neg_3; diff --git a/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_circuits.cairo b/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_circuits.cairo index 8df4c7d3..a6c11db8 100644 --- a/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_circuits.cairo +++ b/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_circuits.cairo @@ -1,12 +1,12 @@ use core::circuit::{ - RangeCheck96, AddMod, MulMod, u384, u96, circuit_add, circuit_sub, circuit_mul, circuit_inverse, - EvalCircuitTrait, CircuitOutputsTrait, CircuitModulus, AddInputResultTrait, CircuitInputs, + u384, circuit_add, circuit_sub, circuit_mul, circuit_inverse, EvalCircuitTrait, + CircuitOutputsTrait, CircuitInputs, }; use garaga::core::circuit::AddInputResultTrait2; use garaga::ec_ops::FunctionFelt; use core::circuit::CircuitElement as CE; use core::circuit::CircuitInput as CI; -use garaga::definitions::{get_b, G1Point, u288, get_GRUMPKIN_modulus, get_BN254_modulus}; +use garaga::definitions::{G1Point, get_GRUMPKIN_modulus, get_BN254_modulus}; use core::option::Option; #[inline(always)] diff --git a/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_constants.cairo b/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_constants.cairo index c8c9b925..b063ca20 100644 --- a/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_constants.cairo +++ b/src/contracts/noir_ultra_keccak_honk_example/src/honk_verifier_constants.cairo @@ -1,4 +1,4 @@ -use garaga::definitions::{G1Point, G2Point, G2Line, u384, u288}; +use garaga::definitions::{G1Point, G2Line, u384, u288}; use garaga::utils::noir::HonkVk; pub const vk: HonkVk = HonkVk { diff --git a/src/contracts/risc0_verifier_bn254/src/groth16_verifier.cairo b/src/contracts/risc0_verifier_bn254/src/groth16_verifier.cairo index 7df06cdd..03b7b89c 100644 --- a/src/contracts/risc0_verifier_bn254/src/groth16_verifier.cairo +++ b/src/contracts/risc0_verifier_bn254/src/groth16_verifier.cairo @@ -19,7 +19,7 @@ mod Risc0Groth16VerifierBN254 { use super::{N_FREE_PUBLIC_INPUTS, vk, ic, precomputed_lines, T}; const ECIP_OPS_CLASS_HASH: felt252 = - 0xc4b7aa28a27b5fb8d7d43928b2a3ee960cf5b4e06cb9ae1ee3f102400b1700; + 0x684d2756a4440c190a5fe54e367c0abe33aefa75084dec2fffc791b620c80e3; #[storage] struct Storage {}