@@ -378,7 +378,8 @@ impl<'a, E: JubjubEngine> Circuit<E> for Transfer<'a, E> {
378378 params
379379 ) ?;
380380
381- nonce. inputize ( cs. namespace ( || "nonce" ) ) ?;
381+ g_epoch. inputize ( cs. namespace ( || "inputize g_epoch" ) ) ?;
382+ nonce. inputize ( cs. namespace ( || "inputize nonce" ) ) ?;
382383 }
383384
384385 Ok ( ( ) )
@@ -436,6 +437,7 @@ mod tests {
436437
437438 let rvk = proof_gen_key. into_rvk ( alpha, params) . 0 . into_xy ( ) ;
438439 let g_epoch = edwards:: Point :: rand ( rng, params) . mul_by_cofactor ( params) ;
440+ let g_epoch_xy = g_epoch. into_xy ( ) ;
439441 let nonce = g_epoch. mul ( dec_key. 0 , params) . into_xy ( ) ;
440442
441443 let mut cs = TestConstraintSystem :: < Bls12 > :: new ( ) ;
@@ -457,10 +459,10 @@ mod tests {
457459 instance. synthesize ( & mut cs) . unwrap ( ) ;
458460
459461 assert ! ( cs. is_satisfied( ) ) ;
460- assert_eq ! ( cs. num_constraints( ) , 25051 ) ;
461- assert_eq ! ( cs. hash( ) , "d429836034d9816ffd3e157e5de055450c00ad6027e1cb0b8ecb06e390a60adc " ) ;
462+ assert_eq ! ( cs. num_constraints( ) , 25053 ) ;
463+ assert_eq ! ( cs. hash( ) , "fabd4cb7d2ebbdb643eefe54b21a4c2d802544ea860c485a14532b2cd1194b4f " ) ;
462464
463- assert_eq ! ( cs. num_inputs( ) , 21 ) ;
465+ assert_eq ! ( cs. num_inputs( ) , 23 ) ;
464466 assert_eq ! ( cs. get_input( 0 , "ONE" ) , Fr :: one( ) ) ;
465467 assert_eq ! ( cs. get_input( 1 , "inputize enc_key_sender/x/input variable" ) , address_sender_xy. 0 ) ;
466468 assert_eq ! ( cs. get_input( 2 , "inputize enc_key_sender/y/input variable" ) , address_sender_xy. 1 ) ;
@@ -480,8 +482,10 @@ mod tests {
480482 assert_eq ! ( cs. get_input( 16 , "inputize pointr/y/input variable" ) , c_bal_right. 1 ) ;
481483 assert_eq ! ( cs. get_input( 17 , "rvk/x/input variable" ) , rvk. 0 ) ;
482484 assert_eq ! ( cs. get_input( 18 , "rvk/y/input variable" ) , rvk. 1 ) ;
483- assert_eq ! ( cs. get_input( 19 , "nonce/x/input variable" ) , nonce. 0 ) ;
484- assert_eq ! ( cs. get_input( 20 , "nonce/y/input variable" ) , nonce. 1 ) ;
485+ assert_eq ! ( cs. get_input( 19 , "inputize g_epoch/x/input variable" ) , g_epoch_xy. 0 ) ;
486+ assert_eq ! ( cs. get_input( 20 , "inputize g_epoch/y/input variable" ) , g_epoch_xy. 1 ) ;
487+ assert_eq ! ( cs. get_input( 21 , "inputize nonce/x/input variable" ) , nonce. 0 ) ;
488+ assert_eq ! ( cs. get_input( 22 , "inputize nonce/y/input variable" ) , nonce. 1 ) ;
485489 }
486490
487491 #[ test]
0 commit comments