Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support precompile #48

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

xander42280
Copy link
Contributor

No description provided.

use std::time::Instant;
use zkm_sdk::{prover::ClientCfg, prover::ProverInput, ProverClient};

pub const DEFAULT_PROVER_NETWORK_RPC: &str = "https://152.32.186.45:20002";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it an environment variable.

let prover_client = ProverClient::new(&client_config).await;
log::info!("new prover client,ok.");

let mut prover_input = ProverInput {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we plz create a new or init function in ProverInput so we don't have to pass empty variables?

Learn how to use Default::default()

@@ -143,14 +153,25 @@ impl Prover for NetworkProver {
//log::info!("generate_proof step: {}", get_status_response.step);
match get_status_response.step {
0 => log::info!("generate_proof : queuing the task."),
1 => log::info!("generate_proof : splitting the task."),
2 => log::info!("generate_proof : proving the task."),
1 => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't hardcode, what's does 0, 1, 2 mean?

let cert_path = env::var("CERT_PATH").unwrap_or("".to_string());
let key_path = env::var("KEY_PATH").unwrap_or("".to_string());
let domain_name = env::var("DOMAIN_NAME").unwrap_or(DEFALUT_PROVER_NETWORK_DOMAIN.to_string());
let private_key = env::var("PRIVATE_KEY").unwrap_or("".to_string());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the PRIVATE KEY to PROOF_NETWORK_PRVKEY, make the variable name precise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants