engine_forkchoiceUpdatedV1
Updates the forkchoice state
Parameters (by position)
Forkchoice state object required
Forkchoice state object V1
Show Forkchoice state object
Forkchoice state objectForkchoice state fields
-
headBlockHash
stringHead block hash
Match pattern:
^0x[0-9a-f]{64}$
-
safeBlockHash
stringSafe block hash
Match pattern:
^0x[0-9a-f]{64}$
-
finalizedBlockHash
stringFinalized block hash
Match pattern:
^0x[0-9a-f]{64}$
-
additionalProperties
true
Payload attributes object
Payload attributes object V1
Show Payload attributes object
Payload attributes objectPayload attributes fields
-
timestamp
stringTimestamp
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
prevRandao
stringPrevious randao value
Match pattern:
^0x[0-9a-f]{64}$
-
suggestedFeeRecipient
stringSuggested fee recipient
Match pattern:
^0x[0-9a-fA-F]{40}$
-
additionalProperties
true
Result
Response object object
Forkchoice updated response
Show Response object object
Response object objectResponse object fields
-
payloadStatus
objectrequiredPayload status
Show
payloadStatusobjectpayloadStatusfields-
status
stringrequiredSet of possible values is restricted to VALID, INVALID, SYNCING
Allowed values:
VALIDINVALIDSYNCING
-
latestValidHash
stringThe hash of the most recent valid block
Match pattern:
^0x[0-9a-f]{64}$
-
validationError
stringValidation error message
-
additionalProperties
true
-
-
payloadId
stringPayload id
Match pattern:
^0x[0-9a-f]{16}$
-
additionalProperties
true
Errors
Error code: -38002
-
code
-38002
-
message
Invalid forkchoice state
Error code: -38003
-
code
-38003
-
message
Invalid payload attributes
Examples
engine_forkchoiceUpdatedV1 example
Request
{
"params": [
{
"headBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"safeBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"finalizedBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a"
},
{
"timestamp": "0x5",
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"suggestedFeeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"
}
]
}
Response
{
"payloadStatus": {
"status": "VALID",
"latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"validationError": null
},
"payloadId": "0x0000000021f32cc1"
}