File tree Expand file tree Collapse file tree 9 files changed +37
-7
lines changed
charts/scroll-proving-sdk Expand file tree Collapse file tree 9 files changed +37
-7
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ target/
2020# option (not recommended) you can uncomment the following to ignore the entire idea folder.
2121# .idea/
2222
23- config.json
2423keys /
2524db /
2625
Original file line number Diff line number Diff line change 22apiVersion : v2
33description : Example chart for showing how to package a service built using the scroll-proving-sdk library
44name : scroll-proving-sdk
5- version : 0.0.6
5+ version : 0.0.7
66kubeVersion : " >=1.22.0-0"
77maintainers :
88 - name : scroll-tech
Original file line number Diff line number Diff line change 11# scroll-proving-sdk
22
3- ![ Version: 0.0.6 ] ( https://img.shields.io/badge/Version-0.0.6 -informational?style=flat-square )
3+ ![ Version: 0.0.7 ] ( https://img.shields.io/badge/Version-0.0.7 -informational?style=flat-square )
44
55Example chart for showing how to package a service built using the scroll-proving-sdk library
66
Original file line number Diff line number Diff line change @@ -84,5 +84,6 @@ scrollConfig: |
8484# "retry_wait_time_sec": 5,
8585# "connection_timeout_sec": 60
8686# }
87- # }
87+ # },
88+ # "db_path": "db"
8889# }
Original file line number Diff line number Diff line change 1+ {
2+ "prover_name_prefix" : " cloud_prover_" ,
3+ "keys_dir" : " keys" ,
4+ "coordinator" : {
5+ "base_url" : " https://coordinator-api.scrollsdk" ,
6+ "retry_count" : 3 ,
7+ "retry_wait_time_sec" : 5 ,
8+ "connection_timeout_sec" : 60
9+ },
10+ "l2geth" : {
11+ "endpoint" : " https://l2-rpc.scrollsdk"
12+ },
13+ "prover" : {
14+ "circuit_type" : 3 ,
15+ "circuit_version" : " v0.13.1" ,
16+ "n_workers" : 1 ,
17+ "cloud" : {
18+ "base_url" : " <CLOUD_PROVING_SERVICE_BASE_URL>" ,
19+ "api_key" : " <API_KEY>" ,
20+ "retry_count" : 3 ,
21+ "retry_wait_time_sec" : 5 ,
22+ "connection_timeout_sec" : 60
23+ }
24+ },
25+ "db_path" : " db"
26+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use std::fs::File;
88pub struct Config {
99 pub prover_name_prefix : String ,
1010 pub keys_dir : String ,
11- pub db_path : String ,
11+ pub db_path : Option < String > ,
1212 pub coordinator : CoordinatorConfig ,
1313 pub l2geth : Option < L2GethConfig > ,
1414 pub prover : ProverConfig ,
@@ -125,7 +125,7 @@ impl Config {
125125 }
126126 }
127127 if let Some ( val) = Self :: get_env_var ( "DB_PATH" ) ? {
128- self . db_path = val;
128+ self . db_path = Option :: from ( val) ;
129129 }
130130
131131 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ impl ProverBuilder {
8686 None => None ,
8787 } ;
8888
89+ let db_path = self . cfg . db_path . unwrap_or_else ( || {
90+ panic ! ( "Missing database path" ) ;
91+ } ) ;
92+
8993 Ok ( Prover {
9094 circuit_type : self . cfg . prover . circuit_type ,
9195 circuit_version : self . cfg . prover . circuit_version ,
@@ -94,7 +98,7 @@ impl ProverBuilder {
9498 proving_service : self . proving_service . unwrap ( ) ,
9599 n_workers : self . cfg . prover . n_workers ,
96100 health_listener_addr : self . cfg . health_listener_addr ,
97- db : Db :: new ( & self . cfg . db_path ) ?,
101+ db : Db :: new ( & db_path) ?,
98102 } )
99103 }
100104}
You can’t perform that action at this time.
0 commit comments