Skip to content

Commit

Permalink
refine info print
Browse files Browse the repository at this point in the history
  • Loading branch information
smtmfft committed Oct 17, 2024
1 parent 8f55ae4 commit 7e7b0f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
23 changes: 13 additions & 10 deletions host/src/server/api/v3/proof/mod.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
use axum::{debug_handler, extract::State, routing::post, Json, Router};
use raiko_core::{
interfaces::{AggregationOnlyRequest, AggregationRequest, ProofRequest, ProofRequestOpt},
provider::get_task_data,
};
use raiko_tasks::{TaskDescriptor, TaskManager, TaskStatus};
use utoipa::OpenApi;

use crate::{
interfaces::HostResult,
metrics::{inc_current_req, inc_guest_req_count, inc_host_req_count},
server::api::{v2, v3::Status},
Message, ProverState,
};
use axum::{debug_handler, extract::State, routing::post, Json, Router};
use raiko_core::{
interfaces::{AggregationOnlyRequest, AggregationRequest, ProofRequest, ProofRequestOpt},
provider::get_task_data,
};
use raiko_lib::prover::Proof;
use raiko_tasks::{TaskDescriptor, TaskManager, TaskStatus};
use tracing::{debug, info};
use utoipa::OpenApi;

mod aggregate;
mod cancel;
Expand Down Expand Up @@ -125,8 +125,11 @@ async fn proof_handler(
let mut proofs = Vec::with_capacity(tasks.len());
for (task, req) in tasks {
let raw_proof = manager.get_task_proof(&task).await?;
let proof = serde_json::from_slice(&raw_proof)?;
debug!("req: {req:?} gets proof: {proof:?}");
let proof: Proof = serde_json::from_slice(&raw_proof)?;
debug!(
"Aggregation sub-req: {req:?} gets proof {:?} with input {:?}.",
proof.proof, proof.input
);
proofs.push(proof);
}

Expand Down
4 changes: 1 addition & 3 deletions provers/sp1/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,6 @@ impl Prover for Sp1Prover {
_store: Option<&mut dyn IdWrite>,
) -> ProverResult<Proof> {
let param = Sp1Param::deserialize(config.get("sp1").unwrap()).unwrap();

info!("aggregate proof with param: {param:?}");

let block_inputs: Vec<B256> = input
.proofs
.iter()
Expand Down Expand Up @@ -316,6 +313,7 @@ impl Prover for Sp1Prover {
let prove_result = client
.prove(&pk, stdin)
.plonk()
.timeout(Duration::from_secs(3600))
.run()
.expect("proving failed");

Expand Down

0 comments on commit 7e7b0f9

Please sign in to comment.