|
1 | 1 | use kimchi::{circuits::wires::COLUMNS, mina_curves::pasta::Pallas, poly_commitment::PolyComm}; |
2 | 2 |
|
3 | 3 | use crate::pickles_preproc::{ |
4 | | - state_proof::Commitments, |
5 | | - type_aliases::{WrapECPoint, WrapProverCommitments}, |
| 4 | + state_proof::{Bulletproof, Commitments}, |
| 5 | + type_aliases::{WrapECPoint, WrapOpeningProof, WrapProverCommitments, WrapScalar}, |
6 | 6 | }; |
7 | 7 |
|
8 | 8 | use super::{ |
@@ -47,6 +47,34 @@ pub fn deserialize_state_proof( |
47 | 47 | lookup, |
48 | 48 | }; |
49 | 49 |
|
| 50 | + let Bulletproof { |
| 51 | + challenge_polynomial_commitment: hex_sg, |
| 52 | + delta: hex_delta, |
| 53 | + lr: hex_lr, |
| 54 | + z_1: hex_z_1, |
| 55 | + z_2: hex_z_2, |
| 56 | + } = state_proof.proof.bulletproof; |
| 57 | + let sg = WrapECPoint::try_from(hex_sg)?.0; |
| 58 | + let delta = WrapECPoint::try_from(hex_delta)?.0; |
| 59 | + let lr = hex_lr |
| 60 | + .into_iter() |
| 61 | + .map(|(hex_p1, hex_p2)| -> Result<(Pallas, Pallas), String> { |
| 62 | + let p1 = WrapECPoint::try_from(hex_p1)?.0; |
| 63 | + let p2 = WrapECPoint::try_from(hex_p2)?.0; |
| 64 | + Ok((p1, p2)) |
| 65 | + }) |
| 66 | + .collect::<Result<_, _>>()?; |
| 67 | + let z1 = WrapScalar::try_from(hex_z_1)?.0; |
| 68 | + let z2 = WrapScalar::try_from(hex_z_2)?.0; |
| 69 | + |
| 70 | + let _opening_proof = WrapOpeningProof { |
| 71 | + sg, |
| 72 | + delta, |
| 73 | + lr, |
| 74 | + z1, |
| 75 | + z2, |
| 76 | + }; |
| 77 | + |
50 | 78 | /* |
51 | 79 | let prover_proof = WrapProverProof { |
52 | 80 | commitments, |
|
0 commit comments