Skip to main content

engine_forkchoiceUpdatedV3

Updates the forkchoice state

Parameters (by position)

Forkchoice state object required

Forkchoice state object V1


Show Forkchoice state object

Forkchoice state fields

  • headBlockHash string

    Head block hash

    Match pattern: ^0x[0-9a-f]{64}$


  • safeBlockHash string

    Safe block hash

    Match pattern: ^0x[0-9a-f]{64}$


  • finalizedBlockHash string

    Finalized block hash

    Match pattern: ^0x[0-9a-f]{64}$


  • additionalProperties true


Payload attributes object

Payload attributes object V3


Show Payload attributes object

Payload attributes fields

  • timestamp string

    Timestamp

    Match pattern: ^0x(0|[1-9a-f][0-9a-f]{0,15})$


  • prevRandao string

    Previous randao value

    Match pattern: ^0x[0-9a-f]{64}$


  • suggestedFeeRecipient string

    Suggested fee recipient

    Match pattern: ^0x[0-9a-fA-F]{40}$


  • withdrawals array<object>

    Withdrawal object V1


    Show withdrawals object

    withdrawals fields

    • index string required

      Withdrawal index

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]{0,15})$


    • validatorIndex string required

      Validator index

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]{0,15})$


    • address string required

      Withdrawal address

      Match pattern: ^0x[0-9a-fA-F]{40}$


    • amount string required

      Withdrawal amount

      Match pattern: ^0x(0|[1-9a-f][0-9a-f]{0,15})$


    • additionalProperties true


  • parentBeaconBlockRoot string

    Parent beacon block root

    Match pattern: ^0x[0-9a-f]{64}$


  • additionalProperties true


Result

Response object object

Forkchoice updated response


Show Response object object

Response object fields

  • payloadStatus object required

    Payload status


    Show payloadStatus object

    payloadStatus fields

    • status string required

      Set of possible values is restricted to VALID, INVALID, SYNCING

      Allowed values: VALID INVALID SYNCING


    • latestValidHash string

      The hash of the most recent valid block

      Match pattern: ^0x[0-9a-f]{64}$


    • validationError string

      Validation error message


    • additionalProperties true


  • payloadId string

    Payload 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

Error code: -32602

  • code

    -32602

  • message

    Invalid params

Error code: -38005

  • code

    -38005

  • message

    Unsupported fork

Examples

engine_forkchoiceUpdatedV3 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"
}
],
"parentBeaconBlockRoot": "0x11f780a954bcba8889998e4e61deaae6388dd2391e9c810bd9c94962cc1eadc1"
}
]
}

Response

{
"payloadStatus": {
"status": "VALID",
"latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"validationError": null
},
"payloadId": "0x0000000021f32cc1"
}