@@ -3,11 +3,8 @@ use async_process::Stdio;
3
3
use futures:: Future ;
4
4
use rand:: { thread_rng, Rng } ;
5
5
use serde_json:: json;
6
- use sharp_p2p_common:: job:: JobData ;
7
6
use sharp_p2p_common:: layout:: Layout ;
8
- use sharp_p2p_common:: { job:: Job , process:: Process } ;
9
- use starknet:: signers:: SigningKey ;
10
- use starknet_crypto:: FieldElement ;
7
+ use sharp_p2p_common:: process:: Process ;
11
8
use std:: io:: Write ;
12
9
use std:: path:: PathBuf ;
13
10
use std:: { io:: Read , pin:: Pin } ;
@@ -17,25 +14,28 @@ use tracing::debug;
17
14
18
15
pub mod tests;
19
16
20
- pub struct CairoCompiler < ' identity > {
21
- signing_key : & ' identity SigningKey ,
22
- registry_contract : FieldElement ,
17
+ pub struct CairoCompiler { }
18
+
19
+ impl CairoCompiler {
20
+ pub fn new ( ) -> Self {
21
+ Self { }
22
+ }
23
23
}
24
24
25
- impl < ' identity > CairoCompiler < ' identity > {
26
- pub fn new ( signing_key : & ' identity SigningKey , registry_contract : FieldElement ) -> Self {
27
- Self { signing_key , registry_contract }
25
+ impl Default for CairoCompiler {
26
+ fn default ( ) -> Self {
27
+ Self :: new ( )
28
28
}
29
29
}
30
30
31
- impl < ' identity > CompilerController for CairoCompiler < ' identity > {
31
+ impl CompilerController for CairoCompiler {
32
32
fn run (
33
33
& self ,
34
34
program_path : PathBuf ,
35
35
_program_input_path : PathBuf ,
36
- ) -> Result < Process < Result < Job , CompilerControllerError > > , CompilerControllerError > {
36
+ ) -> Result < Process < Result < Vec < u8 > , CompilerControllerError > > , CompilerControllerError > {
37
37
let ( terminate_tx, mut terminate_rx) = mpsc:: channel :: < ( ) > ( 10 ) ;
38
- let future: Pin < Box < dyn Future < Output = Result < Job , CompilerControllerError > > + ' _ > > =
38
+ let future: Pin < Box < dyn Future < Output = Result < Vec < u8 > , CompilerControllerError > > + ' _ > > =
39
39
Box :: pin ( async move {
40
40
let layout: & str = Layout :: RecursiveWithPoseidon . into ( ) ;
41
41
@@ -118,10 +118,7 @@ impl<'identity> CompilerController for CairoCompiler<'identity> {
118
118
let mut cairo_pie_compressed = Vec :: new ( ) ;
119
119
cairo_pie. read_to_end ( & mut cairo_pie_compressed) ?;
120
120
121
- Ok ( Job :: try_from_job_data (
122
- JobData :: new ( 0 , cairo_pie_compressed, self . registry_contract ) ,
123
- self . signing_key ,
124
- ) )
121
+ Ok ( cairo_pie_compressed)
125
122
} ) ;
126
123
127
124
Ok ( Process :: new ( future, terminate_tx) )
0 commit comments