-
Notifications
You must be signed in to change notification settings - Fork 238
fix(execution/evm): verify payload status #2863
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
Conversation
|
Claude finished @julienrbrt's task —— View job Comprehensive Code ReviewI've completed a thorough review of the retry logic and payload verification implementation. Overall, this is a solid improvement that properly implements Engine API specification compliance with retry logic for transient failures. The test coverage is excellent. However, I've identified several areas for improvement across code quality, design, and maintainability. 🔴 High Priority Issues1. Unreachable Code in
|
|
The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).
|
Summary of ChangesHello @julienrbrt, 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 significantly enhances the reliability and resilience of the EVM execution client by introducing robust payload status validation and a sophisticated retry mechanism. By adhering to the Engine API specification, the system now intelligently handles transient Highlights
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 introduces retry logic for handling transient SYNCING statuses from the EVM execution client, which is a great improvement for node stability. The core changes involve a new retryWithBackoff helper and its integration into InitChain, ExecuteTxs, and SetFinal.
The overall approach is solid, and the new tests are comprehensive. However, I've identified a few areas for improvement:
- The implementation of the retry logic in
ExecuteTxsandsetFinalis unnecessarily complex and inconsistent with the cleaner pattern used inInitChain. I've left comments suggesting a refactoring to improve clarity and robustness. - The
retryWithBackoffhelper contains some unreachable code that should be removed. - A minor cleanup in
validatePayloadStatusis also suggested.
Addressing these points will make the new retry mechanism more maintainable and consistent across the codebase.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2863 +/- ##
==========================================
- Coverage 64.93% 64.82% -0.11%
==========================================
Files 81 81
Lines 7350 7350
==========================================
- Hits 4773 4765 -8
- Misses 2036 2043 +7
- Partials 541 542 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alpe
left a comment
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 retry/backoff code looks good.
It looks familiar to other retry/backoff logic code that exists already. Would it make sense to extract it to some utility?
Have you thought about encapsulating the retry logic in a decorator to the engineClient.CallContext ? This way, the retry would be hidden and the code can be slightly more readable.
| // get payload | ||
| var payloadResult engine.ExecutionPayloadEnvelope | ||
| err = c.engineClient.CallContext(ctx, &payloadResult, "engine_getPayloadV4", *forkchoiceResult.PayloadID) | ||
| err = c.engineClient.CallContext(ctx, &payloadResult, "engine_getPayloadV4", *payloadID) |
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.
Should there be a retry for this call, too?
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.
I have checked and ExecutionPayloadEnvelope doesn't return a payload status, so it cannot be retried with the same logic. I am updated the API naming to clarify the retry function usage (a00d4ea)
This is a seperate go module, as it depends only on core we have nothing else available. Let me check for your other point. |
tac0turtle
left a comment
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.
utACK, there is the one question from alex
* main: chore: remove extra github action yml file (#2882) fix(execution/evm): verify payload status (#2863) feat: fetch included da height from store (#2880) chore: better output on errors (#2879) refactor!: create da client and split cache interface (#2878) chore!: rename `evm-single` and `grpc-single` (#2839) build(deps): Bump golang.org/x/crypto from 0.42.0 to 0.45.0 in /tools/da-debug in the go_modules group across 1 directory (#2876) chore: parallel cache de/serialization (#2868) chore: bump blob size (#2877)
PR adding retry logic and better payload verification (as found in the audit).
It was one shot by Claude Sonnet, so still checking it :Ddone and updated.