1- use kimchi:: {
2- mina_curves:: pasta:: { Fp , Fq , Pallas } ,
3- poly_commitment:: PolyComm ,
4- } ;
1+ use kimchi:: mina_curves:: pasta:: { Fp , Fq , Pallas } ;
52use o1_utils:: FieldHelpers ;
63use serde:: Deserialize ;
74
8- use super :: type_aliases:: { WrapPolyComm , WrapScalar } ;
5+ use super :: type_aliases:: { WrapECPoint , WrapScalar } ;
96
107type DecimalSigned = String ;
118type HexPointCoordinates = [ String ; 2 ] ;
@@ -19,6 +16,9 @@ pub struct StateProof {
1916
2017#[ derive( Deserialize ) ]
2118pub struct Proof {
19+ pub commitments : Commitments ,
20+ pub evaluations : Evaluations ,
21+ pub ft_eval1 : HexScalar ,
2222 pub bulletproof : Bulletproof ,
2323}
2424
@@ -33,9 +33,9 @@ pub struct Bulletproof {
3333
3434#[ derive( Deserialize ) ]
3535pub struct Commitments {
36- pub t_comm : [ HexPointCoordinates ; 7 ] ,
3736 pub w_comm : [ HexPointCoordinates ; 15 ] ,
3837 pub z_comm : HexPointCoordinates ,
38+ pub t_comm : Vec < HexPointCoordinates > ,
3939}
4040
4141#[ derive( Deserialize ) ]
@@ -50,7 +50,6 @@ pub struct Evaluations {
5050 pub s : [ HexPointCoordinates ; 6 ] ,
5151 pub w : [ HexPointCoordinates ; 15 ] ,
5252 pub z : HexPointCoordinates ,
53- pub ft_eval1 : HexScalar ,
5453}
5554
5655#[ derive( Deserialize ) ]
@@ -124,14 +123,13 @@ pub struct MessagesForNextWrapProof {
124123 pub old_bulletproof_challenges : [ [ BulletproofChallenge ; 16 ] ; 2 ] ,
125124}
126125
127- impl TryFrom < HexPointCoordinates > for WrapPolyComm {
126+ impl TryFrom < HexPointCoordinates > for WrapECPoint {
128127 type Error = String ;
129128
130129 fn try_from ( value : HexPointCoordinates ) -> Result < Self , Self :: Error > {
131130 let x = Fp :: from_hex ( & value[ 0 ] ) . map_err ( |err| err. to_string ( ) ) ?;
132131 let y = Fp :: from_hex ( & value[ 1 ] ) . map_err ( |err| err. to_string ( ) ) ?;
133- let p = Pallas :: new ( x, y, false ) ;
134- Ok ( WrapPolyComm ( PolyComm { elems : vec ! [ p] } ) )
132+ Ok ( WrapECPoint ( Pallas :: new ( x, y, false ) ) )
135133 }
136134}
137135
0 commit comments