From 7d3b779d5fc1b09a3e3312e6d077e1117ec5ceed Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 17:16:54 +0800 Subject: [PATCH 01/20] testool ethers_core deps gone --- Cargo.lock | 1 - eth-types/Cargo.toml | 1 + eth-types/src/eth_core.rs | 4 ++++ eth-types/src/lib.rs | 3 +++ testool/Cargo.toml | 3 +-- testool/src/abi.rs | 7 ++++--- testool/src/statetest/executor.rs | 10 ++++++---- testool/src/statetest/json.rs | 7 +++++-- testool/src/statetest/spec.rs | 7 +++++-- testool/src/statetest/yaml.rs | 7 +++++-- 10 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 eth-types/src/eth_core.rs diff --git a/Cargo.lock b/Cargo.lock index 54417fccd6..5dd9298ac9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3876,7 +3876,6 @@ dependencies = [ "clap", "env_logger", "eth-types", - "ethers-core", "ethers-signers", "external-tracer", "glob", diff --git a/eth-types/Cargo.toml b/eth-types/Cargo.toml index 1050f3efe8..3210530785 100644 --- a/eth-types/Cargo.toml +++ b/eth-types/Cargo.toml @@ -26,3 +26,4 @@ strum = "0.24" [features] warn-unimplemented = [] +ethers-core = [] diff --git a/eth-types/src/eth_core.rs b/eth-types/src/eth_core.rs new file mode 100644 index 0000000000..14be1e4cbf --- /dev/null +++ b/eth-types/src/eth_core.rs @@ -0,0 +1,4 @@ +//! We reexport ethers_core functions here for finer boundary control. +pub use ethers_core::{abi, k256, types, utils}; + +pub use ethers_signers::{LocalWallet, Signer}; diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index d201028b9f..9bf17687af 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -22,6 +22,9 @@ pub mod keccak; pub mod sign_types; pub use keccak::{keccak256, Keccak}; +#[cfg(feature = "ethers-core")] +pub mod eth_core; + pub use bytecode::Bytecode; pub use error::Error; use halo2_proofs::halo2curves::{ diff --git a/testool/Cargo.toml b/testool/Cargo.toml index 8af5e49e12..c75800d108 100644 --- a/testool/Cargo.toml +++ b/testool/Cargo.toml @@ -9,8 +9,7 @@ anyhow = "1" bus-mapping = { path = "../bus-mapping" } clap = { version = "3.1", features = ["derive"] } env_logger = "0.9" -eth-types = { path="../eth-types" } -ethers-core = "0.17.0" +eth-types = { path="../eth-types", features=["ethers-core"]} ethers-signers = "0.17.0" external-tracer = { path="../external-tracer" } glob = "0.3" diff --git a/testool/src/abi.rs b/testool/src/abi.rs index 604463702a..9d94a0d80c 100644 --- a/testool/src/abi.rs +++ b/testool/src/abi.rs @@ -1,10 +1,11 @@ use anyhow::Result; -use eth_types::{Bytes, U256}; +use eth_types::{ + eth_core::abi::{Function, Param, ParamType, StateMutability, Token}, + Bytes, U256, +}; /// encodes an abi call (e.g. "f(uint) 1") pub fn encode_funccall(spec: &str) -> Result { - use ethers_core::abi::{Function, Param, ParamType, StateMutability, Token}; - // split parts into `func_name` ([`func_params`]) `args` let tokens: Vec<_> = spec.split(' ').collect(); diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index 4f1fd3e6c6..1db2c1ec07 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -4,10 +4,12 @@ use bus_mapping::{ circuit_input_builder::{CircuitInputBuilder, CircuitsParams}, mock::BlockData, }; -use eth_types::{geth_types, Address, Bytes, GethExecTrace, U256, U64}; -use ethers_core::{ - k256::ecdsa::SigningKey, - types::{transaction::eip2718::TypedTransaction, TransactionRequest}, +use eth_types::{ + eth_core::{ + k256::ecdsa::SigningKey, + types::{transaction::eip2718::TypedTransaction, TransactionRequest}, + }, + geth_types, Address, Bytes, GethExecTrace, U256, U64, }; use ethers_signers::{LocalWallet, Signer}; use external_tracer::TraceConfig; diff --git a/testool/src/statetest/json.rs b/testool/src/statetest/json.rs index 7bd35e26b7..2480a59768 100644 --- a/testool/src/statetest/json.rs +++ b/testool/src/statetest/json.rs @@ -4,8 +4,11 @@ use super::{ }; use crate::{compiler::Compiler, utils::MainnetFork}; use anyhow::{bail, Result}; -use eth_types::{geth_types::Account, Address, U256}; -use ethers_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}; +use eth_types::{ + eth_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}, + geth_types::Account, + Address, U256, +}; use serde::Deserialize; use std::collections::HashMap; diff --git a/testool/src/statetest/spec.rs b/testool/src/statetest/spec.rs index 234867ccda..1dfe93fe3c 100644 --- a/testool/src/statetest/spec.rs +++ b/testool/src/statetest/spec.rs @@ -1,6 +1,9 @@ use anyhow::{anyhow, bail, Context}; -use eth_types::{geth_types::Account, Address, Bytes, Word, H256, U256, U64}; -use ethers_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}; +use eth_types::{ + eth_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}, + geth_types::Account, + Address, Bytes, Word, H256, U256, U64, +}; use std::{collections::HashMap, str::FromStr}; #[derive(PartialEq, Eq, Debug, Clone)] diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index 28bee90c17..63634c7fdc 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -4,8 +4,11 @@ use super::{ }; use crate::{utils::MainnetFork, Compiler}; use anyhow::{bail, Context, Result}; -use eth_types::{geth_types::Account, Address, Bytes, H256, U256}; -use ethers_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}; +use eth_types::{ + eth_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}, + geth_types::Account, + Address, Bytes, H256, U256, +}; use std::{collections::HashMap, convert::TryInto, str::FromStr}; use yaml_rust::Yaml; From 3a8f98e62f5e1f87bd04d4ef113a89f95707782c Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 17:21:11 +0800 Subject: [PATCH 02/20] mock deps gone --- Cargo.lock | 2 -- eth-types/src/eth_core.rs | 2 +- mock/Cargo.toml | 2 -- mock/src/block.rs | 6 ++++-- mock/src/lib.rs | 5 +++-- mock/src/transaction.rs | 14 +++++++------- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5dd9298ac9..94093a62a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2397,8 +2397,6 @@ name = "mock" version = "0.1.0" dependencies = [ "eth-types", - "ethers-core", - "ethers-signers", "external-tracer", "itertools", "lazy_static", diff --git a/eth-types/src/eth_core.rs b/eth-types/src/eth_core.rs index 14be1e4cbf..ec379c9ff3 100644 --- a/eth-types/src/eth_core.rs +++ b/eth-types/src/eth_core.rs @@ -1,4 +1,4 @@ //! We reexport ethers_core functions here for finer boundary control. -pub use ethers_core::{abi, k256, types, utils}; +pub use ethers_core::{abi, k256, rand, types, utils}; pub use ethers_signers::{LocalWallet, Signer}; diff --git a/mock/Cargo.toml b/mock/Cargo.toml index 406341ab7d..63d2649700 100644 --- a/mock/Cargo.toml +++ b/mock/Cargo.toml @@ -10,7 +10,5 @@ eth-types = { path = "../eth-types" } external-tracer = { path = "../external-tracer" } lazy_static = "1.4" itertools = "0.10.3" -ethers-signers = "0.17.0" -ethers-core = "0.17.0" rand_chacha = "0.3" rand = "0.8" diff --git a/mock/src/block.rs b/mock/src/block.rs index 4123312933..4e6150825d 100644 --- a/mock/src/block.rs +++ b/mock/src/block.rs @@ -1,8 +1,10 @@ //! Mock Block definition and builder related methods. use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_DIFFICULTY, MOCK_GASLIMIT}; -use eth_types::{Address, Block, Bytes, Hash, Transaction, Word, H64, U64}; -use ethers_core::types::{Bloom, OtherFields}; +use eth_types::{ + eth_core::types::{Bloom, OtherFields}, + Address, Block, Bytes, Hash, Transaction, Word, H64, U64, +}; #[derive(Clone, Debug)] /// Mock structure which represents an Ethereum Block and can be used for tests. diff --git a/mock/src/lib.rs b/mock/src/lib.rs index f190e0612c..18d50253da 100644 --- a/mock/src/lib.rs +++ b/mock/src/lib.rs @@ -1,7 +1,8 @@ //! Mock types and functions to generate GethData used for tests -use eth_types::{address, bytecode, bytecode::Bytecode, word, Address, Bytes, Word}; -use ethers_signers::LocalWallet; +use eth_types::{ + address, bytecode, bytecode::Bytecode, eth_core::LocalWallet, word, Address, Bytes, Word, +}; use lazy_static::lazy_static; use rand::SeedableRng; use rand_chacha::ChaCha20Rng; diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 1b6c6ccd1f..3e0ce64470 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -2,14 +2,14 @@ use super::{MOCK_ACCOUNTS, MOCK_CHAIN_ID, MOCK_GASPRICE}; use eth_types::{ - geth_types::Transaction as GethTransaction, word, AccessList, Address, Bytes, Hash, - Transaction, Word, U64, + eth_core::{ + rand::{CryptoRng, RngCore}, + types::{OtherFields, TransactionRequest}, + LocalWallet, Signer, + }, + geth_types::Transaction as GethTransaction, + word, AccessList, Address, Bytes, Hash, Transaction, Word, U64, }; -use ethers_core::{ - rand::{CryptoRng, RngCore}, - types::{OtherFields, TransactionRequest}, -}; -use ethers_signers::{LocalWallet, Signer}; use lazy_static::lazy_static; use rand::SeedableRng; use rand_chacha::ChaCha20Rng; From 28158d4e44e560b8a8a2d5dab1792854839af9fb Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 17:27:57 +0800 Subject: [PATCH 03/20] zkevm-circuits deps gone --- Cargo.lock | 1 - zkevm-circuits/Cargo.toml | 6 ++---- zkevm-circuits/src/evm_circuit/execution/begin_tx.rs | 9 ++++++--- zkevm-circuits/src/super_circuit/test.rs | 8 ++++++-- zkevm-circuits/src/util.rs | 6 ++++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94093a62a3..ffcd24d14e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4541,7 +4541,6 @@ dependencies = [ "ecdsa 0.1.0", "env_logger", "eth-types", - "ethers-core", "ethers-signers", "gadgets", "halo2_proofs", diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index b20410557a..58f8c50183 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -13,10 +13,8 @@ num = "0.4" sha3 = "0.10" array-init = "2.0.0" bus-mapping = { path = "../bus-mapping" } -eth-types = { path = "../eth-types" } +eth-types = { path = "../eth-types", features=["ethers-core"] } gadgets = { path = "../gadgets" } -ethers-core = "0.17.0" -ethers-signers = { version = "0.17.0", optional = true } mock = { path = "../mock", optional = true } strum = "0.24" strum_macros = "0.24" @@ -49,7 +47,7 @@ serde_json = "1.0.78" [features] default = [] -test = ["ethers-signers", "mock", "bus-mapping/test"] +test = ["mock", "bus-mapping/test"] test-circuits = [] warn-unimplemented = ["eth-types/warn-unimplemented"] stats = ["warn-unimplemented", "dep:cli-table"] diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 90db035125..16d4f4116c 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -24,8 +24,11 @@ use crate::{ }, util::Expr, }; -use eth_types::{evm_types::GasCost, Field, ToLittleEndian, ToScalar}; -use ethers_core::utils::{get_contract_address, keccak256}; +use eth_types::{ + eth_core::utils::{get_contract_address, keccak256, rlp::RlpStream}, + evm_types::GasCost, + Field, ToLittleEndian, ToScalar, +}; use gadgets::util::expr_from_bytes; use halo2_proofs::{circuit::Value, plonk::Error}; @@ -576,7 +579,7 @@ impl ExecutionGadget for BeginTxGadget { .assign_value(region, offset, region.word_rlc(callee_code_hash))?; let untrimmed_contract_addr = { - let mut stream = ethers_core::utils::rlp::RlpStream::new(); + let mut stream = RlpStream::new(); stream.begin_list(2); stream.append(&tx.caller_address); stream.append(ð_types::U256::from(tx.nonce)); diff --git a/zkevm-circuits/src/super_circuit/test.rs b/zkevm-circuits/src/super_circuit/test.rs index 697da5cb0c..cab25cb098 100644 --- a/zkevm-circuits/src/super_circuit/test.rs +++ b/zkevm-circuits/src/super_circuit/test.rs @@ -1,5 +1,4 @@ pub use super::*; -use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; use log::error; use mock::{TestContext, MOCK_CHAIN_ID}; @@ -7,7 +6,12 @@ use rand::SeedableRng; use rand_chacha::ChaCha20Rng; use std::collections::HashMap; -use eth_types::{address, bytecode, geth_types::GethData, Word}; +use eth_types::{ + address, bytecode, + eth_core::{LocalWallet, Signer}, + geth_types::GethData, + Word, +}; #[test] fn super_circuit_degree() { diff --git a/zkevm-circuits/src/util.rs b/zkevm-circuits/src/util.rs index 4603df4a21..7fa33be4ef 100644 --- a/zkevm-circuits/src/util.rs +++ b/zkevm-circuits/src/util.rs @@ -9,8 +9,10 @@ use halo2_proofs::{ }; use crate::{evm_circuit::util::rlc, table::TxLogFieldTag, witness}; -use eth_types::{keccak256, Field, ToAddress, Word}; -pub use ethers_core::types::{Address, U256}; +use eth_types::{ + eth_core::types::{Address, U256}, + keccak256, Field, ToAddress, Word, +}; pub use gadgets::util::Expr; pub(crate) fn query_expression( From 0d196235c26931425d7556fbb8575c7c2082dbca Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 17:32:57 +0800 Subject: [PATCH 04/20] busmapping deps gone --- Cargo.lock | 1 - bus-mapping/Cargo.toml | 1 - bus-mapping/src/circuit_input_builder/access.rs | 6 ++++-- bus-mapping/src/circuit_input_builder/input_state_ref.rs | 2 +- bus-mapping/src/circuit_input_builder/transaction.rs | 5 +++-- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 4 ++-- bus-mapping/src/evm/opcodes/sha3.rs | 3 +-- bus-mapping/src/rpc.rs | 5 ++--- bus-mapping/src/state_db.rs | 3 +-- 9 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffcd24d14e..eec4424835 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,7 +400,6 @@ name = "bus-mapping" version = "0.1.0" dependencies = [ "eth-types", - "ethers-core", "ethers-providers", "gadgets", "halo2_proofs", diff --git a/bus-mapping/Cargo.toml b/bus-mapping/Cargo.toml index 3632275fa6..ab6e2088e1 100644 --- a/bus-mapping/Cargo.toml +++ b/bus-mapping/Cargo.toml @@ -10,7 +10,6 @@ eth-types = { path = "../eth-types" } gadgets = { path = "../gadgets" } mock = { path = "../mock", optional = true } -ethers-core = "0.17.0" ethers-providers = "0.17.0" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } itertools = "0.10" diff --git a/bus-mapping/src/circuit_input_builder/access.rs b/bus-mapping/src/circuit_input_builder/access.rs index 1626d6f97a..e4610f9bf1 100644 --- a/bus-mapping/src/circuit_input_builder/access.rs +++ b/bus-mapping/src/circuit_input_builder/access.rs @@ -1,6 +1,8 @@ use crate::{operation::RW, Error}; -use eth_types::{evm_types::OpcodeId, Address, GethExecStep, GethExecTrace, ToAddress, Word}; -use ethers_core::utils::get_contract_address; +use eth_types::{ + eth_core::utils::get_contract_address, evm_types::OpcodeId, Address, GethExecStep, + GethExecTrace, ToAddress, Word, +}; use std::collections::{hash_map::Entry, HashMap, HashSet}; use AccessValue::{Account, Code, Storage}; diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index 20faf1bcdf..4bad19e66f 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -20,12 +20,12 @@ use crate::{ Error, }; use eth_types::{ + eth_core::utils::{get_contract_address, get_create2_address}, evm_types::{ gas_utils::memory_expansion_gas_cost, GasCost, MemoryAddress, OpcodeId, StackAddress, }, Address, Bytecode, GethExecStep, ToAddress, ToBigEndian, ToWord, Word, H256, U256, }; -use ethers_core::utils::{get_contract_address, get_create2_address}; use std::cmp::max; /// Reference to the internal state of the CircuitInputBuilder in a particular diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index dae4f1db35..0be0d70ae3 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -2,8 +2,9 @@ use std::collections::BTreeMap; -use eth_types::{evm_types::Memory, geth_types, GethExecTrace}; -use ethers_core::utils::get_contract_address; +use eth_types::{ + eth_core::utils::get_contract_address, evm_types::Memory, geth_types, GethExecTrace, +}; use crate::{ state_db::{CodeDB, StateDB}, diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index e8baf7f88f..e111cffe28 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -6,10 +6,10 @@ use crate::{ Error, }; use eth_types::{ + eth_core::utils::{get_contract_address, rlp::RlpStream}, evm_types::{GasCost, MAX_REFUND_QUOTIENT_OF_GAS_USED}, evm_unimplemented, ToWord, Word, }; -use ethers_core::utils::get_contract_address; #[derive(Clone, Copy, Debug)] pub(crate) struct BeginEndTx; @@ -127,7 +127,7 @@ fn gen_begin_tx_steps(state: &mut CircuitInputStateRef) -> Result Date: Thu, 1 Jun 2023 17:35:46 +0800 Subject: [PATCH 05/20] tests fixed --- bus-mapping/src/evm/opcodes/sha3.rs | 3 +-- zkevm-circuits/src/evm_circuit/execution/sar.rs | 3 +-- zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bus-mapping/src/evm/opcodes/sha3.rs b/bus-mapping/src/evm/opcodes/sha3.rs index 4c21d8302b..6db3836767 100644 --- a/bus-mapping/src/evm/opcodes/sha3.rs +++ b/bus-mapping/src/evm/opcodes/sha3.rs @@ -188,8 +188,7 @@ impl Sha3CodeGen { #[cfg(test)] pub(crate) mod sha3_tests { use super::Sha3CodeGen; - use eth_types::{evm_types::OpcodeId, geth_types::GethData, Word}; - use ethers_core::utils::keccak256; + use eth_types::{evm_types::OpcodeId, geth_types::GethData, keccak256, Word}; use mock::{ test_ctx::helpers::{account_0_code_account_1_no_code, tx_from_1_to_0}, TestContext, diff --git a/zkevm-circuits/src/evm_circuit/execution/sar.rs b/zkevm-circuits/src/evm_circuit/execution/sar.rs index 87dbd318a5..bb8f2fa5d0 100644 --- a/zkevm-circuits/src/evm_circuit/execution/sar.rs +++ b/zkevm-circuits/src/evm_circuit/execution/sar.rs @@ -366,8 +366,7 @@ impl ExecutionGadget for SarGadget { #[cfg(test)] mod test { use crate::{evm_circuit::test::rand_word, test_util::CircuitTestBuilder}; - use eth_types::{bytecode, U256}; - use ethers_core::types::I256; + use eth_types::{bytecode, eth_core::types::I256, U256}; use lazy_static::lazy_static; use mock::TestContext; use rand::Rng; diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs index 6a5a2154c1..3f0ca6c40f 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs @@ -356,7 +356,9 @@ impl ContractCreateGadget { #[cfg(test)] mod test { use super::{super::test_util::*, ContractCreateGadget}; - use eth_types::{Field, ToAddress, ToLittleEndian, ToWord, Word}; + use eth_types::{ + eth_core::utils::rlp::RlpStream, Field, ToAddress, ToLittleEndian, ToWord, Word, + }; use gadgets::util::{not, Expr}; use halo2_proofs::halo2curves::bn256::Fr; @@ -497,7 +499,7 @@ mod test { (mock::MOCK_ACCOUNTS[1], 0xffffffffffffffffu64), ] { let (rlp_word, rlp_len) = { - let mut stream = ethers_core::utils::rlp::RlpStream::new(); + let mut stream = RlpStream::new(); stream.begin_list(2); stream.append(&caller_address); stream.append(&caller_nonce); From ed64f6fdac8b640b85d13578bb29e806d77e295a Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 17:38:49 +0800 Subject: [PATCH 06/20] types gone --- eth-types/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index 9bf17687af..1750b4e580 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -33,7 +33,6 @@ use halo2_proofs::halo2curves::{ }; use crate::evm_types::{memory::Memory, stack::Stack, storage::Storage, OpcodeId}; -use ethers_core::types; pub use ethers_core::{ abi::ethereum_types::{BigEndianHash, U512}, types::{ @@ -187,7 +186,7 @@ impl ToAddress for U256 { } /// Ethereum Hash (256 bits). -pub type Hash = types::H256; +pub type Hash = H256; impl ToWord for Hash { fn to_word(&self) -> Word { From 731a29e5042e1da49d256b5e9c64367fc5d382c8 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 17:44:31 +0800 Subject: [PATCH 07/20] move BigEndianHash, U512 --- eth-types/src/lib.rs | 9 +++------ zkevm-circuits/src/evm_circuit/execution/addmod.rs | 2 +- .../src/evm_circuit/util/math_gadget/modulo.rs | 2 +- zkevm-circuits/src/pi_circuit.rs | 3 ++- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index 1750b4e580..9ef3696e63 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -33,12 +33,9 @@ use halo2_proofs::halo2curves::{ }; use crate::evm_types::{memory::Memory, stack::Stack, storage::Storage, OpcodeId}; -pub use ethers_core::{ - abi::ethereum_types::{BigEndianHash, U512}, - types::{ - transaction::{eip2930::AccessList, response::Transaction}, - Address, Block, Bytes, Signature, H160, H256, H64, U256, U64, - }, +pub use ethers_core::types::{ + transaction::{eip2930::AccessList, response::Transaction}, + Address, Block, Bytes, Signature, H160, H256, H64, U256, U64, }; use serde::{de, Deserialize, Serialize}; diff --git a/zkevm-circuits/src/evm_circuit/execution/addmod.rs b/zkevm-circuits/src/evm_circuit/execution/addmod.rs index 5ae1f1b5f5..896576b0ae 100644 --- a/zkevm-circuits/src/evm_circuit/execution/addmod.rs +++ b/zkevm-circuits/src/evm_circuit/execution/addmod.rs @@ -20,7 +20,7 @@ use crate::{ }; use bus_mapping::evm::OpcodeId; -use eth_types::{Field, ToLittleEndian, U256, U512}; +use eth_types::{Field, ToLittleEndian, U256, eth_core::abi::ethereum_types::U512}; use halo2_proofs::plonk::Error; #[derive(Clone, Debug)] diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs index d4b65f20b0..8e4b3d4738 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs @@ -103,7 +103,7 @@ impl ModGadget { #[cfg(test)] mod tests { use super::{test_util::*, *}; - use eth_types::{Word, U256, U512}; + use eth_types::{eth_core::abi::ethereum_types::U512, Word, U256}; use halo2_proofs::{halo2curves::bn256::Fr, plonk::Error}; #[derive(Clone)] diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index cebe069cba..574891216d 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -9,9 +9,10 @@ mod test; pub use dev::PiCircuit as TestPiCircuit; use eth_types::{ + eth_core::abi::ethereum_types::BigEndianHash, geth_types::{BlockConstants, Transaction}, sign_types::SignData, - Address, BigEndianHash, Field, Keccak, ToBigEndian, ToLittleEndian, ToScalar, Word, H256, + Address, Field, Keccak, ToBigEndian, ToLittleEndian, ToScalar, Word, H256, }; use halo2_proofs::plonk::{Instance, SecondPhase}; use param::*; From a34c78cac1b8cb37ef187c21ab362206014ed70e Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 18:03:01 +0800 Subject: [PATCH 08/20] explicit import --- bus-mapping/src/circuit_input_builder/access.rs | 4 ++-- .../src/circuit_input_builder/input_state_ref.rs | 2 +- .../src/circuit_input_builder/transaction.rs | 4 +--- bus-mapping/src/evm/opcodes/begin_end_tx.rs | 2 +- bus-mapping/src/rpc.rs | 2 +- eth-types/src/eth_core.rs | 14 +++++++++++++- mock/src/block.rs | 2 +- mock/src/transaction.rs | 6 +----- testool/src/abi.rs | 2 +- testool/src/statetest/executor.rs | 5 +---- testool/src/statetest/json.rs | 2 +- testool/src/statetest/spec.rs | 2 +- testool/src/statetest/yaml.rs | 2 +- zkevm-circuits/src/evm_circuit/execution/addmod.rs | 2 +- .../src/evm_circuit/execution/begin_tx.rs | 4 ++-- zkevm-circuits/src/evm_circuit/execution/sar.rs | 2 +- .../src/evm_circuit/util/math_gadget/modulo.rs | 2 +- .../src/evm_circuit/util/math_gadget/rlp.rs | 4 +--- zkevm-circuits/src/pi_circuit.rs | 2 +- zkevm-circuits/src/util.rs | 2 +- 20 files changed, 34 insertions(+), 33 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder/access.rs b/bus-mapping/src/circuit_input_builder/access.rs index e4610f9bf1..05525bef3a 100644 --- a/bus-mapping/src/circuit_input_builder/access.rs +++ b/bus-mapping/src/circuit_input_builder/access.rs @@ -1,7 +1,7 @@ use crate::{operation::RW, Error}; use eth_types::{ - eth_core::utils::get_contract_address, evm_types::OpcodeId, Address, GethExecStep, - GethExecTrace, ToAddress, Word, + eth_core::get_contract_address, evm_types::OpcodeId, Address, GethExecStep, GethExecTrace, + ToAddress, Word, }; use std::collections::{hash_map::Entry, HashMap, HashSet}; diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index 4bad19e66f..02d48878e4 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -20,7 +20,7 @@ use crate::{ Error, }; use eth_types::{ - eth_core::utils::{get_contract_address, get_create2_address}, + eth_core::{get_contract_address, get_create2_address}, evm_types::{ gas_utils::memory_expansion_gas_cost, GasCost, MemoryAddress, OpcodeId, StackAddress, }, diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index 0be0d70ae3..5a37a33b53 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -2,9 +2,7 @@ use std::collections::BTreeMap; -use eth_types::{ - eth_core::utils::get_contract_address, evm_types::Memory, geth_types, GethExecTrace, -}; +use eth_types::{eth_core::get_contract_address, evm_types::Memory, geth_types, GethExecTrace}; use crate::{ state_db::{CodeDB, StateDB}, diff --git a/bus-mapping/src/evm/opcodes/begin_end_tx.rs b/bus-mapping/src/evm/opcodes/begin_end_tx.rs index e111cffe28..2aed0d5e04 100644 --- a/bus-mapping/src/evm/opcodes/begin_end_tx.rs +++ b/bus-mapping/src/evm/opcodes/begin_end_tx.rs @@ -6,7 +6,7 @@ use crate::{ Error, }; use eth_types::{ - eth_core::utils::{get_contract_address, rlp::RlpStream}, + eth_core::{get_contract_address, RlpStream}, evm_types::{GasCost, MAX_REFUND_QUOTIENT_OF_GAS_USED}, evm_unimplemented, ToWord, Word, }; diff --git a/bus-mapping/src/rpc.rs b/bus-mapping/src/rpc.rs index 0a3b988075..c24913dd42 100644 --- a/bus-mapping/src/rpc.rs +++ b/bus-mapping/src/rpc.rs @@ -3,7 +3,7 @@ use crate::Error; use eth_types::{ - eth_core::types::BlockNumber, Address, Block, Bytes, EIP1186ProofResponse, GethExecTrace, Hash, + eth_core::BlockNumber, Address, Block, Bytes, EIP1186ProofResponse, GethExecTrace, Hash, ResultGethExecTraces, Transaction, Word, U64, }; use ethers_providers::JsonRpcClient; diff --git a/eth-types/src/eth_core.rs b/eth-types/src/eth_core.rs index ec379c9ff3..7342b021d3 100644 --- a/eth-types/src/eth_core.rs +++ b/eth-types/src/eth_core.rs @@ -1,4 +1,16 @@ //! We reexport ethers_core functions here for finer boundary control. -pub use ethers_core::{abi, k256, rand, types, utils}; +pub use ethers_core::{ + abi::{ + ethereum_types::{BigEndianHash, U512}, + Function, Param, ParamType, StateMutability, Token, + }, + k256::ecdsa::SigningKey, + rand::{CryptoRng, RngCore}, + types::{ + transaction::eip2718::TypedTransaction, Address, BlockNumber, Bloom, OtherFields, + TransactionRequest, H256, I256, U256, + }, + utils::{get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address}, +}; pub use ethers_signers::{LocalWallet, Signer}; diff --git a/mock/src/block.rs b/mock/src/block.rs index 4e6150825d..d59cf0c956 100644 --- a/mock/src/block.rs +++ b/mock/src/block.rs @@ -2,7 +2,7 @@ use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_DIFFICULTY, MOCK_GASLIMIT}; use eth_types::{ - eth_core::types::{Bloom, OtherFields}, + eth_core::{Bloom, OtherFields}, Address, Block, Bytes, Hash, Transaction, Word, H64, U64, }; diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 3e0ce64470..01016aeb1b 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -2,11 +2,7 @@ use super::{MOCK_ACCOUNTS, MOCK_CHAIN_ID, MOCK_GASPRICE}; use eth_types::{ - eth_core::{ - rand::{CryptoRng, RngCore}, - types::{OtherFields, TransactionRequest}, - LocalWallet, Signer, - }, + eth_core::{CryptoRng, LocalWallet, OtherFields, RngCore, Signer, TransactionRequest}, geth_types::Transaction as GethTransaction, word, AccessList, Address, Bytes, Hash, Transaction, Word, U64, }; diff --git a/testool/src/abi.rs b/testool/src/abi.rs index 9d94a0d80c..b809e17a83 100644 --- a/testool/src/abi.rs +++ b/testool/src/abi.rs @@ -1,6 +1,6 @@ use anyhow::Result; use eth_types::{ - eth_core::abi::{Function, Param, ParamType, StateMutability, Token}, + eth_core::{Function, Param, ParamType, StateMutability, Token}, Bytes, U256, }; diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index 1db2c1ec07..2ddc613e9f 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -5,10 +5,7 @@ use bus_mapping::{ mock::BlockData, }; use eth_types::{ - eth_core::{ - k256::ecdsa::SigningKey, - types::{transaction::eip2718::TypedTransaction, TransactionRequest}, - }, + eth_core::{SigningKey, TransactionRequest, TypedTransaction}, geth_types, Address, Bytes, GethExecTrace, U256, U64, }; use ethers_signers::{LocalWallet, Signer}; diff --git a/testool/src/statetest/json.rs b/testool/src/statetest/json.rs index 2480a59768..5f804709d7 100644 --- a/testool/src/statetest/json.rs +++ b/testool/src/statetest/json.rs @@ -5,7 +5,7 @@ use super::{ use crate::{compiler::Compiler, utils::MainnetFork}; use anyhow::{bail, Result}; use eth_types::{ - eth_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}, + eth_core::{secret_key_to_address, SigningKey}, geth_types::Account, Address, U256, }; diff --git a/testool/src/statetest/spec.rs b/testool/src/statetest/spec.rs index 1dfe93fe3c..42533577e6 100644 --- a/testool/src/statetest/spec.rs +++ b/testool/src/statetest/spec.rs @@ -1,6 +1,6 @@ use anyhow::{anyhow, bail, Context}; use eth_types::{ - eth_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}, + eth_core::{secret_key_to_address, SigningKey}, geth_types::Account, Address, Bytes, Word, H256, U256, U64, }; diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index 63634c7fdc..2812b0f711 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -5,7 +5,7 @@ use super::{ use crate::{utils::MainnetFork, Compiler}; use anyhow::{bail, Context, Result}; use eth_types::{ - eth_core::{k256::ecdsa::SigningKey, utils::secret_key_to_address}, + eth_core::{SigningKey, secret_key_to_address}, geth_types::Account, Address, Bytes, H256, U256, }; diff --git a/zkevm-circuits/src/evm_circuit/execution/addmod.rs b/zkevm-circuits/src/evm_circuit/execution/addmod.rs index 896576b0ae..e3d9372ba1 100644 --- a/zkevm-circuits/src/evm_circuit/execution/addmod.rs +++ b/zkevm-circuits/src/evm_circuit/execution/addmod.rs @@ -20,7 +20,7 @@ use crate::{ }; use bus_mapping::evm::OpcodeId; -use eth_types::{Field, ToLittleEndian, U256, eth_core::abi::ethereum_types::U512}; +use eth_types::{eth_core::U512, Field, ToLittleEndian, U256}; use halo2_proofs::plonk::Error; #[derive(Clone, Debug)] diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 16d4f4116c..579429cfd3 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -25,9 +25,9 @@ use crate::{ util::Expr, }; use eth_types::{ - eth_core::utils::{get_contract_address, keccak256, rlp::RlpStream}, + eth_core::{get_contract_address, RlpStream}, evm_types::GasCost, - Field, ToLittleEndian, ToScalar, + keccak256, Field, ToLittleEndian, ToScalar, }; use gadgets::util::expr_from_bytes; use halo2_proofs::{circuit::Value, plonk::Error}; diff --git a/zkevm-circuits/src/evm_circuit/execution/sar.rs b/zkevm-circuits/src/evm_circuit/execution/sar.rs index bb8f2fa5d0..e7048da571 100644 --- a/zkevm-circuits/src/evm_circuit/execution/sar.rs +++ b/zkevm-circuits/src/evm_circuit/execution/sar.rs @@ -366,7 +366,7 @@ impl ExecutionGadget for SarGadget { #[cfg(test)] mod test { use crate::{evm_circuit::test::rand_word, test_util::CircuitTestBuilder}; - use eth_types::{bytecode, eth_core::types::I256, U256}; + use eth_types::{bytecode, eth_core::I256, U256}; use lazy_static::lazy_static; use mock::TestContext; use rand::Rng; diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs index 8e4b3d4738..59ce62da8f 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/modulo.rs @@ -103,7 +103,7 @@ impl ModGadget { #[cfg(test)] mod tests { use super::{test_util::*, *}; - use eth_types::{eth_core::abi::ethereum_types::U512, Word, U256}; + use eth_types::{eth_core::U512, Word, U256}; use halo2_proofs::{halo2curves::bn256::Fr, plonk::Error}; #[derive(Clone)] diff --git a/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs b/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs index 3f0ca6c40f..b0f0657e4e 100644 --- a/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs +++ b/zkevm-circuits/src/evm_circuit/util/math_gadget/rlp.rs @@ -356,9 +356,7 @@ impl ContractCreateGadget { #[cfg(test)] mod test { use super::{super::test_util::*, ContractCreateGadget}; - use eth_types::{ - eth_core::utils::rlp::RlpStream, Field, ToAddress, ToLittleEndian, ToWord, Word, - }; + use eth_types::{eth_core::RlpStream, Field, ToAddress, ToLittleEndian, ToWord, Word}; use gadgets::util::{not, Expr}; use halo2_proofs::halo2curves::bn256::Fr; diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index 574891216d..1f61081dd9 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -9,7 +9,7 @@ mod test; pub use dev::PiCircuit as TestPiCircuit; use eth_types::{ - eth_core::abi::ethereum_types::BigEndianHash, + eth_core::BigEndianHash, geth_types::{BlockConstants, Transaction}, sign_types::SignData, Address, Field, Keccak, ToBigEndian, ToLittleEndian, ToScalar, Word, H256, diff --git a/zkevm-circuits/src/util.rs b/zkevm-circuits/src/util.rs index 7fa33be4ef..00936a1afa 100644 --- a/zkevm-circuits/src/util.rs +++ b/zkevm-circuits/src/util.rs @@ -10,7 +10,7 @@ use halo2_proofs::{ use crate::{evm_circuit::util::rlc, table::TxLogFieldTag, witness}; use eth_types::{ - eth_core::types::{Address, U256}, + eth_core::{Address, U256}, keccak256, Field, ToAddress, Word, }; pub use gadgets::util::Expr; From c6489b6054b405a972a511f21018f448530bd187 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Thu, 1 Jun 2023 18:07:37 +0800 Subject: [PATCH 09/20] move ethers_core Transaction --- bus-mapping/src/circuit_input_builder.rs | 8 +++---- .../src/circuit_input_builder/access.rs | 2 +- .../src/circuit_input_builder/block.rs | 4 ++-- .../src/circuit_input_builder/transaction.rs | 4 ++-- bus-mapping/src/mock.rs | 2 +- bus-mapping/src/rpc.rs | 5 +++-- eth-types/src/eth_core.rs | 7 +++++-- eth-types/src/geth_types.rs | 21 ++++++++----------- eth-types/src/lib.rs | 5 +---- .../src/integration_test_circuits.rs | 2 +- mock/src/block.rs | 4 ++-- mock/src/test_ctx.rs | 5 +++-- mock/src/transaction.rs | 7 +++++-- zkevm-circuits/src/pi_circuit.rs | 2 +- zkevm-circuits/src/witness/block.rs | 2 +- 15 files changed, 41 insertions(+), 39 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 11e676d561..889771bb99 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -151,7 +151,7 @@ impl<'a> CircuitInputBuilder { /// Create a new Transaction from a [`eth_types::Transaction`]. pub fn new_tx( &mut self, - eth_tx: ð_types::Transaction, + eth_tx: ð_types::eth_core::Transaction, is_success: bool, ) -> Result { let call_id = self.block_ctx.rwc.0; @@ -263,7 +263,7 @@ impl<'a> CircuitInputBuilder { /// generated operations. fn handle_tx( &mut self, - eth_tx: ð_types::Transaction, + eth_tx: ð_types::eth_core::Transaction, geth_trace: &GethExecTrace, is_last_tx: bool, ) -> Result<(), Error> { @@ -390,7 +390,7 @@ pub fn get_call_memory_offset_length(step: &GethExecStep, nth: usize) -> Result< } } -type EthBlock = eth_types::Block; +type EthBlock = eth_types::Block; /// Struct that wraps a GethClient and contains methods to perform all the steps /// necessary to generate the circuit inputs for a block by querying geth for @@ -594,7 +594,7 @@ impl BuilderClient

{ ) -> Result< ( CircuitInputBuilder, - eth_types::Block, + eth_types::Block, ), Error, > { diff --git a/bus-mapping/src/circuit_input_builder/access.rs b/bus-mapping/src/circuit_input_builder/access.rs index 05525bef3a..f3de868e15 100644 --- a/bus-mapping/src/circuit_input_builder/access.rs +++ b/bus-mapping/src/circuit_input_builder/access.rs @@ -118,7 +118,7 @@ impl Default for CodeSource { /// sections. pub fn gen_state_access_trace( _block: ð_types::Block, - tx: ð_types::Transaction, + tx: ð_types::eth_core::Transaction, geth_trace: &GethExecTrace, ) -> Result, Error> { let mut call_stack: Vec<(Address, CodeSource)> = Vec::new(); diff --git a/bus-mapping/src/circuit_input_builder/block.rs b/bus-mapping/src/circuit_input_builder/block.rs index 650c7344bc..cd210ef395 100644 --- a/bus-mapping/src/circuit_input_builder/block.rs +++ b/bus-mapping/src/circuit_input_builder/block.rs @@ -89,7 +89,7 @@ pub struct Block { /// Circuits Setup Paramteres pub circuits_params: CircuitsParams, /// Original block from geth - pub eth_block: eth_types::Block, + pub eth_block: eth_types::Block, } impl Block { @@ -98,7 +98,7 @@ impl Block { chain_id: Word, history_hashes: Vec, prev_state_root: Word, - eth_block: ð_types::Block, + eth_block: ð_types::Block, circuits_params: CircuitsParams, ) -> Result { if eth_block.base_fee_per_gas.is_none() { diff --git a/bus-mapping/src/circuit_input_builder/transaction.rs b/bus-mapping/src/circuit_input_builder/transaction.rs index 5a37a33b53..8bf64bdc8a 100644 --- a/bus-mapping/src/circuit_input_builder/transaction.rs +++ b/bus-mapping/src/circuit_input_builder/transaction.rs @@ -35,7 +35,7 @@ pub struct TransactionContext { impl TransactionContext { /// Create a new Self. pub fn new( - eth_tx: ð_types::Transaction, + eth_tx: ð_types::eth_core::Transaction, geth_trace: &GethExecTrace, is_last_tx: bool, ) -> Result { @@ -192,7 +192,7 @@ impl Transaction { call_id: usize, sdb: &StateDB, code_db: &mut CodeDB, - eth_tx: ð_types::Transaction, + eth_tx: ð_types::eth_core::Transaction, is_success: bool, ) -> Result { let (found, _) = sdb.get_account(ð_tx.from); diff --git a/bus-mapping/src/mock.rs b/bus-mapping/src/mock.rs index 57ecae2475..0225e09775 100644 --- a/bus-mapping/src/mock.rs +++ b/bus-mapping/src/mock.rs @@ -20,7 +20,7 @@ pub struct BlockData { /// the lastest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// Block from geth - pub eth_block: eth_types::Block, + pub eth_block: eth_types::Block, /// Execution Trace from geth pub geth_traces: Vec, /// Circuits setup parameters diff --git a/bus-mapping/src/rpc.rs b/bus-mapping/src/rpc.rs index c24913dd42..04bd90527d 100644 --- a/bus-mapping/src/rpc.rs +++ b/bus-mapping/src/rpc.rs @@ -3,8 +3,9 @@ use crate::Error; use eth_types::{ - eth_core::BlockNumber, Address, Block, Bytes, EIP1186ProofResponse, GethExecTrace, Hash, - ResultGethExecTraces, Transaction, Word, U64, + eth_core::{BlockNumber, Transaction}, + Address, Block, Bytes, EIP1186ProofResponse, GethExecTrace, Hash, ResultGethExecTraces, Word, + U64, }; use ethers_providers::JsonRpcClient; use serde::Serialize; diff --git a/eth-types/src/eth_core.rs b/eth-types/src/eth_core.rs index 7342b021d3..75da1243f5 100644 --- a/eth-types/src/eth_core.rs +++ b/eth-types/src/eth_core.rs @@ -7,8 +7,11 @@ pub use ethers_core::{ k256::ecdsa::SigningKey, rand::{CryptoRng, RngCore}, types::{ - transaction::eip2718::TypedTransaction, Address, BlockNumber, Bloom, OtherFields, - TransactionRequest, H256, I256, U256, + transaction::{ + eip2718::TypedTransaction, eip2930::AccessList, response, response::Transaction, + }, + Address, BlockNumber, Bloom, NameOrAddress, OtherFields, TransactionRequest, H256, I256, + U256, }, utils::{get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address}, }; diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 0b16ab307d..9155c768f9 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -1,14 +1,11 @@ //! Types needed for generating Ethereum traces use crate::{ + eth_core::{get_contract_address, response, AccessList, NameOrAddress, TransactionRequest}, keccak256, sign_types::{biguint_to_32bytes_le, ct_option_ok_or, recover_pk, SignData, SECP256K1_Q}, - AccessList, Address, Block, Bytes, Error, GethExecTrace, Hash, ToBigEndian, ToLittleEndian, - ToWord, Word, U64, -}; -use ethers_core::{ - types::{transaction::response, NameOrAddress, TransactionRequest}, - utils::get_contract_address, + Address, Block, Bytes, Error, GethExecTrace, Hash, ToBigEndian, ToLittleEndian, ToWord, Word, + U64, }; use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::halo2curves::{group::ff::PrimeField, secp256k1}; @@ -149,9 +146,9 @@ pub struct Transaction { pub s: Word, } -impl From<&Transaction> for crate::Transaction { - fn from(tx: &Transaction) -> crate::Transaction { - crate::Transaction { +impl From<&Transaction> for crate::eth_core::Transaction { + fn from(tx: &Transaction) -> crate::eth_core::Transaction { + crate::eth_core::Transaction { from: tx.from, to: tx.to, nonce: tx.nonce.to_word(), @@ -170,8 +167,8 @@ impl From<&Transaction> for crate::Transaction { } } -impl From<&crate::Transaction> for Transaction { - fn from(tx: &crate::Transaction) -> Transaction { +impl From<&crate::eth_core::Transaction> for Transaction { + fn from(tx: &crate::eth_core::Transaction) -> Transaction { Transaction { from: tx.from, to: tx.to, @@ -299,7 +296,7 @@ pub struct GethData { /// the lastest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// Block from geth - pub eth_block: Block, + pub eth_block: Block, /// Execution Trace from geth pub geth_traces: Vec, /// Accounts diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index 9ef3696e63..da10b77fa1 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -33,10 +33,7 @@ use halo2_proofs::halo2curves::{ }; use crate::evm_types::{memory::Memory, stack::Stack, storage::Storage, OpcodeId}; -pub use ethers_core::types::{ - transaction::{eip2930::AccessList, response::Transaction}, - Address, Block, Bytes, Signature, H160, H256, H64, U256, U64, -}; +pub use ethers_core::types::{Address, Block, Bytes, Signature, H160, H256, H64, U256, U64}; use serde::{de, Deserialize, Serialize}; use std::{collections::HashMap, fmt, str::FromStr}; diff --git a/integration-tests/src/integration_test_circuits.rs b/integration-tests/src/integration_test_circuits.rs index 4771edd86e..c2542d3844 100644 --- a/integration-tests/src/integration_test_circuits.rs +++ b/integration-tests/src/integration_test_circuits.rs @@ -336,7 +336,7 @@ async fn gen_inputs( block_num: u64, ) -> ( CircuitInputBuilder, - eth_types::Block, + eth_types::Block, ) { let cli = get_client(); let cli = BuilderClient::new(cli, CIRCUITS_PARAMS).await.unwrap(); diff --git a/mock/src/block.rs b/mock/src/block.rs index d59cf0c956..a8bc01f9c8 100644 --- a/mock/src/block.rs +++ b/mock/src/block.rs @@ -2,8 +2,8 @@ use crate::{MockTransaction, MOCK_BASEFEE, MOCK_CHAIN_ID, MOCK_DIFFICULTY, MOCK_GASLIMIT}; use eth_types::{ - eth_core::{Bloom, OtherFields}, - Address, Block, Bytes, Hash, Transaction, Word, H64, U64, + eth_core::{Bloom, OtherFields, Transaction}, + Address, Block, Bytes, Hash, Word, H64, U64, }; #[derive(Clone, Debug)] diff --git a/mock/src/test_ctx.rs b/mock/src/test_ctx.rs index 11b8e0c5d2..5b5106bb25 100644 --- a/mock/src/test_ctx.rs +++ b/mock/src/test_ctx.rs @@ -2,8 +2,9 @@ use crate::{eth, MockAccount, MockBlock, MockTransaction}; use eth_types::{ + eth_core::Transaction, geth_types::{Account, BlockConstants, GethData}, - Block, Bytecode, Error, GethExecTrace, Transaction, Word, + Block, Bytecode, Error, GethExecTrace, Word, }; use external_tracer::{trace, TraceConfig}; use helpers::*; @@ -86,7 +87,7 @@ pub struct TestContext { /// the lastest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// Block from geth - pub eth_block: eth_types::Block, + pub eth_block: eth_types::Block, /// Execution Trace from geth pub geth_traces: Vec, } diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 01016aeb1b..69d385ed65 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -2,9 +2,12 @@ use super::{MOCK_ACCOUNTS, MOCK_CHAIN_ID, MOCK_GASPRICE}; use eth_types::{ - eth_core::{CryptoRng, LocalWallet, OtherFields, RngCore, Signer, TransactionRequest}, + eth_core::{ + AccessList, CryptoRng, LocalWallet, OtherFields, RngCore, Signer, Transaction, + TransactionRequest, + }, geth_types::Transaction as GethTransaction, - word, AccessList, Address, Bytes, Hash, Transaction, Word, U64, + word, Address, Bytes, Hash, Word, U64, }; use lazy_static::lazy_static; use rand::SeedableRng; diff --git a/zkevm-circuits/src/pi_circuit.rs b/zkevm-circuits/src/pi_circuit.rs index 1f61081dd9..78ec1d72de 100644 --- a/zkevm-circuits/src/pi_circuit.rs +++ b/zkevm-circuits/src/pi_circuit.rs @@ -82,7 +82,7 @@ pub struct PublicData { /// where the latest one is at history_hashes[history_hashes.len() - 1]. pub history_hashes: Vec, /// Block Transactions - pub transactions: Vec, + pub transactions: Vec, /// Block State Root pub state_root: H256, /// Previous block root diff --git a/zkevm-circuits/src/witness/block.rs b/zkevm-circuits/src/witness/block.rs index e3c4de3764..643828f43c 100644 --- a/zkevm-circuits/src/witness/block.rs +++ b/zkevm-circuits/src/witness/block.rs @@ -50,7 +50,7 @@ pub struct Block { /// Keccak inputs pub keccak_inputs: Vec>, /// Original Block from geth - pub eth_block: eth_types::Block, + pub eth_block: eth_types::Block, } impl Block { From 042caa04668d8de4e092ebdc0ac5c648cfa967b4 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sat, 3 Jun 2023 23:18:34 +0900 Subject: [PATCH 10/20] sweep types under eth_core --- eth-types/src/eth_core.rs | 4 ++-- eth-types/src/lib.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/eth-types/src/eth_core.rs b/eth-types/src/eth_core.rs index 75da1243f5..3d6c8d8608 100644 --- a/eth-types/src/eth_core.rs +++ b/eth-types/src/eth_core.rs @@ -10,8 +10,8 @@ pub use ethers_core::{ transaction::{ eip2718::TypedTransaction, eip2930::AccessList, response, response::Transaction, }, - Address, BlockNumber, Bloom, NameOrAddress, OtherFields, TransactionRequest, H256, I256, - U256, + Address, Block, BlockNumber, Bloom, Bytes, NameOrAddress, OtherFields, Signature, + TransactionRequest, H160, H256, H64, I256, U256, U64, }, utils::{get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address}, }; diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index da10b77fa1..d7d636cbe8 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -25,6 +25,8 @@ pub use keccak::{keccak256, Keccak}; #[cfg(feature = "ethers-core")] pub mod eth_core; +pub use eth_core::{Address, Block, Bytes, H256, H64, U256, U64}; + pub use bytecode::Bytecode; pub use error::Error; use halo2_proofs::halo2curves::{ @@ -33,7 +35,6 @@ use halo2_proofs::halo2curves::{ }; use crate::evm_types::{memory::Memory, stack::Stack, storage::Storage, OpcodeId}; -pub use ethers_core::types::{Address, Block, Bytes, Signature, H160, H256, H64, U256, U64}; use serde::{de, Deserialize, Serialize}; use std::{collections::HashMap, fmt, str::FromStr}; From 12d31f409837bd4b71460c1c6812e651cb1838dc Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sat, 3 Jun 2023 23:50:07 +0900 Subject: [PATCH 11/20] third_party mod --- eth-types/src/lib.rs | 4 +++- eth-types/src/third_party.rs | 2 ++ eth-types/src/{ => third_party}/eth_core.rs | 0 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 eth-types/src/third_party.rs rename eth-types/src/{ => third_party}/eth_core.rs (100%) diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index d7d636cbe8..a76c74e1b3 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -22,8 +22,10 @@ pub mod keccak; pub mod sign_types; pub use keccak::{keccak256, Keccak}; +mod third_party; + #[cfg(feature = "ethers-core")] -pub mod eth_core; +pub use third_party::eth_core; pub use eth_core::{Address, Block, Bytes, H256, H64, U256, U64}; diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs new file mode 100644 index 0000000000..8bb2228596 --- /dev/null +++ b/eth-types/src/third_party.rs @@ -0,0 +1,2 @@ + +pub mod eth_core; diff --git a/eth-types/src/eth_core.rs b/eth-types/src/third_party/eth_core.rs similarity index 100% rename from eth-types/src/eth_core.rs rename to eth-types/src/third_party/eth_core.rs From cb3ecfc39bdefa9ce8a14726c5ab7c14386da51e Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sat, 3 Jun 2023 23:53:49 +0900 Subject: [PATCH 12/20] mv eth signer --- eth-types/src/lib.rs | 2 ++ eth-types/src/third_party.rs | 2 +- eth-types/src/third_party/eth_core.rs | 4 +--- eth-types/src/third_party/eth_signer.rs | 3 +++ mock/src/lib.rs | 2 +- mock/src/transaction.rs | 6 ++---- zkevm-circuits/src/super_circuit/test.rs | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) create mode 100644 eth-types/src/third_party/eth_signer.rs diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index a76c74e1b3..409426f48e 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -26,6 +26,8 @@ mod third_party; #[cfg(feature = "ethers-core")] pub use third_party::eth_core; +#[cfg(feature = "ethers-core")] +pub use third_party::eth_signer; pub use eth_core::{Address, Block, Bytes, H256, H64, U256, U64}; diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs index 8bb2228596..59b70ca6c3 100644 --- a/eth-types/src/third_party.rs +++ b/eth-types/src/third_party.rs @@ -1,2 +1,2 @@ - pub mod eth_core; +pub mod eth_signer; diff --git a/eth-types/src/third_party/eth_core.rs b/eth-types/src/third_party/eth_core.rs index 3d6c8d8608..028895916e 100644 --- a/eth-types/src/third_party/eth_core.rs +++ b/eth-types/src/third_party/eth_core.rs @@ -14,6 +14,4 @@ pub use ethers_core::{ TransactionRequest, H160, H256, H64, I256, U256, U64, }, utils::{get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address}, -}; - -pub use ethers_signers::{LocalWallet, Signer}; +}; \ No newline at end of file diff --git a/eth-types/src/third_party/eth_signer.rs b/eth-types/src/third_party/eth_signer.rs new file mode 100644 index 0000000000..09dcee8a21 --- /dev/null +++ b/eth-types/src/third_party/eth_signer.rs @@ -0,0 +1,3 @@ +//! Use exteral crate ethers_signers + +pub use ethers_signers::{LocalWallet, Signer}; diff --git a/mock/src/lib.rs b/mock/src/lib.rs index 18d50253da..1e6a8b0447 100644 --- a/mock/src/lib.rs +++ b/mock/src/lib.rs @@ -1,7 +1,7 @@ //! Mock types and functions to generate GethData used for tests use eth_types::{ - address, bytecode, bytecode::Bytecode, eth_core::LocalWallet, word, Address, Bytes, Word, + address, bytecode, bytecode::Bytecode, eth_signer::LocalWallet, word, Address, Bytes, Word, }; use lazy_static::lazy_static; use rand::SeedableRng; diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 69d385ed65..0c1cbf781c 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -2,10 +2,8 @@ use super::{MOCK_ACCOUNTS, MOCK_CHAIN_ID, MOCK_GASPRICE}; use eth_types::{ - eth_core::{ - AccessList, CryptoRng, LocalWallet, OtherFields, RngCore, Signer, Transaction, - TransactionRequest, - }, + eth_core::{AccessList, CryptoRng, OtherFields, RngCore, Transaction, TransactionRequest}, + eth_signer::{LocalWallet, Signer}, geth_types::Transaction as GethTransaction, word, Address, Bytes, Hash, Word, U64, }; diff --git a/zkevm-circuits/src/super_circuit/test.rs b/zkevm-circuits/src/super_circuit/test.rs index cab25cb098..1cef68e02d 100644 --- a/zkevm-circuits/src/super_circuit/test.rs +++ b/zkevm-circuits/src/super_circuit/test.rs @@ -8,7 +8,7 @@ use std::collections::HashMap; use eth_types::{ address, bytecode, - eth_core::{LocalWallet, Signer}, + eth_signer::{LocalWallet, Signer}, geth_types::GethData, Word, }; From f081b6f10e5a29acca06558838a629ca50e5bc90 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sat, 3 Jun 2023 23:58:11 +0900 Subject: [PATCH 13/20] rm deps ethers-signers --- Cargo.lock | 3 --- circuit-benchmarks/Cargo.toml | 1 - circuit-benchmarks/src/super_circuit.rs | 8 ++++++-- eth-types/src/geth_types.rs | 2 +- testool/Cargo.toml | 1 - testool/src/statetest/executor.rs | 2 +- zkevm-circuits/Cargo.toml | 1 - 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eec4424835..c92c817f72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -512,7 +512,6 @@ dependencies = [ "bus-mapping", "env_logger", "eth-types", - "ethers-signers", "halo2_proofs", "itertools", "mock", @@ -3873,7 +3872,6 @@ dependencies = [ "clap", "env_logger", "eth-types", - "ethers-signers", "external-tracer", "glob", "halo2_proofs", @@ -4540,7 +4538,6 @@ dependencies = [ "ecdsa 0.1.0", "env_logger", "eth-types", - "ethers-signers", "gadgets", "halo2_proofs", "hex", diff --git a/circuit-benchmarks/Cargo.toml b/circuit-benchmarks/Cargo.toml index 8f813e749b..585b39e5ca 100644 --- a/circuit-benchmarks/Cargo.toml +++ b/circuit-benchmarks/Cargo.toml @@ -16,7 +16,6 @@ rand = "0.8" itertools = "0.10" eth-types = { path = "../eth-types" } env_logger = "0.9" -ethers-signers = "0.17.0" mock = { path="../mock" } rand_chacha = "0.3" diff --git a/circuit-benchmarks/src/super_circuit.rs b/circuit-benchmarks/src/super_circuit.rs index a37ffa82d8..43076fa5f7 100644 --- a/circuit-benchmarks/src/super_circuit.rs +++ b/circuit-benchmarks/src/super_circuit.rs @@ -4,8 +4,12 @@ mod tests { use ark_std::{end_timer, start_timer}; use bus_mapping::circuit_input_builder::CircuitsParams; - use eth_types::{address, bytecode, geth_types::GethData, Word}; - use ethers_signers::{LocalWallet, Signer}; + use eth_types::{ + address, bytecode, + eth_signer::{LocalWallet, Signer}, + geth_types::GethData, + Word, + }; use halo2_proofs::{ halo2curves::bn256::{Bn256, Fr, G1Affine}, plonk::{create_proof, keygen_pk, keygen_vk, verify_proof}, diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index 9155c768f9..a22c393594 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -2,12 +2,12 @@ use crate::{ eth_core::{get_contract_address, response, AccessList, NameOrAddress, TransactionRequest}, + eth_signer::{LocalWallet, Signer}, keccak256, sign_types::{biguint_to_32bytes_le, ct_option_ok_or, recover_pk, SignData, SECP256K1_Q}, Address, Block, Bytes, Error, GethExecTrace, Hash, ToBigEndian, ToLittleEndian, ToWord, Word, U64, }; -use ethers_signers::{LocalWallet, Signer}; use halo2_proofs::halo2curves::{group::ff::PrimeField, secp256k1}; use num::Integer; use num_bigint::BigUint; diff --git a/testool/Cargo.toml b/testool/Cargo.toml index c75800d108..d25f0bf090 100644 --- a/testool/Cargo.toml +++ b/testool/Cargo.toml @@ -10,7 +10,6 @@ bus-mapping = { path = "../bus-mapping" } clap = { version = "3.1", features = ["derive"] } env_logger = "0.9" eth-types = { path="../eth-types", features=["ethers-core"]} -ethers-signers = "0.17.0" external-tracer = { path="../external-tracer" } glob = "0.3" handlebars = "4.3" diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index 2ddc613e9f..79008207ac 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -6,9 +6,9 @@ use bus_mapping::{ }; use eth_types::{ eth_core::{SigningKey, TransactionRequest, TypedTransaction}, + eth_signer::{LocalWallet, Signer}, geth_types, Address, Bytes, GethExecTrace, U256, U64, }; -use ethers_signers::{LocalWallet, Signer}; use external_tracer::TraceConfig; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; use std::{collections::HashMap, str::FromStr}; diff --git a/zkevm-circuits/Cargo.toml b/zkevm-circuits/Cargo.toml index 58f8c50183..d27f921132 100644 --- a/zkevm-circuits/Cargo.toml +++ b/zkevm-circuits/Cargo.toml @@ -37,7 +37,6 @@ cli-table = { version = "0.4", optional = true } [dev-dependencies] bus-mapping = { path = "../bus-mapping", features = ["test"] } ctor = "0.1.22" -ethers-signers = "0.17.0" hex = "0.4.3" itertools = "0.10.1" mock = { path = "../mock" } From d1ba0019a191ab2ffdcb486dce55ddbb825d6373 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sun, 4 Jun 2023 00:05:17 +0900 Subject: [PATCH 14/20] sweep ethers providers under eth-types --- Cargo.lock | 2 +- bus-mapping/Cargo.toml | 1 - bus-mapping/src/circuit_input_builder.rs | 5 +++-- bus-mapping/src/error.rs | 5 +++-- bus-mapping/src/rpc.rs | 2 +- eth-types/Cargo.toml | 1 + eth-types/src/lib.rs | 1 + eth-types/src/third_party.rs | 1 + eth-types/src/third_party/eth_providers.rs | 2 ++ 9 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 eth-types/src/third_party/eth_providers.rs diff --git a/Cargo.lock b/Cargo.lock index c92c817f72..945da23e41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -400,7 +400,6 @@ name = "bus-mapping" version = "0.1.0" dependencies = [ "eth-types", - "ethers-providers", "gadgets", "halo2_proofs", "hex", @@ -1149,6 +1148,7 @@ name = "eth-types" version = "0.1.0" dependencies = [ "ethers-core", + "ethers-providers", "ethers-signers", "halo2_proofs", "hex", diff --git a/bus-mapping/Cargo.toml b/bus-mapping/Cargo.toml index ab6e2088e1..f14829b878 100644 --- a/bus-mapping/Cargo.toml +++ b/bus-mapping/Cargo.toml @@ -10,7 +10,6 @@ eth-types = { path = "../eth-types" } gadgets = { path = "../gadgets" } mock = { path = "../mock", optional = true } -ethers-providers = "0.17.0" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } itertools = "0.10" lazy_static = "1.4" diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 889771bb99..3673837647 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -23,11 +23,12 @@ pub use block::{Block, BlockContext}; pub use call::{Call, CallContext, CallKind}; use core::fmt::Debug; use eth_types::{ - self, geth_types, + self, + eth_providers::JsonRpcClient, + geth_types, sign_types::{pk_bytes_le, pk_bytes_swap_endianness, SignData}, Address, GethExecStep, GethExecTrace, ToWord, Word, }; -use ethers_providers::JsonRpcClient; pub use execution::{ CopyDataType, CopyEvent, CopyStep, ExecState, ExecStep, ExpEvent, ExpStep, NumberOrHash, }; diff --git a/bus-mapping/src/error.rs b/bus-mapping/src/error.rs index dca1721456..060671e2d0 100644 --- a/bus-mapping/src/error.rs +++ b/bus-mapping/src/error.rs @@ -1,8 +1,9 @@ //! Error module for the bus-mapping crate use core::fmt::{Display, Formatter, Result as FmtResult}; -use eth_types::{evm_types::OpcodeId, Address, GethExecStep, Word, H256}; -use ethers_providers::ProviderError; +use eth_types::{ + eth_providers::ProviderError, evm_types::OpcodeId, Address, GethExecStep, Word, H256, +}; use std::error::Error as StdError; use crate::geth_errors::{ diff --git a/bus-mapping/src/rpc.rs b/bus-mapping/src/rpc.rs index 04bd90527d..7f0a88f3be 100644 --- a/bus-mapping/src/rpc.rs +++ b/bus-mapping/src/rpc.rs @@ -4,10 +4,10 @@ use crate::Error; use eth_types::{ eth_core::{BlockNumber, Transaction}, + eth_providers::JsonRpcClient, Address, Block, Bytes, EIP1186ProofResponse, GethExecTrace, Hash, ResultGethExecTraces, Word, U64, }; -use ethers_providers::JsonRpcClient; use serde::Serialize; /// Serialize a type. diff --git a/eth-types/Cargo.toml b/eth-types/Cargo.toml index 3210530785..f2600e0eee 100644 --- a/eth-types/Cargo.toml +++ b/eth-types/Cargo.toml @@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0" [dependencies] ethers-core = "0.17.0" ethers-signers = "0.17.0" +ethers-providers = "0.17.0" hex = "0.4" lazy_static = "1.4" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index 409426f48e..e1554d29aa 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -28,6 +28,7 @@ mod third_party; pub use third_party::eth_core; #[cfg(feature = "ethers-core")] pub use third_party::eth_signer; +pub use third_party::eth_providers; pub use eth_core::{Address, Block, Bytes, H256, H64, U256, U64}; diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs index 59b70ca6c3..fe56165b31 100644 --- a/eth-types/src/third_party.rs +++ b/eth-types/src/third_party.rs @@ -1,2 +1,3 @@ pub mod eth_core; pub mod eth_signer; +pub mod eth_providers; diff --git a/eth-types/src/third_party/eth_providers.rs b/eth-types/src/third_party/eth_providers.rs new file mode 100644 index 0000000000..98c6003659 --- /dev/null +++ b/eth-types/src/third_party/eth_providers.rs @@ -0,0 +1,2 @@ +//! re-export external crate ethers_providers +pub use ethers_providers::{JsonRpcClient, ProviderError}; From 36d6d3b31572b97e6296267aedbbd3677bedce8d Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sun, 4 Jun 2023 00:15:16 +0900 Subject: [PATCH 15/20] sweep ethers under eth-types --- Cargo.lock | 141 +++++++++++++----- eth-types/Cargo.toml | 1 + eth-types/src/lib.rs | 5 +- eth-types/src/third_party.rs | 3 +- eth-types/src/third_party/eth_ethers.rs | 18 +++ integration-tests/Cargo.toml | 1 - .../src/bin/gen_blockchain_data.rs | 17 +-- integration-tests/src/lib.rs | 11 +- 8 files changed, 132 insertions(+), 65 deletions(-) create mode 100644 eth-types/src/third_party/eth_ethers.rs diff --git a/Cargo.lock b/Cargo.lock index 945da23e41..5a4b8edf4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -953,9 +953,9 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "ecc" @@ -1054,9 +1054,9 @@ dependencies = [ [[package]] name = "ena" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7402b94a93c24e742487327a7cd839dc9d36fec9de9fb25b09f2dae459f36c3" +checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" dependencies = [ "log", ] @@ -1147,6 +1147,7 @@ dependencies = [ name = "eth-types" version = "0.1.0" dependencies = [ + "ethers", "ethers-core", "ethers-providers", "ethers-signers", @@ -1494,6 +1495,8 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ + "byteorder", + "rand", "rustc-hex", "static_assertions", ] @@ -1920,11 +1923,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747309b4b440c06d57b0b25f2aee03ee9b5e5397d288c60e21fc709bb98a7408" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -2100,7 +2103,6 @@ dependencies = [ "bus-mapping", "env_logger", "eth-types", - "ethers", "halo2_proofs", "lazy_static", "log", @@ -2211,9 +2213,9 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.9" +version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34313ec00c2eb5c3c87ca6732ea02dcf3af99c3ff7a8fb622ffb99c9d860a87" +checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" dependencies = [ "ascii-canvas", "bit-set", @@ -2223,7 +2225,6 @@ dependencies = [ "itertools", "lalrpop-util", "petgraph", - "pico-args", "regex", "regex-syntax", "string_cache", @@ -2234,9 +2235,9 @@ dependencies = [ [[package]] name = "lalrpop-util" -version = "0.19.10" +version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3b45d694c8074f77bc24fc26e47633c862a9cd3b48dd51209c02ba4c434d68" +checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" dependencies = [ "regex", ] @@ -2795,12 +2796,6 @@ dependencies = [ "siphasher", ] -[[package]] -name = "pico-args" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db8bcd96cb740d03149cbad5518db9fd87126a10ab519c011893b1754134c468" - [[package]] name = "pin-project" version = "1.0.12" @@ -2910,6 +2905,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash 0.8.0", + "impl-codec", "uint", ] @@ -3300,7 +3296,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d470e29e933dac4101180fd6574971892315c414cf2961a192729089687cc9b" dependencies = [ "derive_more", - "primitive-types 0.11.1", + "primitive-types 0.12.1", "rlp", "ruint-macro", "rustc_version", @@ -3768,9 +3764,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" -version = "0.8.4" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", @@ -4221,12 +4217,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -4393,13 +4388,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.1", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm 0.42.1", + "windows_x86_64_msvc 0.42.1", ] [[package]] @@ -4408,7 +4403,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.1", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -4417,13 +4421,28 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.1", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", + "windows_x86_64_gnullvm 0.42.1", + "windows_x86_64_msvc 0.42.1", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] @@ -4432,42 +4451,84 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winreg" version = "0.10.1" diff --git a/eth-types/Cargo.toml b/eth-types/Cargo.toml index f2600e0eee..8846e4699e 100644 --- a/eth-types/Cargo.toml +++ b/eth-types/Cargo.toml @@ -9,6 +9,7 @@ license = "MIT OR Apache-2.0" ethers-core = "0.17.0" ethers-signers = "0.17.0" ethers-providers = "0.17.0" +ethers = { version = "0.17.0", features = ["ethers-solc"] } hex = "0.4" lazy_static = "1.4" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index e1554d29aa..0bc47d5f6f 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -25,10 +25,7 @@ pub use keccak::{keccak256, Keccak}; mod third_party; #[cfg(feature = "ethers-core")] -pub use third_party::eth_core; -#[cfg(feature = "ethers-core")] -pub use third_party::eth_signer; -pub use third_party::eth_providers; +pub use third_party::{eth_core, eth_ethers, eth_providers, eth_signer}; pub use eth_core::{Address, Block, Bytes, H256, H64, U256, U64}; diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs index fe56165b31..2b6eed6947 100644 --- a/eth-types/src/third_party.rs +++ b/eth-types/src/third_party.rs @@ -1,3 +1,4 @@ pub mod eth_core; -pub mod eth_signer; pub mod eth_providers; +pub mod eth_signer; +pub mod eth_ethers; diff --git a/eth-types/src/third_party/eth_ethers.rs b/eth-types/src/third_party/eth_ethers.rs new file mode 100644 index 0000000000..b22a3be136 --- /dev/null +++ b/eth-types/src/third_party/eth_ethers.rs @@ -0,0 +1,18 @@ +//! re-export external crate ethers +pub use ethers::{ + abi, + abi::Tokenize, + contract::{builders::ContractCall, Contract, ContractFactory}, + core::{ + k256::ecdsa::SigningKey, + types::{ + transaction::eip2718::TypedTransaction, Address, Bytes, TransactionReceipt, + TransactionRequest, U256, U64, + }, + utils::WEI_IN_ETHER, + }, + middleware::SignerMiddleware, + providers::{Http, Middleware, PendingTransaction, Provider}, + signers::{coins_bip39::English, MnemonicBuilder, Signer, Wallet}, + solc::Solc, +}; diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 67156dcecc..53b19aa31f 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -8,7 +8,6 @@ license = "MIT OR Apache-2.0" [dependencies] lazy_static = "1.4" -ethers = { version = "0.17.0", features = ["ethers-solc"] } serde_json = "1.0.66" serde = { version = "1.0.130", features = ["derive"] } bus-mapping = { path = "../bus-mapping" , features = ["test"] } diff --git a/integration-tests/src/bin/gen_blockchain_data.rs b/integration-tests/src/bin/gen_blockchain_data.rs index 680b0ab48d..dd68c5b0ad 100644 --- a/integration-tests/src/bin/gen_blockchain_data.rs +++ b/integration-tests/src/bin/gen_blockchain_data.rs @@ -1,17 +1,8 @@ -use ethers::{ +use eth_types::eth_ethers::{ abi::{self, Tokenize}, - contract::{builders::ContractCall, Contract, ContractFactory}, - core::{ - types::{ - transaction::eip2718::TypedTransaction, Address, TransactionReceipt, - TransactionRequest, U256, U64, - }, - utils::WEI_IN_ETHER, - }, - middleware::SignerMiddleware, - providers::{Middleware, PendingTransaction}, - signers::Signer, - solc::Solc, + Address, Contract, ContractCall, ContractFactory, Middleware, PendingTransaction, Signer, + SignerMiddleware, Solc, TransactionReceipt, TransactionRequest, TypedTransaction, U256, U64, + WEI_IN_ETHER, }; use integration_tests::{ get_client, get_provider, get_wallet, log_init, CompiledContract, GenDataOutput, CONTRACTS, diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 5eeedf6a6d..4db404db24 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -5,12 +5,11 @@ use bus_mapping::rpc::GethClient; use env_logger::Env; -use eth_types::Address; -use ethers::{ - abi, - core::{k256::ecdsa::SigningKey, types::Bytes}, - providers::{Http, Provider}, - signers::{coins_bip39::English, MnemonicBuilder, Signer, Wallet}, +use eth_types::{ + eth_ethers::{ + abi, Bytes, English, Http, MnemonicBuilder, Provider, Signer, SigningKey, Wallet, + }, + Address, }; use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; From 19ae434c4e138412772548f1d61942f4ece04b34 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sun, 4 Jun 2023 00:24:08 +0900 Subject: [PATCH 16/20] upgrade complete to 2.0.7 fmt --- Cargo.lock | 1547 +++++++++++++------------ eth-types/Cargo.toml | 8 +- eth-types/src/geth_types.rs | 4 +- eth-types/src/third_party.rs | 2 +- eth-types/src/third_party/eth_core.rs | 2 +- mock/src/block.rs | 4 + mock/src/transaction.rs | 3 +- testool/src/statetest/executor.rs | 4 +- testool/src/statetest/json.rs | 2 +- testool/src/statetest/spec.rs | 2 +- testool/src/statetest/yaml.rs | 2 +- 11 files changed, 818 insertions(+), 762 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a4b8edf4e..578a3cbb9c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,26 +3,30 @@ version = 3 [[package]] -name = "aes" -version = "0.7.5" +name = "Inflector" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", - "opaque-debug 0.3.0", + "lazy_static", + "regex", ] [[package]] -name = "ahash" -version = "0.7.6" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aes" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ - "getrandom", - "once_cell", - "version_check", + "cfg-if", + "cipher", + "cpufeatures", ] [[package]] @@ -38,9 +42,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] @@ -91,13 +95,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.18", ] [[package]] @@ -124,14 +128,14 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8c1df849285fbacd587de7818cc7d13be6cd2cbcd47a04fb1801b0e2706e33" +checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -140,40 +144,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "base16ct" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" - [[package]] name = "base16ct" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base58" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5024ee8015f02155eee35c711107ddd9a9bf3cb689cf2a9089c97e79b6e1ae83" - -[[package]] -name = "base58check" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ee2fe4c9a0c84515f136aaae2466744a721af6d63339c18689d9e995d74d99b" -dependencies = [ - "base58", - "sha2 0.8.2", -] - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - [[package]] name = "base64" version = "0.13.1" @@ -250,15 +226,6 @@ dependencies = [ "wyz", ] -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest 0.10.6", -] - [[package]] name = "blake2b_simd" version = "1.0.0" @@ -277,19 +244,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" dependencies = [ "arrayref", - "byte-tools 0.2.0", -] - -[[package]] -name = "block-buffer" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" -dependencies = [ - "block-padding 0.1.5", - "byte-tools 0.3.1", - "byteorder", - "generic-array 0.12.4", + "byte-tools", ] [[package]] @@ -298,8 +253,8 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding 0.2.1", - "generic-array 0.14.6", + "block-padding", + "generic-array 0.14.7", ] [[package]] @@ -308,16 +263,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "generic-array 0.14.6", -] - -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools 0.3.1", + "generic-array 0.14.7", ] [[package]] @@ -326,56 +272,14 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "borsh" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822462c1e7b17b31961798a6874b36daea6818e99e0cb7d3b7b0fa3c477751c3" -dependencies = [ - "borsh-derive", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh-derive" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37626c9e941a687ee9abef6065b44c379478ae563b7483c613dd705ef1dff59e" -dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61820b4c5693eafb998b1e67485423c923db4a75f72585c247bdee32bad81e7b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76cdbfa13def20d1f8af3ae7b3c6771f06352a74221d8851262ac384c122b8e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "bs58" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +dependencies = [ + "sha2 0.9.9", +] [[package]] name = "bstr" @@ -431,52 +335,81 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" [[package]] -name = "byte-tools" -version = "0.3.1" +name = "byteorder" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] -name = "bytecheck" -version = "0.6.9" +name = "bytes" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d11cac2c12b5adc6570dad2ee1b87eff4955dac476fe12d81e5fdd352e52406f" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" dependencies = [ - "bytecheck_derive", - "ptr_meta", + "serde", ] [[package]] -name = "bytecheck_derive" -version = "0.6.9" +name = "bzip2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e576ebe98e605500b3c8041bb888e966653577172df6dd97398714eb30b9bf" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ - "proc-macro2", - "quote", - "syn", + "bzip2-sys", + "libc", ] [[package]] -name = "byteorder" -version = "1.4.3" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] [[package]] -name = "bytes" -version = "1.4.0" +name = "camino" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] +[[package]] +name = "cargo-platform" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "cc" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -496,11 +429,12 @@ dependencies = [ [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array 0.14.6", + "crypto-common", + "inout", ] [[package]] @@ -547,7 +481,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -579,14 +513,14 @@ checksum = "2af3bfb9da627b0a6c467624fb7963921433774ed435493b5c08a3053e829ad4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] name = "coins-bip32" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634c509653de24b439672164bbf56f5f582a2ab0e313d3b0f6af0b7345cf2560" +checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" dependencies = [ "bincode", "bs58", @@ -594,7 +528,7 @@ dependencies = [ "digest 0.10.6", "getrandom", "hmac 0.12.1", - "k256 0.11.6", + "k256", "lazy_static", "serde", "sha2 0.10.6", @@ -603,16 +537,16 @@ dependencies = [ [[package]] name = "coins-bip39" -version = "0.7.0" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171" +checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" dependencies = [ "bitvec 0.17.4", "coins-bip32", "getrandom", - "hex", "hmac 0.12.1", - "pbkdf2 0.11.0", + "once_cell", + "pbkdf2 0.12.1", "rand", "sha2 0.10.6", "thiserror", @@ -620,16 +554,15 @@ dependencies = [ [[package]] name = "coins-core" -version = "0.7.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c94090a6663f224feae66ab01e41a2555a8296ee07b5f20dab8888bdefc9f617" +checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" dependencies = [ - "base58check", - "base64 0.12.3", + "base64 0.21.0", "bech32", - "blake2", + "bs58", "digest 0.10.6", - "generic-array 0.14.6", + "generic-array 0.14.7", "hex", "ripemd", "serde", @@ -668,12 +601,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "convert_case" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a24b1aaf0fd0ce8b45161144d6f42cd91677fd5940fd431183eb023b3a2b8" - [[package]] name = "cpufeatures" version = "0.2.5" @@ -683,6 +610,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam-channel" version = "0.5.6" @@ -732,25 +668,13 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "crypto-bigint" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" -dependencies = [ - "generic-array 0.14.6", - "rand_core", - "subtle", - "zeroize", -] - [[package]] name = "crypto-bigint" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core", "subtle", "zeroize", @@ -762,7 +686,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "typenum", ] @@ -772,7 +696,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -805,14 +729,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.107", ] [[package]] name = "ctr" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher", ] @@ -838,7 +762,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.107", ] [[package]] @@ -849,18 +773,14 @@ checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.107", ] [[package]] -name = "der" -version = "0.6.1" +name = "data-encoding" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "zeroize", -] +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der" @@ -878,11 +798,11 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "convert_case 0.4.0", + "convert_case", "proc-macro2", "quote", "rustc_version", - "syn", + "syn 1.0.107", ] [[package]] @@ -900,22 +820,13 @@ dependencies = [ "generic-array 0.9.1", ] -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.4", -] - [[package]] name = "digest" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -983,29 +894,17 @@ dependencies = [ "subtle", ] -[[package]] -name = "ecdsa" -version = "0.14.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" -dependencies = [ - "der 0.6.1", - "elliptic-curve 0.12.3", - "rfc6979 0.3.1", - "signature 1.6.4", -] - [[package]] name = "ecdsa" version = "0.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a48e5d537b8a30c0b023116d981b16334be1485af7ca68db3a2b7024cbc957fd" dependencies = [ - "der 0.7.5", + "der", "digest 0.10.6", - "elliptic-curve 0.13.4", - "rfc6979 0.4.0", - "signature 2.1.0", + "elliptic-curve", + "rfc6979", + "signature", ] [[package]] @@ -1014,40 +913,21 @@ version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" -[[package]] -name = "elliptic-curve" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" -dependencies = [ - "base16ct 0.1.1", - "crypto-bigint 0.4.9", - "der 0.6.1", - "digest 0.10.6", - "ff 0.12.1", - "generic-array 0.14.6", - "group 0.12.1", - "pkcs8", - "rand_core", - "sec1 0.3.0", - "subtle", - "zeroize", -] - [[package]] name = "elliptic-curve" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7" dependencies = [ - "base16ct 0.2.0", - "crypto-bigint 0.5.1", + "base16ct", + "crypto-bigint", "digest 0.10.6", - "ff 0.13.0", - "generic-array 0.14.6", - "group 0.13.0", + "ff", + "generic-array 0.14.7", + "group", + "pkcs8", "rand_core", - "sec1 0.7.1", + "sec1", "subtle", "zeroize", ] @@ -1076,6 +956,24 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "enr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" +dependencies = [ + "base64 0.13.1", + "bytes", + "hex", + "k256", + "log", + "rand", + "rlp", + "serde", + "sha3 0.10.7", + "zeroize", +] + [[package]] name = "enumn" version = "0.1.7" @@ -1084,7 +982,7 @@ checksum = "1940ea32e14d489b401074558be4567f35ca9507c4628b4b3fd6fe6eb2ca7b88" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -1111,6 +1009,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -1123,9 +1032,9 @@ dependencies = [ [[package]] name = "eth-keystore" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f65b750ac950f2f825b36d08bef4cda4112e19a7b1a68f6e2bb499413e12440" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" dependencies = [ "aes", "ctr", @@ -1170,9 +1079,9 @@ dependencies = [ [[package]] name = "ethabi" -version = "17.2.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4966fba78396ff92db3b817ee71143eccd98acf0f876b8d600e585a670c5d1b" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" dependencies = [ "ethereum-types", "hex", @@ -1187,36 +1096,40 @@ dependencies = [ [[package]] name = "ethbloom" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" dependencies = [ "crunchy", - "fixed-hash 0.7.0", + "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", + "scale-info", "tiny-keccak", ] [[package]] name = "ethereum-types" -version = "0.13.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" dependencies = [ "ethbloom", - "fixed-hash 0.7.0", + "fixed-hash", + "impl-codec", "impl-rlp", "impl-serde", - "primitive-types 0.11.1", + "primitive-types", + "scale-info", "uint", ] [[package]] name = "ethers" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16142eeb3155cfa5aec6be3f828a28513a28bd995534f945fa70e7d608f16c10" +checksum = "2a58ce802c65cf3d0756dee5a61094a92cde53c1583b246e9ee5b37226c7fc15" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1230,9 +1143,9 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23f8992ecf45ea9dd2983696aabc566c108723585f07f5dc8c9efb24e52d3db" +checksum = "7b856b7b8ff5c961093cb8efe151fbcce724b451941ce20781de11a531ccd578" dependencies = [ "ethers-core", "once_cell", @@ -1242,10 +1155,12 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0010fffc97c5abcf75a30fd75676b1ed917b2b82beb8270391333618e2847d" +checksum = "e066a0d9cfc70c454672bf16bb433b0243427420076dc5b2f49c448fb5a10628" dependencies = [ + "ethers-contract-abigen", + "ethers-contract-derive", "ethers-core", "ethers-providers", "futures-util", @@ -1257,31 +1172,71 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ethers-contract-abigen" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c113e3e86b6bc16d98484b2c3bb2d01d6fed9f489fe2e592e5cc87c3024d616b" +dependencies = [ + "Inflector", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "hex", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest", + "serde", + "serde_json", + "syn 2.0.18", + "toml 0.7.4", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3fb5adee25701c79ec58fcf2c63594cd8829bc9ad6037ff862d5a111101ed2" +dependencies = [ + "Inflector", + "ethers-contract-abigen", + "ethers-core", + "hex", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.18", +] + [[package]] name = "ethers-core" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ebdd63c828f58aa067f40f9adcbea5e114fb1f90144b3a1e2858e0c9b1ff4e8" +checksum = "6da5fa198af0d3be20c19192df2bd9590b92ce09a8421e793bec8851270f1b05" dependencies = [ "arrayvec", "bytes", + "cargo_metadata", "chrono", - "convert_case 0.5.0", - "elliptic-curve 0.12.3", + "elliptic-curve", "ethabi", - "fastrlp", - "generic-array 0.14.6", + "generic-array 0.14.7", "hex", - "k256 0.11.6", - "proc-macro2", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", "rand", "rlp", - "rlp-derive", - "rust_decimal", "serde", "serde_json", "strum", - "syn", + "syn 2.0.18", + "tempfile", "thiserror", "tiny-keccak", "unicode-xid", @@ -1289,16 +1244,15 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b279a3d00bd219caa2f9a34451b4accbfa9a1eaafc26dcda9d572591528435f0" +checksum = "84ebb401ba97c6f5af278c2c9936c4546cad75dec464b439ae6df249906f4caa" dependencies = [ "ethers-core", - "getrandom", + "ethers-solc", "reqwest", "semver", "serde", - "serde-aux", "serde_json", "thiserror", "tracing", @@ -1306,16 +1260,18 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e7e8632d28175352b9454bbcb604643b6ca1de4d36dc99b3f86860d75c132b" +checksum = "740f4a773c19dd6d6a68c8c2e0996c096488d38997d524e21dc612c55da3bd24" dependencies = [ "async-trait", + "auto_impl", "ethers-contract", "ethers-core", "ethers-etherscan", "ethers-providers", "ethers-signers", + "futures-channel", "futures-locks", "futures-util", "instant", @@ -1331,24 +1287,25 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e46482e4d1e79b20c338fd9db9e166184eb387f0a4e7c05c5b5c0aa2e8c8900c" +checksum = "56b498fd2a6c019d023e43e83488cd1fb0721f299055975aa6bac8dbf1e95f2c" dependencies = [ "async-trait", "auto_impl", - "base64 0.13.1", + "base64 0.21.0", + "bytes", + "enr", "ethers-core", "futures-channel", "futures-core", "futures-timer", "futures-util", - "getrandom", "hashers", "hex", "http", + "instant", "once_cell", - "parking_lot 0.11.2", "pin-project", "reqwest", "serde", @@ -1361,40 +1318,38 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-timer", "web-sys", "ws_stream_wasm", ] [[package]] name = "ethers-signers" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73a72ecad124e8ccd18d6a43624208cab0199e59621b1f0fa6b776b2e0529107" +checksum = "02c4b7e15f212fa7cc2e1251868320221d4ff77a3d48068e69f47ce1c491df2d" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", - "elliptic-curve 0.12.3", + "elliptic-curve", "eth-keystore", "ethers-core", "hex", "rand", "sha2 0.10.6", "thiserror", + "tracing", ] [[package]] name = "ethers-solc" -version = "0.17.0" +version = "2.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5db405d0e584aa8dae154ffebb90f2305cae588fd11d9f6b857ebe3a79294" +checksum = "a81c89f121595cf8959e746045bb8b25a6a38d72588561e1a3b7992fc213f674" dependencies = [ "cfg-if", - "colored", "dunce", "ethers-core", - "getrandom", "glob", "hex", "home", @@ -1408,11 +1363,13 @@ dependencies = [ "serde", "serde_json", "solang-parser", + "svm-rs", "thiserror", "tiny-keccak", "tokio", "tracing", "walkdir", + "yansi", ] [[package]] @@ -1426,44 +1383,22 @@ dependencies = [ ] [[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - -[[package]] -name = "fastrlp" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "089263294bb1c38ac73649a6ad563dd9a5142c8dc0482be15b8b9acb22a1611e" -dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "fastrlp-derive", -] - -[[package]] -name = "fastrlp-derive" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0f9d074ab623d1b388c12544bfeed759c7df36dc5c300cda053df9ba1232075" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn", +name = "eyre" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" +dependencies = [ + "indenter", + "once_cell", ] [[package]] -name = "ff" -version = "0.12.1" +name = "fastrand" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ - "rand_core", - "subtle", + "instant", ] [[package]] @@ -1477,18 +1412,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "fixed-hash" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" -dependencies = [ - "byteorder", - "rand", - "rustc-hex", - "static_assertions", -] - [[package]] name = "fixed-hash" version = "0.8.0" @@ -1507,6 +1430,16 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "flate2" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1522,6 +1455,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "funty" version = "2.0.0" @@ -1545,9 +1488,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1555,9 +1498,9 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" @@ -1572,9 +1515,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-locks" @@ -1584,43 +1527,46 @@ checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" dependencies = [ "futures-channel", "futures-task", - "tokio", ] [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.18", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1667,18 +1613,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1714,23 +1651,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] -name = "gobuild" -version = "0.1.0-alpha.2" +name = "gloo-timers" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e156a4ddbf3deb5e8116946c111413bd9a5679bdc1536c78a60618a7a9ac9e" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" dependencies = [ - "cc", + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "group" -version = "0.12.1" +name = "gobuild" +version = "0.1.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "71e156a4ddbf3deb5e8116946c111413bd9a5679bdc1536c78a60618a7a9ac9e" dependencies = [ - "ff 0.12.1", - "rand_core", - "subtle", + "cc", ] [[package]] @@ -1739,7 +1677,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ - "ff 0.13.0", + "ff", "rand_core", "subtle", ] @@ -1769,8 +1707,8 @@ version = "0.2.0" source = "git+https://github.com/privacy-scaling-explorations/halo2.git?tag=v2023_04_20#be955686f86eb618f55d2320c0e042485b313d22" dependencies = [ "blake2b_simd", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "halo2curves", "rand_chacha", "rand_core", @@ -1784,8 +1722,8 @@ name = "halo2curves" version = "0.3.2" source = "git+https://github.com/privacy-scaling-explorations/halo2curves?tag=0.3.2#9f5c50810bbefe779ee5cf1d852b2fe85dc35d5e" dependencies = [ - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "lazy_static", "num-bigint", "num-traits", @@ -1827,9 +1765,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.6", -] [[package]] name = "hashbrown" @@ -1837,7 +1772,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash", ] [[package]] @@ -1917,7 +1852,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -1996,9 +1931,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.2" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" +checksum = "0646026eb1b3eea4cd9ba47912ea5ce9cc07713d105b1a14698f4e6433d348b7" dependencies = [ "http", "hyper", @@ -2043,9 +1978,9 @@ dependencies = [ [[package]] name = "impl-serde" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4551f042f3438e64dbd6226b20527fc84a6e1fe65688b58746a2f53623f25f5c" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -2058,9 +1993,15 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.9.2" @@ -2071,6 +2012,15 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array 0.14.7", +] + [[package]] name = "instant" version = "0.1.12" @@ -2078,9 +2028,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", ] [[package]] @@ -2143,7 +2090,7 @@ checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix", + "rustix 0.36.8", "windows-sys 0.45.0", ] @@ -2169,25 +2116,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] -name = "js-sys" -version = "0.3.61" +name = "jobserver" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ - "wasm-bindgen", + "libc", ] [[package]] -name = "k256" -version = "0.11.6" +name = "js-sys" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ - "cfg-if", - "ecdsa 0.14.8", - "elliptic-curve 0.12.3", - "sha2 0.10.6", - "sha3 0.10.7", + "wasm-bindgen", ] [[package]] @@ -2198,8 +2141,10 @@ checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa 0.16.6", - "elliptic-curve 0.13.4", + "elliptic-curve", + "once_cell", "sha2 0.10.6", + "signature", ] [[package]] @@ -2226,7 +2171,7 @@ dependencies = [ "lalrpop-util", "petgraph", "regex", - "regex-syntax", + "regex-syntax 0.6.28", "string_cache", "term", "tiny-keccak", @@ -2238,9 +2183,6 @@ name = "lalrpop-util" version = "0.19.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" -dependencies = [ - "regex", -] [[package]] name = "lazy_static" @@ -2317,6 +2259,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + [[package]] name = "lock_api" version = "0.4.9" @@ -2379,6 +2327,15 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" version = "0.8.5" @@ -2506,16 +2463,31 @@ dependencies = [ ] [[package]] -name = "once_cell" -version = "1.17.0" +name = "num_enum" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive", +] [[package]] -name = "opaque-debug" -version = "0.2.3" +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.18", +] + +[[package]] +name = "once_cell" +version = "1.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" [[package]] name = "opaque-debug" @@ -2523,6 +2495,31 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.107", +] + [[package]] name = "os_str_bytes" version = "6.4.1" @@ -2558,21 +2555,10 @@ version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" dependencies = [ - "proc-macro-crate 1.3.0", + "proc-macro-crate", "proc-macro2", "quote", - "syn", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", + "syn 1.0.107", ] [[package]] @@ -2582,21 +2568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.7", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -2607,22 +2579,11 @@ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.45.0", ] -[[package]] -name = "password-hash" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d791538a6dcc1e7cb7fe6f6b58aca40e7f79403c45b2bc274008b5e647af1d8" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - [[package]] name = "password-hash" version = "0.4.2" @@ -2641,8 +2602,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" dependencies = [ "blake2b_simd", - "ff 0.13.0", - "group 0.13.0", + "ff", + "group", "lazy_static", "rand", "static_assertions", @@ -2663,23 +2624,24 @@ checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" [[package]] name = "pbkdf2" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271779f35b581956db91a3e55737327a03aa051e90b1c47aeb189508533adfd7" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ "digest 0.10.6", + "hmac 0.12.1", + "password-hash", + "sha2 0.10.6", ] [[package]] name = "pbkdf2" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +checksum = "f0ca0b5a68607598bf3bad68f32227a8164f6254833f84eafaac409cd6746c31" dependencies = [ "digest 0.10.6", "hmac 0.12.1", - "password-hash 0.4.2", - "sha2 0.10.6", ] [[package]] @@ -2718,7 +2680,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2754,37 +2716,35 @@ dependencies = [ [[package]] name = "phf" -version = "0.10.1" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" +checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" dependencies = [ "phf_macros", - "phf_shared", - "proc-macro-hack", + "phf_shared 0.11.1", ] [[package]] name = "phf_generator" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" dependencies = [ - "phf_shared", + "phf_shared 0.11.1", "rand", ] [[package]] name = "phf_macros" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" dependencies = [ "phf_generator", - "phf_shared", - "proc-macro-hack", + "phf_shared 0.11.1", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -2796,24 +2756,33 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.18", ] [[package]] @@ -2830,14 +2799,20 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.6.1", + "der", "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" + [[package]] name = "poseidon" version = "0.2.0" @@ -2871,6 +2846,16 @@ dependencies = [ "yansi", ] +[[package]] +name = "prettyplease" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b69d39aab54d069e7f2fe8cb970493e7834601ca2d8c65fd7bbd183578080d1" +dependencies = [ + "proc-macro2", + "syn 2.0.18", +] + [[package]] name = "prettytable-rs" version = "0.10.0" @@ -2885,39 +2870,20 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "primitive-types" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28720988bff275df1f51b171e1b2a18c30d194c4d2b61defdacecd625a5d94a" -dependencies = [ - "fixed-hash 0.7.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "uint", -] - [[package]] name = "primitive-types" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ - "fixed-hash 0.8.0", + "fixed-hash", "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", "uint", ] -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - [[package]] name = "proc-macro-crate" version = "1.3.0" @@ -2925,7 +2891,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.18.1", ] [[package]] @@ -2937,7 +2903,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "version_check", ] @@ -2952,46 +2918,20 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" dependencies = [ "unicode-ident", ] -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "quote" -version = "1.0.23" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -3049,9 +2989,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -3059,9 +2999,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -3078,6 +3018,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -3085,19 +3034,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.7.2", ] [[package]] @@ -3113,19 +3062,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] -name = "rend" -version = "0.3.6" +name = "regex-syntax" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79af64b4b6362ffba04eef3a4e10829718a4896dac19daa741851c86781edf95" -dependencies = [ - "bytecheck", -] +checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ "base64 0.21.0", "bytes", @@ -3156,7 +3102,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.22.6", "winreg", ] @@ -3166,7 +3112,7 @@ version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a3eabf08ea9e4063f5531b8735e29344d9d6eaebaa314c58253f6c17fcdf2d" dependencies = [ - "k256 0.13.1", + "k256", "num", "once_cell", "revm-primitives", @@ -3188,27 +3134,16 @@ dependencies = [ "bytes", "derive_more", "enumn", - "fixed-hash 0.8.0", + "fixed-hash", "hashbrown 0.13.2", "hex", "hex-literal", - "primitive-types 0.12.1", + "primitive-types", "rlp", "ruint", "sha3 0.10.7", ] -[[package]] -name = "rfc6979" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" -dependencies = [ - "crypto-bigint 0.4.9", - "hmac 0.12.1", - "zeroize", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -3243,31 +3178,6 @@ dependencies = [ "digest 0.10.6", ] -[[package]] -name = "rkyv" -version = "0.7.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cec2b3485b07d96ddfd3134767b8a447b45ea4eb91448d0a35180ec0ffd5ed15" -dependencies = [ - "bytecheck", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eaedadc88b53e36dd32d940ed21ae4d850d5916f2581526921f553a72ac34c4" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "rlp" version = "0.5.2" @@ -3275,6 +3185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] @@ -3286,7 +3197,7 @@ checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -3296,7 +3207,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d470e29e933dac4101180fd6574971892315c414cf2961a192729089687cc9b" dependencies = [ "derive_more", - "primitive-types 0.12.1", + "primitive-types", "rlp", "ruint-macro", "rustc_version", @@ -3309,24 +3220,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62cc5760263ea229d367e7dff3c0cbf09e4797a125bd87059a6c095804f3b2d1" -[[package]] -name = "rust_decimal" -version = "1.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13cf35f7140155d02ba4ec3294373d513a3c7baa8364c162b030e33c61520a8" -dependencies = [ - "arrayvec", - "borsh", - "bytecheck", - "byteorder", - "bytes", - "num-traits", - "rand", - "rkyv", - "serde", - "serde_json", -] - [[package]] name = "rustc-hex" version = "2.1.0" @@ -3349,23 +3242,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" dependencies = [ "bitflags", - "errno", + "errno 0.2.8", + "io-lifetimes", + "libc", + "linux-raw-sys 0.1.4", + "windows-sys 0.45.0", +] + +[[package]] +name = "rustix" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b24138615de35e32031d041a09032ef3487a616d901ca4db224e7d557efae2" +dependencies = [ + "bitflags", + "errno 0.3.1", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", "windows-sys 0.45.0", ] [[package]] name = "rustls" -version = "0.20.8" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "c911ba11bc8433e811ce56fde130ccf32f5127cab0e0194e9c68c5a5b671791e" dependencies = [ "log", "ring", + "rustls-webpki", "sct", - "webpki", ] [[package]] @@ -3377,6 +3284,16 @@ dependencies = [ "base64 0.21.0", ] +[[package]] +name = "rustls-webpki" +version = "0.100.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.11" @@ -3391,9 +3308,9 @@ checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "salsa20" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0fbb5f676da676c260ba276a8f43a8dc67cf02d1438423aeb1c677a7212686" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" dependencies = [ "cipher", ] @@ -3407,6 +3324,30 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scale-info" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf" +dependencies = [ + "cfg-if", + "derive_more", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.107", +] + [[package]] name = "scopeguard" version = "1.1.0" @@ -3415,13 +3356,12 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scrypt" -version = "0.8.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73d6d7c6311ebdbd9184ad6c4447b2f36337e327bda107d3ba9e3c374f9d325" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" dependencies = [ "hmac 0.12.1", - "password-hash 0.3.2", - "pbkdf2 0.10.1", + "pbkdf2 0.11.0", "salsa20", "sha2 0.10.6", ] @@ -3436,35 +3376,16 @@ dependencies = [ "untrusted", ] -[[package]] -name = "seahash" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" - -[[package]] -name = "sec1" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" -dependencies = [ - "base16ct 0.1.1", - "der 0.6.1", - "generic-array 0.14.6", - "pkcs8", - "subtle", - "zeroize", -] - [[package]] name = "sec1" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" dependencies = [ - "base16ct 0.2.0", - "der 0.7.5", - "generic-array 0.14.6", + "base16ct", + "der", + "generic-array 0.14.7", + "pkcs8", "subtle", "zeroize", ] @@ -3496,6 +3417,12 @@ dependencies = [ "serde", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + [[package]] name = "send_wrapper" version = "0.6.0" @@ -3511,16 +3438,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-aux" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a77223b653fa95f3f9864f3eb25b93e4ed170687eb42d85b6b98af21d5e1de" -dependencies = [ - "serde", - "serde_json", -] - [[package]] name = "serde_derive" version = "1.0.152" @@ -3529,7 +3446,7 @@ checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -3543,6 +3460,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93107647184f6027e3b7dcb2e11034cf95ffa1e3a682c67951963ac69c1c007d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3574,32 +3500,20 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] -name = "sha-1" -version = "0.10.1" +name = "sha1" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", "digest 0.10.6", ] -[[package]] -name = "sha2" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" -dependencies = [ - "block-buffer 0.7.3", - "digest 0.8.1", - "fake-simd", - "opaque-debug 0.2.3", -] - [[package]] name = "sha2" version = "0.9.9" @@ -3610,7 +3524,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -3631,7 +3545,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b64dcef59ed4290b9fb562b53df07f564690d6539e8ecdd4728cf392477530bc" dependencies = [ "block-buffer 0.3.3", - "byte-tools 0.2.0", + "byte-tools", "digest 0.7.6", "keccak", ] @@ -3645,7 +3559,7 @@ dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", "keccak", - "opaque-debug 0.3.0", + "opaque-debug", ] [[package]] @@ -3658,16 +3572,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.6", - "rand_core", -] - [[package]] name = "signature" version = "2.1.0" @@ -3719,9 +3623,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -3729,14 +3633,15 @@ dependencies = [ [[package]] name = "solang-parser" -version = "0.1.16" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f68b8280e3f354d5646218319bcee4febe42833cef5ebf653cfc49d0a94409" +checksum = "4a94494913728908efa7a25a2dd2e4f037e714897985c24273c40596638ed909" dependencies = [ "itertools", "lalrpop", "lalrpop-util", "phf", + "thiserror", "unicode-xid", ] @@ -3748,12 +3653,12 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.6.1", + "der", ] [[package]] @@ -3770,8 +3675,8 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.1", - "phf_shared", + "parking_lot", + "phf_shared 0.10.0", "precomputed-hash", ] @@ -3800,7 +3705,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 1.0.107", ] [[package]] @@ -3822,6 +3727,26 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "svm-rs" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a04fc4f5cd35c700153b233f5575ccb3237e0f941fa5049d9e98254d10bf2fe" +dependencies = [ + "fs2", + "hex", + "home", + "once_cell", + "reqwest", + "semver", + "serde", + "serde_json", + "sha2 0.10.6", + "thiserror", + "url", + "zip", +] + [[package]] name = "syn" version = "1.0.107" @@ -3833,12 +3758,36 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tap" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +[[package]] +name = "tempfile" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +dependencies = [ + "cfg-if", + "fastrand", + "redox_syscall 0.3.5", + "rustix 0.37.3", + "windows-sys 0.45.0", +] + [[package]] name = "term" version = "0.7.0" @@ -3886,7 +3835,7 @@ dependencies = [ "strum", "strum_macros", "thiserror", - "toml", + "toml 0.5.11", "urlencoding", "yaml-rust", "zkevm-circuits", @@ -3915,9 +3864,25 @@ checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", +] + +[[package]] +name = "time" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" +dependencies = [ + "serde", + "time-core", ] +[[package]] +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -3944,49 +3909,47 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.18", ] [[package]] name = "tokio-rustls" -version = "0.23.4" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" +checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" dependencies = [ "rustls", "tokio", - "webpki", ] [[package]] name = "tokio-tungstenite" -version = "0.17.2" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" +checksum = "ec509ac96e9a0c43427c74f003127d953a265737636129424288d27cb5c4b12c" dependencies = [ "futures-util", "log", @@ -3994,8 +3957,7 @@ dependencies = [ "tokio", "tokio-rustls", "tungstenite", - "webpki", - "webpki-roots", + "webpki-roots 0.23.1", ] [[package]] @@ -4021,12 +3983,33 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6135d499e69981f9ff0ef2167955a5333c35e36f6937d382974566b3d5b94ec" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.2", + "toml_edit 0.19.10", +] + [[package]] name = "toml_datetime" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" +[[package]] +name = "toml_datetime" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a76a9312f5ba4c2dec6b9161fdf25d87ad8a09256ccea5a556fef03c706a10f" +dependencies = [ + "serde", +] + [[package]] name = "toml_edit" version = "0.18.1" @@ -4035,7 +4018,20 @@ checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" dependencies = [ "indexmap", "nom8", - "toml_datetime", + "toml_datetime 0.5.1", +] + +[[package]] +name = "toml_edit" +version = "0.19.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380d56e8670370eee6566b0bfd4265f65b3f432e8c6d85623f728d4fa31f739" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime 0.6.2", + "winnow", ] [[package]] @@ -4064,7 +4060,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", ] [[package]] @@ -4094,19 +4090,19 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "tungstenite" -version = "0.17.3" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" +checksum = "15fba1a6d6bb030745759a9a2a588bfe8490fc8b4751a277db3a0be1c9ebbf67" dependencies = [ - "base64 0.13.1", "byteorder", "bytes", + "data-encoding", "http", "httparse", "log", "rand", "rustls", - "sha-1", + "sha1", "thiserror", "url", "utf-8", @@ -4262,7 +4258,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-shared", ] @@ -4296,7 +4292,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.107", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4307,21 +4303,6 @@ version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" -[[package]] -name = "wasm-timer" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" -dependencies = [ - "futures", - "js-sys", - "parking_lot 0.11.2", - "pin-utils", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.61" @@ -4351,6 +4332,15 @@ dependencies = [ "webpki", ] +[[package]] +name = "webpki-roots" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" +dependencies = [ + "rustls-webpki", +] + [[package]] name = "winapi" version = "0.3.9" @@ -4529,6 +4519,15 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "winnow" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +dependencies = [ + "memchr", +] + [[package]] name = "winreg" version = "0.10.1" @@ -4550,7 +4549,7 @@ dependencies = [ "log", "pharos", "rustc_version", - "send_wrapper", + "send_wrapper 0.6.0", "thiserror", "wasm-bindgen", "wasm-bindgen-futures", @@ -4587,6 +4586,26 @@ version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac 0.12.1", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + [[package]] name = "zkevm-circuits" version = "0.1.0" @@ -4622,3 +4641,33 @@ dependencies = [ "strum", "strum_macros", ] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.8+zstd.1.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" +dependencies = [ + "cc", + "libc", + "pkg-config", +] diff --git a/eth-types/Cargo.toml b/eth-types/Cargo.toml index 8846e4699e..c0f6b768e7 100644 --- a/eth-types/Cargo.toml +++ b/eth-types/Cargo.toml @@ -6,10 +6,10 @@ authors = ["The appliedzkp team"] license = "MIT OR Apache-2.0" [dependencies] -ethers-core = "0.17.0" -ethers-signers = "0.17.0" -ethers-providers = "0.17.0" -ethers = { version = "0.17.0", features = ["ethers-solc"] } +ethers-core = "2.0.7" +ethers-signers = "2.0.7" +ethers-providers = "2.0.7" +ethers = { version = "2.0.7", features = ["ethers-solc"] } hex = "0.4" lazy_static = "1.4" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } diff --git a/eth-types/src/geth_types.rs b/eth-types/src/geth_types.rs index a22c393594..91b160984d 100644 --- a/eth-types/src/geth_types.rs +++ b/eth-types/src/geth_types.rs @@ -311,7 +311,9 @@ impl GethData { assert_eq!(Word::from(wallet.chain_id()), self.chain_id); let geth_tx: Transaction = (&*tx).into(); let req: TransactionRequest = (&geth_tx).into(); - let sig = wallet.sign_transaction_sync(&req.chain_id(self.chain_id.as_u64()).into()); + let sig = wallet + .sign_transaction_sync(&req.chain_id(self.chain_id.as_u64()).into()) + .unwrap(); tx.v = U64::from(sig.v); tx.r = sig.r; tx.s = sig.s; diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs index 2b6eed6947..7c22969165 100644 --- a/eth-types/src/third_party.rs +++ b/eth-types/src/third_party.rs @@ -1,4 +1,4 @@ pub mod eth_core; +pub mod eth_ethers; pub mod eth_providers; pub mod eth_signer; -pub mod eth_ethers; diff --git a/eth-types/src/third_party/eth_core.rs b/eth-types/src/third_party/eth_core.rs index 028895916e..3c5c97e391 100644 --- a/eth-types/src/third_party/eth_core.rs +++ b/eth-types/src/third_party/eth_core.rs @@ -14,4 +14,4 @@ pub use ethers_core::{ TransactionRequest, H160, H256, H64, I256, U256, U64, }, utils::{get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address}, -}; \ No newline at end of file +}; diff --git a/mock/src/block.rs b/mock/src/block.rs index a8bc01f9c8..af97d24974 100644 --- a/mock/src/block.rs +++ b/mock/src/block.rs @@ -99,6 +99,8 @@ impl From for Block { nonce: Some(mock.nonce), base_fee_per_gas: Some(mock.base_fee_per_gas), other: OtherFields::default(), + withdrawals: None, + withdrawals_root: None, } } } @@ -129,6 +131,8 @@ impl From for Block<()> { nonce: Some(mock.nonce), base_fee_per_gas: Some(mock.base_fee_per_gas), other: OtherFields::default(), + withdrawals: None, + withdrawals_root: None, } } } diff --git a/mock/src/transaction.rs b/mock/src/transaction.rs index 0c1cbf781c..fb2b18f38e 100644 --- a/mock/src/transaction.rs +++ b/mock/src/transaction.rs @@ -322,7 +322,8 @@ impl MockTransaction { .from .as_wallet() .with_chain_id(self.chain_id.low_u64()) - .sign_transaction_sync(&tx.into()); + .sign_transaction_sync(&tx.into()) + .unwrap(); // Set sig parameters self.sig_data((sig.v, sig.r, sig.s)); } diff --git a/testool/src/statetest/executor.rs b/testool/src/statetest/executor.rs index 79008207ac..9f4981bf9a 100644 --- a/testool/src/statetest/executor.rs +++ b/testool/src/statetest/executor.rs @@ -119,7 +119,7 @@ fn into_traceconfig(st: StateTest) -> (String, TraceConfig, StateTestResult) { } let tx: TypedTransaction = tx.into(); - let sig = wallet.sign_transaction_sync(&tx); + let sig = wallet.sign_transaction_sync(&tx).unwrap(); ( st.id, @@ -228,7 +228,7 @@ pub fn run_test( ..eth_types::Block::default() }; - let wallet: LocalWallet = SigningKey::from_bytes(&st.secret_key).unwrap().into(); + let wallet: LocalWallet = SigningKey::from_slice(&st.secret_key).unwrap().into(); let mut wallets = HashMap::new(); wallets.insert( wallet.address(), diff --git a/testool/src/statetest/json.rs b/testool/src/statetest/json.rs index 5f804709d7..04f3284b13 100644 --- a/testool/src/statetest/json.rs +++ b/testool/src/statetest/json.rs @@ -110,7 +110,7 @@ impl<'a> JsonStateTestBuilder<'a> { let to = parse::parse_to_address(&test.transaction.to)?; let secret_key = parse::parse_bytes(&test.transaction.secret_key)?; - let from = secret_key_to_address(&SigningKey::from_bytes(&secret_key.to_vec())?); + let from = secret_key_to_address(&SigningKey::from_slice(&secret_key.to_vec())?); let nonce = parse::parse_u64(&test.transaction.nonce)?; let gas_price = parse::parse_u256(&test.transaction.gas_price)?; diff --git a/testool/src/statetest/spec.rs b/testool/src/statetest/spec.rs index 42533577e6..4a84fdeb80 100644 --- a/testool/src/statetest/spec.rs +++ b/testool/src/statetest/spec.rs @@ -199,7 +199,7 @@ impl StateTest { let value = parse_u256(tx.next().unwrap_or("0"))?; let gas_limit = u64::from_str(tx.next().unwrap_or("10000000"))?; let secret_key = Bytes::from(&[1u8; 32]); - let from = secret_key_to_address(&SigningKey::from_bytes(&secret_key.to_vec())?); + let from = secret_key_to_address(&SigningKey::from_slice(&secret_key.to_vec())?); let mut pre = HashMap::::new(); diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index 2812b0f711..fe082ba77d 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -110,7 +110,7 @@ impl<'a> YamlStateTestBuilder<'a> { let nonce = Self::parse_u64(&yaml_transaction["nonce"])?; let to = Self::parse_to_address(&yaml_transaction["to"])?; let secret_key = Self::parse_bytes(&yaml_transaction["secretKey"])?; - let from = secret_key_to_address(&SigningKey::from_bytes(&secret_key.to_vec())?); + let from = secret_key_to_address(&SigningKey::from_slice(&secret_key.to_vec())?); // parse expects (account states before executing the transaction) let mut expects = Vec::new(); From 71e3410f584f9e31a32cae257c4690a2720a00ec Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sat, 3 Jun 2023 23:18:43 +0900 Subject: [PATCH 17/20] fmt --- testool/src/statetest/yaml.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index fe082ba77d..c90468a0f2 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -5,7 +5,7 @@ use super::{ use crate::{utils::MainnetFork, Compiler}; use anyhow::{bail, Context, Result}; use eth_types::{ - eth_core::{SigningKey, secret_key_to_address}, + eth_core::{secret_key_to_address, SigningKey}, geth_types::Account, Address, Bytes, H256, U256, }; From 89adb6ae25caa2dd2addd2a80cec87282fad92b8 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Sun, 4 Jun 2023 00:59:03 +0900 Subject: [PATCH 18/20] some cleanup --- eth-types/src/third_party/eth_core.rs | 10 +++++++--- eth-types/src/third_party/eth_ethers.rs | 12 ------------ eth-types/src/third_party/eth_providers.rs | 4 +++- eth-types/src/third_party/eth_signer.rs | 2 +- integration-tests/src/bin/gen_blockchain_data.rs | 13 ++++++++----- integration-tests/src/lib.rs | 8 ++++---- 6 files changed, 23 insertions(+), 26 deletions(-) diff --git a/eth-types/src/third_party/eth_core.rs b/eth-types/src/third_party/eth_core.rs index 3c5c97e391..66b2d91ae0 100644 --- a/eth-types/src/third_party/eth_core.rs +++ b/eth-types/src/third_party/eth_core.rs @@ -1,8 +1,9 @@ //! We reexport ethers_core functions here for finer boundary control. pub use ethers_core::{ abi::{ + self, ethereum_types::{BigEndianHash, U512}, - Function, Param, ParamType, StateMutability, Token, + Contract, Function, Param, ParamType, StateMutability, Token, Tokenize, }, k256::ecdsa::SigningKey, rand::{CryptoRng, RngCore}, @@ -11,7 +12,10 @@ pub use ethers_core::{ eip2718::TypedTransaction, eip2930::AccessList, response, response::Transaction, }, Address, Block, BlockNumber, Bloom, Bytes, NameOrAddress, OtherFields, Signature, - TransactionRequest, H160, H256, H64, I256, U256, U64, + TransactionReceipt, TransactionRequest, H160, H256, H64, I256, U256, U64, + }, + utils::{ + get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address, + WEI_IN_ETHER, }, - utils::{get_contract_address, get_create2_address, rlp::RlpStream, secret_key_to_address}, }; diff --git a/eth-types/src/third_party/eth_ethers.rs b/eth-types/src/third_party/eth_ethers.rs index b22a3be136..c75a672693 100644 --- a/eth-types/src/third_party/eth_ethers.rs +++ b/eth-types/src/third_party/eth_ethers.rs @@ -1,18 +1,6 @@ //! re-export external crate ethers pub use ethers::{ - abi, - abi::Tokenize, contract::{builders::ContractCall, Contract, ContractFactory}, - core::{ - k256::ecdsa::SigningKey, - types::{ - transaction::eip2718::TypedTransaction, Address, Bytes, TransactionReceipt, - TransactionRequest, U256, U64, - }, - utils::WEI_IN_ETHER, - }, middleware::SignerMiddleware, - providers::{Http, Middleware, PendingTransaction, Provider}, - signers::{coins_bip39::English, MnemonicBuilder, Signer, Wallet}, solc::Solc, }; diff --git a/eth-types/src/third_party/eth_providers.rs b/eth-types/src/third_party/eth_providers.rs index 98c6003659..6b17bfb004 100644 --- a/eth-types/src/third_party/eth_providers.rs +++ b/eth-types/src/third_party/eth_providers.rs @@ -1,2 +1,4 @@ //! re-export external crate ethers_providers -pub use ethers_providers::{JsonRpcClient, ProviderError}; +pub use ethers_providers::{ + Http, JsonRpcClient, Middleware, PendingTransaction, Provider, ProviderError, +}; diff --git a/eth-types/src/third_party/eth_signer.rs b/eth-types/src/third_party/eth_signer.rs index 09dcee8a21..73a9d469e3 100644 --- a/eth-types/src/third_party/eth_signer.rs +++ b/eth-types/src/third_party/eth_signer.rs @@ -1,3 +1,3 @@ //! Use exteral crate ethers_signers -pub use ethers_signers::{LocalWallet, Signer}; +pub use ethers_signers::{coins_bip39::English, LocalWallet, MnemonicBuilder, Signer, Wallet}; diff --git a/integration-tests/src/bin/gen_blockchain_data.rs b/integration-tests/src/bin/gen_blockchain_data.rs index dd68c5b0ad..51b162253b 100644 --- a/integration-tests/src/bin/gen_blockchain_data.rs +++ b/integration-tests/src/bin/gen_blockchain_data.rs @@ -1,8 +1,11 @@ -use eth_types::eth_ethers::{ - abi::{self, Tokenize}, - Address, Contract, ContractCall, ContractFactory, Middleware, PendingTransaction, Signer, - SignerMiddleware, Solc, TransactionReceipt, TransactionRequest, TypedTransaction, U256, U64, - WEI_IN_ETHER, +use eth_types::{ + eth_core::{ + abi, Address, Tokenize, TransactionReceipt, TransactionRequest, TypedTransaction, U256, + U64, WEI_IN_ETHER, + }, + eth_ethers::{Contract, ContractCall, ContractFactory, SignerMiddleware, Solc}, + eth_providers::{Middleware, PendingTransaction}, + eth_signer::Signer, }; use integration_tests::{ get_client, get_provider, get_wallet, log_init, CompiledContract, GenDataOutput, CONTRACTS, diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 4db404db24..ce84b769bc 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -6,9 +6,9 @@ use bus_mapping::rpc::GethClient; use env_logger::Env; use eth_types::{ - eth_ethers::{ - abi, Bytes, English, Http, MnemonicBuilder, Provider, Signer, SigningKey, Wallet, - }, + eth_core::{Bytes, Contract, SigningKey}, + eth_providers::{Http, Provider}, + eth_signer::{English, MnemonicBuilder, Signer, Wallet}, Address, }; use lazy_static::lazy_static; @@ -131,7 +131,7 @@ pub struct CompiledContract { /// Contract name pub name: String, /// ABI - pub abi: abi::Contract, + pub abi: Contract, /// Bytecode pub bin: Bytes, /// Runtime Bytecode From 791f7816593b874d79da6bde2a2fe8b320c09f72 Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Mon, 5 Jun 2023 10:03:58 +0900 Subject: [PATCH 19/20] no boundary control for ethers and provider --- Cargo.lock | 4 ++-- bus-mapping/Cargo.toml | 1 + bus-mapping/src/circuit_input_builder.rs | 5 ++--- bus-mapping/src/error.rs | 5 ++--- bus-mapping/src/rpc.rs | 2 +- eth-types/Cargo.toml | 2 -- eth-types/src/lib.rs | 3 +-- eth-types/src/third_party.rs | 4 +--- eth-types/src/third_party/eth_ethers.rs | 6 ------ eth-types/src/third_party/eth_providers.rs | 4 ---- integration-tests/Cargo.toml | 1 + .../src/bin/gen_blockchain_data.rs | 20 ++++++++++++------- integration-tests/src/lib.rs | 15 ++++++++------ 13 files changed, 33 insertions(+), 39 deletions(-) delete mode 100644 eth-types/src/third_party/eth_ethers.rs delete mode 100644 eth-types/src/third_party/eth_providers.rs diff --git a/Cargo.lock b/Cargo.lock index 578a3cbb9c..9e3aa4d376 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -304,6 +304,7 @@ name = "bus-mapping" version = "0.1.0" dependencies = [ "eth-types", + "ethers-providers", "gadgets", "halo2_proofs", "hex", @@ -1056,9 +1057,7 @@ dependencies = [ name = "eth-types" version = "0.1.0" dependencies = [ - "ethers", "ethers-core", - "ethers-providers", "ethers-signers", "halo2_proofs", "hex", @@ -2050,6 +2049,7 @@ dependencies = [ "bus-mapping", "env_logger", "eth-types", + "ethers", "halo2_proofs", "lazy_static", "log", diff --git a/bus-mapping/Cargo.toml b/bus-mapping/Cargo.toml index f14829b878..a1edc840bc 100644 --- a/bus-mapping/Cargo.toml +++ b/bus-mapping/Cargo.toml @@ -10,6 +10,7 @@ eth-types = { path = "../eth-types" } gadgets = { path = "../gadgets" } mock = { path = "../mock", optional = true } +ethers-providers = "2.0.7" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } itertools = "0.10" lazy_static = "1.4" diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 3673837647..889771bb99 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -23,12 +23,11 @@ pub use block::{Block, BlockContext}; pub use call::{Call, CallContext, CallKind}; use core::fmt::Debug; use eth_types::{ - self, - eth_providers::JsonRpcClient, - geth_types, + self, geth_types, sign_types::{pk_bytes_le, pk_bytes_swap_endianness, SignData}, Address, GethExecStep, GethExecTrace, ToWord, Word, }; +use ethers_providers::JsonRpcClient; pub use execution::{ CopyDataType, CopyEvent, CopyStep, ExecState, ExecStep, ExpEvent, ExpStep, NumberOrHash, }; diff --git a/bus-mapping/src/error.rs b/bus-mapping/src/error.rs index 060671e2d0..dca1721456 100644 --- a/bus-mapping/src/error.rs +++ b/bus-mapping/src/error.rs @@ -1,9 +1,8 @@ //! Error module for the bus-mapping crate use core::fmt::{Display, Formatter, Result as FmtResult}; -use eth_types::{ - eth_providers::ProviderError, evm_types::OpcodeId, Address, GethExecStep, Word, H256, -}; +use eth_types::{evm_types::OpcodeId, Address, GethExecStep, Word, H256}; +use ethers_providers::ProviderError; use std::error::Error as StdError; use crate::geth_errors::{ diff --git a/bus-mapping/src/rpc.rs b/bus-mapping/src/rpc.rs index 7f0a88f3be..04bd90527d 100644 --- a/bus-mapping/src/rpc.rs +++ b/bus-mapping/src/rpc.rs @@ -4,10 +4,10 @@ use crate::Error; use eth_types::{ eth_core::{BlockNumber, Transaction}, - eth_providers::JsonRpcClient, Address, Block, Bytes, EIP1186ProofResponse, GethExecTrace, Hash, ResultGethExecTraces, Word, U64, }; +use ethers_providers::JsonRpcClient; use serde::Serialize; /// Serialize a type. diff --git a/eth-types/Cargo.toml b/eth-types/Cargo.toml index c0f6b768e7..d1685a3db5 100644 --- a/eth-types/Cargo.toml +++ b/eth-types/Cargo.toml @@ -8,8 +8,6 @@ license = "MIT OR Apache-2.0" [dependencies] ethers-core = "2.0.7" ethers-signers = "2.0.7" -ethers-providers = "2.0.7" -ethers = { version = "2.0.7", features = ["ethers-solc"] } hex = "0.4" lazy_static = "1.4" halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" } diff --git a/eth-types/src/lib.rs b/eth-types/src/lib.rs index 0bc47d5f6f..6cb34e2ac5 100644 --- a/eth-types/src/lib.rs +++ b/eth-types/src/lib.rs @@ -24,8 +24,7 @@ pub use keccak::{keccak256, Keccak}; mod third_party; -#[cfg(feature = "ethers-core")] -pub use third_party::{eth_core, eth_ethers, eth_providers, eth_signer}; +pub use third_party::{eth_core, eth_signer}; pub use eth_core::{Address, Block, Bytes, H256, H64, U256, U64}; diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs index 7c22969165..18115ac6dd 100644 --- a/eth-types/src/third_party.rs +++ b/eth-types/src/third_party.rs @@ -1,4 +1,2 @@ pub mod eth_core; -pub mod eth_ethers; -pub mod eth_providers; -pub mod eth_signer; +pub mod eth_signer; \ No newline at end of file diff --git a/eth-types/src/third_party/eth_ethers.rs b/eth-types/src/third_party/eth_ethers.rs deleted file mode 100644 index c75a672693..0000000000 --- a/eth-types/src/third_party/eth_ethers.rs +++ /dev/null @@ -1,6 +0,0 @@ -//! re-export external crate ethers -pub use ethers::{ - contract::{builders::ContractCall, Contract, ContractFactory}, - middleware::SignerMiddleware, - solc::Solc, -}; diff --git a/eth-types/src/third_party/eth_providers.rs b/eth-types/src/third_party/eth_providers.rs deleted file mode 100644 index 6b17bfb004..0000000000 --- a/eth-types/src/third_party/eth_providers.rs +++ /dev/null @@ -1,4 +0,0 @@ -//! re-export external crate ethers_providers -pub use ethers_providers::{ - Http, JsonRpcClient, Middleware, PendingTransaction, Provider, ProviderError, -}; diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 53b19aa31f..6c3ab020d7 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -8,6 +8,7 @@ license = "MIT OR Apache-2.0" [dependencies] lazy_static = "1.4" +ethers = { version = "2.0.7", features = ["ethers-solc"] } serde_json = "1.0.66" serde = { version = "1.0.130", features = ["derive"] } bus-mapping = { path = "../bus-mapping" , features = ["test"] } diff --git a/integration-tests/src/bin/gen_blockchain_data.rs b/integration-tests/src/bin/gen_blockchain_data.rs index 51b162253b..680b0ab48d 100644 --- a/integration-tests/src/bin/gen_blockchain_data.rs +++ b/integration-tests/src/bin/gen_blockchain_data.rs @@ -1,11 +1,17 @@ -use eth_types::{ - eth_core::{ - abi, Address, Tokenize, TransactionReceipt, TransactionRequest, TypedTransaction, U256, - U64, WEI_IN_ETHER, +use ethers::{ + abi::{self, Tokenize}, + contract::{builders::ContractCall, Contract, ContractFactory}, + core::{ + types::{ + transaction::eip2718::TypedTransaction, Address, TransactionReceipt, + TransactionRequest, U256, U64, + }, + utils::WEI_IN_ETHER, }, - eth_ethers::{Contract, ContractCall, ContractFactory, SignerMiddleware, Solc}, - eth_providers::{Middleware, PendingTransaction}, - eth_signer::Signer, + middleware::SignerMiddleware, + providers::{Middleware, PendingTransaction}, + signers::Signer, + solc::Solc, }; use integration_tests::{ get_client, get_provider, get_wallet, log_init, CompiledContract, GenDataOutput, CONTRACTS, diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index ce84b769bc..f267cd42c8 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -5,11 +5,14 @@ use bus_mapping::rpc::GethClient; use env_logger::Env; -use eth_types::{ - eth_core::{Bytes, Contract, SigningKey}, - eth_providers::{Http, Provider}, - eth_signer::{English, MnemonicBuilder, Signer, Wallet}, - Address, +use ethers::{ + abi, + core::{ + k256::ecdsa::SigningKey, + types::{Address, Bytes}, + }, + providers::{Http, Provider}, + signers::{coins_bip39::English, MnemonicBuilder, Signer, Wallet}, }; use lazy_static::lazy_static; use serde::{Deserialize, Serialize}; @@ -131,7 +134,7 @@ pub struct CompiledContract { /// Contract name pub name: String, /// ABI - pub abi: Contract, + pub abi: abi::Contract, /// Bytecode pub bin: Bytes, /// Runtime Bytecode From 890013d84d54fe6e26fea92a52bb186376ce59df Mon Sep 17 00:00:00 2001 From: ChihChengLiang Date: Mon, 5 Jun 2023 10:09:36 +0900 Subject: [PATCH 20/20] fix test, clippy, fmt --- .../src/circuit_input_builder/input_state_ref.rs | 2 +- bus-mapping/src/state_db.rs | 2 +- circuit-benchmarks/src/pi_circuit.rs | 2 +- eth-types/src/third_party.rs | 2 +- testool/src/statetest/json.rs | 2 +- testool/src/statetest/spec.rs | 2 +- testool/src/statetest/yaml.rs | 2 +- zkevm-circuits/src/evm_circuit/execution/begin_tx.rs | 8 ++++---- .../src/evm_circuit/execution/error_oog_constant.rs | 10 +++++----- .../src/evm_circuit/execution/error_oog_log.rs | 10 +++++----- zkevm-circuits/tests/prover_error.rs | 3 ++- 11 files changed, 23 insertions(+), 22 deletions(-) diff --git a/bus-mapping/src/circuit_input_builder/input_state_ref.rs b/bus-mapping/src/circuit_input_builder/input_state_ref.rs index 02d48878e4..91fa47cd99 100644 --- a/bus-mapping/src/circuit_input_builder/input_state_ref.rs +++ b/bus-mapping/src/circuit_input_builder/input_state_ref.rs @@ -686,7 +686,7 @@ impl<'a> CircuitInputStateRef<'a> { let init_code = get_create_init_code(call_ctx, step)?.to_vec(); Ok(get_create2_address( self.call()?.address, - salt.to_be_bytes().to_vec(), + salt.to_be_bytes(), init_code, )) } diff --git a/bus-mapping/src/state_db.rs b/bus-mapping/src/state_db.rs index d0f833d706..cc0dd0c4a8 100644 --- a/bus-mapping/src/state_db.rs +++ b/bus-mapping/src/state_db.rs @@ -72,7 +72,7 @@ impl From for Account { nonce: account.nonce.as_u64(), balance: account.balance, storage: account.storage.clone(), - code_hash: CodeDB::hash(&account.code.to_vec()), + code_hash: CodeDB::hash(&account.code), } } } diff --git a/circuit-benchmarks/src/pi_circuit.rs b/circuit-benchmarks/src/pi_circuit.rs index eb1295e129..59d2451047 100644 --- a/circuit-benchmarks/src/pi_circuit.rs +++ b/circuit-benchmarks/src/pi_circuit.rs @@ -127,7 +127,7 @@ mod tests { let n_tx = max_txs; for _ in 0..n_tx { - let eth_tx = eth_types::Transaction::from(mock::CORRECT_MOCK_TXS[0].clone()); + let eth_tx = eth_types::eth_core::Transaction::from(mock::CORRECT_MOCK_TXS[0].clone()); public_data.transactions.push(eth_tx); } public_data diff --git a/eth-types/src/third_party.rs b/eth-types/src/third_party.rs index 18115ac6dd..59b70ca6c3 100644 --- a/eth-types/src/third_party.rs +++ b/eth-types/src/third_party.rs @@ -1,2 +1,2 @@ pub mod eth_core; -pub mod eth_signer; \ No newline at end of file +pub mod eth_signer; diff --git a/testool/src/statetest/json.rs b/testool/src/statetest/json.rs index 04f3284b13..f4f89a1301 100644 --- a/testool/src/statetest/json.rs +++ b/testool/src/statetest/json.rs @@ -110,7 +110,7 @@ impl<'a> JsonStateTestBuilder<'a> { let to = parse::parse_to_address(&test.transaction.to)?; let secret_key = parse::parse_bytes(&test.transaction.secret_key)?; - let from = secret_key_to_address(&SigningKey::from_slice(&secret_key.to_vec())?); + let from = secret_key_to_address(&SigningKey::from_slice(&secret_key)?); let nonce = parse::parse_u64(&test.transaction.nonce)?; let gas_price = parse::parse_u256(&test.transaction.gas_price)?; diff --git a/testool/src/statetest/spec.rs b/testool/src/statetest/spec.rs index 4a84fdeb80..59060bdb19 100644 --- a/testool/src/statetest/spec.rs +++ b/testool/src/statetest/spec.rs @@ -199,7 +199,7 @@ impl StateTest { let value = parse_u256(tx.next().unwrap_or("0"))?; let gas_limit = u64::from_str(tx.next().unwrap_or("10000000"))?; let secret_key = Bytes::from(&[1u8; 32]); - let from = secret_key_to_address(&SigningKey::from_slice(&secret_key.to_vec())?); + let from = secret_key_to_address(&SigningKey::from_slice(&secret_key)?); let mut pre = HashMap::::new(); diff --git a/testool/src/statetest/yaml.rs b/testool/src/statetest/yaml.rs index c90468a0f2..abe2e79aab 100644 --- a/testool/src/statetest/yaml.rs +++ b/testool/src/statetest/yaml.rs @@ -110,7 +110,7 @@ impl<'a> YamlStateTestBuilder<'a> { let nonce = Self::parse_u64(&yaml_transaction["nonce"])?; let to = Self::parse_to_address(&yaml_transaction["to"])?; let secret_key = Self::parse_bytes(&yaml_transaction["secretKey"])?; - let from = secret_key_to_address(&SigningKey::from_slice(&secret_key.to_vec())?); + let from = secret_key_to_address(&SigningKey::from_slice(&secret_key)?); // parse expects (account states before executing the transaction) let mut expects = Vec::new(); diff --git a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs index 579429cfd3..6362ce425a 100644 --- a/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs +++ b/zkevm-circuits/src/evm_circuit/execution/begin_tx.rs @@ -630,7 +630,7 @@ mod test { use crate::{evm_circuit::test::rand_bytes, test_util::CircuitTestBuilder}; use bus_mapping::evm::OpcodeId; - use eth_types::{self, bytecode, evm_types::GasCost, word, Bytecode, Word}; + use eth_types::{self, bytecode, eth_core, evm_types::GasCost, word, Bytecode, Word}; use mock::{eth, gwei, MockTransaction, TestContext, MOCK_ACCOUNTS}; @@ -661,7 +661,7 @@ mod test { } } - fn test_ok(tx: eth_types::Transaction, code: Option) { + fn test_ok(tx: eth_types::eth_core::Transaction, code: Option) { // Get the execution steps from the external tracer let ctx = TestContext::<2, 1>::new( None, @@ -688,7 +688,7 @@ mod test { CircuitTestBuilder::new_from_test_ctx(ctx).run(); } - fn mock_tx(value: Word, gas_price: Word, calldata: Vec) -> eth_types::Transaction { + fn mock_tx(value: Word, gas_price: Word, calldata: Vec) -> eth_core::Transaction { let from = MOCK_ACCOUNTS[1]; let to = MOCK_ACCOUNTS[0]; @@ -701,7 +701,7 @@ mod test { .input(calldata.into()) .build(); - eth_types::Transaction::from(mock_transaction) + eth_core::Transaction::from(mock_transaction) } #[test] diff --git a/zkevm-circuits/src/evm_circuit/execution/error_oog_constant.rs b/zkevm-circuits/src/evm_circuit/execution/error_oog_constant.rs index 90bfd06163..652a11c800 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_oog_constant.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_oog_constant.rs @@ -93,8 +93,8 @@ mod test { use crate::test_util::CircuitTestBuilder; use bus_mapping::evm::OpcodeId; use eth_types::{ - self, address, bytecode, bytecode::Bytecode, evm_types::GasCost, geth_types::Account, - Address, ToWord, Word, U64, + self, address, bytecode, bytecode::Bytecode, eth_core, evm_types::GasCost, + geth_types::Account, Address, ToWord, Word, U64, }; use mock::{ @@ -113,7 +113,7 @@ mod test { ) } - fn test_oog_constant(tx: eth_types::Transaction, is_success: bool) { + fn test_oog_constant(tx: eth_core::Transaction, is_success: bool) { let code = if is_success { bytecode! { PUSH1(0) @@ -147,7 +147,7 @@ mod test { CircuitTestBuilder::new_from_test_ctx(ctx).run(); } - fn mock_tx(value: Word, gas_price: Word, calldata: Vec) -> eth_types::Transaction { + fn mock_tx(value: Word, gas_price: Word, calldata: Vec) -> eth_core::Transaction { let from = MOCK_ACCOUNTS[1]; let to = MOCK_ACCOUNTS[0]; @@ -159,7 +159,7 @@ mod test { .gas_price(gas_price) .input(calldata.into()) .build(); - eth_types::Transaction::from(mock_transaction) + eth_core::Transaction::from(mock_transaction) } #[test] diff --git a/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs b/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs index 0892ce5958..58dee35bee 100644 --- a/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs +++ b/zkevm-circuits/src/evm_circuit/execution/error_oog_log.rs @@ -144,8 +144,8 @@ mod test { use bus_mapping::evm::OpcodeId; use eth_types::{ - self, address, bytecode, bytecode::Bytecode, evm_types::GasCost, geth_types::Account, - Address, ToWord, Word, U64, + self, address, bytecode, bytecode::Bytecode, eth_core, evm_types::GasCost, + geth_types::Account, Address, ToWord, Word, U64, }; use mock::{ @@ -163,7 +163,7 @@ mod test { ) } - fn test_oog_log(tx: eth_types::Transaction) { + fn test_oog_log(tx: eth_core::Transaction) { let code = bytecode! { PUSH1(0) PUSH1(0) @@ -191,10 +191,10 @@ mod test { CircuitTestBuilder::new_from_test_ctx(ctx).run(); } - fn mock_tx(value: Word, gas_price: Word, calldata: Vec) -> eth_types::Transaction { + fn mock_tx(value: Word, gas_price: Word, calldata: Vec) -> eth_core::Transaction { let from = MOCK_ACCOUNTS[1]; let to = MOCK_ACCOUNTS[0]; - eth_types::Transaction { + eth_core::Transaction { from, to: Some(to), value, diff --git a/zkevm-circuits/tests/prover_error.rs b/zkevm-circuits/tests/prover_error.rs index ef70f98246..c582a309e4 100644 --- a/zkevm-circuits/tests/prover_error.rs +++ b/zkevm-circuits/tests/prover_error.rs @@ -6,8 +6,9 @@ use bus_mapping::{circuit_input_builder::CircuitsParams, mock::BlockData}; use env_logger::Env; use eth_types::{ + eth_core::{Transaction, H160}, geth_types::{Account, GethData}, - Block, Bytes, Error, Transaction, Word, H160, U256, + Block, Bytes, Error, Word, U256, }; use halo2_proofs::{dev::MockProver, halo2curves::bn256::Fr}; use mock::test_ctx::{gen_geth_traces, LoggerConfig};