/eth/v2/debug/beacon/states/{state_id}

Get full BeaconState object

Return entire BeaconState object for the specified stateId. It can be returned in either JSON format or as bytes serialized using SSZ, depending on the Accept header.

Example Request and Result for /v2/debug/beacon/states/{state_id}

In this section, we provide an illustrative example of a request made to retrieve details contents using the /v2/debug/beacon/states/{state_id} endpoint. Additionally, we present the resulting response containing information about the BeaconState object.

Parameters

FieldTypeDescription

state_id*

string

State identifier. Can be one of: "head" (canonical head in node's view), "genesis", "finalized", "justified", <slot>, <hex encoded stateRoot with 0x prefix>.

The example in this section uses a non-existing project id.

Make sure you replace it with your Ethereum Holesky Beacon endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Get full BeaconState object

GET https://eth-holesky-beacon.blastapi.io/<project-id>/eth/v2/debug/beacon/states/<state_id>

Path Parameters

NameTypeDescription

state_id*

string

head

{
  "version": "phase0",
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "genesis_time": "1",
    "genesis_validators_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "slot": "1",
    "fork": {
      "previous_version": "0x00000000",
      "current_version": "0x00000000",
      "epoch": "1"
    },
    "latest_block_header": {
      "slot": "1",
      "proposer_index": "1",
      "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "block_roots": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ],
    "state_roots": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ],
    "historical_roots": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ],
    "eth1_data": {
      "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "deposit_count": "1",
      "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "eth1_data_votes": [
      {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    ],
    "eth1_deposit_index": "1",
    "validators": [
      {
        "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "effective_balance": "1",
        "slashed": false,
        "activation_eligibility_epoch": "1",
        "activation_epoch": "1",
        "exit_epoch": "1",
        "withdrawable_epoch": "1"
      }
    ],
    "balances": [
      "1"
    ],
    "randao_mixes": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ],
    "slashings": [
      "1"
    ],
    "previous_epoch_attestations": [
      {
        "aggregation_bits": "0x01",
        "data": {
          "slot": "1",
          "index": "1",
          "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "source": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          },
          "target": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          }
        },
        "inclusion_delay": "1",
        "proposer_index": "1"
      }
    ],
    "current_epoch_attestations": [
      {
        "aggregation_bits": "0x01",
        "data": {
          "slot": "1",
          "index": "1",
          "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "source": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          },
          "target": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          }
        },
        "inclusion_delay": "1",
        "proposer_index": "1"
      }
    ],
    "justification_bits": "0x01",
    "previous_justified_checkpoint": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "current_justified_checkpoint": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "finalized_checkpoint": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    }
  }
}

Curl Request example

curl -X 'GET' \
  'https://eth-holesky-beacon.blastapi.io/<project-id>/eth/v2/debug/beacon/states/head' \
  -H 'accept: application/json'

Last updated