GET
/
beacon
/
2f6d649e68c2f861fecd5b8a9e35139e
/
eth
/
v1
/
debug
/
fork_choice
Get fork choice array
curl --request GET \
  --url https://ethereum-mainnet.core.chainstack.com/beacon/2f6d649e68c2f861fecd5b8a9e35139e/eth/v1/debug/fork_choice
{
  "justified_checkpoint": {
    "epoch": "1",
    "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
  },
  "finalized_checkpoint": {
    "epoch": "1",
    "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
  },
  "fork_choice_nodes": [
    {
      "slot": "1",
      "block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "justified_epoch": "1",
      "finalized_epoch": "1",
      "weight": "1",
      "validity": "valid",
      "execution_block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "extra_data": {}
    }
  ],
  "extra_data": {}
}
The /eth/v1/debug/fork_choice method is a debug API endpoint in the Ethereum Beacon Chain that retrieves the complete fork choice context, including justified and finalized checkpoints and the entire fork choice tree with all nodes and their weights. This endpoint provides deep insight into the consensus mechanism’s decision-making process for determining the canonical chain.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

This endpoint does not require any parameters.

Response

The response provides comprehensive fork choice data:
  • justified_checkpoint — the current justified checkpoint containing:
    • epoch — the epoch number of the justified checkpoint
    • root — the block root of the justified checkpoint
  • finalized_checkpoint — the current finalized checkpoint containing:
    • epoch — the epoch number of the finalized checkpoint
    • root — the block root of the finalized checkpoint
  • fork_choice_nodes — array of all nodes in the fork choice tree, each containing:
    • slot — the slot number of this block
    • block_root — the merkle root of this beacon block
    • parent_root — the merkle root of the parent beacon block
    • justified_epoch — the justified epoch from this block’s perspective
    • finalized_epoch — the finalized epoch from this block’s perspective
    • weight — the cumulative weight/score of this block in the fork choice algorithm
    • validity — the validity status (valid, invalid, or optimistic)
    • execution_block_hash — the execution layer block hash
    • extra_data — optional client-specific additional data
  • extra_data — optional additional data at the response level (client-specific)

Usage notes

The /eth/v1/debug/fork_choice method is an advanced debugging tool that exposes the internal state of the fork choice algorithm, which is the heart of Ethereum’s consensus mechanism. This endpoint is invaluable for understanding how the beacon chain determines the canonical chain among potentially competing forks. Key concepts for understanding the response:
  • Fork choice tree — represents all known blocks and their relationships, forming a tree structure where each node is a block
  • Weight — indicates the cumulative attestation support for each block; higher weight means more validators support this chain
  • Checkpoints — justified and finalized checkpoints represent consensus milestones that cannot be reverted
  • Validity states:
    • valid — block has been fully validated
    • invalid — block failed validation
    • optimistic — block assumed valid but not yet verified by execution layer
This endpoint is particularly useful for:
  • Consensus debugging — understanding why certain blocks are chosen as canonical
  • Network analysis — identifying competing forks and their relative support
  • Performance monitoring — tracking the efficiency of finalization
  • Research — studying fork choice behavior under various network conditions
  • Validator operations — understanding attestation targets and block production decisions
The fork choice algorithm uses the LMD-GHOST (Latest Message Driven - Greediest Heaviest Observed SubTree) protocol, which selects the chain with the most cumulative attestation weight while respecting finality rules. This is a debug endpoint and may not be available on all beacon nodes. The data structure can be large on networks with many competing forks or during periods of network instability.

Response

200
application/json

Success - Fork choice data retrieved

Debugging context of fork choice