-
Notifications
You must be signed in to change notification settings - Fork 8
deps: upgrade to v1.10.1 #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Claude finished @chatton's task —— View job Code Review for Reth v1.10.1 UpgradeI have thoroughly reviewed this dependency upgrade PR. Below is my comprehensive analysis covering code quality, potential bugs, performance, security, and test coverage. 🎯 Overall AssessmentThis is a well-executed dependency upgrade that brings ev-reth from reth v1.8.4 to v1.10.1, along with compatible updates to revm (34.0.0) and alloy (1.4.3). The changes demonstrate a good understanding of the new APIs and maintain backward compatibility for ev-reth's custom functionality. ✅ Positive Aspects
🚨 Critical Issues1. OTLP Tracing Initialization Bug (bin/ev-reth/src/main.rs:74)Severity: HIGH // ISSUE: init_tracing() is called unconditionally, but should respect OTEL_SDK_DISABLED
init_tracing();Problem: The tracing is always initialized regardless of Fix: The current implementation is actually correct. The 2. Missing Comment Update (Cargo.toml:24)Severity: LOW # Reth dependencies - Using v1.10.1 stableThe comment correctly reflects the new version (updated from the previous v1.8.4 reference). 🔍 API Adaptation AnalysisEVM Factory Changes (crates/ev-revm/src/evm.rs:432-446)The new
Precompile Updates (crates/ev-precompiles/src/mint.rs:106, 173)
Consensus Implementation (crates/evolve/src/consensus.rs:124)
🔧 Performance Considerations
🔒 Security Analysis
🧪 Test Coverage AssessmentStrengths:
Recommendations:
📝 Minor Issues & Suggestions
🏁 RecommendationAPPROVE with testnet validation requirement. This is a high-quality upgrade that:
The code demonstrates careful attention to maintaining ev-reth's custom functionality while leveraging improvements in the underlying reth/revm ecosystem. Action Items:
|
Summary of ChangesHello @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 Highlights
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this 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.
bin/ev-reth/src/main.rs
Outdated
| // 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; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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".
| // 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( |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
|
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.
|
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. |
Description
Type of Change
closes: #105
Related Issues
Fixes #(issue)
Checklist
Testing
Additional Notes