Skip to content

Commit 1804bbe

Browse files
klkvrmattsse
andauthored
chore: remove optimism feature (paradigmxyz#14545)
Co-authored-by: Matthias Seitz <[email protected]>
1 parent 482f455 commit 1804bbe

File tree

48 files changed

+45
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+45
-292
lines changed

.config/zepter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ workflows:
1212
# Check that `A` activates the features of `B`.
1313
"propagate-feature",
1414
# These are the features to check:
15-
"--features=std,optimism,op,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench",
15+
"--features=std,op,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench",
1616
# 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.
1717
"--left-side-feature-missing=ignore",
1818
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.

.github/assets/check_wasm.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ exclude_crates=(
4545
reth-optimism-payload-builder
4646
reth-optimism-rpc
4747
reth-optimism-chain-registry
48+
reth-optimism-consensus
49+
reth-optimism-evm
4850
reth-rpc
4951
reth-rpc-api
5052
reth-rpc-api-testing-util

.github/workflows/compact.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
matrix:
2424
bin:
2525
- cargo run --bin reth --features "dev"
26-
- cargo run --bin op-reth --features "optimism dev" --manifest-path crates/optimism/bin/Cargo.toml
26+
- cargo run --bin op-reth --features "dev" --manifest-path crates/optimism/bin/Cargo.toml
2727
steps:
2828
- uses: rui314/setup-mold@v1
2929
- uses: dtolnay/rust-toolchain@stable

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
name: Run tests
4949
run: |
5050
cargo nextest run \
51-
--locked -p reth-optimism-node --features "optimism"
51+
--locked -p reth-optimism-node
5252
5353
integration-success:
5454
name: integration success

.github/workflows/kurtosis-op.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
image_tag: ghcr.io/paradigmxyz/op-reth:kurtosis-ci
2323
binary_name: op-reth
24-
cargo_features: optimism,asm-keccak
24+
cargo_features: asm-keccak
2525
cargo_package: crates/optimism/bin/Cargo.toml
2626

2727
test:

.github/workflows/lint.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ jobs:
1818
matrix:
1919
include:
2020
- type: ethereum
21-
args: --bin reth --workspace --lib --examples --tests --benches --locked
21+
args: --workspace --lib --examples --tests --benches --locked
2222
features: "ethereum asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
23-
- type: optimism
24-
args: --bin op-reth --workspace --lib --examples --tests --benches --locked
25-
features: "optimism asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
2623
- type: book
2724
args: --manifest-path book/sources/Cargo.toml --workspace --bins
2825
features: ""
@@ -108,20 +105,17 @@ jobs:
108105
- uses: Swatinem/rust-cache@v2
109106
with:
110107
cache-on-failure: true
111-
- run: cargo hack check --workspace --exclude op-reth
112-
- run: cargo check -p op-reth --features "optimism"
108+
- run: cargo hack check --workspace
113109

114110
msrv:
115-
name: MSRV / ${{ matrix.network }}
111+
name: MSRV
116112
runs-on: ubuntu-latest
117113
timeout-minutes: 30
118114
strategy:
119115
matrix:
120116
include:
121117
- binary: reth
122-
network: ethereum
123118
- binary: op-reth
124-
network: optimism
125119
steps:
126120
- uses: actions/checkout@v4
127121
- uses: rui314/setup-mold@v1
@@ -131,7 +125,7 @@ jobs:
131125
- uses: Swatinem/rust-cache@v2
132126
with:
133127
cache-on-failure: true
134-
- run: cargo build --bin "${{ matrix.binary }}" --workspace --features "${{ matrix.network }}"
128+
- run: cargo build --bin "${{ matrix.binary }}" --workspace
135129
env:
136130
RUSTFLAGS: -D warnings
137131

.github/workflows/unit.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ jobs:
3535
partition: 2
3636
total_partitions: 2
3737
- type: optimism
38-
args: --features "asm-keccak optimism" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
38+
args: --features "asm-keccak" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
3939
partition: 1
4040
total_partitions: 2
4141
- type: optimism
42-
args: --features "asm-keccak optimism" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
42+
args: --features "asm-keccak" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
4343
partition: 2
4444
total_partitions: 2
4545
- type: book
@@ -94,15 +94,12 @@ jobs:
9494
- run: cargo nextest run --release -p ef-tests --features "asm-keccak ef-tests"
9595

9696
doc:
97-
name: doc tests (${{ matrix.network }})
97+
name: doc tests
9898
runs-on:
9999
group: Reth
100100
env:
101101
RUST_BACKTRACE: 1
102102
timeout-minutes: 30
103-
strategy:
104-
matrix:
105-
network: ["ethereum", "optimism"]
106103
steps:
107104
- uses: actions/checkout@v4
108105
- uses: rui314/setup-mold@v1
@@ -111,7 +108,7 @@ jobs:
111108
with:
112109
cache-on-failure: true
113110
- name: Run doctests
114-
run: cargo test --doc --workspace --features "${{ matrix.network }}"
111+
run: cargo test --doc --workspace --all-features
115112

116113
unit-success:
117114
name: unit success

.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ jobs:
4646
- name: mingw-w64
4747
run: sudo apt-get install -y mingw-w64
4848
- name: Check OP-Reth
49-
run: cargo check -p op-reth --features optimism --target x86_64-pc-windows-gnu
49+
run: cargo check -p op-reth --target x86_64-pc-windows-gnu

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DockerfileOp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ ENV BUILD_PROFILE=$BUILD_PROFILE
2020
ARG RUSTFLAGS=""
2121
ENV RUSTFLAGS="$RUSTFLAGS"
2222

23-
RUN cargo chef cook --profile $BUILD_PROFILE --features "optimism" --recipe-path recipe.json --manifest-path /app/crates/optimism/bin/Cargo.toml
23+
RUN cargo chef cook --profile $BUILD_PROFILE --recipe-path recipe.json --manifest-path /app/crates/optimism/bin/Cargo.toml
2424

2525
COPY . .
26-
RUN cargo build --profile $BUILD_PROFILE --bin op-reth --features "optimism" --manifest-path /app/crates/optimism/bin/Cargo.toml
26+
RUN cargo build --profile $BUILD_PROFILE --bin op-reth --manifest-path /app/crates/optimism/bin/Cargo.toml
2727

2828
RUN ls -la /app/target/$BUILD_PROFILE/op-reth
2929
RUN cp /app/target/$BUILD_PROFILE/op-reth /app/op-reth

Makefile

Lines changed: 13 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ EF_TESTS_DIR := ./testing/ef-tests/ethereum-tests
3333
# The docker image name
3434
DOCKER_IMAGE_NAME ?= ghcr.io/paradigmxyz/reth
3535

36-
# Features in reth/op-reth binary crate other than "ethereum" and "optimism"
37-
BIN_OTHER_FEATURES := asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs
38-
3936
##@ Help
4037

4138
.PHONY: help
@@ -54,7 +51,7 @@ install: ## Build and install the reth binary under `~/.cargo/bin`.
5451
.PHONY: install-op
5552
install-op: ## Build and install the op-reth binary under `~/.cargo/bin`.
5653
cargo install --path crates/optimism/bin --bin op-reth --force --locked \
57-
--features "optimism $(FEATURES)" \
54+
--features "$(FEATURES)" \
5855
--profile "$(PROFILE)" \
5956
$(CARGO_INSTALL_EXTRA_FLAGS)
6057

@@ -97,14 +94,14 @@ build-debug: ## Build the reth binary into `target/debug` directory.
9794

9895
.PHONY: build-op
9996
build-op: ## Build the op-reth binary into `target` directory.
100-
cargo build --bin op-reth --features "optimism $(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
97+
cargo build --bin op-reth --features "$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
10198

10299
# Builds the reth binary natively.
103100
build-native-%:
104101
cargo build --bin reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)"
105102

106103
op-build-native-%:
107-
cargo build --bin op-reth --target $* --features "optimism $(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
104+
cargo build --bin op-reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
108105

109106
# The following commands use `cross` to build a cross-compile.
110107
#
@@ -136,7 +133,7 @@ build-%:
136133

137134
op-build-%:
138135
RUSTFLAGS="-C link-arg=-lgcc -Clink-arg=-static-libgcc" \
139-
cross build --bin op-reth --target $* --features "optimism $(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
136+
cross build --bin op-reth --target $* --features "$(FEATURES)" --profile "$(PROFILE)" --manifest-path crates/optimism/bin/Cargo.toml
140137

141138
# Unfortunately we can't easily use cross to build for Darwin because of licensing issues.
142139
# If we wanted to, we would need to build a custom Docker image with the SDK available.
@@ -178,29 +175,19 @@ build-release-tarballs: ## Create a series of `.tar.gz` files in the BIN_DIR dir
178175
##@ Test
179176

180177
UNIT_TEST_ARGS := --locked --workspace --features 'jemalloc-prof' -E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
181-
UNIT_TEST_ARGS_OP := --locked --workspace --features 'jemalloc-prof,optimism' -E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
182178
COV_FILE := lcov.info
183179

184180
.PHONY: test-unit
185181
test-unit: ## Run unit tests.
186182
cargo install cargo-nextest --locked
187183
cargo nextest run $(UNIT_TEST_ARGS)
188184

189-
.PHONY: test-unit-op
190-
test-unit-op: ## Run unit tests (with optimism feature flag enabled).
191-
cargo install cargo-nextest --locked
192-
cargo nextest run $(UNIT_TEST_ARGS_OP)
193185

194186
.PHONY: cov-unit
195187
cov-unit: ## Run unit tests with coverage.
196188
rm -f $(COV_FILE)
197189
cargo llvm-cov nextest --lcov --output-path $(COV_FILE) $(UNIT_TEST_ARGS)
198190

199-
.PHONY: cov-unit-op
200-
cov-unit-op: ## Run unit tests with coverage (with optimism feature flag enabled).
201-
rm -f $(COV_FILE)
202-
cargo llvm-cov nextest --lcov --output-path $(COV_FILE) $(UNIT_TEST_ARGS_OP)
203-
204191
.PHONY: cov-report-html
205192
cov-report-html: cov-unit ## Generate a HTML coverage report and open it in the browser.
206193
cargo llvm-cov report --html
@@ -364,7 +351,7 @@ maxperf: ## Builds `reth` with the most aggressive optimisations.
364351

365352
.PHONY: maxperf-op
366353
maxperf-op: ## Builds `op-reth` with the most aggressive optimisations.
367-
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak,optimism --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml
354+
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml
368355

369356
.PHONY: maxperf-no-asm
370357
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
374361
fmt:
375362
cargo +nightly fmt
376363

377-
lint-reth:
378-
cargo +nightly clippy \
379-
--workspace \
380-
--bin "reth" \
381-
--lib \
382-
--examples \
383-
--tests \
384-
--benches \
385-
--features "ethereum $(BIN_OTHER_FEATURES)" \
386-
-- -D warnings
387-
388-
lint-op-reth:
389-
cargo +nightly clippy \
390-
--workspace \
391-
--bin "op-reth" \
392-
--lib \
393-
--examples \
394-
--tests \
395-
--benches \
396-
--features "optimism $(BIN_OTHER_FEATURES)" \
397-
-- -D warnings
398-
399-
lint-other-targets:
364+
clippy:
400365
cargo +nightly clippy \
401366
--workspace \
402367
--lib \
@@ -436,41 +401,11 @@ ensure-dprint:
436401

437402
lint:
438403
make fmt && \
439-
make lint-reth && \
440-
make lint-op-reth && \
441-
make lint-other-targets && \
404+
make clippy && \
442405
make lint-codespell && \
443406
make lint-toml
444407

445-
fix-lint-reth:
446-
cargo +nightly clippy \
447-
--workspace \
448-
--bin "reth" \
449-
--lib \
450-
--examples \
451-
--tests \
452-
--benches \
453-
--features "ethereum $(BIN_OTHER_FEATURES)" \
454-
--fix \
455-
--allow-staged \
456-
--allow-dirty \
457-
-- -D warnings
458-
459-
fix-lint-op-reth:
460-
cargo +nightly clippy \
461-
--workspace \
462-
--bin "op-reth" \
463-
--lib \
464-
--examples \
465-
--tests \
466-
--benches \
467-
--features "optimism $(BIN_OTHER_FEATURES)" \
468-
--fix \
469-
--allow-staged \
470-
--allow-dirty \
471-
-- -D warnings
472-
473-
fix-lint-other-targets:
408+
clippy-fix:
474409
cargo +nightly clippy \
475410
--workspace \
476411
--lib \
@@ -484,9 +419,7 @@ fix-lint-other-targets:
484419
-- -D warnings
485420

486421
fix-lint:
487-
make fix-lint-reth && \
488-
make fix-lint-op-reth && \
489-
make fix-lint-other-targets && \
422+
make clippy-fix && \
490423
make fmt
491424

492425
.PHONY: rustdocs
@@ -499,43 +432,21 @@ rustdocs: ## Runs `cargo docs` to generate the Rust documents in the `target/doc
499432
cargo +nightly docs \
500433
--document-private-items
501434

502-
test-reth:
503-
cargo test \
504-
--workspace \
505-
--bin "reth" \
506-
--lib \
507-
--examples \
508-
--tests \
509-
--benches \
510-
--features "ethereum $(BIN_OTHER_FEATURES)"
511-
512-
test-op-reth:
435+
test:
513436
cargo test \
514437
--workspace \
515438
--bin "op-reth" \
516439
--lib --examples \
517440
--tests \
518441
--benches \
519-
--features "optimism $(BIN_OTHER_FEATURES)"
520-
521-
test-other-targets:
522-
cargo test \
523-
--workspace \
524-
--lib \
525-
--examples \
526-
--tests \
527-
--benches \
528442
--all-features
529443

530444
test-doc:
531-
cargo test --doc --workspace --features "ethereum"
532-
cargo test --doc --workspace --features "optimism"
445+
cargo test --doc --workspace --all-features
533446

534447
test:
535-
make test-reth && \
536-
make test-op-reth && \
537-
make test-doc && \
538-
make test-other-targets
448+
make test && \
449+
make test-doc
539450

540451
pr:
541452
make lint && \

bin/reth-bench/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ min-info-logs = ["tracing/release_max_level_info"]
9191
min-debug-logs = ["tracing/release_max_level_debug"]
9292
min-trace-logs = ["tracing/release_max_level_trace"]
9393

94-
optimism = ["reth-node-core/optimism"]
95-
9694
# no-op feature flag for switching between the `optimism` and default functionality in CI matrices
9795
ethereum = []
9896

crates/e2e-test-utils/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ reth-network-peers.workspace = true
3333
reth-engine-local.workspace = true
3434
reth-tasks.workspace = true
3535

36-
# currently need to enable this for workspace level
37-
reth-optimism-primitives = { workspace = true, features = ["arbitrary", "serde", "serde-bincode-compat"] }
38-
3936
# rpc
4037
jsonrpsee.workspace = true
4138
url.workspace = true

0 commit comments

Comments
 (0)