Skip to content

Commit b9dd626

Browse files
committed
chore: run cargo fmt
1 parent cdf1e55 commit b9dd626

3 files changed

Lines changed: 40 additions & 11 deletions

File tree

aggregation_mode/cli/src/commands/submit.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ pub async fn run_sp1(args: SubmitSP1Args) {
6262
pub async fn run_zisk(args: SubmitZiskArgs) {
6363
tracing::info!("Submitting Zisk proof to {:?} ", args.network);
6464

65-
let proof = std::fs::read(&args.proof_path)
66-
.expect(&format!("failed to read proof from {}", args.proof_path.display()));
65+
let proof = std::fs::read(&args.proof_path).expect(&format!(
66+
"failed to read proof from {}",
67+
args.proof_path.display()
68+
));
6769

6870
let signer =
6971
LocalSigner::from_str(args.private_key.trim()).expect("failed to parse private key: {e}");

aggregation_mode/cli/src/commands/verify.rs

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,14 @@ pub async fn run_sp1(args: VerifySP1Args) {
7878

7979
let verification_data = AggregationModeVerificationData::SP1 { vk, public_inputs };
8080

81-
verify_proof(args.network, args.rpc_url, args.beacon_url, args.from_block, verification_data).await;
81+
verify_proof(
82+
args.network,
83+
args.rpc_url,
84+
args.beacon_url,
85+
args.from_block,
86+
verification_data,
87+
)
88+
.await;
8289
}
8390

8491
pub async fn run_risc0(args: VerifyRisc0Args) {
@@ -91,9 +98,19 @@ pub async fn run_risc0(args: VerifyRisc0Args) {
9198

9299
let public_inputs = std::fs::read(&args.public_inputs).expect("to read public inputs file");
93100

94-
let verification_data = AggregationModeVerificationData::Risc0 { image_id, public_inputs };
101+
let verification_data = AggregationModeVerificationData::Risc0 {
102+
image_id,
103+
public_inputs,
104+
};
95105

96-
verify_proof(args.network, args.rpc_url, args.beacon_url, args.from_block, verification_data).await;
106+
verify_proof(
107+
args.network,
108+
args.rpc_url,
109+
args.beacon_url,
110+
args.from_block,
111+
verification_data,
112+
)
113+
.await;
97114
}
98115

99116
pub async fn run_zisk(args: VerifyZiskArgs) {
@@ -103,7 +120,14 @@ pub async fn run_zisk(args: VerifyZiskArgs) {
103120

104121
let verification_data = AggregationModeVerificationData::Zisk { proof };
105122

106-
verify_proof(args.network, args.rpc_url, args.beacon_url, args.from_block, verification_data).await;
123+
verify_proof(
124+
args.network,
125+
args.rpc_url,
126+
args.beacon_url,
127+
args.from_block,
128+
verification_data,
129+
)
130+
.await;
107131
}
108132

109133
async fn verify_proof(

aggregation_mode/gateway/src/http.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ use crate::{
2525
db::Db,
2626
helpers::get_time_left_day_formatted,
2727
metrics::GatewayMetrics,
28-
types::{GetReceiptsResponse, SubmitProofRequestRisc0, SubmitProofRequestSP1, SubmitProofRequestZisk},
28+
types::{
29+
GetReceiptsResponse, SubmitProofRequestRisc0, SubmitProofRequestSP1, SubmitProofRequestZisk,
30+
},
2931
verifiers::{verify_sp1_proof, verify_zisk_proof, VerificationError},
3032
};
3133

@@ -401,17 +403,18 @@ impl GatewayServer {
401403
&recovered_address,
402404
AggregationModeProvingSystem::ZISK.as_u16() as i32,
403405
&proof_content,
404-
&[], // Zisk proofs don't have a separate vk file
406+
&[], // Zisk proofs don't have a separate vk file
405407
None,
406408
data.nonce.0 as i64,
407409
)
408410
.await
409411
{
410412
Ok(task_id) => {
411413
let time_elapsed_db_call = query_started_at.elapsed();
412-
state
413-
.metrics
414-
.register_db_response_time_post("zisk-post", time_elapsed_db_call.as_secs_f64());
414+
state.metrics.register_db_response_time_post(
415+
"zisk-post",
416+
time_elapsed_db_call.as_secs_f64(),
417+
);
415418

416419
HttpResponse::Ok().json(AppResponse::new_sucessfull(
417420
serde_json::json!({ "task_id": task_id.to_string() }),

0 commit comments

Comments
 (0)