engine_forkchoiceUpdatedV2
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 V2
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}$
-
withdrawals
array<object>Withdrawal object V1
Show
withdrawalsobjectwithdrawalsfields-
index
stringrequiredWithdrawal index
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
validatorIndex
stringrequiredValidator index
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
address
stringrequiredWithdrawal address
Match pattern:
^0x[0-9a-fA-F]{40}$
-
amount
stringrequiredWithdrawal amount
Match pattern:
^0x(0|[1-9a-f][0-9a-f]{0,15})$
-
additionalProperties
true
-
-
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_forkchoiceUpdatedV2 example
Request
{
"params": [
{
"headBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"safeBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"finalizedBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a"
},
{
"timestamp": "0x64e7785b",
"prevRandao": "0xc130d5e63c61c935f6089e61140ca9136172677cf6aa5800dcc1cf0a02152a14",
"suggestedFeeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"withdrawals": [
{
"index": "0xf0",
"validatorIndex": "0xf0",
"address": "0x00000000000000000000000000000000000010f0",
"amount": "0x1"
},
{
"index": "0xf1",
"validatorIndex": "0xf1",
"address": "0x00000000000000000000000000000000000010f1",
"amount": "0x1"
}
]
}
]
}
Response
{
"payloadStatus": {
"status": "VALID",
"latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"validationError": null
},
"payloadId": "0x0000000021f32cc1"
}