1
- use std:: env;
1
+ use std:: { env, path :: PathBuf } ;
2
2
3
3
use aggregator:: { decode_bytes, BatchData , BatchHash , BatchHeader , ChunkInfo , MAX_AGG_SNARKS } ;
4
4
use eth_types:: H256 ;
@@ -14,7 +14,7 @@ use crate::{
14
14
FD_SP1_CHUNK_PROTOCOL ,
15
15
} ,
16
16
types:: BundleProvingTask ,
17
- utils:: { force_to_read , try_to_read } ,
17
+ utils:: { force_read , try_read } ,
18
18
BatchProofV2 , BatchProofV2Metadata , BatchProvingTask , BundleProofV2 , ChunkKind , ChunkProof ,
19
19
ChunkProofV2 , ParamsMap , ProverError ,
20
20
} ;
@@ -68,12 +68,14 @@ impl<'params> Prover<'params> {
68
68
// The SNARK protocols for both variants of the Layer-2 SNARK must be available in the
69
69
// assets directory before setting up the batch prover. The SNARK protocols are
70
70
// specifically for the halo2-route and sp1-route of generating chunk proofs.
71
- let halo2_protocol = force_to_read ( assets_dir, & FD_HALO2_CHUNK_PROTOCOL ) ;
72
- let sp1_protocol = force_to_read ( assets_dir, & FD_SP1_CHUNK_PROTOCOL ) ;
71
+ let halo2_protocol =
72
+ force_read ( PathBuf :: from ( assets_dir) . join ( FD_HALO2_CHUNK_PROTOCOL . clone ( ) ) ) ;
73
+ let sp1_protocol =
74
+ force_read ( PathBuf :: from ( assets_dir) . join ( FD_SP1_CHUNK_PROTOCOL . clone ( ) ) ) ;
73
75
74
76
// Try to read the verifying key for both Layer-4 and Layer-6 compression circuits.
75
- let raw_vk_batch = try_to_read ( assets_dir, & BATCH_VK_FILENAME ) ;
76
- let raw_vk_bundle = try_to_read ( assets_dir, & BUNDLE_VK_FILENAME ) ;
77
+ let raw_vk_batch = try_read ( PathBuf :: from ( assets_dir) . join ( BATCH_VK_FILENAME . clone ( ) ) ) ;
78
+ let raw_vk_bundle = try_read ( PathBuf :: from ( assets_dir) . join ( BUNDLE_VK_FILENAME . clone ( ) ) ) ;
77
79
78
80
if raw_vk_batch. is_none ( ) {
79
81
log:: warn!(
0 commit comments