Skip to main content
Version: Next

engine_forkchoiceUpdatedV1

Updates the forkchoice state

Parameters (by position)​

Forkchoice state object required

Forkchoice state object V1


Show Forkchoice state object

Forkchoice state fields​

  • finalizedBlockHash string

    Finalized block hash

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


  • headBlockHash string

    Head block hash

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


  • safeBlockHash string

    Safe block hash

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


  • additionalProperties true


Payload attributes object or null


Show Option 1 Payload attributes object V1 object

Payload attributes object V1 fields​

Payload attributes object

Payload attributes object V1


Show Payload attributes object

Payload attributes fields​

  • prevRandao string required

    Previous randao value

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


  • suggestedFeeRecipient string required

    Suggested fee recipient

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


  • timestamp string required

    Timestamp

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


  • additionalProperties true


Show Option 2 Payload attributes null

Payload attributes fields​

Payload attributes null


Result​

Response object object

Forkchoice updated response object V1


Show Response object object

Response object fields​

  • payloadId string

    Payload id

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


  • payloadStatus object required

    Payload status


    Show payloadStatus object

    payloadStatus fields​

    • latestValidHash string or null


      Show Option 1 32 byte hex value string

      32 byte hex value fields​

      latestValidHash string

      32 byte hex value

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


      Show Option 2 The hash of the most recent valid block null

      The hash of the most recent valid block fields​

      latestValidHash null


    • status string required

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

      Allowed values: VALID INVALID SYNCING


    • validationError string or null


      Show Option 1 Validation error message string

      Validation error message fields​

      validationError string


      Show Option 2 Validation error message null

      Validation error message fields​

      validationError null


    • additionalProperties true


  • additionalProperties true


Errors​

Error code: -38002

  • code

    -38002

  • message

    Invalid forkchoice state

Error code: -38003

  • code

    -38003

  • message

    Invalid payload attributes

Error code: -38006

  • code

    -38006

  • message

    Too deep reorg

Examples​

engine_forkchoiceUpdatedV1 example

Request​

{
"params": [
{
"finalizedBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",
"headBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",
"safeBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858"
},
{
"prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",
"suggestedFeeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"timestamp": "0x5"
}
]
}

Response​

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