feat: refactor few stages to providers, introduce insert_block (#1474)

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
This commit is contained in:
rakita
2023-03-01 21:42:45 +01:00
committed by GitHub
parent 6136e0deb4
commit 42e3f56108
19 changed files with 659 additions and 406 deletions

View File

@@ -9,15 +9,11 @@ description = "Commonly used types in reth."
[dependencies]
# reth
reth-rlp = { path = "../rlp", features = [
"std",
"derive",
"ethereum-types",
] }
reth-rlp = { path = "../rlp", features = ["std", "derive", "ethereum-types"] }
reth-rlp-derive = { path = "../rlp/rlp-derive" }
reth-codecs = { version = "0.1.0", path = "../storage/codecs" }
revm-primitives = { version="1.0.0", features = ["serde"] }
revm-primitives = { version = "1.0.0", features = ["serde"] }
# ethereum
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
@@ -61,6 +57,10 @@ triehash = "0.8"
plain_hasher = "0.2"
hash-db = "0.15"
# used for clap value parser
eyre = "0.6"
shellexpand = "3.0"
# arbitrary utils
arbitrary = { version = "1.1.7", features = ["derive"], optional = true }
proptest = { version = "1.0", optional = true }
@@ -81,7 +81,11 @@ proptest-derive = "0.3"
# https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198
secp256k1 = "0.24.2"
criterion = "0.4.0"
pprof = { version = "0.11", features = ["flamegraph", "frame-pointer", "criterion"] }
pprof = { version = "0.11", features = [
"flamegraph",
"frame-pointer",
"criterion",
] }
[features]
default = []

View File

@@ -585,10 +585,9 @@ impl ForkCondition {
mod tests {
use crate::{
AllGenesisFormats, Chain, ChainSpec, ChainSpecBuilder, ForkCondition, ForkHash, ForkId,
Genesis, Hardfork, Head, GOERLI, H256, MAINNET, SEPOLIA,
Genesis, Hardfork, Head, GOERLI, H256, MAINNET, SEPOLIA, U256,
};
use ethers_core::types as EtherType;
use revm_primitives::U256;
fn test_fork_ids(spec: &ChainSpec, cases: &[(Head, ForkId)]) {
for (block, expected_id) in cases {
let computed_id = spec.fork_id(block);