-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Use engine API that matches hardfork version #9253
Use engine API that matches hardfork version #9253
Conversation
This is a great catch, would super appreciate it if you could double check that this is represented in the specs and update there if not: https://github.com/ethereum-optimism/specs This will greatly help alternative implementations (stage 2 roadmap) |
WalkthroughWalkthroughThe changes across these updates aim to standardize and enhance the handling of payload information by introducing the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@tynes |
FYI, I found the new PR has been merged to upstream geth 2 days ago, which allows fcuV2 before Shanghai. This is the correct behavior to satisfy the specs, but it has yet to be released. Current PR makes op-node work with the latest version of geth(v1.13.11). |
Thank you! Keeping the specs up to date is super high leverage for scaling the collective! |
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.
Could we get some test coverage for these new methods as well?
837eb71
to
649e994
Compare
Added unit tests for new methods: 649e994 |
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.
TYVM for finding and fixing this issue.
c0d0db9
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
* Use engine API that matches HF * Simplify engine client code by using EngineAPIVersion * Return full method string from engine api version methods * FCUVersion takes payload attributes * Use a proper method * Handle switch default case explicitly * Return fcuV3 if attrs is nil * Add test cases for engine api version methods
Description
Ethereun Cancun engine API spec specifies that
newPayloadV3
,forkchoiceUpdatedV3
andgetPayloadV3
must returnUnsupported fork
error if they are called before Cancun.Erigon followed the specs, and Geth also merged PRs that check hardfork version in engine APIs last week. (ethereum/go-ethereum#28230, ethereum/go-ethereum#28246)
But the current version of op-geth does not merge upstream fix, so it always accepts V3 APIs from op-node.
I think we should adhere to the L1 engine API specs - merge upstream Geth PRs to op-geth, fix op-node and update exec-engine specs.
This PR is the draft of op-node fix.
Tests
CI will verify that every change does not affect anything. And I have manually tested the fix works with op-erigon (drop V3 API before Cancun)