Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions prover/src/compute_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ use halo2_proofs::{
};
use rand::SeedableRng;
use rand_xorshift::XorShiftRng;

use std::str::FromStr;
use std::time::Instant;

use strum::IntoEnumIterator;
use zkevm_circuits::evm_circuit::{
table::FixedTableTag, test::TestCircuit, witness::block_convert,
Expand All @@ -27,6 +30,7 @@ pub async fn compute_proof(
rpc_url: &str,
) -> Result<Proofs, Box<dyn std::error::Error>> {
// request & build the inputs for the circuits
let time_started = Instant::now();
let url = Http::from_str(rpc_url)?;
let geth_client = GethClient::new(url);
let builder = BuilderClient::new(geth_client).await?;
Expand Down Expand Up @@ -83,6 +87,7 @@ pub async fn compute_proof(
let ret = Proofs {
evm_proof: evm_proof.into(),
state_proof: state_proof.into(),
duration: Instant::now().duration_since(time_started).as_millis() as u64,
};

Ok(ret)
Expand Down
1 change: 1 addition & 0 deletions prover/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pub struct Proofs {
pub state_proof: eth_types::Bytes,
pub evm_proof: eth_types::Bytes,
pub duration: u64,
}

#[derive(Debug, serde::Serialize)]
Expand Down