@@ -5,7 +5,7 @@ use ark_ec::{short_weierstrass::Projective, AffineRepr, CurveGroup, PrimeGroup};
55use ark_ff:: { fields:: arithmetic:: InvalidBigInt , AdditiveGroup , BigInteger256 , Field , PrimeField } ;
66use kimchi:: {
77 circuits:: { gate:: CircuitGate , wires:: COLUMNS } ,
8- groupmap:: GroupMap ,
8+ groupmap:: { BWParameters , GroupMap } ,
99 proof:: RecursionChallenge ,
1010} ;
1111use mina_curves:: pasta:: { Fp , Fq } ;
@@ -24,6 +24,7 @@ use mina_p2p_messages::v2::{
2424} ;
2525use mina_poseidon:: constants:: PlonkSpongeConstantsKimchi ;
2626use mina_signer:: { CompressedPubKey , PubKey } ;
27+ use poly_commitment:: commitment:: CommitmentCurve ;
2728
2829use crate :: {
2930 decompress_pk, gen_keypair,
@@ -3996,8 +3997,7 @@ pub(super) fn create_proof<C: ProofConstants, F: FieldWitness>(
39963997 let mut rng = get_rng ( ) ;
39973998
39983999 let now = redux:: Instant :: now ( ) ;
3999- let group_map =
4000- kimchi:: groupmap:: GroupMap :: < <F as proofs:: field:: FieldWitness >:: Scalar > :: setup ( ) ;
4000+ let group_map = <F :: OtherCurve as CommitmentCurve >:: Map :: setup ( ) ;
40014001 let proof = kimchi:: proof:: ProverProof :: create_recursive :: < F :: FqSponge , EFrSponge < F > , _ > (
40024002 & group_map,
40034003 computed_witness,
@@ -4011,7 +4011,23 @@ pub(super) fn create_proof<C: ProofConstants, F: FieldWitness>(
40114011 let prev_challenges_hash = debug:: hash_prev_challenge :: < F > ( & prev_challenges) ;
40124012 let witness_primary_hash = debug:: hash_slice ( & w. primary ) ;
40134013 let witness_aux_hash = debug:: hash_slice ( w. aux ( ) ) ;
4014- let group_map_hash = debug:: hash_slice ( & group_map. composition ( ) ) ;
4014+ let group_map_hash = {
4015+ // Recreating the same value to access the field.
4016+ // We should find a way to bypass the type-checker to reuse
4017+ // the value group_map defined above.
4018+ // As it is only in the case of errors, the additional cost of
4019+ // creating a new value can be ignored.
4020+ let group_map_for_debug =
4021+ BWParameters :: < <<F as FieldWitness >:: Scalar as FieldWitness >:: Parameters > :: setup ( ) ;
4022+ let d = vec ! [
4023+ group_map_for_debug. u,
4024+ group_map_for_debug. fu,
4025+ group_map_for_debug. sqrt_neg_three_u_squared_minus_u_over_2,
4026+ group_map_for_debug. sqrt_neg_three_u_squared,
4027+ group_map_for_debug. inv_three_u_squared,
4028+ ] ;
4029+ debug:: hash_slice ( & d)
4030+ } ;
40154031
40164032 dbg ! (
40174033 & prev_challenges_hash,
0 commit comments