-
Notifications
You must be signed in to change notification settings - Fork 867
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
Forkchoice v3 #5768
Forkchoice v3 #5768
Conversation
|
c84b85c
to
ab1eded
Compare
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
…tract parent Signed-off-by: Justin Florentine <justin+github@florentine.us>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineGetPayload.java
Show resolved
Hide resolved
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
...org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/ExecutionEngineJsonRpcMethod.java
Show resolved
Hide resolved
...org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/ExecutionEngineJsonRpcMethod.java
Outdated
Show resolved
Hide resolved
if (payloadParameter.getTimestamp() < cancunTimestamp) { | ||
return ValidationResult.invalid(RpcErrorType.UNSUPPORTED_FORK, "Fork not supported"); | ||
} else { | ||
return ValidationResult.valid(); |
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.
we have lost some of the checks here. We need to check that the versioned hash params and the parent beacon block root are available when we are calling the v3 RPC.
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.
They are checked in the parent abstract class, via the validateParams method.
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.
syncResponse is calling the much more robust validateBlobs, but it doesn't look like validateBlobs enforces that the parameters are present. Does the spec for v3 require expectedBlobVersionedHashes
to be present even if the list is empty?
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, it can't be null. We should return invalid params if expectedBlobVersionedHashes
is null. The current validateBlobs will eventually find a mismatch if the transactions have blobs and return an error but we have to check for null first. We have 2 hive tests failing because of this. I am addressing this issue in a different PR.
Signed-off-by: Justin Florentine <justin+github@florentine.us>
…and leave default case to valid Signed-off-by: Justin Florentine <justin+github@florentine.us>
...org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/ExecutionEngineJsonRpcMethod.java
Outdated
Show resolved
Hide resolved
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.
nice refactor. just a couple questions
if (payloadParameter.getTimestamp() < cancunTimestamp) { | ||
return ValidationResult.invalid(RpcErrorType.UNSUPPORTED_FORK, "Fork not supported"); | ||
} else { | ||
return ValidationResult.valid(); |
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.
syncResponse is calling the much more robust validateBlobs, but it doesn't look like validateBlobs enforces that the parameters are present. Does the spec for v3 require expectedBlobVersionedHashes
to be present even if the list is empty?
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
…fic versions Signed-off-by: Justin Florentine <justin+github@florentine.us>
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.
LGTM
* adds new rpc method for fcu3 * pulls up fork checking for reuse across engine api methods * more reuse of timestamp/fork checks, getPayload only needs 1 return type --------- Signed-off-by: Justin Florentine <justin+github@florentine.us>
* adds new rpc method for fcu3 * pulls up fork checking for reuse across engine api methods * more reuse of timestamp/fork checks, getPayload only needs 1 return type --------- Signed-off-by: Justin Florentine <justin+github@florentine.us>
* adds new rpc method for fcu3 * pulls up fork checking for reuse across engine api methods * more reuse of timestamp/fork checks, getPayload only needs 1 return type --------- Signed-off-by: Justin Florentine <justin+github@florentine.us> Signed-off-by: garyschulte <garyschulte@gmail.com>
* adds new rpc method for fcu3 * pulls up fork checking for reuse across engine api methods * more reuse of timestamp/fork checks, getPayload only needs 1 return type --------- Signed-off-by: Justin Florentine <justin+github@florentine.us>
* adds new rpc method for fcu3 * pulls up fork checking for reuse across engine api methods * more reuse of timestamp/fork checks, getPayload only needs 1 return type --------- Signed-off-by: Justin Florentine <justin+github@florentine.us>
PR description
Fixed Issue(s)
fixes #5735