Skip to content

Commit

Permalink
Merge pull request #20 from Arindam2407/new_crate
Browse files Browse the repository at this point in the history
Remove unnecessary dependencies
  • Loading branch information
Arindam2407 authored Nov 30, 2023
2 parents f74a7a3 + 8ba8286 commit 39efd72
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 104 deletions.
65 changes: 22 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bin/reth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ normal = [
# reth
reth-config.workspace = true
reth-primitives = { workspace = true, features = ["arbitrary", "clap"] }
reth-ethereum-forks = { workspace = true, features = ["arbitrary", "clap"] }
reth-ethereum-forks = { workspace = true }
reth-db = { workspace = true, features = ["mdbx", "test-utils"] }
# TODO: Temporary use of the test-utils feature
reth-provider = { workspace = true, features = ["test-utils"] }
Expand Down
32 changes: 1 addition & 31 deletions crates/ethereum-forks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,18 @@ description = "Ethereum fork types used in reth."
# reth
reth-codecs.workspace = true
revm-primitives.workspace = true
revm.workspace = true

# ethereum
alloy-primitives = { workspace = true, features = ["rand", "rlp"] }
alloy-rlp = { workspace = true, features = ["arrayvec"] }

# crypto
secp256k1 = { workspace = true, features = ["global-context", "recovery"] }

# used for forkid
crc = "3"

# tracing
tracing.workspace = true

# misc
bytes.workspace = true
byteorder = "1"
clap = { workspace = true, features = ["derive"], optional = true }
serde.workspace = true
serde_json.workspace = true
serde_with = "3.3.0"
thiserror.workspace = true
sucds = "~0.6"
modular-bitfield = "0.11.2"
derive_more = "0.99"
url = "2.3"
once_cell.workspace = true
tempfile.workspace = true
itertools = "0.11"
num_enum = "0.7"

# `test-utils` feature
plain_hasher = { version = "0.2", optional = true }
Expand All @@ -55,28 +36,17 @@ proptest-derive = { workspace = true, optional = true }
strum = { workspace = true, features = ["derive"] }

[dev-dependencies]
serde_json.workspace = true
test-fuzz = "4"
rand.workspace = true
revm-primitives = { workspace = true, features = ["arbitrary"] }
arbitrary = { workspace = true, features = ["derive"] }
proptest.workspace = true
proptest-derive.workspace = true
assert_matches.workspace = true
toml.workspace = true
triehash = "0.8"

plain_hasher = "0.2"
hash-db = "~0.15"

# necessary so we don't hit a "undeclared 'std'":
# https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198
secp256k1.workspace = true
criterion.workspace = true
pprof = { workspace = true, features = ["flamegraph", "frame-pointer", "criterion"] }

[features]
arbitrary = ["revm-primitives/arbitrary", "dep:arbitrary", "dep:proptest", "dep:proptest-derive"]
clap = ["dep:clap"]
optimism = ["reth-codecs/optimism", "revm-primitives/optimism", "revm/optimism"]
optimism = ["reth-codecs/optimism", "revm-primitives/optimism"]
test-utils = ["dep:plain_hasher", "dep:hash-db"]
3 changes: 2 additions & 1 deletion crates/ethereum-forks/src/forkid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#![deny(missing_docs)]

use crate::{hex, BlockNumber, Head, B256};
use crate::Head;
use alloy_primitives::{hex, BlockNumber, B256};
use alloy_rlp::*;
use crc::*;
use reth_codecs::derive_arbitrary;
Expand Down
4 changes: 1 addition & 3 deletions crates/ethereum-forks/src/head.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![deny(missing_docs)]

use crate::{BlockNumber, B256, U256};
use alloy_primitives::{BlockNumber, B256, U256};
use serde::{Deserialize, Serialize};

/// Describes the current head block.
Expand Down
25 changes: 0 additions & 25 deletions crates/ethereum-forks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,5 @@ pub use forkid::{ForkFilter, ForkFilterKey, ForkHash, ForkId, ForkTransition, Va
pub use hardfork::Hardfork;
pub use head::Head;

// Re-exports
pub use self::ruint::UintTryTo;
pub use alloy_primitives::{
self, address, b256, bloom, bytes, eip191_hash_message, hex, hex_literal, keccak256, ruint,
Address, BlockHash, BlockNumber, Bloom, BloomInput, Bytes, ChainId, Selector, StorageKey,
StorageValue, TxHash, TxIndex, TxNumber, B128, B256, B512, B64, U128, U256, U64, U8,
};
pub use revm_primitives::{self, JumpMap};

#[doc(hidden)]
#[deprecated = "use B64 instead"]
pub type H64 = B64;
#[doc(hidden)]
#[deprecated = "use B128 instead"]
pub type H128 = B128;
#[doc(hidden)]
#[deprecated = "use Address instead"]
pub type H160 = Address;
#[doc(hidden)]
#[deprecated = "use B256 instead"]
pub type H256 = B256;
#[doc(hidden)]
#[deprecated = "use B512 instead"]
pub type H512 = B512;

#[cfg(any(test, feature = "arbitrary"))]
pub use arbitrary;

0 comments on commit 39efd72

Please sign in to comment.