@@ -104,6 +104,10 @@ pub enum ProofType {
104
104
///
105
105
/// Uses the SP1 prover to build the block.
106
106
Sp1 ,
107
+ /// # Sp1Distributed
108
+ ///
109
+ /// Uses the SP1 prover to build the block in a distributed way.
110
+ Sp1Distributed ,
107
111
/// # Sgx
108
112
///
109
113
/// Builds the block on a SGX supported CPU to create a proof.
@@ -119,6 +123,7 @@ impl std::fmt::Display for ProofType {
119
123
f. write_str ( match self {
120
124
ProofType :: Native => "native" ,
121
125
ProofType :: Sp1 => "sp1" ,
126
+ ProofType :: Sp1Distributed => "sp1_distributed" ,
122
127
ProofType :: Sgx => "sgx" ,
123
128
ProofType :: Risc0 => "risc0" ,
124
129
} )
@@ -132,6 +137,7 @@ impl FromStr for ProofType {
132
137
match s. trim ( ) . to_lowercase ( ) . as_str ( ) {
133
138
"native" => Ok ( ProofType :: Native ) ,
134
139
"sp1" => Ok ( ProofType :: Sp1 ) ,
140
+ "sp1_distributed" => Ok ( ProofType :: Sp1Distributed ) ,
135
141
"sgx" => Ok ( ProofType :: Sgx ) ,
136
142
"risc0" => Ok ( ProofType :: Risc0 ) ,
137
143
_ => Err ( RaikoError :: InvalidProofType ( s. to_string ( ) ) ) ,
@@ -159,6 +165,14 @@ impl ProofType {
159
165
#[ cfg( not( feature = "sp1" ) ) ]
160
166
Err ( RaikoError :: FeatureNotSupportedError ( * self ) )
161
167
}
168
+ ProofType :: Sp1Distributed => {
169
+ #[ cfg( feature = "sp1" ) ]
170
+ return sp1_driver:: Sp1DistributedProver :: run ( input, output, config)
171
+ . await
172
+ . map_err ( |e| e. into ( ) ) ;
173
+ #[ cfg( not( feature = "sp1" ) ) ]
174
+ Err ( RaikoError :: FeatureNotSupportedError ( * self ) )
175
+ }
162
176
ProofType :: Risc0 => {
163
177
#[ cfg( feature = "risc0" ) ]
164
178
return risc0_driver:: Risc0Prover :: run ( input. clone ( ) , output, config)
@@ -179,7 +193,7 @@ impl ProofType {
179
193
180
194
// Add the kzg proof to the proof if needed
181
195
if let Some ( blob_commitment) = input. taiko . blob_commitment . clone ( ) {
182
- let kzg_proof = calc_kzg_proof (
196
+ /* let kzg_proof = calc_kzg_proof(
183
197
&input.taiko.tx_data,
184
198
&commitment_to_version_hash(&blob_commitment.try_into().unwrap()),
185
199
)
@@ -188,7 +202,7 @@ impl ProofType {
188
202
proof
189
203
.as_object_mut()
190
204
.unwrap()
191
- . insert ( "kzg_proof" . to_string ( ) , Value :: String ( kzg_proof_hex) ) ;
205
+ .insert("kzg_proof".to_string(), Value::String(kzg_proof_hex)); */
192
206
}
193
207
194
208
Ok ( proof)
0 commit comments