feat(op-reth): make chainspec reth-codec opt-in#21483
Merged
einar-oplabs merged 3 commits intoJun 23, 2026
Merged
Conversation
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.
0d9d41f to
3f48844
Compare
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>
…op-reth-chainspec-reth-codec-opt-in
Contributor
Author
|
@fakedev9999 I had to do some changes to make it pass CI. Could you please confirm that it still works for you? |
nonsense
approved these changes
Jun 23, 2026
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All credit to @fakedev9999.
Supercedes #21178
Follow-up fix (
fix(op-reth): enable reth-codec for post-exec-replay primitives):Gating chainspec's
reth-codecbehind a feature dropped theCompactimpls thatreth-optimism-post-exec-replaywas getting transitively. Because the workspace pinsreth-optimism-chainspecwithdefault-features = false, chainspec'sdefault(and thus its newreth-codec) never activates for consumers — soreth-optimism-primitives/reth-codecwas silently lost. A full workspace build masks this via feature unification, butcargo hack --no-dev-deps(run byjust hack) compiles each crate in isolation and surfaced it: post-exec-replay's provider/DB deps activatereth-primitives-traits/reth-codec, which requires theOpPrimitivesCompactimpls.Fix declares the dependency explicitly in post-exec-replay, matching the existing
reth-optimism-flashblocksidiom for feature-only deps. It's the only crate affected.