[package]
name = "solana-ledger"
description = "Solana ledger"
documentation = "https://docs.rs/solana-ledger"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[lib]
crate-type = ["lib"]
name = "solana_ledger"

[features]
dev-context-only-utils = ["solana-perf/dev-context-only-utils"]
frozen-abi = [
    "dep:solana-frozen-abi",
    "dep:solana-frozen-abi-macro",
    "solana-runtime/frozen-abi",
]
agave-unstable-api = []

[dependencies]
agave-feature-set = { workspace = true }
agave-reserved-account-keys = { workspace = true }
agave-snapshots = { workspace = true }
anyhow = { workspace = true }
assert_matches = { workspace = true }
bincode = { workspace = true }
bitflags = { workspace = true, features = ["serde"] }
bytes = { workspace = true }
bzip2 = { workspace = true }
chrono = { workspace = true, features = ["default", "serde"] }
chrono-humanize = { workspace = true }
crossbeam-channel = { workspace = true }
dashmap = { workspace = true, features = ["rayon", "raw-api"] }
eager = { workspace = true }
fs_extra = { workspace = true }
futures = { workspace = true }
itertools = { workspace = true }
lazy-lru = { workspace = true }
log = { workspace = true }
lru = { workspace = true }
mockall = { workspace = true }
num_cpus = { workspace = true }
num_enum = { workspace = true }
prost = { workspace = true }
qualifier_attr = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
rayon = { workspace = true }
reed-solomon-erasure = { workspace = true, features = ["simd-accel"] }
scopeguard = { workspace = true }
serde = { workspace = true }
serde_bytes = { workspace = true }
sha2 = { workspace = true }
solana-account = { workspace = true }
solana-account-decoder = { workspace = true }
solana-accounts-db = { workspace = true }
solana-address-lookup-table-interface = { workspace = true }
solana-bpf-loader-program = { workspace = true }
solana-clock = { workspace = true }
solana-cost-model = { workspace = true }
solana-entry = { workspace = true }
solana-epoch-schedule = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true, features = [
    "frozen-abi",
] }
solana-frozen-abi-macro = { workspace = true, optional = true, features = [
    "frozen-abi",
] }
solana-genesis-config = { workspace = true }
solana-genesis-utils = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-keypair = { workspace = true }
solana-measure = { workspace = true }
solana-message = { workspace = true }
solana-metrics = { workspace = true }
solana-native-token = { workspace = true }
solana-net-utils = { workspace = true }
solana-nohash-hasher = { workspace = true }
solana-packet = { workspace = true }
solana-perf = { workspace = true }
solana-program-runtime = { workspace = true, features = ["metrics"] }
solana-pubkey = { workspace = true }
solana-rayon-threadlimit = { workspace = true }
solana-runtime = { workspace = true }
solana-runtime-transaction = { workspace = true }
solana-seed-derivable = { workspace = true }
solana-sha256-hasher = { workspace = true }
solana-shred-version = { workspace = true }
solana-signature = { workspace = true }
solana-signer = { workspace = true }
solana-stake-interface = { workspace = true }
solana-storage-bigtable = { workspace = true }
solana-storage-proto = { workspace = true }
solana-streamer = { workspace = true }
solana-svm = { workspace = true }
solana-svm-timings = { workspace = true }
solana-svm-transaction = { workspace = true }
solana-system-interface = { workspace = true }
solana-system-transaction = { workspace = true }
solana-time-utils = { workspace = true }
solana-transaction = { workspace = true }
solana-transaction-context = { workspace = true }
solana-transaction-error = { workspace = true }
solana-transaction-status = { workspace = true }
solana-vote = { workspace = true }
solana-vote-program = { workspace = true }
static_assertions = { workspace = true }
strum = { workspace = true, features = ["derive"] }
strum_macros = { workspace = true }
tar = { workspace = true }
tempfile = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["full"] }
tokio-stream = { workspace = true }
trees = { workspace = true }
wincode = { workspace = true }

[dependencies.rocksdb]
# Avoid the vendored bzip2 within rocksdb-sys that can cause linker conflicts
# when also using the bzip2 crate
version = "0.24.0"
default-features = false
features = ["lz4"]

[dev-dependencies]
agave-logger = { workspace = true }
bs58 = { workspace = true }
criterion = { workspace = true }
proptest = { workspace = true }
solana-account-decoder = { workspace = true }
# See order-crates-for-publishing.py for using this unusual `path = "."`
solana-ledger = { path = ".", features = ["dev-context-only-utils", "agave-unstable-api"] }
solana-net-utils = { workspace = true, features = ["dev-context-only-utils"] }
solana-perf = { workspace = true, features = ["dev-context-only-utils"] }
solana-program-option = { workspace = true }
solana-program-pack = { workspace = true }
solana-runtime = { workspace = true, features = ["dev-context-only-utils"] }
solana-signature = { workspace = true, features = ["rand"] }
solana-vote = { workspace = true, features = ["dev-context-only-utils"] }
spl-generic-token = { workspace = true }
spl-pod = { workspace = true }
test-case = { workspace = true }

[[bench]]
name = "blockstore"

[[bench]]
name = "make_shreds_from_entries"
harness = false

[lints]
workspace = true
