[package]
name = "reth-bench"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Benchmarking for ethereum nodes"
default-run = "reth-bench"

[lints]
workspace = true

[dependencies]
# reth
reth-provider = { workspace = true }
reth-cli-runner.workspace = true
reth-db = { workspace = true, features = ["mdbx"] }
reth-node-core.workspace = true
reth-node-api.workspace = true
reth-rpc-types.workspace = true
reth-rpc-types-compat.workspace = true
reth-primitives = { workspace = true, features = ["alloy-compat"] }
reth-tracing.workspace = true

# alloy
alloy-provider = { workspace = true, features = ["engine-api", "reqwest-rustls-tls"], default-features = false }
alloy-rpc-types-engine.workspace = true
alloy-transport.workspace = true
alloy-transport-http.workspace = true
alloy-transport-ws.workspace = true
alloy-transport-ipc.workspace = true
alloy-pubsub.workspace = true
alloy-json-rpc.workspace = true
alloy-rpc-client.workspace = true
alloy-consensus.workspace = true
alloy-eips.workspace = true

# reqwest
reqwest = { workspace = true, default-features = false, features = [
    "rustls-tls-native-roots",
] }

# tower
tower.workspace = true

# tracing
tracing.workspace = true

# io
serde.workspace = true
serde_json.workspace = true

# async
tokio = { workspace = true, features = [
    "sync",
    "macros",
    "time",
    "rt-multi-thread",
] }
tokio-util.workspace = true
futures.workspace = true
async-trait.workspace = true

# misc
eyre.workspace = true
thiserror.workspace = true
clap = { workspace = true, features = ["derive", "env"] }

# for writing data
csv = "1.3.0"

[target.'cfg(unix)'.dependencies]
tikv-jemallocator = { version = "0.5.0", optional = true }
libc = "0.2"

[dev-dependencies]
reth-tracing.workspace = true

[features]
default = ["jemalloc"]

asm-keccak = ["reth-primitives/asm-keccak"]

jemalloc = ["dep:tikv-jemallocator"]
jemalloc-prof = ["jemalloc", "tikv-jemallocator?/profiling"]

min-error-logs = ["tracing/release_max_level_error"]
min-warn-logs = ["tracing/release_max_level_warn"]
min-info-logs = ["tracing/release_max_level_info"]
min-debug-logs = ["tracing/release_max_level_debug"]
min-trace-logs = ["tracing/release_max_level_trace"]

optimism = [
    "reth-primitives/optimism",
    "reth-provider/optimism",
    "reth-node-core/optimism",
]

# no-op feature flag for switching between the `optimism` and default functionality in CI matrices
ethereum = []

[[bin]]
name = "reth-bench"
path = "src/main.rs"
