fix: feature propagation (#11888)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Oliver <onbjerg@users.noreply.github.com>
This commit is contained in:
liamaharon
2024-10-20 07:36:11 +11:00
committed by GitHub
parent 6c026daf92
commit cf4a4454ec
59 changed files with 880 additions and 201 deletions

40
.config/zepter.yaml Normal file
View File

@ -0,0 +1,40 @@
version:
format: 1
# Minimum zepter version that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.13.2
# The examples in the following comments assume crate `A` to have a dependency on crate `B`.
workflows:
check:
- [
"lint",
# Check that `A` activates the features of `B`.
"propagate-feature",
# These are the features to check:
"--features=std,optimism,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench",
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
"--left-side-feature-missing=ignore",
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
"--left-side-outside-workspace=ignore",
# Auxillary flags:
"--offline",
"--locked",
"--show-path",
"--quiet",
]
default:
# Running `zepter` with no subcommand will check & fix.
- [$check.0, "--fix"]
# Will be displayed when any workflow fails:
help:
text: |
Reth uses the Zepter CLI to detect abnormalities in Cargo features, e.g. missing propagation.
It looks like one more more checks failed; please check the console output.
You can try to automatically address them by installing zepter (`cargo install zepter --locked`) and simply running `zepter` in the workspace root.
links:
- "https://github.com/paradigmxyz/reth/pull/11888"
- "https://github.com/ggwpez/zepter"

View File

@ -219,6 +219,22 @@ jobs:
env:
RUSTFLAGS: -D warnings
# Check crates correctly propagate features
feature-propagation:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: fetch deps
run: |
# Eagerly pull dependencies
time cargo metadata --format-version=1 --locked > /dev/null
- name: run zepter
run: |
cargo install zepter -f --locked
zepter --version
time zepter run check
lint-success:
name: lint success
runs-on: ubuntu-latest
@ -236,6 +252,7 @@ jobs:
- grafana
- no-test-deps
- features
- feature-propagation
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed

27
Cargo.lock generated
View File

@ -516,6 +516,7 @@ dependencies = [
"alloy-rlp",
"alloy-serde",
"alloy-sol-types",
"arbitrary",
"derive_more 1.0.0",
"itertools 0.13.0",
"jsonrpsee-types",
@ -1497,6 +1498,17 @@ dependencies = [
"tinyvec",
]
[[package]]
name = "bstr"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c"
dependencies = [
"memchr",
"regex-automata 0.4.8",
"serde",
]
[[package]]
name = "bumpalo"
version = "3.16.0"
@ -2258,6 +2270,7 @@ dependencies = [
"lock_api",
"once_cell",
"parking_lot_core 0.9.10",
"serde",
]
[[package]]
@ -3318,6 +3331,7 @@ version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"serde",
"typenum",
"version_check",
"zeroize",
@ -4512,7 +4526,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
dependencies = [
"cfg-if",
"windows-targets 0.52.6",
"windows-targets 0.48.5",
]
[[package]]
@ -4623,6 +4637,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47186c6da4d81ca383c7c47c1bfc80f4b95f4720514d860a5407aaf4233f9588"
dependencies = [
"linked-hash-map",
"serde",
]
[[package]]
@ -4645,6 +4660,7 @@ checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
dependencies = [
"autocfg",
"scopeguard",
"serde",
]
[[package]]
@ -5009,6 +5025,7 @@ dependencies = [
"libc",
"log",
"mio 0.8.11",
"serde",
"walkdir",
"windows-sys 0.48.0",
]
@ -5277,6 +5294,7 @@ dependencies = [
"alloy-primitives",
"alloy-rpc-types-eth",
"alloy-serde",
"arbitrary",
"op-alloy-consensus",
"serde",
"serde_json",
@ -5370,6 +5388,7 @@ version = "3.6.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee"
dependencies = [
"arbitrary",
"arrayvec",
"bitvec",
"byte-slice-cast",
@ -10098,6 +10117,10 @@ name = "similar"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e"
dependencies = [
"bstr",
"unicode-segmentation",
]
[[package]]
name = "similar-asserts"
@ -10106,6 +10129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfe85670573cd6f0fa97940f26e7e6601213c3b0555246c24234131f88c5709e"
dependencies = [
"console",
"serde",
"similar",
]
@ -11016,6 +11040,7 @@ dependencies = [
"parking_lot 0.12.3",
"rand 0.8.5",
"resolv-conf",
"serde",
"smallvec",
"thiserror",
"tokio",

View File

@ -585,7 +585,7 @@ pprof = "0.13"
proptest = "1.4"
proptest-derive = "0.5"
serial_test = { default-features = false, version = "3" }
similar-asserts = { default-features = false, version = "1.5.0" }
similar-asserts = { version = "1.5.0", features = ["serde"] }
tempfile = "3.8"
test-fuzz = "6"

View File

@ -76,9 +76,16 @@ reth-tracing.workspace = true
[features]
default = ["jemalloc"]
asm-keccak = ["reth-primitives/asm-keccak"]
asm-keccak = [
"reth-primitives/asm-keccak",
"reth-node-core/asm-keccak",
"alloy-primitives/asm-keccak"
]
jemalloc = ["reth-cli-util/jemalloc"]
jemalloc = [
"reth-cli-util/jemalloc",
"reth-node-core/jemalloc"
]
jemalloc-prof = ["reth-cli-util/jemalloc-prof"]
tracy-allocator = ["reth-cli-util/tracy-allocator"]

View File

@ -103,14 +103,21 @@ default = ["jemalloc"]
dev = ["reth-cli-commands/dev"]
asm-keccak = ["reth-node-core/asm-keccak", "reth-primitives/asm-keccak"]
asm-keccak = [
"reth-node-core/asm-keccak",
"reth-primitives/asm-keccak",
"alloy-primitives/asm-keccak"
]
jemalloc = [
"reth-cli-util/jemalloc",
"reth-node-core/jemalloc",
"reth-node-metrics/jemalloc",
]
jemalloc-prof = ["reth-cli-util/jemalloc"]
jemalloc-prof = [
"reth-cli-util/jemalloc",
"reth-cli-util/jemalloc-prof"
]
tracy-allocator = ["reth-cli-util/tracy-allocator"]
min-error-logs = ["tracing/release_max_level_error"]

View File

@ -63,5 +63,24 @@ alloy-genesis.workspace = true
alloy-consensus.workspace = true
[features]
test-utils = []
optimism = ["reth-primitives/optimism", "reth-provider/optimism"]
test-utils = [
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-evm/test-utils",
"reth-network/test-utils",
"reth-primitives/test-utils",
"reth-revm/test-utils",
"reth-stages-api/test-utils",
"reth-db/test-utils",
"reth-db-api/test-utils",
"reth-provider/test-utils",
"reth-trie-db/test-utils",
"reth-trie/test-utils"
]
optimism = [
"reth-primitives/optimism",
"reth-provider/optimism",
"reth-execution-types/optimism",
"reth-db/optimism",
"reth-db-api/optimism"
]

View File

@ -60,5 +60,9 @@ test-utils = [
"alloy-signer-local",
"alloy-consensus",
"rand",
"revm"
"revm",
"reth-chainspec/test-utils",
"reth-primitives/test-utils",
"reth-trie/test-utils",
"revm?/test-utils"
]

View File

@ -45,6 +45,21 @@ std = [
"alloy-genesis/std",
"alloy-primitives/std",
"alloy-trie/std",
"reth-primitives-traits/std",
"alloy-consensus/std",
"once_cell/std"
]
arbitrary = [
"alloy-chains/arbitrary",
"reth-ethereum-forks/arbitrary",
"reth-primitives-traits/arbitrary",
"reth-trie-common/arbitrary",
"alloy-consensus/arbitrary",
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary",
"alloy-trie/arbitrary"
]
test-utils = [
"reth-primitives-traits/test-utils",
"reth-trie-common/test-utils"
]
arbitrary = ["alloy-chains/arbitrary"]
test-utils = []

View File

@ -46,4 +46,12 @@ tokio-stream.workspace = true
tracing.workspace = true
[features]
optimism = ["reth-provider/optimism", "reth-optimism-consensus"]
optimism = [
"reth-provider/optimism",
"reth-optimism-consensus",
"reth-beacon-consensus/optimism",
"reth-execution-types/optimism",
"reth-optimism-consensus?/optimism",
"reth-primitives/optimism",
"revm-primitives/optimism"
]

View File

@ -82,4 +82,6 @@ optimism = [
"reth-primitives/optimism",
"reth-provider/optimism",
"reth-blockchain-tree/optimism",
"reth-db/optimism",
"reth-db-api/optimism"
]

View File

@ -24,5 +24,11 @@ derive_more.workspace = true
[features]
default = ["std"]
std = []
test-utils = []
std = [
"reth-primitives/std",
"alloy-primitives/std",
"alloy-eips/std"
]
test-utils = [
"reth-primitives/test-utils"
]

View File

@ -46,4 +46,8 @@ op-alloy-rpc-types-engine = { workspace = true, optional = true }
workspace = true
[features]
optimism = ["op-alloy-rpc-types-engine"]
optimism = [
"op-alloy-rpc-types-engine",
"reth-beacon-consensus/optimism",
"reth-provider/optimism"
]

View File

@ -86,4 +86,14 @@ test-utils = [
"reth-stages/test-utils",
"reth-static-file",
"reth-tracing",
"reth-blockchain-tree/test-utils",
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-evm/test-utils",
"reth-payload-builder/test-utils",
"reth-primitives/test-utils",
"reth-revm/test-utils",
"reth-stages-api/test-utils",
"reth-provider/test-utils",
"reth-trie/test-utils"
]

View File

@ -50,4 +50,9 @@ itertools.workspace = true
tracing.workspace = true
[features]
optimism = ["reth-beacon-consensus/optimism"]
optimism = [
"reth-beacon-consensus/optimism",
"reth-primitives/optimism",
"reth-provider/optimism",
"revm-primitives/optimism"
]

View File

@ -39,12 +39,27 @@ alloy-consensus.workspace = true
[features]
default = ["std", "serde", "rustc-hash"]
arbitrary = ["dep:arbitrary", "dep:proptest", "dep:proptest-derive"]
serde = ["dep:serde"]
arbitrary = [
"dep:arbitrary",
"dep:proptest",
"dep:proptest-derive",
"alloy-chains/arbitrary",
"alloy-consensus/arbitrary",
"alloy-primitives/arbitrary"
]
serde = [
"dep:serde",
"alloy-chains/serde",
"alloy-consensus/serde",
"alloy-primitives/serde"
]
std = [
"alloy-chains/std",
"alloy-primitives/std",
"thiserror-no-std/std",
"rustc-hash/std",
"alloy-consensus/std",
"once_cell/std",
"serde?/std"
]
rustc-hash = ["dep:rustc-hash"]

View File

@ -41,4 +41,14 @@ alloy-genesis.workspace = true
[features]
default = ["std"]
std = []
std = [
"reth-consensus/std",
"reth-primitives/std",
"reth-revm/std",
"alloy-consensus/std",
"alloy-eips/std",
"alloy-genesis/std",
"alloy-primitives/std",
"revm-primitives/std",
"secp256k1/std"
]

View File

@ -55,4 +55,17 @@ alloy-consensus.workspace = true
[features]
default = []
test-utils = ["reth-node-builder/test-utils"]
test-utils = [
"reth-node-builder/test-utils",
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-network/test-utils",
"reth-payload-builder/test-utils",
"reth-primitives/test-utils",
"reth-revm/test-utils",
"reth-db/test-utils",
"reth-provider/test-utils",
"reth-transaction-pool/test-utils",
"revm/test-utils",
"reth-evm/test-utils"
]

View File

@ -42,5 +42,24 @@ reth-ethereum-forks.workspace = true
[features]
default = ["std"]
std = ["dep:metrics", "dep:reth-metrics"]
test-utils = ["dep:parking_lot"]
std = [
"dep:metrics",
"dep:reth-metrics",
"reth-consensus/std",
"reth-primitives/std",
"reth-primitives-traits/std",
"reth-revm/std",
"alloy-eips/std",
"alloy-primitives/std",
"revm-primitives/std",
"revm/std"
]
test-utils = [
"dep:parking_lot",
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-revm/test-utils",
"revm/test-utils"
]

View File

@ -26,4 +26,9 @@ derive_more.workspace = true
[features]
default = ["std"]
std = ["reth-consensus/std"]
std = [
"reth-consensus/std",
"alloy-eips/std",
"alloy-primitives/std",
"revm-primitives/std"
]

View File

@ -33,10 +33,24 @@ reth-primitives = { workspace = true, features = ["arbitrary", "test-utils"] }
[features]
default = ["std"]
optimism = ["reth-primitives/optimism", "revm/optimism"]
serde = ["dep:serde", "reth-trie/serde", "revm/serde"]
serde = [
"dep:serde",
"reth-trie/serde",
"revm/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"rand/serde"
]
serde-bincode-compat = [
"reth-primitives/serde-bincode-compat",
"reth-trie/serde-bincode-compat",
"serde_with",
"alloy-eips/serde-bincode-compat"
]
std = [
"reth-primitives/std",
"alloy-eips/std",
"alloy-primitives/std",
"revm/std",
"serde?/std"
]
std = []

View File

@ -70,4 +70,14 @@ tempfile.workspace = true
[features]
default = []
serde = ["reth-provider/serde", "reth-exex-types/serde"]
serde = [
"reth-provider/serde",
"reth-exex-types/serde",
"reth-revm/serde",
"alloy-consensus/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"parking_lot/serde",
"rand/serde",
"secp256k1/serde"
]

View File

@ -33,5 +33,16 @@ rand.workspace = true
[features]
default = []
serde = ["dep:serde", "reth-execution-types/serde"]
serde-bincode-compat = ["reth-execution-types/serde-bincode-compat", "serde_with"]
serde = [
"dep:serde",
"reth-execution-types/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"rand/serde"
]
serde-bincode-compat = [
"reth-execution-types/serde-bincode-compat",
"serde_with",
"reth-primitives/serde-bincode-compat",
"alloy-eips/serde-bincode-compat"
]

View File

@ -51,5 +51,14 @@ reth-tracing.workspace = true
[features]
default = ["serde"]
serde = ["dep:serde"]
serde = [
"dep:serde",
"alloy-primitives/serde",
"discv5/serde",
"enr/serde",
"generic-array/serde",
"parking_lot/serde",
"rand?/serde",
"secp256k1/serde"
]
test-utils = ["dep:rand"]

View File

@ -48,4 +48,15 @@ reth-tracing.workspace = true
rand.workspace = true
[features]
serde = ["dep:serde", "dep:serde_with"]
serde = [
"dep:serde",
"dep:serde_with",
"alloy-chains/serde",
"alloy-primitives/serde",
"enr/serde",
"linked_hash_set/serde",
"parking_lot/serde",
"rand/serde",
"secp256k1/serde",
"trust-dns-resolver/serde"
]

View File

@ -77,4 +77,8 @@ test-utils = [
"reth-consensus/test-utils",
"reth-network-p2p/test-utils",
"reth-testing-utils",
"reth-chainspec/test-utils",
"reth-primitives/test-utils",
"reth-db-api?/test-utils",
"reth-provider/test-utils"
]

View File

@ -50,5 +50,17 @@ arbitrary = [
"dep:arbitrary",
"dep:proptest",
"dep:proptest-arbitrary-interop",
"reth-chainspec/arbitrary",
"alloy-consensus/arbitrary",
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary"
]
serde = [
"dep:serde",
"alloy-chains/serde",
"alloy-consensus/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"bytes/serde",
"rand/serde"
]
serde = ["dep:serde"]

View File

@ -69,8 +69,19 @@ arbitrary = [
"reth-primitives/arbitrary",
"reth-eth-wire-types/arbitrary",
"dep:arbitrary",
"reth-chainspec/arbitrary",
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary"
]
serde = [
"dep:serde",
"reth-eth-wire-types/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"bytes/serde",
"rand/serde",
"secp256k1/serde"
]
serde = ["dep:serde", "reth-eth-wire-types/serde"]
[[test]]
name = "fuzz_roundtrip"

View File

@ -40,4 +40,10 @@ derive_more.workspace = true
[features]
default = ["serde"]
serde = ["dep:serde"]
serde = [
"dep:serde",
"reth-eth-wire-types/serde",
"reth-network-types/serde",
"alloy-primitives/serde",
"enr/serde"
]

View File

@ -101,8 +101,36 @@ criterion = { workspace = true, features = ["async_tokio", "html_reports"] }
[features]
default = ["serde"]
geth-tests = []
serde = ["dep:serde", "secp256k1/serde", "enr/serde", "reth-network-types/serde"]
test-utils = ["dep:reth-provider", "reth-provider?/test-utils", "dep:tempfile", "reth-transaction-pool/test-utils", "reth-network-types/test-utils"]
serde = [
"dep:serde",
"secp256k1/serde",
"enr/serde",
"reth-network-types/serde",
"reth-dns-discovery/serde",
"reth-eth-wire/serde",
"reth-provider?/serde",
"alloy-consensus/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"discv5/serde",
"parking_lot/serde",
"rand/serde",
"smallvec/serde",
"url/serde"
]
test-utils = [
"dep:reth-provider",
"reth-provider?/test-utils",
"dep:tempfile",
"reth-transaction-pool/test-utils",
"reth-network-types/test-utils",
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-discv4/test-utils",
"reth-network/test-utils",
"reth-network-p2p/test-utils",
"reth-primitives/test-utils"
]
[[bench]]
name = "bench"

View File

@ -43,5 +43,15 @@ tokio = { workspace = true, features = ["full"] }
[features]
default = ["std"]
test-utils = ["reth-consensus/test-utils", "parking_lot"]
std = ["reth-consensus/std"]
test-utils = [
"reth-consensus/test-utils",
"parking_lot",
"reth-network-types/test-utils",
"reth-primitives/test-utils"
]
std = [
"reth-consensus/std",
"reth-primitives/std",
"alloy-eips/std",
"alloy-primitives/std"
]

View File

@ -96,4 +96,21 @@ tempfile.workspace = true
[features]
default = []
test-utils = ["reth-db/test-utils"]
test-utils = [
"reth-db/test-utils",
"reth-blockchain-tree/test-utils",
"reth-chain-state/test-utils",
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-engine-tree/test-utils",
"reth-evm/test-utils",
"reth-downloaders/test-utils",
"reth-network/test-utils",
"reth-network-p2p/test-utils",
"reth-payload-builder/test-utils",
"reth-primitives/test-utils",
"reth-stages/test-utils",
"reth-db-api/test-utils",
"reth-provider/test-utils",
"reth-transaction-pool/test-utils"
]

View File

@ -76,10 +76,18 @@ proptest.workspace = true
tokio.workspace = true
[features]
optimism = ["reth-primitives/optimism"]
optimism = [
"reth-primitives/optimism",
"reth-db/optimism"
]
# Features for vergen to generate correct env vars
jemalloc = []
asm-keccak = []
jemalloc = [
"reth-cli-util/jemalloc"
]
asm-keccak = [
"reth-primitives/asm-keccak",
"alloy-primitives/asm-keccak"
]
[build-dependencies]
vergen = { version = "8.0.0", features = ["build", "cargo", "git", "gitcl"] }

View File

@ -37,7 +37,15 @@ tracy-allocator = ["reth-cli-util/tracy-allocator"]
asm-keccak = ["reth-optimism-cli/asm-keccak", "reth-optimism-node/asm-keccak"]
optimism = ["reth-optimism-cli/optimism", "reth-optimism-node/optimism"]
optimism = [
"reth-optimism-cli/optimism",
"reth-optimism-node/optimism",
"reth-optimism-consensus/optimism",
"reth-optimism-evm/optimism",
"reth-optimism-payload-builder/optimism",
"reth-optimism-rpc/optimism",
"reth-provider/optimism"
]
min-error-logs = ["tracing/release_max_level_error"]
min-warn-logs = ["tracing/release_max_level_warn"]

View File

@ -53,4 +53,6 @@ std = [
"reth-ethereum-forks/std",
"reth-primitives-traits/std",
"reth-optimism-forks/std",
"alloy-consensus/std",
"once_cell/std"
]

View File

@ -78,6 +78,9 @@ optimism = [
"reth-provider/optimism",
"reth-node-core/optimism",
"reth-optimism-node/optimism",
"reth-execution-types/optimism",
"reth-db/optimism",
"reth-db-api/optimism"
]
asm-keccak = [
"alloy-primitives/asm-keccak",

View File

@ -51,10 +51,21 @@ alloy-consensus.workspace = true
[features]
default = ["std"]
std = []
std = [
"reth-consensus/std",
"reth-primitives/std",
"reth-revm/std",
"alloy-consensus/std",
"alloy-eips/std",
"alloy-genesis/std",
"alloy-primitives/std",
"revm-primitives/std",
"revm/std"
]
optimism = [
"reth-primitives/optimism",
"reth-execution-types/optimism",
"reth-optimism-consensus/optimism",
"revm/optimism",
"revm-primitives/optimism"
]

View File

@ -27,5 +27,13 @@ once_cell.workspace = true
[features]
default = ["std"]
std = []
serde = ["dep:serde"]
std = [
"alloy-primitives/std",
"once_cell/std",
"serde?/std"
]
serde = [
"dep:serde",
"alloy-chains/serde",
"alloy-primitives/serde"
]

View File

@ -78,6 +78,26 @@ optimism = [
"reth-auto-seal-consensus/optimism",
"reth-optimism-rpc/optimism",
"reth-engine-local/optimism",
"reth-optimism-consensus/optimism",
"reth-db/optimism"
]
asm-keccak = [
"reth-primitives/asm-keccak",
"reth/asm-keccak",
"alloy-primitives/asm-keccak",
"revm/asm-keccak"
]
test-utils = [
"reth-node-builder/test-utils",
"reth-chainspec/test-utils",
"reth-consensus/test-utils",
"reth-evm/test-utils",
"reth-network/test-utils",
"reth-payload-builder/test-utils",
"reth-primitives/test-utils",
"reth-revm/test-utils",
"reth-db/test-utils",
"reth-provider/test-utils",
"reth-transaction-pool/test-utils",
"revm/test-utils"
]
asm-keccak = ["reth-primitives/asm-keccak"]
test-utils = ["reth-node-builder/test-utils"]

View File

@ -54,4 +54,7 @@ optimism = [
"reth-provider/optimism",
"reth-optimism-evm/optimism",
"revm/optimism",
"reth-execution-types/optimism",
"reth-optimism-consensus/optimism",
"revm-primitives/optimism"
]

View File

@ -67,4 +67,5 @@ optimism = [
"reth-primitives/optimism",
"reth-provider/optimism",
"revm/optimism",
"reth-optimism-consensus/optimism"
]

View File

@ -20,4 +20,8 @@ reth-prune-types.workspace = true
reth-stages-types.workspace = true
[features]
optimism = ["reth-primitives/optimism"]
optimism = [
"reth-primitives/optimism",
"reth-codecs/optimism",
"reth-db-api/optimism"
]

View File

@ -40,4 +40,10 @@ tracing.workspace = true
revm.workspace = true
[features]
test-utils = ["reth-chain-state"]
test-utils = [
"reth-chain-state",
"reth-chain-state?/test-utils",
"reth-primitives/test-utils",
"reth-provider/test-utils",
"revm/test-utils"
]

View File

@ -54,8 +54,18 @@ test-fuzz.workspace = true
[features]
default = ["std"]
std = []
test-utils = ["arbitrary"]
std = [
"alloy-consensus/std",
"alloy-eips/std",
"alloy-genesis/std",
"alloy-primitives/std",
"revm-primitives/std",
"serde/std"
]
test-utils = [
"arbitrary",
"reth-codecs/test-utils"
]
arbitrary = [
"std",
"alloy-consensus/arbitrary",
@ -63,5 +73,11 @@ arbitrary = [
"dep:arbitrary",
"dep:proptest",
"dep:proptest-arbitrary-interop",
"alloy-eips/arbitrary",
"revm-primitives/arbitrary"
]
serde-bincode-compat = [
"serde_with",
"alloy-consensus/serde-bincode-compat",
"alloy-eips/serde-bincode-compat"
]
serde-bincode-compat = ["serde_with", "alloy-consensus/serde-bincode-compat"]

View File

@ -90,9 +90,24 @@ pprof = { workspace = true, features = [
[features]
default = ["c-kzg", "alloy-compat", "std", "reth-codec", "secp256k1"]
std = ["reth-primitives-traits/std"]
std = [
"reth-primitives-traits/std",
"alloy-consensus/std",
"alloy-eips/std",
"alloy-genesis/std",
"alloy-primitives/std",
"alloy-serde?/std",
"k256/std",
"once_cell/std",
"revm-primitives/std",
"secp256k1?/std",
"serde/std"
]
reth-codec = ["dep:reth-codecs", "dep:zstd", "dep:modular-bitfield", "std"]
asm-keccak = ["alloy-primitives/asm-keccak"]
asm-keccak = [
"alloy-primitives/asm-keccak",
"revm-primitives/asm-keccak"
]
arbitrary = [
"dep:arbitrary",
"alloy-eips/arbitrary",
@ -102,6 +117,14 @@ arbitrary = [
"reth-primitives-traits/arbitrary",
"revm-primitives/arbitrary",
"secp256k1",
"reth-chainspec/arbitrary",
"reth-trie-common/arbitrary",
"alloy-consensus/arbitrary",
"alloy-primitives/arbitrary",
"alloy-rpc-types?/arbitrary",
"alloy-serde?/arbitrary",
"op-alloy-consensus?/arbitrary",
"op-alloy-rpc-types?/arbitrary"
]
secp256k1 = ["dep:secp256k1"]
c-kzg = [
@ -121,12 +144,18 @@ alloy-compat = [
"dep:alloy-serde",
"dep:op-alloy-rpc-types",
]
test-utils = ["reth-primitives-traits/test-utils"]
test-utils = [
"reth-primitives-traits/test-utils",
"reth-chainspec/test-utils",
"reth-codecs?/test-utils",
"reth-trie-common/test-utils"
]
serde-bincode-compat = [
"alloy-consensus/serde-bincode-compat",
"op-alloy-consensus?/serde-bincode-compat",
"reth-primitives-traits/serde-bincode-compat",
"serde_with",
"alloy-eips/serde-bincode-compat"
]
[[bench]]

View File

@ -34,6 +34,21 @@ alloy-primitives.workspace = true
[features]
default = ["std"]
std = []
test-utils = ["dep:reth-trie"]
serde = ["revm/serde"]
std = [
"reth-primitives/std",
"alloy-primitives/std",
"revm/std",
"alloy-eips/std"
]
test-utils = [
"dep:reth-trie",
"reth-primitives/test-utils",
"reth-trie?/test-utils",
"revm/test-utils"
]
serde = [
"revm/serde",
"reth-trie?/serde",
"alloy-eips/serde",
"alloy-primitives/serde"
]

View File

@ -46,4 +46,9 @@ tokio-stream.workspace = true
reth-testing-utils.workspace = true
[features]
test-utils = []
test-utils = [
"reth-consensus/test-utils",
"reth-network-p2p/test-utils",
"reth-primitives-traits/test-utils",
"reth-provider/test-utils"
]

View File

@ -100,6 +100,17 @@ test-utils = [
"reth-stages-api/test-utils",
"dep:reth-testing-utils",
"dep:tempfile",
"reth-chainspec?/test-utils",
"reth-consensus/test-utils",
"reth-evm/test-utils",
"reth-downloaders/test-utils",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-revm/test-utils",
"reth-codecs/test-utils",
"reth-db-api/test-utils",
"reth-trie-db/test-utils",
"reth-trie/test-utils"
]
[[bench]]

View File

@ -49,7 +49,15 @@ serde.workspace = true
[features]
default = ["std", "alloy"]
std = ["alloy-primitives/std", "bytes/std"]
std = [
"alloy-primitives/std",
"bytes/std",
"alloy-consensus?/std",
"alloy-eips?/std",
"alloy-genesis?/std",
"alloy-trie?/std",
"serde/std"
]
alloy = [
"dep:alloy-consensus",
"dep:alloy-eips",

View File

@ -56,11 +56,25 @@ proptest.workspace = true
proptest-arbitrary-interop.workspace = true
[features]
test-utils = ["arbitrary"]
test-utils = [
"arbitrary",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-codecs/test-utils",
"reth-db-models/test-utils",
"reth-trie-common/test-utils"
]
arbitrary = [
"reth-primitives/arbitrary",
"reth-db-models/arbitrary",
"dep:arbitrary",
"dep:proptest",
"reth-primitives-traits/arbitrary",
"reth-trie-common/arbitrary",
"alloy-primitives/arbitrary",
"parity-scale-codec/arbitrary"
]
optimism = [
"reth-primitives/optimism",
"reth-codecs/optimism"
]
optimism = ["reth-primitives/optimism"]

View File

@ -39,5 +39,14 @@ proptest-arbitrary-interop.workspace = true
test-fuzz.workspace = true
[features]
test-utils = ["arbitrary"]
arbitrary = ["reth-primitives/arbitrary", "dep:arbitrary", "dep:proptest"]
test-utils = [
"arbitrary",
"reth-primitives/test-utils",
"reth-codecs/test-utils"
]
arbitrary = [
"reth-primitives/arbitrary",
"dep:arbitrary",
"dep:proptest",
"alloy-primitives/arbitrary"
]

View File

@ -89,10 +89,28 @@ mdbx = [
"dep:strum",
"dep:rustc-hash",
]
test-utils = ["dep:tempfile", "arbitrary", "parking_lot"]
test-utils = [
"dep:tempfile",
"arbitrary",
"parking_lot",
"reth-primitives/test-utils",
"reth-primitives-traits/test-utils",
"reth-db-api/test-utils",
"reth-nippy-jar/test-utils",
"reth-trie-common/test-utils"
]
bench = []
arbitrary = ["reth-primitives/arbitrary", "reth-db-api/arbitrary"]
optimism = []
arbitrary = [
"reth-primitives/arbitrary",
"reth-db-api/arbitrary",
"reth-primitives-traits/arbitrary",
"reth-trie-common/arbitrary",
"alloy-primitives/arbitrary"
]
optimism = [
"reth-primitives/optimism",
"reth-db-api/optimism"
]
disable-lock = []
[[bench]]

View File

@ -25,4 +25,8 @@ derive_more.workspace = true
[features]
default = ["std"]
std = []
std = [
"reth-primitives/std",
"alloy-eips/std",
"alloy-primitives/std"
]

View File

@ -91,8 +91,25 @@ optimism = [
"reth-primitives/optimism",
"reth-execution-types/optimism",
"reth-optimism-primitives",
"reth-codecs/optimism",
"reth-db/optimism",
"reth-db-api/optimism",
"revm/optimism"
]
serde = [
"reth-execution-types/serde",
"reth-trie-db/serde",
"reth-trie/serde",
"alloy-consensus?/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"alloy-rpc-types-engine/serde",
"dashmap/serde",
"notify/serde",
"parking_lot/serde",
"rand/serde",
"revm/serde"
]
serde = ["reth-execution-types/serde"]
test-utils = [
"reth-db/test-utils",
"reth-nippy-jar/test-utils",
@ -100,4 +117,12 @@ test-utils = [
"reth-chain-state/test-utils",
"reth-ethereum-engine-primitives",
"alloy-consensus",
"reth-chainspec/test-utils",
"reth-evm/test-utils",
"reth-network-p2p/test-utils",
"reth-primitives/test-utils",
"reth-codecs/test-utils",
"reth-db-api/test-utils",
"reth-trie-db/test-utils",
"revm/test-utils"
]

View File

@ -72,12 +72,42 @@ serde_json.workspace = true
[features]
default = ["serde"]
serde = ["dep:serde"]
test-utils = ["rand", "paste", "serde"]
serde = [
"dep:serde",
"reth-execution-types/serde",
"reth-eth-wire-types/serde",
"reth-provider/serde",
"alloy-consensus/serde",
"alloy-eips/serde",
"alloy-primitives/serde",
"bitflags/serde",
"parking_lot/serde",
"rand?/serde",
"revm/serde",
"smallvec/serde"
]
test-utils = [
"rand",
"paste",
"serde",
"reth-chain-state/test-utils",
"reth-chainspec/test-utils",
"reth-primitives/test-utils",
"reth-provider/test-utils",
"revm/test-utils"
]
arbitrary = [
"proptest",
"reth-primitives/arbitrary",
"proptest-arbitrary-interop",
"reth-chainspec/arbitrary",
"reth-eth-wire-types/arbitrary",
"alloy-consensus/arbitrary",
"alloy-eips/arbitrary",
"alloy-primitives/arbitrary",
"bitflags/arbitrary",
"revm/arbitrary",
"smallvec/arbitrary"
]
[[bench]]

View File

@ -41,8 +41,19 @@ hash-db = "=0.15.2"
plain_hasher = "0.2"
[features]
test-utils = ["dep:plain_hasher", "dep:hash-db", "arbitrary"]
test-utils = [
"dep:plain_hasher",
"dep:hash-db",
"arbitrary",
"reth-primitives-traits/test-utils",
"reth-codecs/test-utils"
]
arbitrary = [
"alloy-trie/arbitrary",
"dep:arbitrary",
"reth-primitives-traits/arbitrary",
"alloy-consensus/arbitrary",
"alloy-primitives/arbitrary",
"nybbles/arbitrary",
"revm-primitives/arbitrary"
]

View File

@ -66,5 +66,23 @@ similar-asserts.workspace = true
[features]
metrics = ["reth-metrics", "reth-trie/metrics", "dep:metrics"]
serde = ["dep:serde"]
test-utils = ["triehash", "reth-trie-common/test-utils"]
serde = [
"dep:serde",
"reth-provider/serde",
"reth-trie/serde",
"alloy-consensus/serde",
"alloy-primitives/serde",
"revm/serde",
"similar-asserts/serde"
]
test-utils = [
"triehash",
"reth-trie-common/test-utils",
"reth-chainspec/test-utils",
"reth-primitives/test-utils",
"reth-db/test-utils",
"reth-db-api/test-utils",
"reth-provider/test-utils",
"reth-trie/test-utils",
"revm/test-utils"
]

View File

@ -64,9 +64,23 @@ bincode.workspace = true
[features]
metrics = ["reth-metrics", "dep:metrics"]
serde = ["dep:serde"]
serde-bincode-compat = ["serde_with"]
test-utils = ["triehash", "reth-trie-common/test-utils"]
serde = [
"dep:serde",
"alloy-consensus/serde",
"alloy-primitives/serde",
"revm/serde"
]
serde-bincode-compat = [
"serde_with",
"reth-primitives/serde-bincode-compat",
"alloy-consensus/serde-bincode-compat"
]
test-utils = [
"triehash",
"reth-trie-common/test-utils",
"reth-primitives/test-utils",
"revm/test-utils"
]
[[bench]]
name = "prefix_set"

View File

@ -13,7 +13,11 @@ workspace = true
[features]
ef-tests = []
asm-keccak = ["reth-primitives/asm-keccak"]
asm-keccak = [
"reth-primitives/asm-keccak",
"alloy-primitives/asm-keccak",
"revm/asm-keccak"
]
[dependencies]
reth-chainspec.workspace = true