File tree 4 files changed +10
-8
lines changed 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ ocaml = { version = "0.22.2", optional = true }
30
30
ocaml-gen = { path = " ../../ocaml/ocaml-gen" , optional = true }
31
31
32
32
[dev-dependencies ]
33
- bincode = " 1.3.3 "
33
+ rmp-serde = " 0.15.5 "
34
34
proptest = " 1.0.0"
35
35
proptest-derive = " 0.3.0"
36
36
Original file line number Diff line number Diff line change @@ -527,6 +527,7 @@ mod tests {
527
527
use mina_curves:: pasta:: Fp ;
528
528
use proptest:: prelude:: * ;
529
529
use rand:: SeedableRng as _;
530
+ use serde:: { Deserialize , Serialize } ;
530
531
531
532
// TODO: move to mina-curves
532
533
prop_compose ! {
@@ -561,10 +562,11 @@ mod tests {
561
562
proptest ! {
562
563
#[ test]
563
564
fn test_gate_serialization( cg in arb_circuit_gate( ) ) {
564
- let encoded = bincode :: serialize ( & cg) . unwrap( ) ;
565
+ let encoded = rmp_serde :: to_vec ( & cg) . unwrap( ) ;
565
566
println!( "gate: {:?}" , cg) ;
566
567
println!( "encoded gate: {:?}" , encoded) ;
567
- let decoded: CircuitGate <Fp > = bincode:: deserialize( & encoded) . unwrap( ) ;
568
+ let decoded: CircuitGate <Fp > = rmp_serde:: from_read_ref( & encoded) . unwrap( ) ;
569
+
568
570
println!( "decoded gate: {:?}" , decoded) ;
569
571
prop_assert_eq!( cg. row, decoded. row) ;
570
572
prop_assert_eq!( cg. typ, decoded. typ) ;
Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ ark-ec = { version = "0.3.0", features = [ "parallel" ] }
12
12
ark-poly = { version = " 0.3.0" , features = [ " parallel" ] }
13
13
ark-serialize = " 0.3.0"
14
14
array-init = " 1.0.0"
15
- bincode = " 1.3.3"
16
15
colored = " 2.0.0"
17
16
rand = " 0.8.0"
18
17
rand_core = { version = " 0.5" }
19
18
rayon = " 1.5.0"
19
+ rmp-serde = " 0.15.5"
20
20
serde = " 1.0.130"
21
21
serde_with = " 1.10.0"
22
22
sprs = " 0.9.2"
@@ -32,7 +32,6 @@ plonk_15_wires_circuits = { path = "../../circuits/plonk-15-wires" }
32
32
[dev-dependencies ]
33
33
groupmap = { path = " ../../groupmap" }
34
34
mina-curves = { path = " ../../curves" }
35
- bincode = " 1.3.3"
36
35
37
36
[features ]
38
37
default = []
Original file line number Diff line number Diff line change @@ -308,8 +308,8 @@ where
308
308
} ;
309
309
310
310
// deserialize
311
- let mut verifier_index: Self =
312
- bincode :: deserialize_from ( & mut reader ) . map_err ( |e| e. to_string ( ) ) ?;
311
+ let mut verifier_index = Self :: deserialize ( & mut rmp_serde :: Deserializer :: new ( reader ) )
312
+ . map_err ( |e| e. to_string ( ) ) ?;
313
313
314
314
// fill in the rest
315
315
verifier_index. srs = srs;
@@ -333,6 +333,7 @@ where
333
333
334
334
let writer = BufWriter :: new ( file) ;
335
335
336
- bincode:: serialize_into ( writer, self ) . map_err ( |e| e. to_string ( ) )
336
+ self . serialize ( & mut rmp_serde:: Serializer :: new ( writer) )
337
+ . map_err ( |e| e. to_string ( ) )
337
338
}
338
339
}
You can’t perform that action at this time.
0 commit comments