Skip to content

test: upgrade all reth dependencies from v1.11.3 to v2.0.0#207

Draft
randygrok wants to merge 14 commits intomainfrom
test-reth-v2
Draft

test: upgrade all reth dependencies from v1.11.3 to v2.0.0#207
randygrok wants to merge 14 commits intomainfrom
test-reth-v2

Conversation

@randygrok
Copy link
Copy Markdown
Contributor

@randygrok randygrok commented Apr 8, 2026

Summary

  • Bump all reth dependencies from v1.11.3 to v2.0.0 (revm 36, alloy-evm 0.30)
  • Migrate reth-primitives imports to alloy-consensus / reth-primitives-traits / reth-ethereum-primitives
  • Adapt to removed PayloadBuilderAttributes trait — PayloadAttributes used directly
  • Adapt to new revm 36 API: ResultGas, new_mainnet_with_spec, TransactionEnvMut
  • Adapt block executor to new StateDB trait bound (replaces Database + State)
  • Rebuild RPC receipt conversion after into_rpc removal
  • Switch reth-codecs and reth-primitives-traits to crates.io
  • Clean up dead code left over from the migration (unused types, constructors)
  • Add logging for undecodable payload transactions and extract duplicated helpers

Test plan

  • cargo check passes for all crates
  • All unit and e2e tests pass
  • Clippy clean with -D warnings
  • Manual smoke test on devnet

randygrok added 14 commits April 8, 2026 14:06
These crates were extracted from the reth monorepo in v2.0.0 and
published to crates.io as version 0.1.0. Update workspace dependencies
to reference crates.io instead of the git repository.
- Remove serde-bincode-compat feature (removed from reth-primitives-traits)
- Remove RlpBincode impl (trait no longer exists)
- Remove explicit SignedTransaction impls (now blanket-implemented)
- Update Decompress::decompress to return DecompressError instead of DatabaseError
- Update imports accordingly
- Remove unused reth-primitives dependency (crate removed in v2.0.0)
- Remove is_pure method from Precompile impl (removed from trait in revm 36)
- Remove reth-primitives dependency (deleted upstream)
- Remove PayloadBuilderAttributes trait (merged into PayloadAttributes)
- Refactor EvolveEnginePayloadBuilderAttributes to impl PayloadAttributes
- Change PayloadBuilder::Attributes to EvolveEnginePayloadAttributes
- Migrate PayloadConfig to include payload_id field
- Migrate BuildArguments to include execution_cache and trie_handle
- Rename TransactionEnv to TransactionEnvMut (alloy-evm)
- Update TryIntoTxEnv to new 3-generic-param signature
- Add consensus_ref to PoolTransaction impl
- Fix build_with_tasks generic args (3 → 2)
- Add slot_num field to BlockEnv initializers
- Remove set_state_clear_flag (handled by EVM spec)
- Update BlockBuilder::finish to accept precomputed state root
- Fix receipt conversion (replace into_rpc with map_logs)
- Fix Withdrawals/Cow type mismatches
- Rename extra_data_bytes to extra_data
- Fix reth_primitives imports to alloy_consensus/reth_primitives_traits
- Update BlockExecutorFactory::create_executor to use StateDB bound
- Also remove reth-primitives from tests/Cargo.toml
- Migrate reth_primitives::{Header, Transaction} to alloy_consensus::Header
  and reth_ethereum_primitives::Transaction
- Remove with_disable_proof_v2() from TreeConfig (method removed in v2.0.0)
Add missing const fn annotations and remove useless .into() conversion.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 918344ad-314e-4fe7-8df8-55e77f07b88d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test-reth-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@randygrok randygrok changed the title refactor: post reth v2.0.0 upgrade cleanup test: upgrade all reth dependencies from v1.11.3 to v2.0.0 Apr 8, 2026
@claude
Copy link
Copy Markdown

claude bot commented Apr 8, 2026

Claude finished @randygrok's task —— View job


PR Review: Reth v2.0.0 Dependency Upgrade

I've completed a comprehensive review of this major dependency upgrade from reth v1.11.3 to v2.0.0. Here's my detailed assessment:

Strengths

Well-Executed Migration

  • Comprehensive scope: Successfully migrated 26 files across the entire codebase
  • Clean dependency updates: All reth dependencies consistently updated to v2.0.0 tag
  • Proper import migration: Successfully migrated from reth-primitives to alloy-consensus/reth-primitives-traits
  • API adaptation: Properly adapted to new revm 36 APIs including ResultGas, new_mainnet_with_spec, TransactionEnvMut

Code Quality Improvements

  • Enhanced error handling: Added graceful handling of undecodable transactions with proper logging (crates/node/src/payload_service.rs:226-238)
  • Test coverage: Added comprehensive test try_build_drops_invalid_raw_transactions to verify invalid transaction handling
  • Helper extraction: Extracted duplicated fee recipient resolution logic into resolve_fee_recipient() method
  • Dead code cleanup: Removed unused constructors like EvEvm::new() and obsolete types

Security Considerations

  • Graceful degradation: Invalid transactions are dropped with warnings rather than causing failures
  • Fee recipient fallback: Proper fallback to configured base-fee sink when suggested recipient is zero
  • Transaction validation: Maintains robust transaction decoding and recovery processes

⚠️ Areas of Concern

Major Breaking Changes

  • PayloadBuilderAttributes removal: The migration from the removed trait to direct PayloadAttributes usage looks correct but represents a significant API surface change
  • StateDB trait bounds: New StateDB trait replacing Database + State - ensure all downstream usage is compatible
  • RPC receipt conversion: Complete rebuild of receipt conversion after into_rpc removal requires thorough testing

Potential Compatibility Issues

  • Revm 36 integration: The new TransactionEnvMut and context APIs are substantially different - runtime behavior changes possible
  • Gas calculation changes: New ResultGas type may have subtle differences in gas accounting
  • Block execution: StateDB trait bounds and new executor APIs could affect block processing performance

🔧 Technical Review

Performance Considerations

  • Transaction decoding: Using network_decode() in payload service - verify this doesn't introduce performance regression vs previous approach
  • Memory usage: New alloy-consensus types may have different memory characteristics than reth-primitives
  • Block building: The executor factory changes could impact block building latency

Missing Test Coverage

While the PR includes some new tests, consider adding:

  • Integration tests for the new revm 36 APIs
  • Performance regression tests for block building
  • Edge case testing for the new StateDB trait bounds
  • RPC compatibility tests for the rebuilt receipt conversion

📋 Recommendations

High Priority

  1. Manual smoke test: The checklist shows this is pending - critical for a change of this magnitude
  2. Performance benchmarking: Compare block building and transaction processing performance vs v1.11.3
  3. Integration testing: Test against production-like workloads to catch subtle behavioral changes

Medium Priority

  1. Documentation updates: Consider updating any docs that reference the old APIs
  2. Monitoring: Add metrics for the new "dropping undecodable transaction" warnings to track frequency
  3. Rollback plan: Ensure rollback strategy is clear given the scope of changes

📊 Overall Assessment

This is a well-executed major dependency upgrade that demonstrates:

  • ✅ Strong engineering discipline in handling breaking changes
  • ✅ Proper error handling and graceful degradation
  • ✅ Good test coverage for new failure modes
  • ✅ Clean code organization and dead code removal

Recommendation: APPROVE after completing the manual smoke test on devnet. The migration appears technically sound, but the scope warrants careful validation in a realistic environment before merging.

The code quality is high, security considerations are properly handled, and the testing approach is appropriate for the scope of changes.


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