@@ -5,7 +5,7 @@ mod none_engine;
55use std:: sync:: { Arc , LazyLock } ;
66
77use ark_std:: rand:: { CryptoRng , RngCore } ;
8- use serde:: Serialize ;
8+ use serde:: { Deserialize , Serialize } ;
99use spongefish:: {
1010 Codec , Decoding , DuplexSpongeInterface , ProverState , VerificationError , VerificationResult ,
1111 VerifierState ,
@@ -47,9 +47,11 @@ pub trait Engine: Protocol {
4747
4848assert_obj_safe ! ( Engine ) ;
4949
50- #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash , Serialize ) ]
50+ #[ derive( Debug , Clone , Copy , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
5151pub struct Config {
5252 pub engine_id : ProtocolId ,
53+
54+ // TODO: Use threshold to be more determistic.
5355 pub difficulty : Bits ,
5456}
5557
@@ -77,13 +79,6 @@ impl Config {
7779 }
7880 }
7981
80- pub fn sha2 ( difficulty : Bits ) -> Self {
81- Self {
82- engine_id : Sha2 :: new ( ) . protocol_id ( ) ,
83- difficulty,
84- }
85- }
86-
8782 #[ cfg_attr( feature = "tracing" , instrument( skip( prover_state) ) ) ]
8883 pub fn prove < H , R > ( & self , prover_state : & mut ProverState < H , R > )
8984 where
0 commit comments