From c0c7862c118a077ef0bf7aaf27ab3801ac6800eb Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 17:57:50 +0100 Subject: [PATCH 1/9] Skip no-std checks --- .github/assets/check_rv32imac.sh | 58 ++++++++++++++++---------------- .github/workflows/lint.yml | 50 ++++++++++++++++++++++++++- 2 files changed, 78 insertions(+), 30 deletions(-) diff --git a/.github/assets/check_rv32imac.sh b/.github/assets/check_rv32imac.sh index 9d9c421ca20..9298c17e481 100755 --- a/.github/assets/check_rv32imac.sh +++ b/.github/assets/check_rv32imac.sh @@ -3,39 +3,39 @@ set +e # Disable immediate exit on error # Array of crates to check crates_to_check=( - reth-codecs-derive - reth-primitives - reth-primitives-traits - reth-network-peers - reth-trie-common - reth-trie-sparse - reth-chainspec - reth-consensus - reth-consensus-common - reth-prune-types - reth-static-file-types - reth-storage-errors - reth-execution-errors - reth-errors - reth-execution-types - reth-db-models - reth-evm - reth-revm - reth-storage-api + #reth-codecs-derive + #reth-primitives + #reth-primitives-traits + #reth-network-peers + #reth-trie-common + #reth-trie-sparse + #reth-chainspec + #reth-consensus + #reth-consensus-common + #reth-prune-types + #reth-static-file-types + #reth-storage-errors + #reth-execution-errors + #reth-errors + #reth-execution-types + #reth-db-models + #reth-evm + #reth-revm + #reth-storage-api ## ethereum - reth-evm-ethereum - reth-ethereum-forks - reth-ethereum-primitives - reth-ethereum-consensus - reth-stateless + #reth-evm-ethereum + #reth-ethereum-forks + #reth-ethereum-primitives + #reth-ethereum-consensus + #reth-stateless ## optimism - reth-optimism-chainspec - reth-optimism-forks - reth-optimism-consensus - reth-optimism-primitives - reth-optimism-evm + #reth-optimism-chainspec + #reth-optimism-forks + #reth-optimism-consensus + #reth-optimism-primitives + #reth-optimism-evm ) # Array to hold the results diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 94a79ffb293..d86a79577a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: include: - type: ethereum args: --workspace --lib --examples --tests --benches --locked - features: "asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs" + features: "ethereum asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs" steps: - uses: actions/checkout@v6 - uses: rui314/setup-mold@v1 @@ -78,6 +78,24 @@ jobs: sudo apt update && sudo apt install gcc-multilib .github/assets/check_wasm.sh + riscv: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v6 + - uses: rui314/setup-mold@v1 + - uses: dtolnay/rust-toolchain@stable + with: + target: riscv32imac-unknown-none-elf + - uses: taiki-e/install-action@cargo-hack + - uses: mozilla-actions/sccache-action@v0.0.9 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - uses: dcarbone/install-jq-action@v3 + - name: Run RISC-V checks + run: .github/assets/check_rv32imac.sh + crate-checks: name: crate-checks (${{ matrix.partition }}/${{ matrix.total_partitions }}) runs-on: ubuntu-latest @@ -225,6 +243,35 @@ jobs: - name: Ensure no arbitrary or proptest dependency on default build run: cargo tree --package reth -e=features,no-dev | grep -Eq "arbitrary|proptest" && exit 1 || exit 0 + # Checks that selected crates can compile with power set of features + features: + name: features + runs-on: ubuntu-latest + strategy: + matrix: + partition: [1, 2] + total_partitions: [2] + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + - uses: rui314/setup-mold@v1 + - uses: dtolnay/rust-toolchain@clippy + - uses: mozilla-actions/sccache-action@v0.0.9 + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo install cargo-hack + uses: taiki-e/install-action@cargo-hack + - run: | + cargo hack check \ + --package reth-codecs \ + --package reth-primitives-traits \ + --package reth-primitives \ + --feature-powerset \ + --depth 2 + env: + RUSTFLAGS: -D warnings + # Check crates correctly propagate features feature-propagation: runs-on: ubuntu-latest @@ -260,6 +307,7 @@ jobs: - typos - grafana - no-test-deps + - features - feature-propagation - deny timeout-minutes: 30 From 862ec8af902c991175778e60722bdedd7a3dc011 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:02:18 +0100 Subject: [PATCH 2/9] Revert rm exclude ef-tests --- .github/workflows/unit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index ef6705b0082..29dee55b0bf 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -51,7 +51,7 @@ jobs: cargo nextest run \ --features "${{ matrix.features }} $EDGE_FEATURES" --locked \ ${{ matrix.exclude_args }} --workspace \ - --no-tests=warn \ + --exclude ef-tests --no-tests=warn \ -E "!kind(test) and not binary(e2e_testsuite)" doc: From cfd96c0b02a9e15d7ecf826ad81d6cdf917b57fb Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:05:41 +0100 Subject: [PATCH 3/9] fixup! Skip no-std checks --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d86a79577a1..0e66e20cf6c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: include: - type: ethereum 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" + features: "asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs" steps: - uses: actions/checkout@v6 - uses: rui314/setup-mold@v1 From 344b14539de24f0993f123d0a954f1f6c42c3f5a Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:08:21 +0100 Subject: [PATCH 4/9] Run feature powerset on new crates --- .github/workflows/lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0e66e20cf6c..7e0f703ce54 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -264,9 +264,9 @@ jobs: uses: taiki-e/install-action@cargo-hack - run: | cargo hack check \ - --package reth-codecs \ - --package reth-primitives-traits \ - --package reth-primitives \ + --package reth-optimism-trie \ + --package reth-optimism-exex \ + --package reth-optimism-node \ --feature-powerset \ --depth 2 env: From 16f46a4ecae7e1c92fe6758e3a007cac0d918408 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:21:03 +0100 Subject: [PATCH 5/9] fixup! Run feature powerset on new crates --- .github/workflows/lint.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 7e0f703ce54..eefb827a32e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -266,7 +266,6 @@ jobs: cargo hack check \ --package reth-optimism-trie \ --package reth-optimism-exex \ - --package reth-optimism-node \ --feature-powerset \ --depth 2 env: From 06aebdd4e4dd3cfd855ecc4ceaed21ecc4ea5ba3 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:27:51 +0100 Subject: [PATCH 6/9] fixup! Run feature powerset on new crates --- .github/workflows/lint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eefb827a32e..4c1abbd9ab9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -264,6 +264,7 @@ jobs: uses: taiki-e/install-action@cargo-hack - run: | cargo hack check \ + --all-targets \ --package reth-optimism-trie \ --package reth-optimism-exex \ --feature-powerset \ From 9351a05a25ecd71668005078b1b23fbd517a3e31 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:32:43 +0100 Subject: [PATCH 7/9] Making eyre dep optional in reth-optimism-trie --- crates/optimism/trie/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/optimism/trie/Cargo.toml b/crates/optimism/trie/Cargo.toml index bb5b0b71132..dff55b4b93e 100644 --- a/crates/optimism/trie/Cargo.toml +++ b/crates/optimism/trie/Cargo.toml @@ -42,7 +42,7 @@ bincode.workspace = true # misc thiserror.workspace = true auto_impl.workspace = true -eyre.workspace = true +eyre = { workspace = true, optional = true } strum.workspace = true tracing.workspace = true derive_more.workspace = true @@ -85,4 +85,5 @@ metrics = [ "reth-trie/metrics", "dep:reth-metrics", "dep:metrics", + "dep:eyre", ] From 8d264c5d0624f256dcfb46b7f6ef6767f11159bb Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:35:13 +0100 Subject: [PATCH 8/9] Enable eyre for tests in reth-trie-optimism --- crates/optimism/trie/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/optimism/trie/Cargo.toml b/crates/optimism/trie/Cargo.toml index dff55b4b93e..e5e9ee14f60 100644 --- a/crates/optimism/trie/Cargo.toml +++ b/crates/optimism/trie/Cargo.toml @@ -68,6 +68,7 @@ reth-testing-utils.workspace = true reth-storage-errors.workspace = true secp256k1.workspace = true mockall.workspace = true +eyre.workspace = true # misc serial_test.workspace = true From 05bf071434c710d15fb49d46fa19b8cca9e717c4 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Fri, 23 Jan 2026 18:41:54 +0100 Subject: [PATCH 9/9] Fix lint --- crates/optimism/exex/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/optimism/exex/src/lib.rs b/crates/optimism/exex/src/lib.rs index 4e0e42cc9fd..1e01d1ed86b 100644 --- a/crates/optimism/exex/src/lib.rs +++ b/crates/optimism/exex/src/lib.rs @@ -174,7 +174,6 @@ where /// Ensure proofs storage is initialized async fn ensure_initialized(&self) -> eyre::Result<()> { // Check if proofs storage is initialized - #[cfg_attr(not(feature = "metrics"), expect(unused_variables))] let earliest_block_number = match self.storage.get_earliest_block_number().await? { Some((n, _)) => n, None => {