mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
chore: remove optimism feature (#14545)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -12,7 +12,7 @@ workflows:
|
||||
# Check that `A` activates the features of `B`.
|
||||
"propagate-feature",
|
||||
# These are the features to check:
|
||||
"--features=std,optimism,op,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench",
|
||||
"--features=std,op,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.
|
||||
|
||||
2
.github/assets/check_wasm.sh
vendored
2
.github/assets/check_wasm.sh
vendored
@ -45,6 +45,8 @@ exclude_crates=(
|
||||
reth-optimism-payload-builder
|
||||
reth-optimism-rpc
|
||||
reth-optimism-chain-registry
|
||||
reth-optimism-consensus
|
||||
reth-optimism-evm
|
||||
reth-rpc
|
||||
reth-rpc-api
|
||||
reth-rpc-api-testing-util
|
||||
|
||||
2
.github/workflows/compact.yml
vendored
2
.github/workflows/compact.yml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
matrix:
|
||||
bin:
|
||||
- cargo run --bin reth --features "dev"
|
||||
- cargo run --bin op-reth --features "optimism dev" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
- cargo run --bin op-reth --features "dev" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
steps:
|
||||
- uses: rui314/setup-mold@v1
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
|
||||
2
.github/workflows/integration.yml
vendored
2
.github/workflows/integration.yml
vendored
@ -48,7 +48,7 @@ jobs:
|
||||
name: Run tests
|
||||
run: |
|
||||
cargo nextest run \
|
||||
--locked -p reth-optimism-node --features "optimism"
|
||||
--locked -p reth-optimism-node
|
||||
|
||||
integration-success:
|
||||
name: integration success
|
||||
|
||||
2
.github/workflows/kurtosis-op.yml
vendored
2
.github/workflows/kurtosis-op.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
with:
|
||||
image_tag: ghcr.io/paradigmxyz/op-reth:kurtosis-ci
|
||||
binary_name: op-reth
|
||||
cargo_features: optimism,asm-keccak
|
||||
cargo_features: asm-keccak
|
||||
cargo_package: crates/optimism/bin/Cargo.toml
|
||||
|
||||
test:
|
||||
|
||||
14
.github/workflows/lint.yml
vendored
14
.github/workflows/lint.yml
vendored
@ -18,11 +18,8 @@ jobs:
|
||||
matrix:
|
||||
include:
|
||||
- type: ethereum
|
||||
args: --bin reth --workspace --lib --examples --tests --benches --locked
|
||||
args: --workspace --lib --examples --tests --benches --locked
|
||||
features: "ethereum asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
|
||||
- type: optimism
|
||||
args: --bin op-reth --workspace --lib --examples --tests --benches --locked
|
||||
features: "optimism asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
|
||||
- type: book
|
||||
args: --manifest-path book/sources/Cargo.toml --workspace --bins
|
||||
features: ""
|
||||
@ -108,20 +105,17 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
- run: cargo hack check --workspace --exclude op-reth
|
||||
- run: cargo check -p op-reth --features "optimism"
|
||||
- run: cargo hack check --workspace
|
||||
|
||||
msrv:
|
||||
name: MSRV / ${{ matrix.network }}
|
||||
name: MSRV
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- binary: reth
|
||||
network: ethereum
|
||||
- binary: op-reth
|
||||
network: optimism
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: rui314/setup-mold@v1
|
||||
@ -131,7 +125,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
- run: cargo build --bin "${{ matrix.binary }}" --workspace --features "${{ matrix.network }}"
|
||||
- run: cargo build --bin "${{ matrix.binary }}" --workspace
|
||||
env:
|
||||
RUSTFLAGS: -D warnings
|
||||
|
||||
|
||||
11
.github/workflows/unit.yml
vendored
11
.github/workflows/unit.yml
vendored
@ -35,11 +35,11 @@ jobs:
|
||||
partition: 2
|
||||
total_partitions: 2
|
||||
- type: optimism
|
||||
args: --features "asm-keccak optimism" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
|
||||
args: --features "asm-keccak" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
|
||||
partition: 1
|
||||
total_partitions: 2
|
||||
- type: optimism
|
||||
args: --features "asm-keccak optimism" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
|
||||
args: --features "asm-keccak" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
|
||||
partition: 2
|
||||
total_partitions: 2
|
||||
- type: book
|
||||
@ -94,15 +94,12 @@ jobs:
|
||||
- run: cargo nextest run --release -p ef-tests --features "asm-keccak ef-tests"
|
||||
|
||||
doc:
|
||||
name: doc tests (${{ matrix.network }})
|
||||
name: doc tests
|
||||
runs-on:
|
||||
group: Reth
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
network: ["ethereum", "optimism"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: rui314/setup-mold@v1
|
||||
@ -111,7 +108,7 @@ jobs:
|
||||
with:
|
||||
cache-on-failure: true
|
||||
- name: Run doctests
|
||||
run: cargo test --doc --workspace --features "${{ matrix.network }}"
|
||||
run: cargo test --doc --workspace --all-features
|
||||
|
||||
unit-success:
|
||||
name: unit success
|
||||
|
||||
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@ -46,4 +46,4 @@ jobs:
|
||||
- name: mingw-w64
|
||||
run: sudo apt-get install -y mingw-w64
|
||||
- name: Check OP-Reth
|
||||
run: cargo check -p op-reth --features optimism --target x86_64-pc-windows-gnu
|
||||
run: cargo check -p op-reth --target x86_64-pc-windows-gnu
|
||||
|
||||
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -7253,7 +7253,6 @@ dependencies = [
|
||||
"reth-node-api",
|
||||
"reth-node-builder",
|
||||
"reth-node-core",
|
||||
"reth-optimism-primitives",
|
||||
"reth-payload-builder",
|
||||
"reth-payload-builder-primitives",
|
||||
"reth-payload-primitives",
|
||||
|
||||
@ -20,10 +20,10 @@ ENV BUILD_PROFILE=$BUILD_PROFILE
|
||||
ARG RUSTFLAGS=""
|
||||
ENV RUSTFLAGS="$RUSTFLAGS"
|
||||
|
||||
RUN cargo chef cook --profile $BUILD_PROFILE --features "optimism" --recipe-path recipe.json --manifest-path /app/crates/optimism/bin/Cargo.toml
|
||||
RUN cargo chef cook --profile $BUILD_PROFILE --recipe-path recipe.json --manifest-path /app/crates/optimism/bin/Cargo.toml
|
||||
|
||||
COPY . .
|
||||
RUN cargo build --profile $BUILD_PROFILE --bin op-reth --features "optimism" --manifest-path /app/crates/optimism/bin/Cargo.toml
|
||||
RUN cargo build --profile $BUILD_PROFILE --bin op-reth --manifest-path /app/crates/optimism/bin/Cargo.toml
|
||||
|
||||
RUN ls -la /app/target/$BUILD_PROFILE/op-reth
|
||||
RUN cp /app/target/$BUILD_PROFILE/op-reth /app/op-reth
|
||||
|
||||
115
Makefile
115
Makefile
@ -33,9 +33,6 @@ EF_TESTS_DIR := ./testing/ef-tests/ethereum-tests
|
||||
# The docker image name
|
||||
DOCKER_IMAGE_NAME ?= ghcr.io/paradigmxyz/reth
|
||||
|
||||
# Features in reth/op-reth binary crate other than "ethereum" and "optimism"
|
||||
BIN_OTHER_FEATURES := asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs
|
||||
|
||||
##@ Help
|
||||
|
||||
.PHONY: help
|
||||
@ -54,7 +51,7 @@ install: ## Build and install the reth binary under `~/.cargo/bin`.
|
||||
.PHONY: install-op
|
||||
install-op: ## Build and install the op-reth binary under `~/.cargo/bin`.
|
||||
cargo install --path crates/optimism/bin --bin op-reth --force --locked \
|
||||
--features "optimism $(FEATURES)" \
|
||||
--features "$(FEATURES)" \
|
||||
--profile "$(PROFILE)" \
|
||||
$(CARGO_INSTALL_EXTRA_FLAGS)
|
||||
|
||||
@ -97,14 +94,14 @@ build-debug: ## Build the reth binary into `target/debug` directory.
|
||||
|
||||
.PHONY: build-op
|
||||
build-op: ## Build the op-reth binary into `target` directory.
|
||||
cargo build --bin op-reth --features "optimism $(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
cargo build --bin op-reth --features "$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
|
||||
# Builds the reth binary natively.
|
||||
build-native-%:
|
||||
cargo build --bin reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)"
|
||||
|
||||
op-build-native-%:
|
||||
cargo build --bin op-reth --target $* --features "optimism $(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
cargo build --bin op-reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
|
||||
# The following commands use `cross` to build a cross-compile.
|
||||
#
|
||||
@ -136,7 +133,7 @@ build-%:
|
||||
|
||||
op-build-%:
|
||||
RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" \
|
||||
cross build --bin op-reth --target $* --features "optimism $(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
cross build --bin op-reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
|
||||
|
||||
# Unfortunately we can't easily use cross to build for Darwin because of licensing issues.
|
||||
# If we wanted to, we would need to build a custom Docker image with the SDK available.
|
||||
@ -178,7 +175,6 @@ build-release-tarballs: ## Create a series of `.tar.gz` files in the BIN_DIR dir
|
||||
##@ Test
|
||||
|
||||
UNIT_TEST_ARGS := --locked --workspace --features 'jemalloc-prof' -E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
|
||||
UNIT_TEST_ARGS_OP := --locked --workspace --features 'jemalloc-prof,optimism' -E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
|
||||
COV_FILE := lcov.info
|
||||
|
||||
.PHONY: test-unit
|
||||
@ -186,21 +182,12 @@ test-unit: ## Run unit tests.
|
||||
cargo install cargo-nextest --locked
|
||||
cargo nextest run $(UNIT_TEST_ARGS)
|
||||
|
||||
.PHONY: test-unit-op
|
||||
test-unit-op: ## Run unit tests (with optimism feature flag enabled).
|
||||
cargo install cargo-nextest --locked
|
||||
cargo nextest run $(UNIT_TEST_ARGS_OP)
|
||||
|
||||
.PHONY: cov-unit
|
||||
cov-unit: ## Run unit tests with coverage.
|
||||
rm -f $(COV_FILE)
|
||||
cargo llvm-cov nextest --lcov --output-path $(COV_FILE) $(UNIT_TEST_ARGS)
|
||||
|
||||
.PHONY: cov-unit-op
|
||||
cov-unit-op: ## Run unit tests with coverage (with optimism feature flag enabled).
|
||||
rm -f $(COV_FILE)
|
||||
cargo llvm-cov nextest --lcov --output-path $(COV_FILE) $(UNIT_TEST_ARGS_OP)
|
||||
|
||||
.PHONY: cov-report-html
|
||||
cov-report-html: cov-unit ## Generate a HTML coverage report and open it in the browser.
|
||||
cargo llvm-cov report --html
|
||||
@ -364,7 +351,7 @@ maxperf: ## Builds `reth` with the most aggressive optimisations.
|
||||
|
||||
.PHONY: maxperf-op
|
||||
maxperf-op: ## Builds `op-reth` with the most aggressive optimisations.
|
||||
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak,optimism --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml
|
||||
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml
|
||||
|
||||
.PHONY: maxperf-no-asm
|
||||
maxperf-no-asm: ## Builds `reth` with the most aggressive optimisations, minus the "asm-keccak" feature.
|
||||
@ -374,29 +361,7 @@ maxperf-no-asm: ## Builds `reth` with the most aggressive optimisations, minus t
|
||||
fmt:
|
||||
cargo +nightly fmt
|
||||
|
||||
lint-reth:
|
||||
cargo +nightly clippy \
|
||||
--workspace \
|
||||
--bin "reth" \
|
||||
--lib \
|
||||
--examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--features "ethereum $(BIN_OTHER_FEATURES)" \
|
||||
-- -D warnings
|
||||
|
||||
lint-op-reth:
|
||||
cargo +nightly clippy \
|
||||
--workspace \
|
||||
--bin "op-reth" \
|
||||
--lib \
|
||||
--examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--features "optimism $(BIN_OTHER_FEATURES)" \
|
||||
-- -D warnings
|
||||
|
||||
lint-other-targets:
|
||||
clippy:
|
||||
cargo +nightly clippy \
|
||||
--workspace \
|
||||
--lib \
|
||||
@ -436,41 +401,11 @@ ensure-dprint:
|
||||
|
||||
lint:
|
||||
make fmt && \
|
||||
make lint-reth && \
|
||||
make lint-op-reth && \
|
||||
make lint-other-targets && \
|
||||
make clippy && \
|
||||
make lint-codespell && \
|
||||
make lint-toml
|
||||
|
||||
fix-lint-reth:
|
||||
cargo +nightly clippy \
|
||||
--workspace \
|
||||
--bin "reth" \
|
||||
--lib \
|
||||
--examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--features "ethereum $(BIN_OTHER_FEATURES)" \
|
||||
--fix \
|
||||
--allow-staged \
|
||||
--allow-dirty \
|
||||
-- -D warnings
|
||||
|
||||
fix-lint-op-reth:
|
||||
cargo +nightly clippy \
|
||||
--workspace \
|
||||
--bin "op-reth" \
|
||||
--lib \
|
||||
--examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--features "optimism $(BIN_OTHER_FEATURES)" \
|
||||
--fix \
|
||||
--allow-staged \
|
||||
--allow-dirty \
|
||||
-- -D warnings
|
||||
|
||||
fix-lint-other-targets:
|
||||
clippy-fix:
|
||||
cargo +nightly clippy \
|
||||
--workspace \
|
||||
--lib \
|
||||
@ -484,9 +419,7 @@ fix-lint-other-targets:
|
||||
-- -D warnings
|
||||
|
||||
fix-lint:
|
||||
make fix-lint-reth && \
|
||||
make fix-lint-op-reth && \
|
||||
make fix-lint-other-targets && \
|
||||
make clippy-fix && \
|
||||
make fmt
|
||||
|
||||
.PHONY: rustdocs
|
||||
@ -499,43 +432,21 @@ rustdocs: ## Runs `cargo docs` to generate the Rust documents in the `target/doc
|
||||
cargo +nightly docs \
|
||||
--document-private-items
|
||||
|
||||
test-reth:
|
||||
cargo test \
|
||||
--workspace \
|
||||
--bin "reth" \
|
||||
--lib \
|
||||
--examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--features "ethereum $(BIN_OTHER_FEATURES)"
|
||||
|
||||
test-op-reth:
|
||||
test:
|
||||
cargo test \
|
||||
--workspace \
|
||||
--bin "op-reth" \
|
||||
--lib --examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--features "optimism $(BIN_OTHER_FEATURES)"
|
||||
|
||||
test-other-targets:
|
||||
cargo test \
|
||||
--workspace \
|
||||
--lib \
|
||||
--examples \
|
||||
--tests \
|
||||
--benches \
|
||||
--all-features
|
||||
|
||||
test-doc:
|
||||
cargo test --doc --workspace --features "ethereum"
|
||||
cargo test --doc --workspace --features "optimism"
|
||||
cargo test --doc --workspace --all-features
|
||||
|
||||
test:
|
||||
make test-reth && \
|
||||
make test-op-reth && \
|
||||
make test-doc && \
|
||||
make test-other-targets
|
||||
make test && \
|
||||
make test-doc
|
||||
|
||||
pr:
|
||||
make lint && \
|
||||
|
||||
@ -91,8 +91,6 @@ 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-node-core/optimism"]
|
||||
|
||||
# no-op feature flag for switching between the `optimism` and default functionality in CI matrices
|
||||
ethereum = []
|
||||
|
||||
|
||||
@ -33,9 +33,6 @@ reth-network-peers.workspace = true
|
||||
reth-engine-local.workspace = true
|
||||
reth-tasks.workspace = true
|
||||
|
||||
# currently need to enable this for workspace level
|
||||
reth-optimism-primitives = { workspace = true, features = ["arbitrary", "serde", "serde-bincode-compat"] }
|
||||
|
||||
# rpc
|
||||
jsonrpsee.workspace = true
|
||||
url.workspace = true
|
||||
|
||||
@ -51,8 +51,3 @@ itertools.workspace = true
|
||||
|
||||
# tracing
|
||||
tracing.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-provider/optimism",
|
||||
]
|
||||
|
||||
@ -37,7 +37,6 @@ reth-ethereum-primitives.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
optimism = []
|
||||
serde = [
|
||||
"dep:serde",
|
||||
"rand/serde",
|
||||
|
||||
@ -72,12 +72,6 @@ rand.workspace = true
|
||||
tempfile.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-db?/optimism",
|
||||
"reth-db-api?/optimism",
|
||||
"reth-provider/optimism",
|
||||
]
|
||||
|
||||
test-utils = [
|
||||
"tempfile",
|
||||
"reth-db-api",
|
||||
|
||||
@ -72,7 +72,6 @@ proptest.workspace = true
|
||||
tokio.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = ["reth-db/optimism"]
|
||||
# Features for vergen to generate correct env vars
|
||||
jemalloc = ["reth-cli-util/jemalloc"]
|
||||
asm-keccak = ["reth-primitives/asm-keccak", "alloy-primitives/asm-keccak"]
|
||||
|
||||
@ -594,7 +594,6 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
#[test]
|
||||
fn network_args_default_sanity_test() {
|
||||
let default_args = NetworkArgs::default();
|
||||
|
||||
@ -35,16 +35,6 @@ 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",
|
||||
"reth-optimism-consensus/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-optimism-payload-builder/optimism",
|
||||
"reth-optimism-rpc/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
]
|
||||
|
||||
dev = [
|
||||
"reth-optimism-cli/dev",
|
||||
"reth-optimism-primitives/arbitrary",
|
||||
|
||||
@ -24,8 +24,6 @@
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
/// Re-exported from `reth_optimism_cli`.
|
||||
pub mod cli {
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#![allow(missing_docs, rustdoc::missing_crate_level_docs)]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
use clap::Parser;
|
||||
use reth_optimism_cli::{chainspec::OpChainSpecParser, Cli};
|
||||
|
||||
@ -46,14 +46,14 @@ reth-tracing.workspace = true
|
||||
|
||||
# eth
|
||||
alloy-eips.workspace = true
|
||||
alloy-consensus = { workspace = true, optional = true }
|
||||
alloy-consensus.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
|
||||
# misc
|
||||
futures-util.workspace = true
|
||||
derive_more = { workspace = true, optional = true }
|
||||
serde = { workspace = true, optional = true }
|
||||
derive_more.workspace = true
|
||||
serde.workspace = true
|
||||
clap = { workspace = true, features = ["derive", "env"] }
|
||||
|
||||
tokio = { workspace = true, features = ["sync", "macros", "time", "rt-multi-thread"] }
|
||||
@ -63,7 +63,7 @@ eyre.workspace = true
|
||||
|
||||
# reth test-vectors
|
||||
proptest = { workspace = true, optional = true }
|
||||
op-alloy-consensus = { workspace = true, optional = true }
|
||||
op-alloy-consensus.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile.workspace = true
|
||||
@ -72,22 +72,6 @@ reth-db-common.workspace = true
|
||||
reth-cli-commands.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"op-alloy-consensus",
|
||||
"alloy-consensus",
|
||||
"dep:derive_more",
|
||||
"dep:serde",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-node-core/optimism",
|
||||
"reth-optimism-node/optimism",
|
||||
"reth-execution-types/optimism",
|
||||
"reth-db/optimism",
|
||||
"reth-db-api/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
"reth-downloaders/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-optimism-consensus/optimism",
|
||||
]
|
||||
asm-keccak = [
|
||||
"alloy-primitives/asm-keccak",
|
||||
"reth-node-core/asm-keccak",
|
||||
@ -105,11 +89,12 @@ dev = [
|
||||
"dep:proptest",
|
||||
"reth-cli-commands/arbitrary",
|
||||
]
|
||||
|
||||
serde = [
|
||||
"alloy-consensus?/serde",
|
||||
"alloy-consensus/serde",
|
||||
"alloy-eips/serde",
|
||||
"alloy-primitives/serde",
|
||||
"op-alloy-consensus?/serde",
|
||||
"op-alloy-consensus/serde",
|
||||
"reth-execution-types/serde",
|
||||
"reth-provider/serde",
|
||||
"reth-optimism-primitives/serde",
|
||||
|
||||
@ -5,10 +5,8 @@
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
/// Optimism chain specification parser.
|
||||
pub mod chainspec;
|
||||
|
||||
@ -27,7 +27,7 @@ reth-trie-common.workspace = true
|
||||
reth-optimism-forks.workspace = true
|
||||
reth-optimism-chainspec.workspace = true
|
||||
# TODO: remove this after feature cleanup
|
||||
reth-optimism-primitives = { workspace = true, features = ["serde"] }
|
||||
reth-optimism-primitives = { workspace = true, features = ["serde", "reth-codec"] }
|
||||
|
||||
# ethereum
|
||||
alloy-eips.workspace = true
|
||||
@ -79,9 +79,3 @@ std = [
|
||||
"thiserror/std",
|
||||
"reth-execution-types/std",
|
||||
]
|
||||
optimism = [
|
||||
"reth-optimism-primitives/optimism",
|
||||
"reth-execution-types/optimism",
|
||||
"reth-optimism-node/optimism",
|
||||
"reth-provider/optimism",
|
||||
]
|
||||
|
||||
@ -7,8 +7,6 @@
|
||||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
|
||||
@ -83,8 +83,3 @@ std = [
|
||||
"revm-database/std",
|
||||
"revm-optimism/std",
|
||||
]
|
||||
optimism = [
|
||||
"reth-execution-types/optimism",
|
||||
"reth-optimism-consensus/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
]
|
||||
|
||||
@ -7,8 +7,6 @@
|
||||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
|
||||
@ -13,8 +13,8 @@ workspace = true
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-chainspec.workspace = true
|
||||
reth-db.workspace = true
|
||||
reth-engine-local.workspace = true
|
||||
reth-db = { workspace = true, features = ["op"] }
|
||||
reth-engine-local = { workspace = true, features = ["op"] }
|
||||
reth-primitives.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-payload-builder.workspace = true
|
||||
@ -43,7 +43,7 @@ reth-optimism-txpool.workspace = true
|
||||
reth-optimism-chainspec.workspace = true
|
||||
reth-optimism-consensus.workspace = true
|
||||
reth-optimism-forks.workspace = true
|
||||
reth-optimism-primitives = { workspace = true, features = ["serde", "serde-bincode-compat"] }
|
||||
reth-optimism-primitives = { workspace = true, features = ["serde", "serde-bincode-compat", "reth-codec"] }
|
||||
|
||||
# revm with required optimism features
|
||||
revm = { workspace = true, features = ["secp256k1", "blst", "c-kzg"] }
|
||||
@ -87,19 +87,6 @@ futures.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["reth-codec"]
|
||||
optimism = [
|
||||
"reth-provider/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-optimism-payload-builder/optimism",
|
||||
"reth-optimism-rpc/optimism",
|
||||
"reth-engine-local/op",
|
||||
"reth-optimism-consensus/optimism",
|
||||
"reth-db/optimism",
|
||||
"reth-optimism-node/optimism",
|
||||
"reth-node-core/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
"reth-optimism-txpool/optimism",
|
||||
]
|
||||
asm-keccak = [
|
||||
"reth-primitives/asm-keccak",
|
||||
"alloy-primitives/asm-keccak",
|
||||
|
||||
@ -9,8 +9,6 @@
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
/// CLI argument parsing for the optimism node.
|
||||
pub mod args;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
mod p2p;
|
||||
|
||||
const fn main() {}
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
#![allow(missing_docs)]
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
mod builder;
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
mod priority;
|
||||
|
||||
const fn main() {}
|
||||
|
||||
@ -51,12 +51,3 @@ derive_more.workspace = true
|
||||
tracing.workspace = true
|
||||
thiserror.workspace = true
|
||||
sha2.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-provider/optimism",
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-execution-types/optimism",
|
||||
"reth-optimism-consensus/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
]
|
||||
|
||||
@ -5,11 +5,9 @@
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![allow(clippy::useless_let_if_seq)]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
pub mod builder;
|
||||
pub use builder::OpPayloadBuilder;
|
||||
|
||||
@ -121,4 +121,3 @@ arbitrary = [
|
||||
"alloy-rpc-types-eth?/arbitrary",
|
||||
"alloy-serde?/arbitrary",
|
||||
]
|
||||
optimism = []
|
||||
|
||||
@ -36,7 +36,6 @@ pub type OpBlockBody = <OpBlock as reth_primitives_traits::Block>::Body;
|
||||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub struct OpPrimitives;
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
impl reth_primitives_traits::NodePrimitives for OpPrimitives {
|
||||
type Block = OpBlock;
|
||||
type BlockHeader = alloy_consensus::Header;
|
||||
|
||||
@ -82,12 +82,3 @@ network = ["dep:reth-network"]
|
||||
provider = ["storage-api", "dep:reth-provider", "dep:reth-db"]
|
||||
storage-api = ["dep:reth-storage-api"]
|
||||
trie = ["dep:reth-trie"]
|
||||
optimism = [
|
||||
"reth-db?/optimism",
|
||||
"reth-optimism-consensus?/optimism",
|
||||
"reth-optimism-evm?/optimism",
|
||||
"reth-optimism-node?/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
"reth-optimism-rpc?/optimism",
|
||||
"reth-provider?/optimism",
|
||||
]
|
||||
|
||||
@ -9,8 +9,6 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![allow(unused_crate_dependencies)]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
/// Re-exported ethereum types
|
||||
#[doc(inline)]
|
||||
|
||||
@ -76,14 +76,6 @@ derive_more = { workspace = true, features = ["constructor"] }
|
||||
reth-optimism-chainspec.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-provider/optimism",
|
||||
"reth-optimism-consensus/optimism",
|
||||
"reth-optimism-payload-builder/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
"reth-optimism-txpool/optimism",
|
||||
]
|
||||
client = [
|
||||
"jsonrpsee/client",
|
||||
"jsonrpsee/async-client",
|
||||
|
||||
@ -5,10 +5,8 @@
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
pub mod engine;
|
||||
pub mod error;
|
||||
|
||||
@ -18,9 +18,3 @@ reth-codecs.workspace = true
|
||||
reth-db-api.workspace = true
|
||||
reth-prune-types.workspace = true
|
||||
reth-stages-types.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-codecs/op",
|
||||
"reth-db-api/optimism",
|
||||
]
|
||||
|
||||
@ -6,8 +6,6 @@
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
@ -48,10 +48,3 @@ parking_lot.workspace = true
|
||||
[dev-dependencies]
|
||||
reth-optimism-chainspec.workspace = true
|
||||
reth-provider = { workspace = true, features = ["test-utils"] }
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-optimism-evm/optimism",
|
||||
"reth-optimism-primitives/optimism",
|
||||
"reth-provider/optimism",
|
||||
]
|
||||
|
||||
@ -5,10 +5,8 @@
|
||||
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
|
||||
issue_tracker_base_url = "https://github.com/paradigmxyz/reth/issues/"
|
||||
)]
|
||||
#![cfg_attr(all(not(test), feature = "optimism"), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
// The `optimism` feature must be enabled to use this crate.
|
||||
#![cfg(feature = "optimism")]
|
||||
|
||||
mod validator;
|
||||
pub use validator::{OpL1BlockInfo, OpTransactionValidator};
|
||||
|
||||
@ -86,11 +86,6 @@ arbitrary = [
|
||||
"alloy-consensus/arbitrary",
|
||||
"reth-optimism-primitives?/arbitrary",
|
||||
]
|
||||
optimism = [
|
||||
"reth-codecs/op",
|
||||
"reth-optimism-primitives?/optimism",
|
||||
"op",
|
||||
]
|
||||
op = [
|
||||
"dep:reth-optimism-primitives",
|
||||
"reth-codecs/op",
|
||||
|
||||
@ -319,7 +319,6 @@ mod tests {
|
||||
//
|
||||
// this check is to ensure we do not inadvertently add too many fields to a struct which would
|
||||
// expand the flags field and break backwards compatibility
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
#[test]
|
||||
fn test_ensure_backwards_compatibility() {
|
||||
use super::*;
|
||||
|
||||
@ -90,7 +90,6 @@ arbitrary = [
|
||||
"alloy-consensus/arbitrary",
|
||||
"reth-primitives-traits/arbitrary",
|
||||
]
|
||||
optimism = ["reth-db-api/optimism"]
|
||||
op = [
|
||||
"reth-db-api/op",
|
||||
"reth-primitives-traits/op",
|
||||
|
||||
@ -87,12 +87,6 @@ eyre.workspace = true
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = [
|
||||
"reth-execution-types/optimism",
|
||||
"reth-codecs/op",
|
||||
"reth-db/optimism",
|
||||
"reth-db-api/optimism",
|
||||
]
|
||||
serde = [
|
||||
"dashmap/serde",
|
||||
"notify/serde",
|
||||
|
||||
@ -19,6 +19,3 @@ alloy-eips.workspace = true
|
||||
alloy-consensus.workspace = true
|
||||
|
||||
eyre.workspace = true
|
||||
|
||||
[features]
|
||||
optimism = []
|
||||
|
||||
Reference in New Issue
Block a user