File tree Expand file tree Collapse file tree 4 files changed +3
-35
lines changed
Expand file tree Collapse file tree 4 files changed +3
-35
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ struct CloudProver {
7575 api_key : String ,
7676}
7777
78- #[ async_trait]
78+ #[ async_trait( ? Send ) ]
7979impl ProvingService for CloudProver {
8080 fn is_local ( & self ) -> bool {
8181 false
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl LocalProverConfig {
5151
5252struct LocalProver { }
5353
54- #[ async_trait]
54+ #[ async_trait( ? Send ) ]
5555impl ProvingService for LocalProver {
5656 fn is_local ( & self ) -> bool {
5757 true
Original file line number Diff line number Diff line change 6060 }
6161 }
6262
63- pub async fn run_with_n_workers ( self )
64- where
65- Backend : ProvingService + Send + Sync + ' static ,
66- {
67- assert ! ( self . n_workers == self . coordinator_clients. len( ) ) ;
68- if self . proof_types . contains ( & ProofType :: Chunk ) {
69- assert ! ( self . l2geth_client. is_some( ) ) ;
70- }
71-
72- self . test_coordinator_connection ( ) . await ;
73-
74- let app = Router :: new ( ) . route ( "/" , get ( || async { "OK" } ) ) ;
75- let addr = SocketAddr :: from_str ( & self . health_listener_addr )
76- . expect ( "Failed to parse socket address" ) ;
77- let server = axum:: Server :: bind ( & addr) . serve ( app. into_make_service ( ) ) ;
78- let health_check_server_task = tokio:: spawn ( server) ;
79-
80- let mut provers = JoinSet :: new ( ) ;
81- let self_arc = std:: sync:: Arc :: new ( self ) ;
82- for i in 0 ..self_arc. n_workers {
83- let self_clone = std:: sync:: Arc :: clone ( & self_arc) ;
84- provers. spawn ( async move {
85- self_clone. working_loop ( i) . await ;
86- } ) ;
87- }
88-
89- tokio:: select! {
90- _ = health_check_server_task => { } ,
91- _ = async { while provers. join_next( ) . await . is_some( ) { } } => { } ,
92- }
93- }
94-
9563 async fn test_coordinator_connection ( & self ) {
9664 self . coordinator_clients [ 0 ]
9765 . get_token ( true )
Original file line number Diff line number Diff line change 11use super :: ProofType ;
22use async_trait:: async_trait;
33
4- #[ async_trait]
4+ #[ async_trait( ? Send ) ]
55pub trait ProvingService {
66 fn is_local ( & self ) -> bool ;
77 async fn get_vks ( & self , req : GetVkRequest ) -> GetVkResponse ;
You can’t perform that action at this time.
0 commit comments