Skip to content

deps: upgrade to v1.11.0#106

Open
chatton wants to merge 10 commits intomainfrom
cian/reth-upgrade
Open

deps: upgrade to v1.11.0#106
chatton wants to merge 10 commits intomainfrom
cian/reth-upgrade

Conversation

@chatton
Copy link
Contributor

@chatton chatton commented Jan 22, 2026

Description

Type of Change

closes: #105

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring

Related Issues

Fixes #(issue)

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Testing

Additional Notes

@claude
Copy link

claude bot commented Jan 22, 2026

Claude finished @chatton's task —— View job


Code Review: Reth v1.11.0 Upgrade

I've completed a comprehensive review of this major dependency upgrade. Here are my findings:

Review Summary ✅ APPROVED with Minor Suggestions

✅ Excellent Dependency Management

  • Clean upgrade from Reth v1.8.4 → v1.11.0, revm to v34.0.0, alloy to v1.5.6
  • All dependencies properly aligned with consistent versioning
  • Good use of workspace dependencies to prevent version conflicts

✅ High-Quality API Adaptations

  • Precompiles: MintPrecompile correctly adapted to new revm APIs with proper use of decr_balance() and touch_account() returning Result
  • EVM Factory: Clean implementation of new components() and components_mut() methods for AlloyEvm trait
  • Consensus: Maintains custom timestamp validation logic while leveraging upstream improvements
  • Tests: Comprehensive e2e test coverage with proper adaptation to new EthApiClient generic parameters

Security Analysis ✅ SECURE

  • No security regressions identified
  • Mint precompile maintains proper authorization checks
  • Balance operations use safe overflow/underflow protection
  • OTLP tracing follows OpenTelemetry security best practices

Performance Considerations ✅ OPTIMIZED

  • Upgrades bring performance improvements from upstream Reth/revm
  • No performance anti-patterns introduced
  • EVM factory properly separates inspect vs execute modes for efficiency

Test Coverage ✅ COMPREHENSIVE

  • Strong test coverage in mint precompile (752 lines of tests!)
  • E2e tests updated for new APIs with proper type safety
  • Tests cover both happy path and error scenarios

Minor Issues & Suggestions

⚠️ OTLP Configuration Logic (main.rs:26-44)

// Current logic returns None if endpoint not configured
// Consider allowing basic tracing even without OTLP endpoint

📝 Comment Update Needed (Cargo.toml:24)

# Reth dependencies - Using v1.11.0 stable

🔧 Consider Refactoring
The EthApiClient calls in e2e tests are verbose due to explicit generics. Consider type aliases for commonly used client types.

Recommendations

  1. Approve and Merge - This is a well-executed upgrade
  2. 🧪 Testnet Validation - Agree with @tac0turtle's suggestion for testnet testing given the scope
  3. 🔄 Monitor - Watch for any edge cases in production given the extensive API surface changes

Final Assessment

This PR demonstrates excellent engineering practices with thorough API adaptations, comprehensive test coverage, and proper security considerations. The upgrade positions the codebase well for future Reth improvements while maintaining Evolve's custom functionality.

Code Quality: ⭐⭐⭐⭐⭐ (5/5)
Security: ✅ Safe to deploy
Test Coverage: ✅ Comprehensive
Documentation: ✅ Well-documented changes

Great work @chatton! 🎉


@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @chatton, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on a significant dependency upgrade, moving the project's core Reth framework to version v1.10.1. This update required extensive modifications across the codebase to ensure compatibility with the new Reth version, including adjustments to related revm and alloy libraries, a more configurable OTLP tracing setup, and updates to custom precompile logic. The changes also involve aligning with updated interfaces in Reth's payload builder, consensus, and EVM factory components, which helps integrate the latest features and stability improvements from the upstream project.

Highlights

  • Dependency Upgrades: Upgraded Reth dependencies from v1.8.4 to v1.10.1, along with compatible updates for revm (to 34.0.0) and alloy (to 1.4.3) and its related libraries.
  • OTLP Tracing Refactor: Refactored OTLP tracing initialization to dynamically configure endpoint and protocol via environment variables (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL), improving flexibility and deployment options.
  • MintPrecompile Logic Updates: Adjusted MintPrecompile to align with revm changes, specifically modifying how account balances are incremented/decremented and ensuring proper error handling and account state management (e.g., set_code, load_account_mut, touch_account).
  • Reth Interface Adaptations: Updated various Reth-related interfaces, including EvmFactory, Evm traits, Consensus implementation, and PayloadValidator, to match the new signatures and types introduced in Reth v1.10.1.
  • Payload Builder Enhancements: Modified the payload builder to calculate block timestamps based on the parent header and current system time, and added extra_data field initialization.
  • E2E Test Adjustments: Updated EthApiClient calls in end-to-end tests to include the Bytes type parameter, reflecting changes in the RPC client API.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades several key dependencies, most notably reth from v1.8.4 to v1.10.1, along with revm and alloy. The majority of the code changes are adaptations to the new APIs of these upgraded dependencies. The OTLP tracing initialization has also been refactored to be more robust and configurable via environment variables.

My review focuses on the new tracing logic and general maintainability. I've identified a couple of issues in the tracing initialization: one that could prevent tracing from being enabled at all, and another related to non-compliance with the OpenTelemetry specification for disabling the SDK. I've also pointed out an outdated comment in Cargo.toml that should be updated to reflect the new dependency version. The rest of the changes appear to be correct adaptations to the upstream API changes.

Comment on lines 27 to 30
// disabled if OTEL_SDK_DISABLED is set to anything other than "false"
if std::env::var("OTEL_SDK_DISABLED").is_ok_and(|v| v != "false") {
return None;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation for checking OTEL_SDK_DISABLED is not fully compliant with the OpenTelemetry specification. The spec states that the SDK should be disabled only if OTEL_SDK_DISABLED is set to true (case-insensitive), and any other value should be ignored (meaning the SDK is not disabled). The current logic disables the SDK for any value other than "false". This should be corrected to only disable for "true".

Suggested change
// disabled if OTEL_SDK_DISABLED is set to anything other than "false"
if std::env::var("OTEL_SDK_DISABLED").is_ok_and(|v| v != "false") {
return None;
}
// disabled if OTEL_SDK_DISABLED is set to "true" (case-insensitive)
if std::env::var("OTEL_SDK_DISABLED").map_or(false, |v| v.eq_ignore_ascii_case("true")) {
return None;
}

type Precompiles = PRECOMP;
type Frame = EthFrame<EthInterpreter>;

fn all(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

underlying Evm trait added two new methods to return all components either mutably or immutably

type Spec = SpecId;
type Precompiles = PRECOMP;
type Inspector = INSP;
type BlockEnv = BlockEnv;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new associated type in the EvmFactory trait

internals
.sstore(MINT_PRECOMPILE_ADDR, Self::allowlist_key(addr), value)
.map_err(Self::map_internals_error)?;
internals.touch_account(MINT_PRECOMPILE_ADDR);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

touch_account now returns a Result

.checked_sub(amount)
.ok_or_else(|| PrecompileError::Other("insufficient balance".to_string()))?;
account.info.set_balance(new_balance);
if !account.decr_balance(amount) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a new function to decrease the balance instead of needing to set a manually calculated decreased balance

@chatton chatton marked this pull request as ready for review January 26, 2026 10:06
@chatton chatton requested a review from a team as a code owner January 26, 2026 10:06
@tac0turtle
Copy link
Contributor

we should test this on testnets before merging to avoid the issue we had before

reconcile reth v1.10.1 API changes with ADR 003 batch/sponsorship
features from main. resolve merge conflicts and fix compilation
errors across ev-revm, ev-node, evolve, and test crates.
@chatton
Copy link
Contributor Author

chatton commented Feb 12, 2026

Ran the ev-node tests using the image built from this PR as so far it's okay https://github.com/evstack/ev-node/actions/runs/21943919373/job/63379862604?pr=3066

Working on spinning up a testnet with this image too.

@chatton chatton changed the title deps: upgrade to v1.10.1 deps: upgrade to v1.11.0 Feb 17, 2026
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.

upgrade to reth 1.10

3 participants