@@ -7,7 +7,10 @@ use curve25519_dalek::scalar::Scalar;
77use  curve25519_dalek:: traits:: { Identity ,  MultiscalarMul } ; 
88use  merlin:: Transcript ; 
99
10- use  super :: { ConstraintSystem ,  LinearCombination ,  R1CSProof ,  RandomizedConstraintSystem ,  Variable } ; 
10+ use  super :: { 
11+     ConstraintSystem ,  LinearCombination ,  R1CSProof ,  RandomizableConstraintSystem , 
12+     RandomizedConstraintSystem ,  Variable , 
13+ } ; 
1114
1215use  errors:: R1CSError ; 
1316use  generators:: { BulletproofGens ,  PedersenGens } ; 
@@ -83,8 +86,6 @@ impl<'t, 'g> Drop for Prover<'t, 'g> {
8386} 
8487
8588impl < ' t ,  ' g >  ConstraintSystem  for  Prover < ' t ,  ' g >  { 
86-     type  RandomizedCS  = RandomizingProver < ' t ,  ' g > ; 
87- 
8889    fn  transcript ( & mut  self )  -> & mut  Transcript  { 
8990        self . transcript 
9091    } 
@@ -162,6 +163,10 @@ impl<'t, 'g> ConstraintSystem for Prover<'t, 'g> {
162163        // (e.g. that variables are valid, that the linear combination evals to 0 for prover, etc). 
163164        self . constraints . push ( lc) ; 
164165    } 
166+ } 
167+ 
168+ impl < ' t ,  ' g >  RandomizableConstraintSystem  for  Prover < ' t ,  ' g >  { 
169+     type  RandomizedCS  = RandomizingProver < ' t ,  ' g > ; 
165170
166171    fn  specify_randomized_constraints < F > ( & mut  self ,  callback :  F )  -> Result < ( ) ,  R1CSError > 
167172    where 
@@ -173,8 +178,6 @@ impl<'t, 'g> ConstraintSystem for Prover<'t, 'g> {
173178} 
174179
175180impl < ' t ,  ' g >  ConstraintSystem  for  RandomizingProver < ' t ,  ' g >  { 
176-     type  RandomizedCS  = Self ; 
177- 
178181    fn  transcript ( & mut  self )  -> & mut  Transcript  { 
179182        self . prover . transcript 
180183    } 
@@ -201,13 +204,6 @@ impl<'t, 'g> ConstraintSystem for RandomizingProver<'t, 'g> {
201204    fn  constrain ( & mut  self ,  lc :  LinearCombination )  { 
202205        self . prover . constrain ( lc) 
203206    } 
204- 
205-     fn  specify_randomized_constraints < F > ( & mut  self ,  callback :  F )  -> Result < ( ) ,  R1CSError > 
206-     where 
207-         F :  ' static  + Fn ( & mut  Self :: RandomizedCS )  -> Result < ( ) ,  R1CSError > , 
208-     { 
209-         callback ( self ) 
210-     } 
211207} 
212208
213209impl < ' t ,  ' g >  RandomizedConstraintSystem  for  RandomizingProver < ' t ,  ' g >  { 
0 commit comments