diff --git a/prover/src/circuit_witness.rs b/prover/src/circuit_witness.rs index ed4dafde..fc702bad 100644 --- a/prover/src/circuit_witness.rs +++ b/prover/src/circuit_witness.rs @@ -9,9 +9,10 @@ use eth_types::ToBigEndian; use eth_types::Word; use eth_types::H256; use eth_types::{geth_types, Bytes}; -use ethers_providers::Http; +// use ethers_providers::Http; +use ethers_providers::Ws; use halo2_proofs::halo2curves::bn256::Fr; -use std::str::FromStr; +// use std::str::FromStr; use zkevm_circuits::evm_circuit; use zkevm_circuits::pi_circuit::PublicData; use zkevm_common::prover::CircuitConfig; @@ -72,14 +73,14 @@ impl CircuitWitness { propose_tx_hash: &str, l2_rpc_url: &str, ) -> Result> { - let l1_url = Http::from_str(l1_rpc_url)?; + let l1_url = Ws::connect(l1_rpc_url).await?; let l1_geth_client = GethClient::new(l1_url); let propose_tx_hash = eth_types::H256::from_slice( &hex::decode(propose_tx_hash).expect("parse propose tx hash"), ); let txs_rlp = get_txs_rlp(&l1_geth_client, propose_tx_hash).await?; - let l2_url = Http::from_str(l2_rpc_url)?; + let l2_url = Ws::connect(l2_rpc_url).await?; let l2_geth_client = GethClient::new(l2_url); // TODO: add support for `eth_getHeaderByNumber` let block = l2_geth_client diff --git a/prover/src/shared_state.rs b/prover/src/shared_state.rs index fb0594c4..e77803a2 100644 --- a/prover/src/shared_state.rs +++ b/prover/src/shared_state.rs @@ -5,7 +5,7 @@ use crate::circuit_witness::CircuitWitness; use crate::circuits::*; use crate::utils::collect_instance; use crate::utils::fixed_rng; -use crate::utils::gen_num_instance; +// use crate::utils::gen_num_instance; use crate::utils::gen_proof; use crate::G1Affine; use crate::ProverKey; @@ -17,10 +17,10 @@ use halo2_proofs::plonk::{keygen_pk, keygen_vk}; use halo2_proofs::poly::commitment::Params; use hyper::Uri; use rand::{thread_rng, Rng}; -use snark_verifier::loader::native::NativeLoader; -use snark_verifier::system::halo2::compile; +// use snark_verifier::loader::native::NativeLoader; +// use snark_verifier::system::halo2::compile; use snark_verifier::system::halo2::transcript::evm::EvmTranscript; -use snark_verifier::system::halo2::Config as PlonkConfig; +// use snark_verifier::system::halo2::Config as PlonkConfig; use std::collections::HashMap; use std::fmt::Write; use std::fs::File;