[package]
name = "reth-db-models"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
description = "Database models used in storage module."

[lints]
workspace = true

[dependencies]
# reth
reth-codecs = { workspace = true, optional = true }
reth-primitives-traits = { workspace = true, features = ["serde"] }

# ethereum
alloy-primitives.workspace = true
alloy-eips.workspace = true

# codecs
modular-bitfield = { workspace = true, optional = true }
serde = { workspace = true, default-features = false }

# misc
bytes = { workspace = true, optional = true }

# arbitrary utils
arbitrary = { workspace = true, features = ["derive"], optional = true }

[dev-dependencies]
# reth
reth-primitives-traits = { workspace = true, features = ["arbitrary"] }
reth-codecs.workspace = true

bytes.workspace = true
modular-bitfield.workspace = true
arbitrary = { workspace = true, features = ["derive"] }

proptest.workspace = true
proptest-arbitrary-interop.workspace = true
test-fuzz.workspace = true

[features]
default = ["std"]
std = [
    "alloy-eips/std",
    "alloy-primitives/std",
    "reth-primitives-traits/std",
    "bytes?/std",
    "serde/std",
]
test-utils = [
    "reth-primitives-traits/test-utils",
    "arbitrary",
    "reth-codecs?/test-utils",
]
arbitrary = [
    "std",
    "reth-primitives-traits/arbitrary",
    "dep:arbitrary",
    "alloy-primitives/arbitrary",
    "alloy-eips/arbitrary",
    "reth-codecs?/arbitrary",
]
reth-codec = [
    "dep:reth-codecs",
    "dep:modular-bitfield",
    "dep:bytes",
    "reth-primitives-traits/reth-codec",
]
