-
Notifications
You must be signed in to change notification settings - Fork 10
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
base: main
Are you sure you want to change the base?
Conversation
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"; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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.
No description provided.