diff --git a/tests/halo2_vk_ser.rs b/tests/halo2_vk_ser.rs index 0909ea0b4..e26570591 100644 --- a/tests/halo2_vk_ser.rs +++ b/tests/halo2_vk_ser.rs @@ -71,11 +71,15 @@ fn halo2_vk_ser() -> Result<()> { println!("Reading vk3"); let mut buf1_c = Cursor::new(buf1); - let vk3 = VerifyingKey::read::>, ZkCircuit>(&mut buf1_c)?; + // Construct the circuit to be able to read the VerifyingKey + let circuit = ZkCircuit::new(empty_witnesses(&zkbin), &zkbin); + let vk3 = VerifyingKey::read::>, ZkCircuit>(&mut buf1_c, circuit)?; println!("Reading vk4"); let mut buf2_c = Cursor::new(buf2); - let vk4 = VerifyingKey::read::>, ZkCircuit>(&mut buf2_c)?; + // Construct the circuit to be able to read the VerifyingKey + let circuit = ZkCircuit::new(empty_witnesses(&zkbin), &zkbin); + let vk4 = VerifyingKey::read::>, ZkCircuit>(&mut buf2_c, circuit)?; // Now let's see if we can verify a proof with all four keys. println!("Creating pk");