diff --git a/src/engine/cancun.md b/src/engine/cancun.md index b9431c76..dc68bc81 100644 --- a/src/engine/cancun.md +++ b/src/engine/cancun.md @@ -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. -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 @@ -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. \ No newline at end of file +1. Client software **MUST** return `-38005: Unsupported fork` error if the `timestamp` of payload or payloadAttributes greater or equal to the Cancun activation timestamp.