From e661c26743120b48ba8df5bd753f95cdc635782b Mon Sep 17 00:00:00 2001 From: Mengran Lan Date: Wed, 29 May 2024 18:51:05 +0800 Subject: [PATCH] remove dependency of eth_types from zkevm-circuits --- prover_rust/Cargo.lock | 1 - prover_rust/Cargo.toml | 1 - prover_rust/src/geth_client.rs | 6 +++--- prover_rust/src/key_signer.rs | 2 +- prover_rust/src/prover.rs | 2 +- prover_rust/src/types.rs | 4 +--- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/prover_rust/Cargo.lock b/prover_rust/Cargo.lock index 3dc5c4611..672c70893 100644 --- a/prover_rust/Cargo.lock +++ b/prover_rust/Cargo.lock @@ -3360,7 +3360,6 @@ dependencies = [ "base64 0.13.1", "env_logger 0.11.3", "eth-keystore", - "eth-types 0.1.0 (git+https://github.com/scroll-tech/zkevm-circuits.git?tag=v0.11.0rc2)", "ethers-core 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", "ethers-providers 2.0.7 (git+https://github.com/scroll-tech/ethers-rs.git?branch=v2.0.7)", "futures", diff --git a/prover_rust/Cargo.toml b/prover_rust/Cargo.toml index 95f96fca0..68fd7b3c0 100644 --- a/prover_rust/Cargo.toml +++ b/prover_rust/Cargo.toml @@ -31,7 +31,6 @@ ethers-providers = { git = "https://github.com/scroll-tech/ethers-rs.git", branc halo2_proofs = { git = "https://github.com/scroll-tech/halo2.git", branch = "v1.1" } snark-verifier-sdk = { git = "https://github.com/scroll-tech/snark-verifier", branch = "develop", default-features = false, features = ["loader_halo2", "loader_evm", "halo2-pse"] } prover = { git = "https://github.com/scroll-tech/zkevm-circuits.git", branch = "v0.10", default-features = false, features = ["parallel_syn", "scroll", "shanghai"] } -eth-types = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.11.0rc2" } prover_next = { git = "https://github.com/scroll-tech/zkevm-circuits.git", tag = "v0.11.0rc2", package = "prover", default-features = false, features = ["parallel_syn", "scroll"] } base64 = "0.13.1" reqwest = "0.12.4" diff --git a/prover_rust/src/geth_client.rs b/prover_rust/src/geth_client.rs index 3cdfa89b0..1e07579eb 100644 --- a/prover_rust/src/geth_client.rs +++ b/prover_rust/src/geth_client.rs @@ -3,7 +3,7 @@ use anyhow::Result; use ethers_core::types::BlockNumber; use tokio::runtime::Runtime; -use eth_types::{H256, U64}; +use ethers_core::types::{H256, U64}; use serde::{Deserialize, Serialize}; use ethers_providers::{Http, Provider}; @@ -32,12 +32,12 @@ pub fn get_block_number(block_trace: &ProverBlockTrace) -> Option { pub type TxHash = H256; /// this struct is tracked to https://github.com/scroll-tech/go-ethereum/blob/0f0cd99f7a2e/core/types/block.go#Header -/// the detail fields of struct are not 100% same as eth_types::Block so this needs to be changed in +/// the detail fields of struct are not 100% same as ethers_core::types::Block so this needs to be changed in /// some time currently only the `number` field is required #[derive(Debug, Deserialize, Serialize, Default)] pub struct Header { #[serde(flatten)] - block: eth_types::Block, + block: ethers_core::types::Block, } impl Header { diff --git a/prover_rust/src/key_signer.rs b/prover_rust/src/key_signer.rs index fc180d78e..3c471ad22 100644 --- a/prover_rust/src/key_signer.rs +++ b/prover_rust/src/key_signer.rs @@ -10,7 +10,7 @@ use ethers_core::{ types::Signature as EthSignature, }; -use eth_types::{H256, U256}; +use ethers_core::types::{H256, U256}; use hex::ToHex; use tiny_keccak::{Hasher, Keccak}; diff --git a/prover_rust/src/prover.rs b/prover_rust/src/prover.rs index 04881fdcb..62f2cc8f7 100644 --- a/prover_rust/src/prover.rs +++ b/prover_rust/src/prover.rs @@ -1,5 +1,5 @@ use anyhow::{bail, Error, Ok, Result}; -use eth_types::U64; +use ethers_core::types::U64; use once_cell::sync::Lazy; use std::{cell::RefCell, cmp::Ordering, env, rc::Rc}; diff --git a/prover_rust/src/types.rs b/prover_rust/src/types.rs index 297d9a0d3..52c10ac0f 100644 --- a/prover_rust/src/types.rs +++ b/prover_rust/src/types.rs @@ -1,6 +1,4 @@ -use core::fmt; - -use eth_types::H256; +use ethers_core::types::H256; use prover::{BatchProof, ChunkHash, ChunkProof}; use serde::{Deserialize, Deserializer, Serialize, Serializer};