File tree 4 files changed +3
-35
lines changed
4 files changed +3
-35
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ struct CloudProver {
75
75
api_key : String ,
76
76
}
77
77
78
- #[ async_trait]
78
+ #[ async_trait( ? Send ) ]
79
79
impl ProvingService for CloudProver {
80
80
fn is_local ( & self ) -> bool {
81
81
false
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl LocalProverConfig {
51
51
52
52
struct LocalProver { }
53
53
54
- #[ async_trait]
54
+ #[ async_trait( ? Send ) ]
55
55
impl ProvingService for LocalProver {
56
56
fn is_local ( & self ) -> bool {
57
57
true
Original file line number Diff line number Diff line change 60
60
}
61
61
}
62
62
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
-
95
63
async fn test_coordinator_connection ( & self ) {
96
64
self . coordinator_clients [ 0 ]
97
65
. get_token ( true )
Original file line number Diff line number Diff line change 1
1
use super :: ProofType ;
2
2
use async_trait:: async_trait;
3
3
4
- #[ async_trait]
4
+ #[ async_trait( ? Send ) ]
5
5
pub trait ProvingService {
6
6
fn is_local ( & self ) -> bool ;
7
7
async fn get_vks ( & self , req : GetVkRequest ) -> GetVkResponse ;
You can’t perform that action at this time.
0 commit comments