Skip to content

Commit 09ae9ec

Browse files
committed
fix warnings
1 parent 8dec02a commit 09ae9ec

8 files changed

Lines changed: 49 additions & 41 deletions

File tree

.github/workflows/build-and-test-rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ jobs:
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

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ verify_aggregated_proof_risc0:
300300
--rpc_url $(RPC_URL)
301301

302302
proof_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

305305
proof_aggregator_write_program_ids: ## Write proof aggregator zkvm programs ids
306306
@cd aggregation_mode/proof_aggregator && ./scripts/build_programs.sh

aggregation_mode/proof_aggregator/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,24 @@ risc0-build = { version = "3.0.3" }
3838
# Tell risc0 build to find method in ./aggregation_programs/risc0 package
3939
methods = ["./aggregation_programs/risc0"]
4040

41-
[profile.release]
42-
opt-level = 3
43-
4441
[features]
4542
default = []
4643
prove = []
4744
gpu = ["risc0-zkvm/cuda"]
4845

4946
[[bin]]
5047
name = "proof_aggregator_cpu"
51-
path = "./src/main.rs"
48+
path = "./src/bin/proof_aggregator_cpu.rs"
5249
required-features = ["prove"]
5350

5451
[[bin]]
5552
name = "proof_aggregator_gpu"
56-
path = "./src/main.rs"
53+
path = "./src/bin/proof_aggregator_gpu.rs"
5754
required-features = ["prove", "gpu"]
5855

5956
[[bin]]
6057
name = "proof_aggregator_dev"
61-
path = "./src/main.rs"
58+
path = "./src/bin/proof_aggregator_dev.rs"
6259

6360
[[bin]]
6461
name = "write_program_image_id_vk_hash"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[tokio::main]
2+
async fn main() {
3+
proof_aggregator::run().await;
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[tokio::main]
2+
async fn main() {
3+
proof_aggregator::run().await;
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#[tokio::main]
2+
async fn main() {
3+
proof_aggregator::run().await;
4+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
pub mod aggregators;
22
pub 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+
}

aggregation_mode/proof_aggregator/src/main.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)