Skip to content
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 order of operation for fcu v3 #479

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/engine/cancun.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ Refer to the response for [`engine_forkchoiceUpdatedV2`](./shanghai.md#engine_fo

This method follows the same specification as [`engine_forkchoiceUpdatedV2`](./shanghai.md#engine_forkchoiceupdatedv2) with addition of the following:

1. Client software **MUST** check that provided set of parameters and their fields strictly matches the expected one and return `-32602: Invalid params` error if this check fails. Any field having `null` value **MUST** be considered as not provided.
1. Client software **MUST** validate and apply the forkchoice state before validating `payloadAttributes`. If `forkchoiceState` does not match the expected fields, clients must return `-32602: Invalid params`. If the client is `SYNCING` it **MUST** skip the validation of `payloadAttributes`.

2. Client software **MUST** check that `payloadAttributes` strictly matches the expected fields and return `-38003: Invalid payload attributes` error if this check fails. Any field having `null` value **MUST** be considered as not provided.

3. Client software **MUST** return `-38005: Unsupported fork` error if the `payloadAttributes` is set and the `payloadAttributes.timestamp` does not fall within the time frame of the Cancun fork.
lightclient marked this conversation as resolved.
Show resolved Hide resolved

2. Client software **MUST** return `-38005: Unsupported fork` error if the `payloadAttributes` is set and the `payloadAttributes.timestamp` does not fall within the time frame of the Cancun fork.
4. Client software **MUST** return `-38003: Invalid payload attributes` if the `payloadAttributes.timestamp` is less or equal to the timestamp of a block referenced by `forkchoiceState.headBlockHash`.

### engine_getPayloadV3

Expand Down Expand Up @@ -184,4 +188,4 @@ For the following methods:

a validation **MUST** be added:

1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of payload or payloadAttributes greater or equal to the Cancun activation timestamp.
1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of payload or payloadAttributes greater or equal to the Cancun activation timestamp.
Loading