refactor: eliminate op-rbuilder fork via [patch] approach#9
refactor: eliminate op-rbuilder fork via [patch] approach#9
Conversation
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
e7b9cb7 to
cec5ae7
Compare
Audit & Build VerificationArchitecture: ✅ Correct approachInjecting Tea's EVM customizations at the
Build Verification (Docker, ARM64)
Bugs Found & Fixed (pushed in 04ddfb7)Bug 1: Missing trait import (
Bug 2:
Note: Pre-existing
|
Extract Tea-specific precompiles (GPG verify, L1 cost multiplier, chain ID detection) into a new `tea-precompiles` crate. Inject them into `OpEvmFactory` at the `alloy-op-evm` layer via feature-gated dependency, so tea-reth gets Tea's EVM automatically without a custom executor builder. Op-rbuilder submodule points to the `tea` branch of teaxyz/tea-op-rbuilder (existing minimal fork: 6 files, 21 lines) which swaps TeaOpEvmConfig into the block builder. This fork remains necessary because op-rbuilder's dep versions (thiserror 1.x, reqwest 0.12) are incompatible with the rust/ workspace (thiserror 2.x, reqwest 0.13). Changes: - New: rust/tea-precompiles/ (self-contained GPG precompile + L1 cost) - Modified: rust/alloy-op-evm/ (OpEvmFactory uses Tea precompiles when std) - Simplified: rust/tea-reth/ (removed TeaEvmFactory, evm/, precompiles/) - Added: just build-op-rbuilder and patch-op-rbuilder recipes in justfile Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
04ddfb7 to
2e735ca
Compare
Add op-rbuilder (Flashbots v0.4.1) as a workspace member of the rust/
workspace. This eliminates the need for a separate fork or submodule —
op-rbuilder shares the same dependency resolution as tea-reth, alloy-op-evm,
and tea-precompiles.
Changes to op-rbuilder source (3 files, minimal):
- tx_signer.rs: secp256k1 0.30→0.31 API (from_digest, thread_rng)
- args/playground.rs: SecretKey cross-version conversion via bytes
- Cargo.toml: added pgp dep for GPG precompile
The Tea integration uses tea_reth::node::{TeaOpEvmConfig, TeaExecutorBuilder}
which op-rbuilder imports — same pattern as the original tea branch fork but
now resolved entirely within the rust/ workspace.
Added to rust/Cargo.toml:
- op-rbuilder workspace members
- Missing workspace deps (axum, ctor, dotenvy, etc.)
- libp2p features, moka future feature, alloy-sol-types json feature
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
tea-precompilescrateOpEvmFactoryat thealloy-op-evmlayer (feature-gated behindstd)rust/workspace member — no separate fork or submodule neededTeaOpEvmConfigandTeaExecutorBuilderfromtea_reth::nodeArchitecture
All crates in the same
rust/workspace — shared dependency resolution, no cross-workspace conflicts.Op-rbuilder changes (3 files)
Cargo.tomlpgpdep for GPG precompiletx_signer.rsfrom_digest,thread_rng)args/playground.rsSecretKeycross-version conversion via bytesOp-rbuilder's Tea integration (type swaps in context/payload/service/syncer_ctx/launcher) is unchanged from the original PR #1 pattern — it just resolves from the workspace now instead of an external dep.
Build verification (Docker, ARM64)
cargo check -p tea-precompiles— compilescargo check -p alloy-op-evm— compilescargo check -p tea-reth— compilescargo check -p op-rbuilder— compilescargo test -p tea-precompiles— 44 tests passcargo test -p tea-reth— 9 integration tests pass🤖 Generated with Claude Code