Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yiweichi committed Jan 5, 2025
1 parent 6ba25dc commit f3cebe7
Show file tree
Hide file tree
Showing 13 changed files with 187 additions and 729 deletions.
51 changes: 0 additions & 51 deletions prover/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,55 +1,4 @@
use anyhow::{bail, Result};
use serde::{Deserialize, Serialize};
use std::fs::File;

use crate::types::ProverType;

#[derive(Debug, Serialize, Deserialize)]
pub struct CircuitConfig {
pub hard_fork_name: String,
pub params_path: String,
pub assets_path: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct CoordinatorConfig {
pub base_url: String,
pub retry_count: u32,
pub retry_wait_time_sec: u64,
pub connection_timeout_sec: u64,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct L2GethConfig {
pub endpoint: String,
}

#[derive(Debug, Deserialize)]
pub struct Config {
pub prover_name: String,
pub keystore_path: String,
pub keystore_password: String,
pub db_path: String,
pub prover_types: Vec<ProverType>,
pub low_version_circuit: CircuitConfig,
pub high_version_circuit: CircuitConfig,
pub coordinator: CoordinatorConfig,
pub l2geth: Option<L2GethConfig>,
}

impl Config {
pub fn from_reader<R>(reader: R) -> Result<Self>
where
R: std::io::Read,
{
serde_json::from_reader(reader).map_err(|e| anyhow::anyhow!(e))
}

pub fn from_file(file_name: String) -> Result<Self> {
let file = File::open(file_name)?;
Config::from_reader(&file)
}
}

static SCROLL_PROVER_ASSETS_DIR_ENV_NAME: &str = "SCROLL_PROVER_ASSETS_DIR";
static mut SCROLL_PROVER_ASSETS_DIRS: Vec<String> = vec![];
Expand Down
142 changes: 0 additions & 142 deletions prover/src/coordinator_client.rs

This file was deleted.

57 changes: 0 additions & 57 deletions prover/src/geth_client.rs

This file was deleted.

103 changes: 0 additions & 103 deletions prover/src/key_signer.rs

This file was deleted.

Loading

0 comments on commit f3cebe7

Please sign in to comment.