Skip to content

Conversation

MariusVanDerWijden
Copy link
Member

Spec: https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#request

- ExecutionPayloadV1 MUST be used if the timestamp value is lower than the Shanghai timestamp,
- ExecutionPayloadV2 MUST be used if the timestamp value is greater or equal to the Shanghai timestamp,
- Client software MUST return -32602: Invalid params error if the wrong version of the structure is used in the method call.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

func (api *ConsensusAPI) NewPayloadV1(params engine.ExecutableData) (engine.PayloadStatusV1, error) {
if params.Withdrawals != nil {
return engine.PayloadStatusV1{Status: engine.INVALID}, fmt.Errorf("withdrawals not supported in V1")
return engine.PayloadStatusV1{Status: engine.INVALID}, engine.InvalidParams.With(fmt.Errorf("withdrawals not supported in V1"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this, seems that the error that the remote "sees" is can't execute payload: Invalid parameters"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be specific

{"jsonrpc":"2.0","id":1,"error":{"code":-32602,"message":"Invalid parameters","data":{"err":"withdrawals not supported in V1"}}}

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants