curl --request GET \
--url https://ethereum-mainnet.core.chainstack.com/beacon/2f6d649e68c2f861fecd5b8a9e35139e/eth/v2/debug/beacon/heads{
"data": [
{
"root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"slot": "1",
"execution_optimistic": false
}
]
}Retrieves all possible chain heads (leaves of fork choice tree). This endpoint provides insight into the current fork choice state by returning all potential chain heads that the beacon node is tracking.
curl --request GET \
--url https://ethereum-mainnet.core.chainstack.com/beacon/2f6d649e68c2f861fecd5b8a9e35139e/eth/v2/debug/beacon/heads{
"data": [
{
"root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
"slot": "1",
"execution_optimistic": false
}
]
}/eth/v2/debug/beacon/heads method is a debug API endpoint in the Ethereum Beacon Chain that retrieves all possible chain heads, which are the leaves of the fork choice tree. This endpoint is crucial for understanding the current state of fork choice in the beacon chain, showing all potential chain tips that the node is currently tracking and considering as possible canonical chains.
data — array of chain head objects, each containing:
root — the block root (32-byte hex string) uniquely identifying this chain headslot — the slot number of this chain headexecution_optimistic — boolean indicating whether this head references an unverified execution payload/eth/v2/debug/beacon/heads method provides critical insight into the fork choice mechanism of the beacon chain. In a healthy network, there is typically one primary head representing the canonical chain, but during network partitions, high latency periods, or chain reorganizations, multiple heads may exist temporarily.
This endpoint is particularly useful for:
execution_optimistic flag is important for understanding whether a head has been fully verified with the execution layer. Optimistic heads may be invalidated if the execution payload is later found to be invalid.
This is a debug endpoint and may not be available on all beacon nodes. It provides a real-time view of the fork choice state and is essential for advanced monitoring and debugging of consensus layer behavior.Success - Fork choice leaves retrieved
Array of all chain heads (fork choice leaves)
Show child attributes
The block root of this chain head
"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
The slot number of this chain head
"1"
True if this head references an unverified execution payload. Optimistic information may be invalidated at a later time.
false
Was this page helpful?