@@ -3,34 +3,28 @@ use std::path::Path;
33use super :: CircuitsHandler ;
44use async_trait:: async_trait;
55use eyre:: Result ;
6- use libzkp:: ProvintTaskExt ;
6+ use libzkp:: ProvingTaskExt ;
77use scroll_zkvm_prover:: { Prover , ProverConfig } ;
88use scroll_zkvm_types:: ProvingTask ;
99use tokio:: sync:: Mutex ;
1010pub struct UniversalHandler {
1111 prover : Prover ,
1212}
1313
14- // additional config dispatched with proving task
15- #[ derive( Debug , Default ) ]
16- pub ( crate ) struct TaskConfig {
17- pub is_openvm_v13 : bool ,
18- }
19-
2014/// Safe for current usage as `CircuitsHandler` trait (protected inside of Mutex and NEVER extract
2115/// the instance out by `into_inner`)
2216unsafe impl Send for UniversalHandler { }
2317
2418impl UniversalHandler {
25- pub fn new ( workspace_path : impl AsRef < Path > , cfg : & TaskConfig ) -> Result < Self > {
19+ pub fn new ( workspace_path : impl AsRef < Path > , is_openvm_v13 : bool ) -> Result < Self > {
2620 let path_app_exe = workspace_path. as_ref ( ) . join ( "app.vmexe" ) ;
2721 let path_app_config = workspace_path. as_ref ( ) . join ( "openvm.toml" ) ;
28- let segment_len = Some ( ( 1 << 22 ) - 100 ) ;
22+ let segment_len = Some ( ( 1 << 21 ) - 100 ) ;
2923 let config = ProverConfig {
3024 path_app_config,
3125 path_app_exe,
3226 segment_len,
33- is_openvm_v13 : cfg . is_openvm_v13 ,
27+ is_openvm_v13,
3428 } ;
3529
3630 let prover = Prover :: setup ( config, None ) ?;
@@ -43,13 +37,8 @@ impl UniversalHandler {
4337 & mut self . prover
4438 }
4539
46- pub fn get_task_from_input ( input : & str ) -> Result < ( ProvingTask , TaskConfig ) > {
47- let task_ext: ProvintTaskExt = serde_json:: from_str ( input) ?;
48- let cfg = TaskConfig {
49- is_openvm_v13 : task_ext. use_openvm_13 ,
50- } ;
51-
52- Ok ( ( task_ext. into ( ) , cfg) )
40+ pub fn get_task_from_input ( input : & str ) -> Result < ProvingTaskExt > {
41+ Ok ( serde_json:: from_str ( input) ?)
5342 }
5443}
5544
0 commit comments