Skip to content

Enable ethrex's rayon feature on the embedded node - #584

Open
0w3n-d wants to merge 1 commit into
od/ethrex-v26-devnet8from
od/ethrex-rayon-feature
Open

0w3n-d wants to merge 1 commit into
od/ethrex-v26-devnet8from
od/ethrex-rayon-feature

Conversation

@0w3n-d

@0w3n-d 0w3n-d commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Issue: none (one-line dependency fix; happy to file a bug issue if you want it tracked)

What this PR does

Adds rayon to the ethrex-blockchain, ethrex-common and ethrex-vm pins.
It is a default feature of all three; our pins set default-features = false,
and only the ethrex cmd crate — deliberately not a dependency — adds it back,
so the embedded node has never had it.

Without it the node cannot follow the head on an Amsterdam chain. ethrex gates
the parallel BAL execution path on rayon
(crates/vm/backends/levm/mod.rs:485) but not the caller that decides whether
to create the merkleizer channel (crates/blockchain/blockchain.rs:1026). With
a BAL supplied and both bal_parallel_* options at their defaults, the caller
skips the channel, LEVM drops the BAL, and the sequential path errors with
sequential execution path called without a merkleizer Sender. Every
newPayload that carries a BAL fails. P2P sync is unaffected, because it
passes no BAL — which is why a simulator syncs to the head and then stalls
one block later. Observed on plataberget at block 176481.

The feature also gates the mempool prewarm (Mempool prewarm requires the rayon feature; disabled) and the block warmer (warmer: 0.00 ms), both now
active.

What this PR deliberately does not do

  • No change to the pinned ethrex rev, and no patch to ethrex. The
    cfg-gating inconsistency is an upstream bug; this PR only stops us from
    triggering it. An upstream report is worth filing separately.
  • No change to ethrex-p2p, ethrex-levm or ethrex-storage pins.
    ethrex-levm picks up rayon transitively through ethrex-vm, and
    ethrex-p2p uses rayon unconditionally.
  • Does not touch the aws-lc-rs/cc constraint that the comment above these
    pins documents. rayon is unrelated to it.

Tests

No new tests. Nothing in the suite executes an Amsterdam block with a BAL
through add_block, so no unit test can observe this; the failure is a
feature-resolution problem, not a logic one.

Verified two ways:

  • cargo metadata before and after. Before, all four ethrex crates resolved
    without rayon; after, all four have it. Identical under --all-features.
  • Existing checks: just fmt-check, cargo clippy --all-features --no-deps -- -D warnings, and just test (414 passed, 0 failed, 8 ignored).

Still needs a redeploy on plataberget to confirm the two log lines are gone.
Note that this means the simulation role has never validated an Amsterdam block
through the engine path, so earlier sim results on this stack are not
trustworthy.

Reviewer checklist

  • CI (lint, unit-test) is green
  • Matches the linked issue/step
  • No unexplained scope creep or unrelated files touched

🤖 Generated with Claude Code

`rayon` is a default feature of ethrex-blockchain, ethrex-common and
ethrex-vm. The pins here set `default-features = false`, and only the
`ethrex` cmd crate (deliberately not a dependency) adds it back, so the
embedded node has never had it.

It is not optional. ethrex gates the parallel BAL execution path on it
(`crates/vm/backends/levm/mod.rs:485`) but not the caller that decides
whether to create the merkleizer channel
(`crates/blockchain/blockchain.rs:1026`). With a BAL supplied and both
`bal_parallel_*` options at their defaults, the caller skips the channel
and LEVM then drops the BAL and takes the sequential path, which needs
that Sender:

  Error executing block: sequential execution path called without a
  merkleizer Sender

So every `newPayload` that carries a BAL fails and the node cannot
follow the head. P2P sync is unaffected because it passes no BAL.

Also restores the mempool prewarm and the block warmer, both of which
log or no-op when the feature is off.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@0w3n-d
0w3n-d added this pull request to stack #504 September 9, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant