@@ -4,7 +4,6 @@ use anyhow::Result;
44use bitcoind_async_client:: { Auth , Client } ;
55use strata_asm_params:: AsmParams ;
66use strata_asm_proof_db:: SledProofDb ;
7- use strata_asm_proof_impl:: program:: AsmStfProofProgram ;
87use strata_asm_worker:: AsmWorkerBuilder ;
98use strata_tasks:: TaskExecutor ;
109use tokio:: {
@@ -64,11 +63,26 @@ pub(crate) async fn bootstrap(
6463 let proof_db = SledProofDb :: open ( & orch_config. proof_db_path ) ?;
6564 let proof_db_clone = proof_db. clone ( ) ;
6665
67- let native_host = AsmStfProofProgram :: native_host ( ) ;
66+ #[ cfg( feature = "sp1" ) ]
67+ let host = {
68+ use std:: fs;
69+
70+ use strata_asm_sp1_guest_builder:: ASM_ELF_PATH ;
71+ use zkaleido_sp1_host:: SP1Host ;
72+ let elf = fs:: read ( ASM_ELF_PATH )
73+ . unwrap_or_else ( |err| panic ! ( "failed to read guest elf at {ASM_ELF_PATH}: {err}" ) ) ;
74+ SP1Host :: init ( & elf)
75+ } ;
76+
77+ #[ cfg( not( feature = "sp1" ) ) ]
78+ let host = {
79+ use strata_asm_proof_impl:: program:: AsmStfProofProgram ;
80+ AsmStfProofProgram :: native_host ( )
81+ } ;
6882
6983 let input_builder = InputBuilder :: new ( asm_manager. clone ( ) , bitcoin_client. clone ( ) ) ;
7084 let mut orchestrator =
71- ProofOrchestrator :: new ( proof_db, native_host , orch_config, input_builder, rx) ;
85+ ProofOrchestrator :: new ( proof_db, host , orch_config, input_builder, rx) ;
7286
7387 // ZkVmRemoteProver is !Send (#[async_trait(?Send)]), so the orchestrator
7488 // future cannot be spawned on a multi-threaded runtime directly. We run it
0 commit comments