File tree Expand file tree Collapse file tree
aggregation_mode/proof_aggregator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9292
9393 - name : Run AggregationMode tests
9494 run : |
95- cd aggregation_mode/proof_aggregator && cargo test
95+ cd aggregation_mode/proof_aggregator && SKIP_AGG_PROGRAMS_BUILD=1 cargo test
9696 cd ../gateway && cargo test
9797 cd ../payments_poller && cargo test
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ verify_aggregated_proof_risc0:
300300 --rpc_url $(RPC_URL )
301301
302302proof_aggregator_install : # # Install the aggregation mode with proving enabled
303- cargo install --path aggregation_mode --features prove,gpu --bin proof_aggregator_gpu --locked
303+ cargo install --path aggregation_mode/proof_aggregator --features prove,gpu --bin proof_aggregator_gpu --locked
304304
305305proof_aggregator_write_program_ids : # # Write proof aggregator zkvm programs ids
306306 @cd aggregation_mode/proof_aggregator && ./scripts/build_programs.sh
Original file line number Diff line number Diff line change @@ -38,27 +38,24 @@ risc0-build = { version = "3.0.3" }
3838# Tell risc0 build to find method in ./aggregation_programs/risc0 package
3939methods = [" ./aggregation_programs/risc0" ]
4040
41- [profile .release ]
42- opt-level = 3
43-
4441[features ]
4542default = []
4643prove = []
4744gpu = [" risc0-zkvm/cuda" ]
4845
4946[[bin ]]
5047name = " proof_aggregator_cpu"
51- path = " ./src/main .rs"
48+ path = " ./src/bin/proof_aggregator_cpu .rs"
5249required-features = [" prove" ]
5350
5451[[bin ]]
5552name = " proof_aggregator_gpu"
56- path = " ./src/main .rs"
53+ path = " ./src/bin/proof_aggregator_gpu .rs"
5754required-features = [" prove" , " gpu" ]
5855
5956[[bin ]]
6057name = " proof_aggregator_dev"
61- path = " ./src/main .rs"
58+ path = " ./src/bin/proof_aggregator_dev .rs"
6259
6360[[bin ]]
6461name = " write_program_image_id_vk_hash"
Original file line number Diff line number Diff line change 1+ #[ tokio:: main]
2+ async fn main ( ) {
3+ proof_aggregator:: run ( ) . await ;
4+ }
Original file line number Diff line number Diff line change 1+ #[ tokio:: main]
2+ async fn main ( ) {
3+ proof_aggregator:: run ( ) . await ;
4+ }
Original file line number Diff line number Diff line change 1+ #[ tokio:: main]
2+ async fn main ( ) {
3+ proof_aggregator:: run ( ) . await ;
4+ }
Original file line number Diff line number Diff line change 11pub mod aggregators;
22pub mod backend;
3+
4+ use std:: env;
5+ use backend:: { config:: Config , ProofAggregator } ;
6+ use tracing_subscriber:: { EnvFilter , FmtSubscriber } ;
7+
8+ fn read_config_filepath_from_args ( ) -> String {
9+ let args: Vec < String > = env:: args ( ) . collect ( ) ;
10+ if args. len ( ) < 2 {
11+ panic ! (
12+ "You mus provide a config file. Usage: {} <config-file-path>" ,
13+ args[ 0 ]
14+ ) ;
15+ }
16+
17+ args[ 1 ] . clone ( )
18+ }
19+
20+ pub async fn run ( ) {
21+ // ignore sp1_cuda info logs
22+ let filter = EnvFilter :: new ( "info,sp1_cuda=warn" ) ;
23+ let subscriber = FmtSubscriber :: builder ( ) . with_env_filter ( filter) . finish ( ) ;
24+ tracing:: subscriber:: set_global_default ( subscriber) . expect ( "setting default subscriber failed" ) ;
25+
26+ // load config
27+ let config_file_path = read_config_filepath_from_args ( ) ;
28+ tracing:: info!( "Loading config from {}..." , config_file_path) ;
29+ let config = Config :: from_file ( & config_file_path) . expect ( "Config is valid" ) ;
30+ tracing:: info!( "Config loaded" ) ;
31+
32+ let mut proof_aggregator = ProofAggregator :: new ( config) . await ;
33+ proof_aggregator. start ( ) . await ;
34+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments