Retrieves all current fork choice context including justified and finalized checkpoints, and the complete fork choice tree with all nodes and their weights.
/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.
justified_checkpoint
— the current justified checkpoint containing:
epoch
— the epoch number of the justified checkpointroot
— the block root of the justified checkpointfinalized_checkpoint
— the current finalized checkpoint containing:
epoch
— the epoch number of the finalized checkpointroot
— the block root of the finalized checkpointfork_choice_nodes
— array of all nodes in the fork choice tree, each containing:
slot
— the slot number of this blockblock_root
— the merkle root of this beacon blockparent_root
— the merkle root of the parent beacon blockjustified_epoch
— the justified epoch from this block’s perspectivefinalized_epoch
— the finalized epoch from this block’s perspectiveweight
— the cumulative weight/score of this block in the fork choice algorithmvalidity
— the validity status (valid
, invalid
, or optimistic
)execution_block_hash
— the execution layer block hashextra_data
— optional client-specific additional dataextra_data
— optional additional data at the response level (client-specific)
/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:
valid
— block has been fully validatedinvalid
— block failed validationoptimistic
— block assumed valid but not yet verified by execution layerSuccess - Fork choice data retrieved
Debugging context of fork choice