Skip to content

feat(op-reth): make chainspec reth-codec opt-in#21483

Merged
einar-oplabs merged 3 commits into
developfrom
einar/fakedev9999/op-reth-chainspec-reth-codec-opt-in
Jun 23, 2026
Merged

feat(op-reth): make chainspec reth-codec opt-in#21483
einar-oplabs merged 3 commits into
developfrom
einar/fakedev9999/op-reth-chainspec-reth-codec-opt-in

Conversation

@einar-oplabs

@einar-oplabs einar-oplabs commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

All credit to @fakedev9999.

Supercedes #21178


Follow-up fix (fix(op-reth): enable reth-codec for post-exec-replay primitives):

Gating chainspec's reth-codec behind a feature dropped the Compact impls that reth-optimism-post-exec-replay was getting transitively. Because the workspace pins reth-optimism-chainspec with default-features = false, chainspec's default (and thus its new reth-codec) never activates for consumers — so reth-optimism-primitives/reth-codec was silently lost. A full workspace build masks this via feature unification, but cargo hack --no-dev-deps (run by just hack) compiles each crate in isolation and surfaced it: post-exec-replay's provider/DB deps activate reth-primitives-traits/reth-codec, which requires the OpPrimitives Compact impls.

Fix declares the dependency explicitly in post-exec-replay, matching the existing reth-optimism-flashblocks idiom for feature-only deps. It's the only crate affected.

reth-optimism-chainspec force-enabled reth-codec on reth-optimism-primitives via
its dependency line, unconditionally pulling reth-zstd-compressors → zstd → zstd-sys
(native C) into every consumer — even type-only ones. The chainspec crate has no
Compact/zstd usage of its own. Gate reth-codec behind an opt-in feature (on by
default to preserve behavior) so zkVM/type-only consumers can drop the native zstd
C build with default-features = false.
@einar-oplabs einar-oplabs force-pushed the einar/fakedev9999/op-reth-chainspec-reth-codec-opt-in branch from 0d9d41f to 3f48844 Compare June 22, 2026 15:26
einar-oplabs and others added 2 commits June 22, 2026 23:23
Making chainspec's reth-codec opt-in dropped the Compact impls that
post-exec-replay relied on transitively: its provider/DB dependencies
activate reth-primitives-traits/reth-codec, which demands Compact impls
for OpPrimitives that only exist when reth-optimism-primitives/reth-codec
is enabled. Declare that dependency directly so the crate compiles in
isolation (cargo hack --no-dev-deps), matching the reth-optimism-flashblocks
idiom for feature-only deps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@einar-oplabs

Copy link
Copy Markdown
Contributor Author

@fakedev9999 I had to do some changes to make it pass CI. Could you please confirm that it still works for you?

@einar-oplabs einar-oplabs added this pull request to the merge queue Jun 23, 2026
Merged via the queue into develop with commit 62b788d Jun 23, 2026
96 of 118 checks passed
@einar-oplabs einar-oplabs deleted the einar/fakedev9999/op-reth-chainspec-reth-codec-opt-in branch June 23, 2026 08:02
nonsense added a commit that referenced this pull request Jun 23, 2026
The reth-codec opt-in change (#21483) added reth-optimism-primitives as a
dependency of reth-optimism-post-exec-replay but only updated the main rust
workspace lockfile. The op-rbuilder and rollup-boost workspaces depend on
that crate via path, so their Cargo.lock files went stale and the Docker
builds (which run `cargo chef cook --locked`) failed with "cannot update
the lock file because --locked was passed".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

3 participants