mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-07 22:04:10 -05:00
fix(zk): missing compressed proof version
This commit is contained in:
committed by
Nicolas Sarlin
parent
231d0c5e50
commit
95593b1ea9
@@ -278,7 +278,8 @@ where
|
||||
G::G2: Compressible,
|
||||
{
|
||||
V0(CompressedProofV0<G>),
|
||||
V1(CompressedProof<G>),
|
||||
V1(CompressedProofV1<G>),
|
||||
V2(CompressedProof<G>),
|
||||
}
|
||||
|
||||
#[derive(VersionsDispatch)]
|
||||
|
||||
@@ -2095,6 +2095,7 @@ mod tests {
|
||||
use super::*;
|
||||
use rand::rngs::StdRng;
|
||||
use rand::{thread_rng, Rng, SeedableRng};
|
||||
use tfhe_versionable::Unversionize;
|
||||
|
||||
type Curve = curve_api::Bls12_446;
|
||||
|
||||
@@ -3148,9 +3149,12 @@ mod tests {
|
||||
&seed.to_le_bytes(),
|
||||
);
|
||||
|
||||
let compressed_proof = bincode::serialize(&proof.compress()).unwrap();
|
||||
let proof =
|
||||
Proof::uncompress(bincode::deserialize(&compressed_proof).unwrap()).unwrap();
|
||||
let compressed_proof = bincode::serialize(&proof.compress().versionize()).unwrap();
|
||||
let proof = Proof::uncompress(
|
||||
CompressedProof::unversionize(bincode::deserialize(&compressed_proof).unwrap())
|
||||
.unwrap(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
verify(&proof, (&public_param, &public_commit), &testcase.metadata).unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user