Skip to content

engine_forkchoiceUpdatedV1 ​

served

Updates the forkchoice state

For consensus clients only

The consensus client calls this method on the authenticated Engine API port, with the JWT secret. Applications and wallets do not call it.

INFO

This page is generated from the specification. The text comes from the OpenRPC description of the method.

Parameters ​

NameTypeRequiredDescription
Forkchoice stateobjectyesForkchoice state object V1
Payload attributesobjectnoPayload attributes object V1

Returns ​

object: Response object

Live example ​

No live example: this method needs the JWT secret on the authenticated port.

Errors ​

CodeMessage
-38002Invalid forkchoice state
-38003Invalid payload attributes
-38006Too deep reorg

Specification ​

The official specification: engine_forkchoiceUpdatedV1 in ethereum/execution-apis.

Schema (OpenRPC) ​

Parameter Forkchoice state: object
json
{
  "properties": {
    "finalizedBlockHash": {
      "pattern": "^0x[0-9a-f]{64}$",
      "title": "Finalized block hash",
      "type": "string"
    },
    "headBlockHash": {
      "pattern": "^0x[0-9a-f]{64}$",
      "title": "Head block hash",
      "type": "string"
    },
    "safeBlockHash": {
      "pattern": "^0x[0-9a-f]{64}$",
      "title": "Safe block hash",
      "type": "string"
    }
  },
  "required": [
    "headBlockHash",
    "safeBlockHash",
    "finalizedBlockHash"
  ],
  "title": "Forkchoice state object V1",
  "type": "object"
}
Parameter Payload attributes: object
json
{
  "properties": {
    "prevRandao": {
      "pattern": "^0x[0-9a-f]{64}$",
      "title": "Previous randao value",
      "type": "string"
    },
    "suggestedFeeRecipient": {
      "pattern": "^0x[0-9a-fA-F]{40}$",
      "title": "Suggested fee recipient",
      "type": "string"
    },
    "timestamp": {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]{0,15})$",
      "title": "Timestamp",
      "type": "string"
    }
  },
  "required": [
    "timestamp",
    "prevRandao",
    "suggestedFeeRecipient"
  ],
  "title": "Payload attributes object V1",
  "type": "object"
}
Result: object
json
{
  "properties": {
    "payloadId": {
      "pattern": "^0x[0-9a-f]{16}$",
      "title": "Payload id",
      "type": "string"
    },
    "payloadStatus": {
      "properties": {
        "latestValidHash": {
          "pattern": "^0x[0-9a-f]{64}$",
          "title": "The hash of the most recent valid block",
          "type": "string"
        },
        "status": {
          "description": "Set of possible values is restricted to VALID, INVALID, SYNCING",
          "enum": [
            "VALID",
            "INVALID",
            "SYNCING"
          ],
          "title": "Payload validation status",
          "type": "string"
        },
        "validationError": {
          "title": "Validation error message",
          "type": "string"
        }
      },
      "required": [
        "status"
      ],
      "title": "Payload status",
      "type": "object"
    }
  },
  "required": [
    "payloadStatus"
  ],
  "title": "Forkchoice updated response",
  "type": "object"
}