-
Notifications
You must be signed in to change notification settings - Fork 394
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
engine: clarify payloadAttributes
checks and fcu v3 processing flow
#498
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's not clear how we extend point 7 of Paris fork. Might be better just to add this rules to Paris also in expected order
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.
One of this rules is in Paris which is checking the
timestamp
wrt parent block’s timestamp. Other two are introduced in Cancun, so they aren’t relevant for Paris. The point (7) in Cancun has an extended list of checks wrt to ParisThere 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 also had some confusion wrt to this. We have an engine api test:
where we essentially fcuV2 before Cancun, with a Shanghai
timestamp
and a non nullparentBeaconBlockRoot
(incorrect Payload Attributes structure).As we are before Cancun my assumption would be that the extended points to (7) are not yet applied. Most clients return
-38003: Invalid payload attributes
for this case. The addition to Paris only validates the Payload Attributes based on the timestamp. So to my understanding we don't explicitly state what to return in this case.So I agree with @flcl42 that we could add the Payload Attributes structure check to Paris. Apologies if I am missing something here
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.
Ahh, I just noticed that this check would be covered by: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_forkchoiceupdatedv2. And the appropraite response should be
-32602: Invalid params
.As most clients return
-38003: Invalid payload attributes
would it make sense to change it here. Similarly, I personally found this tricky to determine based on the current spec regarding the Payload Attributes structure check (but I could be the stupid odd one out).I added a potential change for the latter here: main...spencer-tb:execution-apis:src/engine/payload-attributes-updates
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.
why should the
parent.timestamp
check be removed from cancun?Also, i am hesitant to change the previous versions of any methods in the spec unless the change is coherent with the behavior of the majority of EL clients
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.
Do EL clients check
payloadAttributes
structure in case of V1? If we remove a check from V3 then it is not clear in which order they are applied which may result in the return error message to be different on the same payloadAttributes in different client implementationsThere 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.
My fault - it should be kept, I wasn't taking into consideration the order of the checks!
I'd like to double check our tests for the
payloadAttributes
structure in case of V1. Will get back to you :)