Skip to content

Commit ea56f3a

Browse files
mmagicianPratyush
andauthoredJan 31, 2024
Fix prover_state: should include full verifier's randomness (#78)
Co-authored-by: Pratyush Mishra <pratyush795@gmail.com>
1 parent a40f613 commit ea56f3a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
 

‎src/ml_sumcheck/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ impl<F: Field> MLSumcheck<F> {
6262
prover_msgs.push(prover_msg);
6363
verifier_msg = Some(IPForMLSumcheck::sample_round(fs_rng));
6464
}
65+
prover_state
66+
.randomness
67+
.push(verifier_msg.unwrap().randomness);
6568

6669
Ok((prover_msgs, prover_state))
6770
}

‎src/ml_sumcheck/test.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ fn test_polynomial_as_subprotocol(
107107
let (poly, asserted_sum) =
108108
random_list_of_products::<Fr, _>(nv, num_multiplicands_range, num_products, &mut rng);
109109
let poly_info = poly.info();
110-
let (proof, _prover_state) =
110+
let (proof, prover_state) =
111111
MLSumcheck::prove_as_subprotocol(prover_rng, &poly).expect("fail to prove");
112112
let subclaim =
113113
MLSumcheck::verify_as_subprotocol(verifier_rng, &poly_info, asserted_sum, &proof)
@@ -116,6 +116,7 @@ fn test_polynomial_as_subprotocol(
116116
poly.evaluate(&subclaim.point) == subclaim.expected_evaluation,
117117
"wrong subclaim"
118118
);
119+
assert_eq!(prover_state.randomness, subclaim.point);
119120
}
120121

121122
#[test]

0 commit comments

Comments
 (0)
Please sign in to comment.