evm-fork-cache 0.2.1

Forked EVM state cache, snapshots, overlays, and simulation utilities for EVM search
Documentation
[package]
name = "evm-fork-cache"
version = "0.2.1"
edition = "2024"
rust-version = "1.88"
license = "MIT OR Apache-2.0"
description = "Forked EVM state cache, snapshots, overlays, and simulation utilities for EVM search"
keywords = ["evm", "revm", "defi", "simulation", "ethereum"]
categories = ["cryptography::cryptocurrencies", "simulation", "caching"]
readme = "README.md"
repository = "https://github.com/KaiCode2/evm-fork-cache"
documentation = "https://docs.rs/evm-fork-cache"

# Keep the published crate lean: development specs and release plans (per-phase
# build orders with internal line references) are planning artifacts, and the CI
# workflow has no consumer value. The consumer-facing ROADMAP.md, KNOWN_ISSUES.md,
# INTERNALS.md, and benchmark notes under docs/ are still shipped.
exclude = ["docs/*-spec.md", "docs/*-plan.md", ".github/"]

# Build the docs.rs page with every feature enabled so the full surface — the
# reactive runtime, the default WebSocket subscriber, the opt-in polling
# transport, and cold-start — is all documented (docs.rs builds with default
# features otherwise). `--cfg docsrs` is the conventional hook for any
# feature-gated doc annotations.
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

# Standalone workspace root: keeps this crate from being absorbed by any
# ancestor-directory workspace and gives it its own Cargo.lock.
[workspace]

[features]
default = ["reactive", "reactive-ws"]
reactive = []
reactive-ws = ["reactive", "alloy-provider/ws", "dep:rustls", "rustls/ring"]
reactive-polling = ["reactive"]

[dependencies]
alloy-consensus = "1.1.2"
alloy-contract = "1.0.38"
alloy-eips = "1.0.38"
alloy-network = "1.0.38"
alloy-primitives = { version = "1.4", features = ["map"] }
alloy-provider = "1.0.38"
alloy-rlp = "0.3"
alloy-rpc-client = "1.0.38"
alloy-rpc-types-eth = "1.0.38"
alloy-sol-types = "1.4"

futures = "0.3"
bincode = "1.3"
foundry-fork-db = "0.22"
revm = { version = "34.0", features = ["std", "serde", "optional_eip3607", "optional_no_base_fee", "optional_balance_check"] }
# Pulled by `reactive-ws` only to select rustls' `ring` crypto provider for the
# alloy WebSocket (wss://) TLS path. If a transitive dep also enabled aws-lc-rs,
# rustls 0.23 would have no unambiguous process default and a wss:// connection
# would panic ("no process-level CryptoProvider available"); the AlloySubscriber
# installs the ring provider best-effort at WS init. Do not remove without
# re-checking the TLS provider story.
rustls = { version = "0.23", default-features = false, optional = true }
serde = { version = "1.0.228", features = ["derive"] }
thiserror = "2.0"
serde_json = "1.0.145"
tokio = { version = "1.48.0", features = ["rt-multi-thread", "time"] }
tracing = "0.1.41"

[dev-dependencies]
anyhow = "1.0.98"
alloy-node-bindings = "1.1.2"
alloy-rpc-client = { version = "1.0.38", features = ["reqwest"] }
alloy-transport = "1.0.38"
alloy-transport-http = "1.0.38"
criterion = "0.5"
# Gzip-capable HTTP client for the bulk-storage benchmark example: enabling the
# `gzip` feature makes reqwest advertise `Accept-Encoding: gzip` and
# transparently decompress responses — a large win for multi-hundred-KB
# `eth_call` payloads (see docs/bulk-storage-extraction.md).
reqwest = { version = "0.12", default-features = false, features = ["gzip"] }
# `macros` powers `#[tokio::main]`/`#[tokio::test]` in the examples and tests.
# `time` lets live RPC examples bound their subscription windows.
tokio = { version = "1.48.0", features = ["macros", "rt-multi-thread", "time"] }

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

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

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

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

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

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

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

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

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

[[example]]
name = "reactive_alloy_amm_live_probe"
required-features = ["reactive"]

[[example]]
name = "reactive_runtime"
required-features = ["reactive"]

[[example]]
name = "reactive_engine_lifecycle"
required-features = ["reactive"]

[[example]]
name = "cold_start"
required-features = ["reactive"]

# RPC-gated real-contract benchmarks. Skipped (not failed) when RPC_URL is unset,
# so `cargo bench` stays offline by default.
[[bench]]
name = "rpc_mainnet"
harness = false