-
Notifications
You must be signed in to change notification settings - Fork 879
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
Fcu verify payload attributes #3837
Fcu verify payload attributes #3837
Conversation
…e one of the head block Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
44455b6
to
8cacabf
Compare
...g/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdated.java
Outdated
Show resolved
Hide resolved
if (optionalPayloadAttributes.isPresent() | ||
&& !isPayloadAttributesValid(optionalPayloadAttributes.get(), newHead.get())) { | ||
return new JsonRpcErrorResponse(requestId, JsonRpcError.INVALID_PAYLOAD_ATTRIBUTES); | ||
} | ||
|
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 a doubt, since #3836 says:
Invalid payload attributes and MUST NOT begin a payload build process. In such an event, the forkchoiceState update MUST NOT be rolled back.
my understanding is that, even if there are payload attribute errors, the FcU should be applied, but the error is returned before the mergeCoordinator.updateForkChoice
call, so the FcU update is never applied, or am I missnig something?
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.
Yes, after further investigation that is how it should work. I've changed the code accordingly
Please add a CHANGELOG entry |
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
...g/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdated.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
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.
CHANGELOG.md
* check that the timestamp in fcu payload attributes is greater than the one of the head block Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net>
PR description
Adds payload attributes checks to EngineForkchoiceUpdated and returns INVALID_PAYLOAD_ATTRIBUTES error if any of them should be invalid.
Fixed Issue(s)
"fixes #3836 "
Documentation
doc-change-required
label to this PR ifupdates are required.
Changelog