Node API
Supported Chains
API Reference
Ethereum Beacon

Ethereum Beacon


Available for Premium users only.

Ethereum Beacon API is available on Web3 API platform (opens in a new tab) upon switching on the Beacon toggle.

The Beacon Chain is a consensus layer that introduced a proof-of-stake (opens in a new tab) to Ethereum. The Beacon Chain mechanism is responsible for creating new blocks, making sure those new blocks are valid, and rewarding validators with ETH for keeping the network secure.

In order for your Web3 application to interact with the Beacon Chain — either by reading blockchain data or sending transactions to the network — it must connect to a Beacon node. Developers interact with the blockchain using the methods provided by the API.

Beacon API uses the REST interface for querying, responses come in JSON format (opens in a new tab).

Methods supported

Beacon:

Builder:

Config:

Debug:

Events:

Node:

Validator:

ValidatorRequiredApi:

Rewards:


Beacon

GET /eth/v1/beacon/genesis

Retrieves the details of the chain's genesis.

Returns the details of the chain's genesis which can be used to identify chain.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/genesis" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "data": {
    "genesis_time": "1590832934",
    "genesis_validators_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "genesis_fork_version": "0x00000000"
  }
}
  • 400: Chain genesis info is not yet known.
{
  "code": 404,
  "message": "Chain genesis info is not yet known"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/root

Retrieves the state SSZ HashTreeRoot.

Calculates HashTreeRoot for state with given 'stateId'. If stateId is root, same value will be returned.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
    Example: head.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/root" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
  }
}
  • 400: Invalid state ID.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/fork

Retrieves the Fork object for a requested state.

Retrieves the Fork (opens in a new tab) object for state with given 'stateId'.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/fork" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "data": {
    "previous_version": "0x00000000",
    "current_version": "0x00000000",
    "epoch": "1"
  }
}
  • 400: Invalid state ID.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/finality_checkpoints

Retrieves state finality checkpoints.

Returns finality checkpoints for state with given 'stateId'. In case finality is not yet achieved, checkpoint should return epoch 0 and ZERO_HASH as root.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/finality_checkpoints" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "previous_justified": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "current_justified": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "finalized": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    }
  }
}
  • 400: Invalid state ID.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/validators

Retrieves validators from state.

Returns filterable list of validators with their balance, status, and index.

Information will be returned for all indices or public key that match known validators. If an index or public key does not match any known validator, no information will be returned but this will not cause an error. There are no guarantees for the returned data in terms of ordering; both the index and public key are returned for each validator, and can be used to confirm for which inputs a response has been returned.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • id (array[string]; query): either a hex encoded public key (any bytes48 with 0x prefix) or validator index.
  • status (array; query): see the validator status specification (opens in a new tab).

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/states/{state_id}/validators" \
-H "Accept: application/json"

Responses

  • 200: Success
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "index": "1",
      "balance": "1",
      "status": "active_ongoing",
      "validator": {
        "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "effective_balance": "1",
        "slashed": false,
        "activation_eligibility_epoch": "1",
        "activation_epoch": "1",
        "exit_epoch": "1",
        "withdrawable_epoch": "1"
      }
    }
  ]
}
  • 400: Invalid state or validator ID, or status.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 414: Too many validator IDs.
{
  "code": 414,
  "message": "Too many validator IDs in request"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/states/{state_id}/validators

Retrieves validators from state.

Returns filterable list of validators with their balance, status and index.

Information will be returned for all indices or public key that match known validators. If an index or public key does not match any known validator, no information will be returned but this will not cause an error. There are no guarantees for the returned data in terms of ordering; both the index and public key are returned for each validator, and can be used to confirm for which inputs a response has been returned.

The POST variant of this endpoint has the same semantics as the GET endpoint but passes the lists of IDs and statuses via a POST body in order to enable larger requests.

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.

  • <request body> (required): The lists of validator IDs and statuses to filter on. Either or both may be null to signal that no filtering on that attribute is desired.

{
  "ids": [
    "string"
  ],
  "statuses": [
    "active_ongoing"
  ]
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/states/{state_id}/validators" \
-H "Accept: application/json"
-d '{
  "ids": [
    "string"
  ],
  "statuses": [
    "active_ongoing"
  ]
}'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "index": "1",
      "balance": "1",
      "status": "active_ongoing",
      "validator": {
        "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "effective_balance": "1",
        "slashed": false,
        "activation_eligibility_epoch": "1",
        "activation_epoch": "1",
        "exit_epoch": "1",
        "withdrawable_epoch": "1"
      }
    }
  ]
}
  • 400: Invalid state or validator ID, or status.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/validators/{validator_id}

Retrieves the validator from state by ID.

Returns validator specified by state and id or public key along with status and balance.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • validator_id (string; path; required): either a hex encoded public key (any bytes48 with 0x prefix) or validator index.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/validators/{validator_id}" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "index": "1",
    "balance": "1",
    "status": "active_ongoing",
    "validator": {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "effective_balance": "1",
      "slashed": false,
      "activation_eligibility_epoch": "1",
      "activation_epoch": "1",
      "exit_epoch": "1",
      "withdrawable_epoch": "1"
    }
  }
}
  • 400: Invalid state or validator ID, or status.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/validator_balances

Retrieves validator balances from state.

Returns filterable list of validators balances.

Balances will be returned for all indices or public key that match known validators. If an index or public key does not match any known validator, no balance will be returned but this will not cause an error. There are no guarantees for the returned data in terms of ordering; the index and is returned for each balance, and can be used to confirm for which inputs a response has been returned.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • id (array[string]; query): either a hex encoded public key (any bytes48 with 0x prefix) or validator index.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/validator_balances" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "index": "1",
      "balance": "1"
    }
  ]
}
  • 400: Invalid state or validator ID, or status.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 414: Too many validator IDs.
{
  "code": 414,
  "message": "Too many validator IDs in request"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/states/{state_id}/validator_balances

Retrieves validator balances from state.

Returns filterable list of validators balances.

Balances will be returned for all indices or public key that match known validators. If an index or public key does not match any known validator, no balance will be returned but this will not cause an error. There are no guarantees for the returned data in terms of ordering; the index is returned for each balance, and can be used to confirm for which inputs a response has been returned.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • <request body>: an array of either hex encoded public key (any bytes48 with 0x prefix) or validator index.
[
  "string"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/validator_balances" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  "string"
]'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "index": "1",
      "balance": "1"
    }
  ]
}
  • 400: Invalid state or validator ID, or status.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/committees

Retrieves all committees for a state.

Retrieves the committees for the given state.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • epoch (string; query): fetches committees for the given epoch; if not present then the committees for the epoch of the state will be obtained.
  • index (string; query): restricts returned values to those matching the supplied committee index.
  • slot (string; query): restricts returned values to those matching the supplied slot.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/committees" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "index": "1",
      "slot": "1",
      "validators": [
        "1"
      ]
    }
  ]
}
  • 400: Invalid state ID, index, epoch, slot, or combination thereof.
{
  "code": 400,
  "message": "Slot does not belong in epoch"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/sync_committees

Retrieves sync committees for a state.

Retrieves the current sync committee for the given state. Also returns the subcommittee assignments.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • epoch (string; query): fetches sync committees for the given epoch; if not present then the sync committees for the epoch of the state will be obtained.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/sync_committees" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "validators": [
      "1"
    ],
    "validator_aggregates": [
      [
        "1"
      ]
    ]
  }
}
  • 400: Invalid state ID, index, epoch, slot, or combination thereof.
{
  "code": 400,
  "message": "Slot does not belong in epoch"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/randao

Retrieves the RANDAO mix for some epoch in a specified state.

Fetch the RANDAO mix for the requested epoch from the state identified by state_id.

If an epoch is not specified then the RANDAO mix for the state's current epoch will be returned.

By adjusting the state_id parameter you can query for any historic value of the RANDAO mix. Ordinarily states from the same epoch will mutate the RANDAO mix for that epoch as blocks are applied.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • epoch (string; query): fetches sync committees for the given epoch; if not present then the sync committees for the epoch of the state will be obtained.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/randao" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "randao": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
  }
}
  • 400: Invalid state ID or epoch.
{
  "code": 400,
  "message": "Epoch is out of range for the `randao_mixes` of the state"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/headers

Retrieves block headers.

Retrieves block headers matching given query. By default, it will fetch current head slot blocks.

Parameters

  • slot (string; query): a slot.
  • parent_root (string, hex; query): a parent root.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/headers" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "canonical": true,
      "header": {
        "message": {
          "slot": "1",
          "proposer_index": "1",
          "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      }
    }
  ]
}
  • 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/headers/{block_id}

Retrieves a block header.

Retrieves a block header for a given block ID.

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/headers/{block_id}" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "canonical": true,
    "header": {
      "message": {
        "slot": "1",
        "proposer_index": "1",
        "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    }
  }
}
  • 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/blinded_blocks

Publishes a signed block.

Instructs the beacon node to use the components of the SignedBlindedBeaconBlock to construct and publish a SignedBeaconBlock by swapping out the transactions_root for the corresponding full list of transactions. The beacon node should broadcast a newly constructed SignedBeaconBlock to the beacon network, to be included in the beacon chain. The beacon node is not required to validate the signed BeaconBlock, and a successful response (20X) only indicates that the broadcast has been successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202). Before Bellatrix, this endpoint will accept a SignedBeaconBlock.

Parameters

  • Eth-Consensus-Version (string; header): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.
  • <request body> (required): The SignedBlindedBeaconBlock object composed of BlindedBeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/blinded_blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
"string"
  • Code 202: The block failed validation, but was successfully broadcast anyway. It was not integrated into the beacon node's database.
"string"
  • Code 400: The SignedBlindedBeaconBlock object is invalid.
{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v2/beacon/blinded_blocks

Publishes a signed block.

Instructs the beacon node to use the components of the SignedBlindedBeaconBlock to construct and publish a SignedBeaconBlock by swapping out the transactions_root for the corresponding full list of transactions. The beacon node should broadcast a newly constructed SignedBeaconBlock to the beacon network, to be included in the beacon chain. The beacon node is not required to validate the signed BeaconBlock, and a successful response (20X) only indicates that the broadcast has been successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202). Before Bellatrix, this endpoint will accept a SignedBeaconBlock. The broadcast behaviour may be adjusted via the broadcast_validation query parameter.

Parameters

  • broadcast_validation (string; query): level of validation that must be applied to a block before it is broadcast. Possible values:

    • gossip (default): lightweight gossip checks only.
    • consensus: full consensus checks, including validation of all signatures and blocks fields except for the execution payload transactions.
    • consensus_and_equivocation: the same as consensus, with an extra equivocation check immediately before the block is broadcast. If the block is found to be an equivocation it fails validation.
  • Eth-Consensus-Version (string; header; required): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.

  • <request body> (required): The SignedBlindedBeaconBlock object composed of BlindedBeaconBlock object (produced by beacon node) and validator signature.

{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/beacon/blinded_blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
"string"
  • Code 202: The block failed validation, but was successfully broadcast anyway. It was not integrated into the beacon node's database.
"string"
  • Code 400: The SignedBlindedBeaconBlock object is invalid or broadcast validation failed.
{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/beacon/blocks

Publishes a signed block.

Instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be included in the beacon chain. A success response (20x) indicates that the block passed gossip validation and was successfully broadcast onto the network. The beacon node is also expected to integrate the block into state, but may broadcast it before doing so, thus to aid timely delivery of the block. Should the block fail full validation, a separate success response code (202) is used to indicate that the block was successfully broadcast but failed integration. After Deneb, this additionally instructs the beacon node to broadcast all given blobs.

Parameters

  • Eth-Consensus-Version (string; header): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.
  • <request body> (required): the SignedBeaconBlock object composed of the BeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
"string"
  • Code 202: The block could not be integrated into the beacon node's database as it failed validation, but was successfully broadcast.
"string"
  • Code 400: The SignedBeaconBlock object is invalid and could not be broadcast.
{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v2/beacon/blocks

Publishes a signed block.

Instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be included in the beacon chain. A success response (20x) indicates that the block passed gossip validation and was successfully broadcast onto the network. The beacon node is also expected to integrate the block into the state, but may broadcast it before doing so, so as to aid timely delivery of the block. Should the block fail full validation, a separate success response code (202) is used to indicate that the block was successfully broadcast but failed integration. After Deneb, this additionally instructs the beacon node to broadcast all given blobs. The broadcast behaviour may be adjusted via the broadcast_validation query parameter.

Parameters

  • broadcast_validation (string; query): level of validation that must be applied to a block before it is broadcast. Possible values:
    • gossip (default): lightweight gossip checks only.
    • consensus: full consensus checks, including validation of all signatures and blocks fields except for the execution payload transactions.
    • consensus_and_equivocation: the same as consensus, with an extra equivocation check immediately before the block is broadcast. If the block is found to be an equivocation it fails validation.
  • Eth-Consensus-Version (string; header): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.
  • <request body> (required): the SignedBeaconBlock object composed of the BeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/beacon/blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
"string"
  • Code 202: The block could not be integrated into the beacon node's database as it failed validation, but was successfully broadcast.
"string"
  • Code 400: The SignedBeaconBlock object is invalid or broadcast validation failed.
{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v2/beacon/blocks/{block_id}

Retrieves a block.

Retrieves block details for given block id. Depending on Accept header it can be returned either as json or as bytes serialized by SSZ

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/beacon/blocks/{block_id}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.

Note: The Eth-Consensus-Version header is required in response so client can deserialize returned json or ssz data more effectively.

{
  "version": "phase0",
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "message": {
      "slot": "1",
      "proposer_index": "1",
      "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "body": {
        "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
        "eth1_data": {
          "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "deposit_count": "1",
          "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "proposer_slashings": [
          {
            "signed_header_1": {
              "message": {
                "slot": "1",
                "proposer_index": "1",
                "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            },
            "signed_header_2": {
              "message": {
                "slot": "1",
                "proposer_index": "1",
                "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            }
          }
        ],
        "attester_slashings": [
          {
            "attestation_1": {
              "attesting_indices": [
                "1"
              ],
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
              "data": {
                "slot": "1",
                "index": "1",
                "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "source": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                },
                "target": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                }
              }
            },
            "attestation_2": {
              "attesting_indices": [
                "1"
              ],
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
              "data": {
                "slot": "1",
                "index": "1",
                "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "source": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                },
                "target": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                }
              }
            }
          }
        ],
        "attestations": [
          {
            "aggregation_bits": "0x01",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        ],
        "deposits": [
          {
            "proof": [
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            ],
            "data": {
              "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
              "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "amount": "1",
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            }
          }
        ],
        "voluntary_exits": [
          {
            "message": {
              "epoch": "1",
              "validator_index": "1"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        ]
      }
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
}
  • Code 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • Code 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/blocks/{block_id}/root

Retrieves a block root.

Retrieves hashTreeRoot of BeaconBlock/BeaconBlockHeader

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/blocks/{block_id}/root" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
  }
}
  • Code 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • Code 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/blocks/{block_id}/attestations

Retrieves block attestations.

Retrieves attestation included in requested block.

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/blocks/{block_id}/attestations" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "aggregation_bits": "0x01",
      "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "data": {
        "slot": "1",
        "index": "1",
        "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "source": {
          "epoch": "1",
          "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "target": {
          "epoch": "1",
          "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        }
      }
    }
  ]
}
  • Code 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • Code 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/blob_sidecars/{block_id}

Retrieves blob sidecars.

Retrieves blob sidecars for a given block id. Depending on Accept header it can be returned either as json or as bytes serialized by SSZ.

If the indices parameter is specified, only the blob sidecars with the specified indices will be returned. There are no guarantees for the returned blob sidecars in terms of ordering.

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

  • indices (array; string; query): an array of indices for blob sidecars to request for in the specified block. Returns all blob sidecars in the block if not specified.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/blob_sidecars/{block_id}" \
-H "Accept: application/json"

Responses

  • 200: Successful response.
{
    "data": [
        {
            "index": "1",
            "blob": "0x4aad0Fad1Efb9D9825Cde0846cabc4323312ABAA63fE5435824F8d7D8c89B43Bcfce42BBF8BFe6A4D89Ede1ADa060a8AC2e8cb425Af0b8f30cD89BFaB0b51aDd0BAdcE8cAB69F3E8DcB76709a78D4Eb9D4d2D71f02beea8f3E01DEBeeEbb583...",
            "kzg_commitment": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "kzg_proof": "0xAD18a6a4A3EECfb6eba0A36236e74a00BE86B44d925fabAcbc2c4B78920Baf3dFEeb5Bff3794A5cC8F1d48EBc0921AB2",
            "signed_block_header": {
                "message": {
                    "slot": "1",
                    "proposer_index": "1",
                    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                    "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                },
                "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            },
            "kzg_commitment_inclusion_proof": [
                "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            ]
        }
    ]
}
  • 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/rewards/sync_committee/{block_id}

Retrieves sync committee rewards.

Retrieves the rewards info for sync committee members specified by array of public keys or validator index. If no array is provided, return reward info for every committee member.

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

  • <Request body>: An array of either hex encoded public key (any bytes48 with 0x prefix) or validator index.

[
  "string"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/rewards/sync_committee/{block_id}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "validator_index": "0",
      "reward": "2000"
    }
  ]
}
  • 400: Invalid get sync committee rewards request.
{
  "code": 400,
  "message": "Invalid request to retrieve sync committee rewards info"
}
  • 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/deposit_snapshot

Retrieves deposit tree snapshot.

Retrieve EIP-4881 (opens in a new tab) Deposit Tree Snapshot. Depending on Accept header it can be returned either as json or as bytes serialized by SSZ.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/deposit_snapshot" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "data": {
    "finalized": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ],
    "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "deposit_count": "1",
    "execution_block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "execution_block_height": "1"
  }
}
  • 404: No Finalized Snapshot Available.
{
  "code": 404,
  "message": "No Finalized Snapshot Available"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/rewards/blocks/{block_id}

Retrieves block rewards.

Retrieve block reward info for a single block.

Parameters

  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/rewards/blocks/{block_id}" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "proposer_index": "123",
    "total": "123",
    "attestations": "123",
    "sync_aggregate": "123",
    "proposer_slashings": "123",
    "attester_slashings": "123"
  }
}
  • 400: Invalid get block rewards request.
{
  "code": 400,
  "message": "Invalid request to retrieve block rewards info"
}
  • 404: The block or required state not found.
{
  "code": 404,
  "message": "Block or required state not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/rewards/attestations/{epoch}

Retrieves attestations rewards.

Retrieve attestation reward info for validators specified by array of public keys or validator index. If no array is provided, return reward info for every validator.

Parameters

  • epoch (string; path; required): the epoch to get rewards info from.
  • <request body>: an array of either hex encoded public key (any bytes48 with 0x prefix) or validator index.
[
  "string"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/rewards/attestations/{epoch}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "ideal_rewards": [
      {
        "effective_balance": "1000000000",
        "head": "2500",
        "target": "5000",
        "source": "5000",
        "inclusion_delay": "5000",
        "inactivity": "5000"
      }
    ],
    "total_rewards": [
      {
        "validator_index": "0",
        "head": "2000",
        "target": "2000",
        "source": "4000",
        "inclusion_delay": "2000",
        "inactivity": "2000"
      }
    ]
  }
}
  • 400: Invalid get attestations rewards request.
{
  "code": 400,
  "message": "Invalid request to retrieve attestations rewards info"
}
  • 404: Epoch not known or required data not available.
{
  "code": 404,
  "message": "Epoch not known or required data not available"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/blinded_blocks/{block_id}

Retrieves blinded block.

Retrieves blinded block for given block ID. Depending on Accept header it can be returned either as JSON or as bytes serialized by SSZ.

Parameters
  • block_id (string; path; required): a block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/blinded_blocks/{block_id}" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "version": "phase0",
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "message": {
      "slot": "1",
      "proposer_index": "1",
      "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "body": {
        "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
        "eth1_data": {
          "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "deposit_count": "1",
          "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "proposer_slashings": [
          {
            "signed_header_1": {
              "message": {
                "slot": "1",
                "proposer_index": "1",
                "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            },
            "signed_header_2": {
              "message": {
                "slot": "1",
                "proposer_index": "1",
                "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            }
          }
        ],
        "attester_slashings": [
          {
            "attestation_1": {
              "attesting_indices": [
                "1"
              ],
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
              "data": {
                "slot": "1",
                "index": "1",
                "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "source": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                },
                "target": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                }
              }
            },
            "attestation_2": {
              "attesting_indices": [
                "1"
              ],
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
              "data": {
                "slot": "1",
                "index": "1",
                "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
                "source": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                },
                "target": {
                  "epoch": "1",
                  "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
                }
              }
            }
          }
        ],
        "attestations": [
          {
            "aggregation_bits": "0x01",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        ],
        "deposits": [
          {
            "proof": [
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            ],
            "data": {
              "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
              "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "amount": "1",
              "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
            }
          }
        ],
        "voluntary_exits": [
          {
            "message": {
              "epoch": "1",
              "validator_index": "1"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        ]
      }
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
}
  • 400: The block ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid block ID: current"
}
  • 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/light_client/bootstrap/{block_root}

Retrieves LightClientBootstrap structure for a requested block root.

Requests the LightClientBootstrap (opens in a new tab) structure corresponding to a given post-Altair beacon block root. Depending on the Accept header it can be returned either as JSON or SSZ-serialized bytes.

Servers SHOULD provide results as defined in create_light_client_bootstrap (opens in a new tab). To fulfill a request, the requested block's post state needs to be known.

Parameters

  • block_root (string, hex; path; required): Block root. <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/light_client/bootstrap/{block_root}" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "version": "phase0",
  "data": {
    "header": {
      "beacon": {
        "slot": "1",
        "proposer_index": "1",
        "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    },
    "current_sync_committee": {
      "pubkeys": [
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"
      ],
      "aggregate_pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"
    },
    "current_sync_committee_branch": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ]
  }
}
  • 400: Malformed request parameter.
{
  "code": 400,
  "message": "Invalid block root value"
}
  • 404: LightClientBootstrap instance cannot be produced for the given block root.
{
  "code": 404,
  "message": "LC bootstrap unavailable"
}
  • 406: Unacceptable media type.
{
  "code": 406,
  "message": "Accepted media type not supported"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/light_client/updates

Retrieves LightClientUpdate instances in a requested sync committee period range.

Requests the LightClientUpdate (opens in a new tab) instances in the sync committee period range [start_period, start_period + count), leading up to the current head sync committee period as selected by fork choice. Depending on the Accept header they can be returned either as JSON or SSZ-serialized bytes.

Servers SHOULD provide results as defined in create_light_client_update (opens in a new tab). They MUST respond with at least the earliest known result within the requested range, and MUST send results in consecutive order (by period). The response MUST NOT contain more than min(MAX_REQUEST_LIGHT_CLIENT_UPDATES, count) (opens in a new tab) results.

Parameters

  • start_period (string; query; required)
  • count (string; query; required)

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/light_client/updates" \
-H "Accept: application/json"

Responses

  • 200: Success.
[
  {
    "version": "phase0",
    "data": {
      "attested_header": {
        "beacon": {
          "slot": "1",
          "proposer_index": "1",
          "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        }
      },
      "next_sync_committee": {
        "pubkeys": [
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
          "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"
        ],
        "aggregate_pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"
      },
      "next_sync_committee_branch": [
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      ],
      "finalized_header": {
        "beacon": {
          "slot": "1",
          "proposer_index": "1",
          "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        }
      },
      "finality_branch": [
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      ],
      "sync_aggregate": {
        "sync_committee_bits": "0x01",
        "sync_committee_signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      },
      "signature_slot": "1"
    }
  }
]
  • 400: Malformed or missing request parameter.
{
  "code": 400,
  "message": "Invalid sync committee period requested"
}
  • 406: Unacceptable media type.
{
  "code": 406,
  "message": "Accepted media type not supported"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/light_client/finality_update

Retrieves the known LightClientFinalityUpdate.

Requests the latest LightClientFinalityUpdate (opens in a new tab) known by the server. Depending on the Accept header it can be returned either as JSON or SSZ-serialized bytes.

Servers SHOULD provide results as defined in create_light_client_finality_update (opens in a new tab).

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/light_client/finality_update" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "version": "phase0",
  "data": {
    "attested_header": {
      "beacon": {
        "slot": "1",
        "proposer_index": "1",
        "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    },
    "finalized_header": {
      "beacon": {
        "slot": "1",
        "proposer_index": "1",
        "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    },
    "finality_branch": [
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    ],
    "sync_aggregate": {
      "sync_committee_bits": "0x01",
      "sync_committee_signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    },
    "signature_slot": "1"
  }
}
  • 400: No LightClientFinalityUpdate available.
{
  "code": 404,
  "message": "LC finality update unavailable"
}
  • 406: Unacceptable media type.
{
  "code": 406,
  "message": "Accepted media type not supported"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/light_client/optimistic_update

Retrieves the latest known LightClientOptimisticUpdate.

Requests the latest LightClientOptimisticUpdate (opens in a new tab) known by the server. Depending on the Accept header it can be returned either as JSON or SSZ-serialized bytes.

Servers SHOULD provide results as defined in create_light_client_optimistic_update (opens in a new tab).

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/light_client/optimistic_update" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "version": "phase0",
  "data": {
    "attested_header": {
      "beacon": {
        "slot": "1",
        "proposer_index": "1",
        "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    },
    "sync_aggregate": {
      "sync_committee_bits": "0x01",
      "sync_committee_signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    },
    "signature_slot": "1"
  }
}
  • 404: No LightClientOptimisticUpdate available.
{
  "code": 404,
  "message": "LC optimistic update unavailable"
}
  • 406: Unacceptable media type.
{
  "code": 406,
  "message": "Accepted media type not supported"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/pool/attestations

Retrieves attestations from the operations pool.

Retrieves attestations known by the node but not necessarily incorporated into any block

Parameters

  • slot (string; query): a slot.
  • committee_index (string; query): a committee index.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your-token}/eth/v1/beacon/pool/attestations" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "aggregation_bits": "0x01",
      "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "data": {
        "slot": "1",
        "index": "1",
        "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "source": {
          "epoch": "1",
          "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "target": {
          "epoch": "1",
          "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        }
      }
    }
  ]
}
  • Code 400: The slot or committee index could not be parsed.
{
  "code": 400,
  "message": "Invalid slot: current"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/attestations

Submits attestation objects to the node.

Submits Attestation objects to the node. Each attestation in the request body is processed individually.

If an attestation is validated successfully the node MUST publish that attestation on the appropriate subnet.

If one or more attestations fail validation the node MUST return a 400 error with details of which attestations have failed, and why.

Parameters

  • <request body> (required):
[
  {
    "aggregation_bits": "0x01",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "data": {
      "slot": "1",
      "index": "1",
      "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "source": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "target": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    }
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/attestations" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Attestations are stored in pool and broadcast on appropriate subnet.
  • Code 400: Errors with one or more attestations.
{
  "code": 400,
  "message": "some failures",
  "failures": [
    {
      "index": 3,
      "message": "invalid signature"
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/pool/attester_slashings

Retrieves AttesterSlashings from the operations pool.

Retrieves attester slashings known by the node but not necessarily incorporated into any block.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/attester_slashings" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "attestation_1": {
        "attesting_indices": [
          "1"
        ],
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
        "data": {
          "slot": "1",
          "index": "1",
          "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "source": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          },
          "target": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          }
        }
      },
      "attestation_2": {
        "attesting_indices": [
          "1"
        ],
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
        "data": {
          "slot": "1",
          "index": "1",
          "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "source": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          },
          "target": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          }
        }
      }
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/attester_slashings

Submits the AttesterSlashing object to the node's pool.

Submits AttesterSlashing object to node's pool and if passes validation node MUST broadcast it to network.

Parameters

  • <request body> (required):
{
  "attestation_1": {
    "attesting_indices": [
      "1"
    ],
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "data": {
      "slot": "1",
      "index": "1",
      "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "source": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "target": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    }
  },
  "attestation_2": {
    "attesting_indices": [
      "1"
    ],
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "data": {
      "slot": "1",
      "index": "1",
      "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "source": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "target": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    }
  }
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/attester_slashings" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid attester slashing.
{
  "code": 400,
  "message": "Invalid attester slashing, it will never pass validation so it's rejected"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/pool/proposer_slashings

Retrieves ProposerSlashings from the operations pool.

Retrieves proposer slashings known by the node but not necessarily incorporated into any block.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/proposer_slashings" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "signed_header_1": {
        "message": {
          "slot": "1",
          "proposer_index": "1",
          "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      },
      "signed_header_2": {
        "message": {
          "slot": "1",
          "proposer_index": "1",
          "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
        },
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      }
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/proposer_slashings

Submits the ProposerSlashing object to the node's pool.

Submits ProposerSlashing object to node's pool and if passes validation node MUST broadcast it to network.

Parameters

  • <request body> (required):
{
  "signed_header_1": {
    "message": {
      "slot": "1",
      "proposer_index": "1",
      "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  },
  "signed_header_2": {
    "message": {
      "slot": "1",
      "proposer_index": "1",
      "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/proposer_slashings" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid proposer slashing.
{
  "code": 400,
  "message": "Invalid proposer slashing, it will never pass validation so it's rejected"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/sync_committees

Submits sync committee signatures to the node.

Submits sync committee signature objects to the node.

Sync committee signatures are not present in phase0, but are required for Altair networks.

If a sync committee signature is validated successfully the node MUST publish that sync committee signature on all applicable subnets.

If one or more sync committee signatures fail validation the node MUST return a 400 error with details of which sync committee signatures have failed, and why.

Parameters

  • <request body> (required):
[
  {
    "slot": "1",
    "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "validator_index": "1",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/sync_committees" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Sync committee signatures are stored in pool and broadcast on appropriate subnet.
  • Code 400: Errors with one or more sync committee signatures.
{
  "code": 400,
  "message": "some failures",
  "failures": [
    {
      "index": 3,
      "message": "invalid signature"
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/pool/voluntary_exits

Retrieves SignedVoluntaryExit from the operations pool.

Retrieves voluntary exits known by the node but not necessarily incorporated into any block.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/voluntary_exits" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "message": {
        "epoch": "1",
        "validator_index": "1"
      },
      "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/voluntary_exits

Submits the SignedVoluntaryExit object to the node's pool.

Submits SignedVoluntaryExit object to node's pool and if passes validation node MUST broadcast it to network.

Parameters

  • <request body> (required):
{
  "message": {
    "epoch": "1",
    "validator_index": "1"
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/voluntary_exits" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Voluntary exit is stored in node and broadcasted to network.
  • Code 400: Invalid voluntary exit.
{
  "code": 400,
  "message": "Invalid voluntary exit, it will never pass validation so it's rejected"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/pool/bls_to_execution_changes

Retrieves SignedBLSToExecutionChange from operations pool.

Retrieves BLS to execution changes known by the node but not necessarily incorporated into any block.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/bls_to_execution_changes" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "data": [
    {
      "message": {
        "validator_index": "1",
        "from_bls_pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
        "to_execution_address": "0xAbcF8e0d4e9587369b2301D0790347320302cc09"
      },
      "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    }
  ]
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/bls_to_execution_changes

Submits SignedBLSToExecutionChange object to node's pool

Submits a list of SignedBLSToExecutionChange objects to node's pool. Any that pass validation MUST be broadcast to the network.

Parameters

  • <request body> (required):
[
  {
    "message": {
      "validator_index": "1",
      "from_bls_pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "to_execution_address": "0xAbcF8e0d4e9587369b2301D0790347320302cc09"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/bls_to_execution_changes" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • 200: BLS to execution changes were all stored to the pool and broadcast on the appropriate subnet.
  • 400: Errors in one or more BLS to execution changes.
{
  "code": 400,
  "message": "some failures",
  "failures": [
    {
      "index": 3,
      "message": "invalid signature"
    }
  ]
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

Builder

Set of endpoints specific to building blocks.

GET /eth/v1/builder/states/{state_id}/expected_withdrawals

Retrieves the withdrawals that are to be included for the block built on the specified state.

Gets the withdrawals computed from the specified state, that will be included in the block that gets built on the specified state.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • proposal_slot (string; query): the slot that a block is being built for, with the specified state as the parent. Defaults to the slot after the parent state if not specified.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/builder/states/{state_id}/expected_withdrawals" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "index": "1",
      "validator_index": "1",
      "address": "0xAbcF8e0d4e9587369b2301D0790347320302cc09",
      "amount": "1"
    }
  ]
}
  • 400: An error occurred preparing the withdrawals from the specified state for the proposal slot.
{
  "code": 400,
  "message": "The specified state is not a capella state."
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

Config

Endpoints to query chain configuration, specification, and fork schedules.

GET /eth/v1/config/fork_schedule

Retrieves scheduled upcoming forks.

Retrieve all forks, past present and future, of which this node is aware.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/config/fork_schedule" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "previous_version": "0x00000000",
      "current_version": "0x00000000",
      "epoch": "1"
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/config/spec

Retrieves spec parameters.

Retrieve specification configuration used on this node. The configuration should include:

Values are returned with the following format:

  • Any value starting with 0x in the spec is returned as a hex string.
  • Numeric values are returned as a quoted integer.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/config/spec" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "DEPOSIT_CONTRACT_ADDRESS": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
  "DEPOSIT_NETWORK_ID": "1",
  "DOMAIN_AGGREGATE_AND_PROOF": "0x06000000",
  "INACTIVITY_PENALTY_QUOTIENT": "67108864",
  "INACTIVITY_PENALTY_QUOTIENT_ALTAIR": "50331648"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/config/deposit_contract

Retrieves a deposit contract address.

Retrieve Eth1 deposit contract address and chain ID.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/config/deposit_contract" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "chain_id": "1",
    "address": "0x1Db3439a222C519ab44bb1144fC28167b4Fa6EE6"
  }
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

Debug

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

Retrieves the full BeaconState object.

Returns full BeaconState object for given stateId. Depending on Accept header it can be returned either as json or as bytes serialized by SSZ.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
    Example: head.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/debug/beacon/states/{state_id}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.

Note: The Eth-Consensus-Version header is required in response so client can deserialize returned json or ssz data more effectively.

{
  "version": "phase0",
  "execution_optimistic": 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": [],
    "slashings": [],
    "previous_epoch_attestations": [
      {
        "aggregation_bits": "0x2ccfbd524ECbedfc70c91BE08b5668fA4ebdfD773B1fFe1daAbfC912c3cD4b2C93E1",
        "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": "0xF9DD8ABe17ae0baDA640Bb0d8c4e81a349D3a",
        "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"
    }
  }
}
  • Code 400: Invalid state ID.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • Code 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v2/debug/beacon/heads

Retrieves fork choice leaves.

Retrieves all possible chain heads (leaves of fork choice tree).

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/debug/beacon/heads" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "slot": "1",
      "execution_optimistic": false
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/debug/fork_choice

Retrieves fork choice array.

Retrieves all current fork choice context.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/debug/fork_choice" \
-H "Accept: text/event-stream"

Responses

  • 200: Success.
{
  "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": {}
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

Events

Set of endpoints for event subscription.

GET /eth/v1/events

Subscribes to Beacon node events.

Provides endpoint to subscribe to beacon node Server-Sent-Events stream. Consumers should use eventsource (opens in a new tab) implementation to listen on those events.

Servers may send SSE comments beginning with : for any purpose, including to keep the event stream connection alive in the presence of proxy servers.

Parameters

  • topics (array[string]; query; required): event types to subscribe to; available values : head, block, block_gossip, attestation, voluntary_exit, bls_to_execution_change, proposer_slashing, attester_slashing, finalized_checkpoint, chain_reorg, contribution_and_proof, light_client_finality_update, light_client_optimistic_update, payload_attributes, blob_sidecar.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/events" \
-H "Accept: text/event-stream"

Responses

  • Code 200: Opened SSE stream.

Head event:

The node has finished processing, resulting in a new head. previous_duty_dependent_root is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1) and current_duty_dependent_root is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch) - 1). Both dependent roots use the genesis block root in the case of underflow.

event: head
data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch_transition":false, "previous_duty_dependent_root":"0x5e0043f107cb57913498fbf2f99ff55e730bf1e151f02f221e977c91a90a0e91", "current_duty_dependent_root":"0x5e0043f107cb57913498fbf2f99ff55e730bf1e151f02f221e977c91a90a0e91", "execution_optimistic": false}

Block event:

The node has received a valid block (from P2P or API).

event: block
data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "execution_optimistic": false}

Block gossip event:

The node has received a block (from P2P or API) that passes validation rules of the beacon_block topic.

event: block_gossip
data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf"}

Attestation event:

The node has received a valid attestation (from P2P or API).

event: attestation
data: {"aggregation_bits":"0x01", "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "data":{"slot":"1", "index":"1", "beacon_block_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "source":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}, "target":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}}

Voluntary exit event:

The node has received a valid voluntary exit (from P2P or API).

event: voluntary_exit
data: {"message":{"epoch":"1", "validator_index":"1"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}

Proposer slashing event:

The node has received a ProposerSlashing (from P2P or API) that passes validation rules of the proposer_slashing topic.

event: proposer_slashing
data: {"signed_header_1":{"message":{"slot":"0","proposer_index":"0","parent_root":"0x0000000000000000000000000000000000000000000000000000000000000000","state_root":"0x0000000000000000000000000000000000000000000000000000000000000000","body_root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"signed_header_2":{"message":{"slot":"0","proposer_index":"0","parent_root":"0x0000000000000000000000000000000000000000000000000000000000000000","state_root":"0x0000000000000000000000000000000000000000000000000000000000000000","body_root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}

Attester slashing event:

The node has received an AttesterSlashing (from P2P or API) that passes validation rules of the attester_slashing topic.

event: attester_slashing
data: {"attestation_1":{"attesting_indices":["0", "1"],"data":{"slot":"0","index":"0","beacon_block_root":"0x0000000000000000000000000000000000000000000000000000000000000000","source":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"target":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"attestation_2":{"attesting_indices":["0", "1"],"data":{"slot":"0","index":"0","beacon_block_root":"0x0000000000000000000000000000000000000000000000000000000000000000","source":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"target":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}

BLS to execution change event:

The node has received a SignedBLSToExecutionChange (from P2P or API) that passes validation rules of the bls_to_execution_change topic.

event: bls_to_execution_change
data: {"message":{"validator_index":"1", "from_bls_pubkey":"0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95", "to_execution_address":"0x9Be8d619c56699667c1feDCD15f6b14D8B067F72"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}

Finalized checkpoint event:

Finalized checkpoint has been updated.

event: finalized_checkpoint
data: {"block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false }

Chain reorg event:

The node has reorganized its chain.

event: chain_reorg
data: {"slot":"200", "depth":"50", "old_head_block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_block":"0x76262e91970d375a19bfe8a867288d7b9cde43c8635f598d93d39d041706fc76", "old_head_state":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false}

Contribution and proof event:

The node has received a valid sync committee SignedContributionAndProof (from P2P or API).

event: contribution_and_proof
data: {"message": {"aggregator_index": "997", "contribution": {"slot": "168097", "beacon_block_root": "0x56f1fd4262c08fa81e27621c370e187e621a67fc80fe42340b07519f84b42ea1", "subcommittee_index": "0", "aggregation_bits": "0xffffffffffffffffffffffffffffffff", "signature": "0x85ab9018e14963026476fdf784cc674da144b3dbdb47516185438768774f077d882087b90ad642469902e782a8b43eed0cfc1b862aa9a473b54c98d860424a702297b4b648f3f30bdaae8a8b7627d10d04cb96a2cc8376af3e54a9aa0c8145e3"}, "selection_proof": "0x87c305f04bfe5db27c2b19fc23e00d7ac496ec7d3e759cbfdd1035cb8cf6caaa17a36a95a08ba78c282725e7b66a76820ca4eb333822bd399ceeb9807a0f2926c67ce67cfe06a0b0006838203b493505a8457eb79913ce1a3bcd1cc8e4ef30ed"}, "signature": "0xac118511474a94f857300b315c50585c32a713e4452e26a6bb98cdb619936370f126ed3b6bb64469259ee92e69791d9e12d324ce6fd90081680ce72f39d85d50b0ff977260a8667465e613362c6d6e6e745e1f9323ec1d6f16041c4e358839ac"}

Light client finality update event:

The node's latest known LightClientFinalityUpdate has been updated.

event: light_client_finality_update
data: {"version":"altair", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finalized_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finality_branch": ["0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"], "sync_aggregate": {"sync_committee_bits":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffbffffffffffffffffffffbffffffffffffff", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}}

Light client optimistic update event:

The node's latest known LightClientOptimisticUpdate has been updated.

event: light_client_optimistic_update
data: {"version":"altair", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "sync_aggregate": {"sync_committee_bits":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffbffffffffffffffffffffbffffffffffffff", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}}

Payload attributes event:

The node has computed new payload attributes for execution payload building.

This event gives block builders and relays sufficient information to construct or verify a block at proposal_slot. The meanings of the fields are:

  • version: the identifier of the beacon hard fork at proposal_slot, e.g. "bellatrix", "capella".
  • proposal_slot: the slot at which a block using these payload attributes may be built.
  • parent_block_root: the beacon block root of the parent block to be built upon.
  • parent_block_number: the execution block number of the parent block.
  • parent_block_hash: the execution block hash of the parent block.
  • proposer_index: the validator index of the proposer at proposal_slot on the chain identified by parent_block_root.
  • payload_attributes: beacon API encoding of PayloadAttributesV<N> as defined by the execution-apis specification. The version N must match the payload attributes for the hard fork matching version. The beacon API encoded object must have equivalent fields to its counterpart in execution-apis with two differences: 1) snake_case identifiers must be used rather than camelCase; 2) integers must be encoded as quoted decimals rather than big-endian hex.

The frequency at which this event is sent may depend on beacon node configuration. The fee recipient may also be set via beacon node config, but should likely be ignored by block builders and most other API consumers.

event: payload_attributes
data: {"version": "capella", "data": {"proposer_index": "123", "proposal_slot": "10", "parent_block_number": "9", "parent_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "parent_block_hash": "0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "payload_attributes": {"timestamp": "123456", "prev_randao": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "suggested_fee_recipient": "0x0000000000000000000000000000000000000000", "withdrawals": [{"index": "5", "validator_index": "10", "address": "0x0000000000000000000000000000000000000000", "amount": "15640"}]}}}

Blob sidecar event:

The node has received a BlobSidecar (from P2P or API) that passes all gossip validations on the blob_sidecar_{subnet_id} topic.

event: blob_sidecar
data: {"block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "index": "1", "slot": "1", "kzg_commitment": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "versioned_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}
  • Code 400: The topics supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid topic: weather_forecast"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

Node

Endpoints to query node related information.

GET /eth/v1/node/identity

Retrieves node network identity.

Retrieves data about the node's network presence.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/identity" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "data": {
    "peer_id": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
    "enr": "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8",
    "p2p_addresses": [
      "/ip4/7.7.7.7/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N"
    ],
    "discovery_addresses": [
      "/ip4/7.7.7.7/udp/30303/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N"
    ],
    "metadata": {
      "seq_number": "1",
      "attnets": "0x0000000000000000",
      "syncnets": "0x0f"
    }
  }
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/peers

Retrieves node network peers.

Retrieves data about the node's network peers. By default, this returns all peers. Multiple query params are combined using AND conditions.

Parameters

  • state (array[string]; query): available values : disconnected, connecting, connected, disconnecting.
  • direction (array[string]; query): available values : inbound, outbound.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/peers" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": [
    {
      "peer_id": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
      "enr": "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8",
      "last_seen_p2p_address": "/ip4/7.7.7.7/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
      "state": "disconnected",
      "direction": "inbound"
    }
  ],
  "meta": {
    "count": 1
  }
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/peers/{peer_id}

Retrieves a peer.

Retrieves data about the given peer.

Parameters

  • peer_id (string; path; required): a peer ID; example: QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/peers/{peer_id}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "peer_id": "QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
    "enr": "enr:-IS4QHCYrYZbAKWCBRlAy5zzaDZXJBGkcnh4MHcBFZntXNFrdvJjX04jRzjzCBOonrkTfj499SZuOh8R33Ls8RRcy5wBgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPKY0yuDUmstAHYpMa2_oxVtw0RW_QAdpzBQA8yWM0xOIN1ZHCCdl8",
    "last_seen_p2p_address": "/ip4/7.7.7.7/tcp/4242/p2p/QmYyQSo1c1Ym7orWxLYvCrM2EmxFTANf8wXmmE7DWjhx5N",
    "state": "disconnected",
    "direction": "inbound"
  }
}
  • Code 400: The peer ID supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid peer ID: localhost"
}
  • Code 404: Peer not found.
{
  "code": 404,
  "message": "Peer not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/peer_count

Retrieves peer count.

Retrieves number of known peers.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/peer_count" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "disconnected": "12",
    "connecting": "34",
    "connected": "56",
    "disconnecting": "5"
  }
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/version

Retrieves a version string of the running Beacon node.

Requests that the beacon node identify information about its implementation in a format similar to an HTTP User-Agent (opens in a new tab) field.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/version" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "version": "Lighthouse/v0.1.5 (Linux x86_64)"
  }
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/syncing

Retrieves a node syncing status.

Requests the beacon node to describe if it's currently syncing or not, and if it is, what block it is up to.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/syncing" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "head_slot": "1",
    "sync_distance": "1",
    "is_syncing": true,
    "is_optimistic": true,
    "el_offline": true
  }
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/health

Retrieves health check.

Returns node health status in http status codes. Useful for load balancers.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/health"

Responses

  • Code 200: Node is ready.
  • Code 206: Node is syncing but can serve incomplete data.
  • Code 400: Invalid syncing status code.
  • Code 503: Node not initialized or having issues.

Validator

Endpoints intended for validator clients.

POST /eth/v1/validator/duties/attester/{epoch}

Retrieves attester duties.

Requests the beacon node to provide a set of attestation duties, which should be performed by validators, for a particular epoch. Duties should only need to be checked once per epoch, however a chain reorganization (of > MIN_SEED_LOOKAHEAD epochs) could occur, resulting in a change of duties. For full safety, you should monitor head events and confirm the dependent root in this response matches:

  • event.previous_duty_dependent_root when compute_epoch_at_slot(event.slot) == epoch
  • event.current_duty_dependent_root when compute_epoch_at_slot(event.slot) + 1 == epoch
  • event.block otherwise

The dependent_root value is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1) or the genesis block root in the case of underflow.

Parameters

  • epoch (string; path; required): should only be allowed one epoch ahead.
  • <request body> (required): an array of the validator indices for which to obtain the duties:
[
  "1"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/duties/attester/{epoch}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
{
  "dependent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
  "execution_optimistic": false,
  "data": [
    {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "validator_index": "1",
      "committee_index": "1",
      "committee_length": "1",
      "committees_at_slot": "1",
      "validator_committee_index": "1",
      "slot": "1"
    }
  ]
}
  • Code 400: Invalid epoch or index.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/duties/proposer/{epoch}

Retrieves block proposer duties.

Request beacon node to provide all validators that are scheduled to propose a block in the given epoch. Duties should only need to be checked once per epoch, however a chain reorganization could occur that results in a change of duties. For full safety, you should monitor head events and confirm the dependent root in this response matches:

  • event.current_duty_dependent_root when compute_epoch_at_slot(event.slot) == epoch
  • event.block otherwise

The dependent_root value is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch) - 1) or the genesis block root in the case of underflow.

Parameters

  • epoch (string; path; required); an epoch.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/duties/proposer/{epoch}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "dependent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
  "execution_optimistic": false,
  "data": [
    {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "validator_index": "1",
      "slot": "1"
    }
  ]
}
  • Code 400: Invalid epoch.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/duties/sync/{epoch}

Retrieves sync committee duties.

Requests the beacon node to provide a set of sync committee duties for a particular epoch.

Parameters

  • epoch (string; path; required): epoch // EPOCHS_PER_SYNC_COMMITTEE_PERIOD <= current_epoch // EPOCHS_PER_SYNC_COMMITTEE_PERIOD + 1
  • <request body> (required): an array of the validator indices for which to obtain the duties:
[
  "1"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/duties/sync/{epoch}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
{
  "execution_optimistic": false,
  "data": [
    {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "validator_index": "1",
      "validator_sync_committee_indices": [
        "1"
      ]
    }
  ]
}
  • Code 400: Invalid epoch or index.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v3/validator/blocks/{slot}

Produces a new block, without signature.

Requests a beacon node to produce a valid block, which can then be signed by a validator. The returned block may be blinded or unblinded, depending on the current state of the network as decided by the execution and beacon nodes.

The beacon node must return an unblinded block if it obtains the execution payload from its paired execution node. It must only return a blinded block if it obtains the execution payload header from an MEV relay.

Metadata in the response indicates the type of block produced, and the supported types of block will be added to as forks progress.

Parameters

  • slot (string; path; required): the slot for which the block should be proposed.
  • randao_reveal (string; hex; query; required): the validator's randao reveal value.
  • graffiti (string; hex; query): an arbitrary data validator to include in the block.
  • skip_randao_verification (query): skip verification of the randao_reveal value. If this flag is set then the randao_reveal must be set to the point at infinity (0xc0..00). This query parameter is a flag and does not take a value.
  • builder_boost_factor (string; query):

Percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the paired execution node. This parameter is only relevant if the beacon node is connected to a builder, deems it safe to produce a builder payload, and receives valid responses from both the builder endpoint and the paired execution node. When these preconditions are met, the server MUST act as follows:

  • if exec_node_payload_value >= builder_boost_factor * (builder_payload_value // 100), then return a full (unblinded) block containing the execution node payload.
  • otherwise, return a blinded block containing the builder payload header.

Servers must support the following values of the boost factor which encode common preferences:

  • builder_boost_factor=0: prefer the execution node payload unless an error makes it unviable.
  • builder_boost_factor=100: default profit maximization mode; choose whichever payload pays more.
  • builder_boost_factor=2**64 - 1: prefer the builder payload unless an error or beacon node health check makes it unviable.

Servers should use saturating arithmetic or another technique to ensure that large values of the builder_boost_factor do not trigger overflows or errors. If this parameter is provided and the beacon node is not configured with a builder then the beacon node MUST respond with a full block, which the caller can choose to reject if it wishes. If this parameter is not provided then it should be treated as having the default value of 100. If the value is provided but out of range for a 64-bit unsigned integer, then an error response with status code 400 MUST be returned.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v3/validator/blocks/{slot}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.

Note: The Eth-Consensus-Version header is required in response so client can deserialize returned json or ssz data more effectively.

{
  "version": "phase0",
  "data": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xbF0eF8805DE094355C99fD34Df183ADB5BB153f5dac2eD83bee6eEd2dEf05cFC",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  }
}
  • Code 400: Invalid block production request.
{
  "code": 400,
  "message": "Invalid request to produce a block"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/attestation_data

Produces attestation data.

Requests that the beacon node produce an AttestationData.

A 503 error must be returned if the block identified by the response beacon_block_root is optimistic (i.e. the attestation attests to a block that has not been fully verified by an execution engine).

Parameters

  • slot (string; query; required): the slot for which an attestation data should be created.
  • committee_index (string; query; required): the committee index for which an attestation data should be created.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/attestation_data" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "slot": "1",
    "index": "1",
    "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "source": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "target": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    }
  }
}
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/aggregate_attestation

Retrieves aggregated attestation.

Aggregates all attestations matching given attestation data root and slot.

A 503 error must be returned if the block identified by the response beacon_block_root is optimistic (i.e. the aggregated attestation attests to a block that has not been fully verified by an execution engine).

A 404 error must be returned if no attestation is available for the requested attestation_data_root.

Parameters

  • attestation_data_root (string; query; required): HashTreeRoot of AttestationData that validator wants aggregated.
  • slot (string; query; required): a slot.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/aggregate_attestation" \
-H "Accept: application/json"

Responses

  • Code 200: Success. Returns aggregated Attestation object with same AttestationData root.
{
  "data": {
    "aggregation_bits": "0x01",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "data": {
      "slot": "1",
      "index": "1",
      "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "source": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "target": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    }
  }
}
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 404: Not found.
{
  "code": 404,
  "message": "Requested item not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/aggregate_and_proofs

Publishes multiple aggregate and proofs.

Verifies given aggregate and proofs and publishes them on appropriate gossipsub topic.

Parameters

  • <request body> (required):
[
  {
    "message": {
      "aggregator_index": "1",
      "aggregate": {
        "aggregation_bits": "0x01",
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
        "data": {
          "slot": "1",
          "index": "1",
          "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "source": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          },
          "target": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          }
        }
      },
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/aggregate_and_proofs" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/beacon_committee_subscriptions

Signals the Beacon node to prepare for a committee subnet.

After beacon node receives this request, search using discv5 for peers related to this subnet and replace current peers with those ones if necessary. If validator is_aggregator, beacon node must:

  • Announce subnet topic subscription on gossipsub.
  • Aggregate attestations received on that subnet.

Parameters

  • <request body>:
[
  {
    "validator_index": "1",
    "committee_index": "1",
    "committees_at_slot": "1",
    "slot": "1",
    "is_aggregator": true
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/beacon_committee_subscriptions" \
-H "Content-Type: application/json" \
-H  "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success. Slot signature is valid and beacon node has prepared the attestation subnet. Note that we cannot be certain the Beacon node will find peers for that subnet for various reasons.

  • Code 400: Invalid request syntax.

{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/sync_committee_subscriptions

Subscribes to sync committee subnets.

Subscribe to a number of sync committee subnets.

Sync committees are not present in phase0, but are required for Altair networks.

Subscribing to sync committee subnets is an action performed by VC to enable network participation in Altair networks, and only required if the VC has an active validator in an active sync committee.

Parameters

  • <request body>:
[
  {
    "validator_index": "1",
    "sync_committee_indices": [
      "1"
    ],
    "until_epoch": "1"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/sync_committee_subscriptions" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/beacon_committee_selections

Determines if a distributed validator has been selected to aggregate attestations.

This endpoint should be used by a validator client running as part of a distributed validator cluster, and is implemented by a distributed validator middleware client. This endpoint is used to exchange partial selection proofs for combined/aggregated selection proofs to allow a validator client to correctly determine if any of its validators has been selected to perform an attestation aggregation duty in a slot. Validator clients running in a distributed validator cluster must query this endpoint at the start of an epoch for the current and lookahead (next) epochs for all validators that have attester duties in the current and lookahead epochs. Consensus clients need not support this endpoint and may return a 501.

Parameters

  • <request body> (required):
[
  {
    "validator_index": "1",
    "slot": "1",
    "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/beacon_committee_selections" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • 200: Returns the threshold aggregated beacon committee selection proofs.
{
  "data": [
    {
      "validator_index": "1",
      "slot": "1",
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    }
  ]
}
  • 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • 501: Endpoint not implemented.
{
  "code": 501,
  "message": "Endpoint not implemented"
}
  • 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/sync_committee_contribution

Produces a sync committee contribution.

Requests that the beacon node produce a sync committee contribution.

A 503 error must be returned if the block identified by the response beacon_block_root is optimistic (i.e. the sync committee contribution refers to a block that has not been fully verified by an execution engine).

Parameters

  • slot (string; query; required): the slot for which a sync committee contribution should be created.
  • subcommittee_index (string; query; required): the subcommittee index for which to produce the contribution.
  • beacon_block_root (string; query; required): the block root for which to produce the contribution.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/sync_committee_contribution" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "slot": "1",
    "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "subcommittee_index": "1",
    "aggregation_bits": "0x01",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
}
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 404: Not found.
{
  "code": 404,
  "message": "Requested item not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/sync_committee_selections

Determines if a distributed validator has been selected to make a sync committee contribution.

Submit sync committee selections to a DVT middleware client. It returns the threshold aggregated sync committee selection. This endpoint should be used by a validator client running as part of a distributed validator cluster, and is implemented by a distributed validator middleware client. This endpoint is used to exchange partial selection proofs (slot signatures) for combined/aggregated selection proofs to allow a validator client to correctly determine if any of its validators has been selected to perform a sync committee contribution (sync aggregation) duty in a slot. Validator clients running in a distributed validator cluster must query this endpoint at the start of each slot for all validators that are included in the current sync committee. Consensus clients need not support this endpoint and may return a 501.

Parameters

  • <request body> (required):
[
  {
    "validator_index": "1",
    "slot": "1",
    "subcommittee_index": "1",
    "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/sync_committee_selections" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • 200: Returns the threshold aggregated sync committee selection proofs.
{
  "data": [
    {
      "validator_index": "1",
      "slot": "1",
      "subcommittee_index": "1",
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    }
  ]
}
  • 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • 501: Endpoint not implemented.
{
  "code": 501,
  "message": "Endpoint not implemented"
}
  • 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/contribution_and_proofs

Publishes multiple contribution and proofs.

Publishes multiple signed sync committee contribution and proofs.

Parameters

  • <request body>:
[
  {
    "message": {
      "aggregator_index": "1",
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "contribution": {
        "slot": "1",
        "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "subcommittee_index": "1",
        "aggregation_bits": "0xffffffffffffffffffffffffffffffff",
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      }
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/contribution_and_proofs" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/prepare_beacon_proposer

Provides the Beacon node with proposals for the given validators.

Prepares the beacon node for potential proposers by supplying information required when proposing blocks for the given validators. The information supplied for each validator index will persist through the epoch in which the call is submitted and for a further two epochs after that, or until the beacon node restarts. It is expected that validator clients will send this information periodically, for example each epoch, to ensure beacon nodes have correct and timely fee recipient information.

Note that there is no guarantee that the beacon node will use the supplied fee recipient when creating a block proposal, so on receipt of a proposed block the validator should confirm that it finds the fee recipient within the block acceptable before signing it.

Also note that requests containing currently inactive or unknown validator indices will be accepted, as they may become active at a later epoch.

Parameters

  • <request body>:
[
  {
    "validator_index": "1",
    "fee_recipient": "0xAbcF8e0d4e9587369b2301D0790347320302cc09"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/prepare_beacon_proposer" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success. Preparation information has been received.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/register_validator

Provides the Beacon node with registrations for the given validators to the external builder network.

Prepares the beacon node for engaging with external builders. The information must be sent by the beacon node to the builder network. It is expected that the validator client will send this information periodically to ensure the beacon node has correct and timely registration information to provide to builders. The validator client should not sign blinded beacon blocks that do not adhere to their latest fee recipient and gas limit preferences.

Note that only registrations for active or pending validators must be sent to the builder network. Registrations for unknown or exited validators must be filtered out and not sent to the builder network.

Parameters

  • <request body>:
[
  {
    "message": {
      "fee_recipient": "0xAbcF8e0d4e9587369b2301D0790347320302cc09",
      "gas_limit": "1",
      "timestamp": "1",
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/register_validator" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success. Registration information has been received.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/liveness/{epoch}

Indicates if a validator has been observed on the network.

Requests the beacon node to indicate if a validator has been observed to be live in a given epoch. The beacon node might detect liveness by observing messages from the validator on the network, in the beacon chain, from its API or from any other source. A beacon node SHOULD support the current and previous epoch, however it MAY support earlier epoch. It is important to note that the values returned by the beacon node are not canonical; they are best-effort and based upon a subjective view of the network. A beacon node that was recently started or suffered a network partition may indicate that a validator is not live when it actually is.

Parameters

  • epoch (string; path; required): the epoch for which liveness is being queried.
  • <request body> (required): an array of the validator indices for which to detect liveness.
[
  "1"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/liveness/{epoch" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • 200: Success.
{
  "data": [
    {
      "index": "1",
      "is_live": true
    }
  ]
}
  • 400: Invalid epoch or index.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

ValidatorRequiredApi

Minimal set of endpoints to enable a working validator implementation.

GET /eth/v1/beacon/genesis

Retrieves the details of the chain's genesis.

Returns the details of the chain's genesis which can be used to identify chain.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/genesis" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
    "data": {
        "genesis_time": "1606824023",
        "genesis_validators_root": "0x4b363db94e286120d76eb905340fdd4e54bfe9f06bf33ff6cf5ad27f511bfe95",
        "genesis_fork_version": "0x00000000"
    }
}
  • 404: Chain genesis info is not yet known.
{
  "code": 404,
  "message": "Chain genesis info is not yet known"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/fork

Retrieves the Fork object for a requested state.

Retrieves the Fork (opens in a new tab) object for state with given 'stateId'.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/state/{state_id}/fork" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "data": {
    "previous_version": "0x00000000",
    "current_version": "0x00000000",
    "epoch": "1"
  }
}
  • 400: Invalid state ID.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: State not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/states/{state_id}/validators/{validator_id}

Retrieves the validator from state by ID.

Returns validator specified by state and id or public key along with status and balance.

Parameters

  • state_id (string; path; required): state identifier. Can be one of: head (canonical head in node's view), genesis, finalized, justified, <slot>, <hex encoded stateRoot with 0x prefix>.
  • validator_id (string; path; required): either a hex encoded public key (any bytes48 with 0x prefix) or validator index.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/states/{state_id}/validators/{validator_id}" \
-H "Accept: application/json"

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "data": {
    "index": "1",
    "balance": "1",
    "status": "active_ongoing",
    "validator": {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "effective_balance": "1",
      "slashed": false,
      "activation_eligibility_epoch": "1",
      "activation_epoch": "1",
      "exit_epoch": "1",
      "withdrawable_epoch": "1"
    }
  }
}
  • 400: Invalid state or validator ID.
{
  "code": 400,
  "message": "Invalid state ID: current"
}
  • 404: Not found.
{
  "code": 404,
  "message": "State not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/blocks

Publishes a signed block.

Instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be included in the beacon chain. A success response (20x) indicates that the block passed gossip validation and was successfully broadcast onto the network. The beacon node is also expected to integrate the block into state, but may broadcast it before doing so, thus to aid timely delivery of the block. Should the block fail full validation, a separate success response code (202) is used to indicate that the block was successfully broadcast but failed integration. After Deneb, this additionally instructs the beacon node to broadcast all given blobs.

Parameters

  • Eth-Consensus-Version (header): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix.
  • <request body> (required): the SignedBeaconBlock object composed of the BeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xdEFeAFdc312b725d00Dd16b4A627fCBfa6B8aAF1d8AF7bCfd82bbFca700A0645",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.

  • Code 202: The block failed validation, but was successfully broadcast anyway. It was not integrated into the beacon node's database.

  • Code 400: The SignedBeaconBlock object is invalid.

{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v2/beacon/blocks

Publishes a signed block.

Instructs the beacon node to broadcast a newly signed beacon block to the beacon network, to be included in the beacon chain. A success response (20x) indicates that the block passed gossip validation and was successfully broadcast onto the network. The beacon node is also expected to integrate the block into the state, but may broadcast it before doing so, thus to aid timely delivery of the block. Should the block fail full validation, a separate success response code (202) is used to indicate that the block was successfully broadcast but failed integration. After Deneb, this additionally instructs the beacon node to broadcast all given blobs. The broadcast behaviour may be adjusted via the broadcast_validation query parameter.

Parameters

  • broadcast_validation (string; query): Level of validation that must be applied to a block before it is broadcast. Possible values:
    • gossip (default): lightweight gossip checks only.
    • consensus: full consensus checks, including validation of all signatures and blocks fields except for the execution payload transactions.
    • consensus_and_equivocation: the same as consensus, with an extra equivocation check immediately before the block is broadcast. If the block is found to be an equivocation it fails validation.
  • Eth-Consensus-Version (header; required): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.
  • <request body> (required): the SignedBeaconBlock object composed of the BeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xdEFeAFdc312b725d00Dd16b4A627fCBfa6B8aAF1d8AF7bCfd82bbFca700A0645",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/beacon/blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.

  • Code 202: The block could not be integrated into the beacon node's database as it failed validation, but was successfully broadcast.

  • Code 400: The SignedBeaconBlock object is invalid or broadcast validation failed.

{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/beacon/blinded_blocks

Publishes a signed block.

Instructs the beacon node to use the components of the SignedBlindedBeaconBlock to construct and publish a SignedBeaconBlock by swapping out the transactions_root for the corresponding full list of transactions. The beacon node should broadcast a newly constructed SignedBeaconBlock to the beacon network, to be included in the beacon chain. The beacon node is not required to validate the signed BeaconBlock, and a successful response (20X) only indicates that the broadcast has been successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202). Before Bellatrix, this endpoint will accept a SignedBeaconBlock.

Parameters

  • Eth-Consensus-Version (string; header): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.
  • <request body> (required): the SignedBlindedBeaconBlock object composed of BlindedBeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0x81cdF3DbaE67fBbE10CAc8Bcd8B28d4DDDc65D9a74f3921693676fccF8BeCe9B",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/blinded_blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
  • Code 202: The block failed validation, but was successfully broadcast anyway. It was not integrated into the beacon node's database.
  • Code 400: The SignedBlindedBeaconBlock object is invalid.
{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v2/beacon/blinded_blocks

Publishes a signed block.

Instructs the beacon node to use the components of the SignedBlindedBeaconBlock to construct and publish a SignedBeaconBlock by swapping out the transactions_root for the corresponding full list of transactions. The beacon node should broadcast a newly constructed SignedBeaconBlock to the beacon network, to be included in the beacon chain. The beacon node is not required to validate the signed BeaconBlock, and a successful response (20X) only indicates that the broadcast has been successful. The beacon node is expected to integrate the new block into its state, and therefore validate the block internally, however blocks which fail the validation are still broadcast but a different status code is returned (202). Before Bellatrix, this endpoint will accept a SignedBeaconBlock. The broadcast behaviour may be adjusted via the broadcast_validation query parameter.

Parameters

  • broadcast_validation (string; query): level of validation that must be applied to a block before it is broadcast. Possible values:
    • gossip (default): lightweight gossip checks only.
    • consensus: full consensus checks, including validation of all signatures and blocks fields except for the execution payload transactions.
    • consensus_and_equivocation: the same as consensus, with an extra equivocation check immediately before the block is broadcast. If the block is found to be an equivocation it fails validation.
  • Eth-Consensus-Version (string; header, required): a version of the block being submitted, if using SSZ encoding. Available values : phase0, altair, bellatrix, capella, deneb.
  • <request body> (required): The SignedBlindedBeaconBlock object composed of BlindedBeaconBlock object (produced by beacon node) and validator signature.
{
  "message": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  },
  "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
}

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v2/beacon/blinded_blocks" \
-H "Eth-Consensus-Version: bellatrix" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{your_request_body}'

Responses

  • Code 200: The block was validated successfully and has been broadcast. It has also been integrated into the beacon node's database.
  • Code 202: The block failed validation, but was successfully broadcast anyway. It was not integrated into the beacon node's database.
  • Code 400: The SignedBlindedBeaconBlock object is invalid or broadcast validation failed.
{
  "code": 400,
  "message": "Invalid block: missing signature"
}
  • Code 415: The supplied content-type is not supported.
{
  "code": 415,
  "message": "Cannot read the supplied content type."
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/beacon/pool/attestations

Submits Attestation objects to the node.

Submits Attestation objects to the node. Each attestation in the request body is processed individually.

If an attestation is validated successfully the node MUST publish that attestation on the appropriate subnet.

If one or more attestations fail validation the node MUST return a 400 error with details of which attestations have failed, and why.

Parameters

  • <request body> (required):
[
  {
    "aggregation_bits": "0x01",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "data": {
      "slot": "1",
      "index": "1",
      "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "source": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "target": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    }
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/attestations" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Attestations are stored in pool and broadcast on appropriate subnet.
  • Code 400: Errors with one or more attestations.
{
  "code": 400,
  "message": "some failures",
  "failures": [
    {
      "index": 3,
      "message": "invalid signature"
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/pool/sync_committees

Submits sync committee signatures to the node.

Submits sync committee signature objects to the node.

Sync committee signatures are not present in phase0, but are required for Altair networks.

If a sync committee signature is validated successfully the node MUST publish that sync committee signature on all applicable subnets.

If one or more sync committee signatures fail validation the node MUST return a 400 error with details of which sync committee signatures have failed, and why.

Parameters

  • <request body> (required):
[
  {
    "slot": "1",
    "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "validator_index": "1",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/pool/sync_committees" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Sync committee signatures are stored in pool and broadcast on appropriate subnet.
  • Code 400: Errors with one or more sync committee signatures.
{
  "code": 400,
  "message": "some failures",
  "failures": [
    {
      "index": 3,
      "message": "invalid signature"
    }
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/node/syncing

Retrieves a node syncing status.

Requests the beacon node to describe if it's currently syncing or not, and if it is, what block it is up to.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/node/syncing" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "head_slot": "1",
    "sync_distance": "1",
    "is_syncing": true,
    "is_optimistic": true
  }
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/config/spec

Retrieves spec parameters.

Retrieve specification configuration used on this node. The configuration should include:

Values are returned with the following format:

  • Any value starting with 0x in the spec is returned as a hex string.
  • Numeric values are returned as a quoted integer.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/config/spec" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "DEPOSIT_CONTRACT_ADDRESS": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
  "DEPOSIT_NETWORK_ID": "1",
  "DOMAIN_AGGREGATE_AND_PROOF": "0x06000000",
  "INACTIVITY_PENALTY_QUOTIENT": "67108864",
  "INACTIVITY_PENALTY_QUOTIENT_ALTAIR": "50331648"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/duties/attester/{epoch}

Retrieves attester duties.

Requests the beacon node to provide a set of attestation duties, which should be performed by validators, for a particular epoch. Duties should only need to be checked once per epoch, however a chain reorganization (of > MIN_SEED_LOOKAHEAD epochs) could occur, resulting in a change of duties. For full safety, you should monitor head events and confirm the dependent root in this response matches:

  • event.previous_duty_dependent_root when compute_epoch_at_slot(event.slot) == epoch
  • event.current_duty_dependent_root when compute_epoch_at_slot(event.slot) + 1 == epoch
  • event.block otherwise

The dependent_root value is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1) or the genesis block root in the case of underflow.

Parameters

  • epoch (string; path; required): should only be allowed one epoch ahead.
  • <request body> (required): an array of the validator indices for which to obtain the duties:
[
  "1"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/duties/attester/{epoch}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
{
  "dependent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
  "execution_optimistic": false,
  "data": [
    {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "validator_index": "1",
      "committee_index": "1",
      "committee_length": "1",
      "committees_at_slot": "1",
      "validator_committee_index": "1",
      "slot": "1"
    }
  ]
}
  • Code 400: Invalid epoch or index.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/duties/proposer/{epoch}

Retrieves block proposer duties.

Request beacon node to provide all validators that are scheduled to propose a block in the given epoch. Duties should only need to be checked once per epoch, however a chain reorganization could occur that results in a change of duties. For full safety, you should monitor head events and confirm the dependent root in this response matches:

  • event.current_duty_dependent_root when compute_epoch_at_slot(event.slot) == epoch
  • event.block otherwise

The dependent_root value is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch) - 1) or the genesis block root in the case of underflow.

Parameters

  • epoch (string; path; required); an epoch.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/duties/proposer/{epoch}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "dependent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
  "execution_optimistic": false,
  "data": [
    {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "validator_index": "1",
      "slot": "1"
    }
  ]
}
  • Code 400: Invalid epoch.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/duties/sync/{epoch}

Retrieves sync committee duties.

Requests the beacon node to provide a set of sync committee duties for a particular epoch.

Parameters

  • epoch (string; path; required): epoch // EPOCHS_PER_SYNC_COMMITTEE_PERIOD <= current_epoch // EPOCHS_PER_SYNC_COMMITTEE_PERIOD + 1
  • <request body> (required): an array of the validator indices for which to obtain the duties:
[
  "1"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/duties/sync/{epoch}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
{
  "execution_optimistic": false,
  "data": [
    {
      "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
      "validator_index": "1",
      "validator_sync_committee_indices": [
        "1"
      ]
    }
  ]
}
  • Code 400: Invalid epoch or index.
{
  "code": 400,
  "message": "Invalid epoch: -2"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v3/validator/blocks/{slot}

Produces a new block, without signature.

Requests a beacon node to produce a valid block, which can then be signed by a validator. The returned block may be blinded or unblinded, depending on the current state of the network as decided by the execution and beacon nodes.

The beacon node must return an unblinded block if it obtains the execution payload from its paired execution node. It must only return a blinded block if it obtains the execution payload header from an MEV relay.

Metadata in the response indicates the type of block produced, and the supported types of block will be added to as forks progress.

Parameters

  • slot (string; path; required): the slot for which the block should be proposed.
  • randao_reveal (string; hex; query; required): the validator's randao reveal value.
  • graffiti (string; hex; query): an arbitrary data validator to include in the block.
  • skip_randao_verification (query): skip verification of the randao_reveal value. If this flag is set then the randao_reveal must be set to the point at infinity (0xc0..00). This query parameter is a flag and does not take a value.
  • builder_boost_factor (string; query):

percentage multiplier to apply to the builder's payload value when choosing between a builder payload header and payload from the paired execution node. This parameter is only relevant if the beacon node is connected to a builder, deems it safe to produce a builder payload, and receives valid responses from both the builder endpoint and the paired execution node. When these preconditions are met, the server MUST act as follows:

  • if exec_node_payload_value >= builder_boost_factor * (builder_payload_value // 100), then return a full (unblinded) block containing the execution node payload.
  • otherwise, return a blinded block containing the builder payload header.

Servers must support the following values of the boost factor which encode common preferences:

  • builder_boost_factor=0: prefer the execution node payload unless an error makes it unviable.
  • builder_boost_factor=100: default profit maximization mode; choose whichever payload pays more.
  • builder_boost_factor=2**64 - 1: prefer the builder payload unless an error or beacon node health check makes it unviable.

Servers should use saturating arithmetic or another technique to ensure that large values of the builder_boost_factor do not trigger overflows or errors. If this parameter is provided and the beacon node is not configured with a builder then the beacon node MUST respond with a full block, which the caller can choose to reject if it wishes. If this parameter is not provided then it should be treated as having the default value of 100. If the value is provided but out of range for a 64-bit unsigned integer, then an error response with status code 400 MUST be returned.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v3/validator/blocks/{slot}" \
-H "Accept: application/json"

Responses

  • Code 200: Success.

Note: The Eth-Consensus-Version, Eth-Execution-Payload-Blinded, Eth-Execution-Payload-Value, Eth-Consensus-Block-Value header is required in response so client can deserialize returned json or ssz data more effectively.

{
  "version": "phase0",
  "data": {
    "slot": "1",
    "proposer_index": "1",
    "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "body": {
      "randao_reveal": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "eth1_data": {
        "deposit_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "deposit_count": "1",
        "block_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "graffiti": "0xbF0eF8805DE094355C99fD34Df183ADB5BB153f5dac2eD83bee6eEd2dEf05cFC",
      "proposer_slashings": [
        {
          "signed_header_1": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          },
          "signed_header_2": {
            "message": {
              "slot": "1",
              "proposer_index": "1",
              "parent_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "state_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "body_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "attester_slashings": [
        {
          "attestation_1": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          },
          "attestation_2": {
            "attesting_indices": [
              "1"
            ],
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
            "data": {
              "slot": "1",
              "index": "1",
              "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
              "source": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              },
              "target": {
                "epoch": "1",
                "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
              }
            }
          }
        }
      ],
      "attestations": [
        {
          "aggregation_bits": "0x01",
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
          "data": {
            "slot": "1",
            "index": "1",
            "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "source": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            },
            "target": {
              "epoch": "1",
              "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
            }
          }
        }
      ],
      "deposits": [
        {
          "proof": [
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          ],
          "data": {
            "pubkey": "0x93247f2209abcacf57b75a51dafae777f9dd38bc7053d1af526f220a7489a6d3a2753e5f3e8b1cfe39b56f43611df74a",
            "withdrawal_credentials": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
            "amount": "1",
            "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
          }
        }
      ],
      "voluntary_exits": [
        {
          "message": {
            "epoch": "1",
            "validator_index": "1"
          },
          "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
        }
      ]
    }
  }
}
  • Code 400: Invalid block production request.
{
  "code": 400,
  "message": "Invalid request to produce a block"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/attestation_data

Produces attestation data.

Requests that the beacon node produce an AttestationData.

A 503 error must be returned if the block identified by the response beacon_block_root is optimistic (i.e. the attestation attests to a block that has not been fully verified by an execution engine).

Parameters

  • slot (string; query; required): the slot for which an attestation data should be created.
  • committee_index (string; query; required): the committee index for which an attestation data should be created.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/attestation_data" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "slot": "1",
    "index": "1",
    "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "source": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    },
    "target": {
      "epoch": "1",
      "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
    }
  }
}
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

GET /eth/v1/validator/aggregate_attestation

Retrieves aggregated attestation.

Aggregates all attestations matching given attestation data root and slot.

A 503 error must be returned if the block identified by the response beacon_block_root is optimistic (i.e. the aggregated attestation attests to a block that has not been fully verified by an execution engine).

A 404 error must be returned if no attestation is available for the requested attestation_data_root.

Parameters

  • attestation_data_root (string, hex; query; required): HashTreeRoot of AttestationData that validator wants aggregated.
  • slot (string; query; required): a slot.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/aggregate_attestation" \
-H "Accept: application/json"

Responses

  • Code 200: Success. Returns aggregated Attestation object with same AttestationData root.
{
  "data": {
    "aggregation_bits": "0x01",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
    "data": {
      "slot": "1",
      "index": "1",
      "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
      "source": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      },
      "target": {
        "epoch": "1",
        "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
      }
    }
  }
}
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 404: Not found.
{
  "code": 404,
  "message": "Requested item not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/aggregate_and_proofs

Publishes multiple aggregate and proofs.

Verifies given aggregate and proofs and publishes them on appropriate gossipsub topic.

Parameters

  • <request body> (required):
[
  {
    "message": {
      "aggregator_index": "1",
      "aggregate": {
        "aggregation_bits": "0x01",
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
        "data": {
          "slot": "1",
          "index": "1",
          "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
          "source": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          },
          "target": {
            "epoch": "1",
            "root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"
          }
        }
      },
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/aggregate_and_proofs" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/beacon_committee_subscriptions

Signals the Beacon node to prepare for a committee subnet.

After beacon node receives this request, search using discv5 for peers related to this subnet and replace current peers with those ones if necessary. If validator is_aggregator, beacon node must:

  • Announce subnet topic subscription on gossipsub.
  • Aggregate attestations received on that subnet.

Parameters

  • <request body> (required):
[
  {
    "validator_index": "1",
    "committee_index": "1",
    "committees_at_slot": "1",
    "slot": "1",
    "is_aggregator": true
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/beacon_committee_subscriptions" \
-H "Content-Type: application/json" \
-H  "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success. Slot signature is valid and beacon node has prepared the attestation subnet. Note that we cannot be certain the Beacon node will find peers for that subnet for various reasons.

  • Code 400: Invalid request syntax.

{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/sync_committee_subscriptions

Subscribes to sync committee subnets.

Subscribe to a number of sync committee subnets.

Sync committees are not present in phase0, but are required for Altair networks.

Subscribing to sync committee subnets is an action performed by VC to enable network participation in Altair networks, and only required if the VC has an active validator in an active sync committee.

Parameters

  • <request body> (required):
[
  {
    "validator_index": "1",
    "sync_committee_indices": [
      "1"
    ],
    "until_epoch": "1"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/sync_committee_subscriptions" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/validator/sync_committee_contribution

Produces a sync committee contribution.

Requests that the beacon node produce a sync committee contribution.

A 503 error must be returned if the block identified by the response beacon_block_root is optimistic (i.e. the sync committee contribution refers to a block that has not been fully verified by an execution engine).

Parameters

  • slot (string; query; required): the slot for which a sync committee contribution should be created.
  • subcommittee_index (string; query; required): the subcommittee index for which to produce the contribution.
  • beacon_block_root (string, hex; query; required): the block root for which to produce the contribution.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/sync_committee_contribution" \
-H "Accept: application/json"

Responses

  • Code 200: Success.
{
  "data": {
    "slot": "1",
    "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
    "subcommittee_index": "1",
    "aggregation_bits": "0x01",
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
}
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 404: Not found.
{
  "code": 404,
  "message": "Requested item not found"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}
  • Code 503: Beacon node is currently syncing, try again later.
{
  "code": 503,
  "message": "Beacon node is currently syncing and not serving request on that endpoint"
}

POST /eth/v1/validator/contribution_and_proofs

Publishes multiple contribution and proofs.

Publishes multiple signed sync committee contribution and proofs.

Parameters

  • <request body> (required):
[
  {
    "message": {
      "aggregator_index": "1",
      "selection_proof": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505",
      "contribution": {
        "slot": "1",
        "beacon_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2",
        "subcommittee_index": "1",
        "aggregation_bits": "0x01",
        "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
      }
    },
    "signature": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/contribution_and_proofs" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/validator/prepare_beacon_proposer

Provides the Beacon node with proposals for the given validators.

Prepares the beacon node for potential proposers by supplying information required when proposing blocks for the given validators. The information supplied for each validator index will persist through the epoch in which the call is submitted and for a further two epochs after that, or until the beacon node restarts. It is expected that validator clients will send this information periodically, for example each epoch, to ensure beacon nodes have correct and timely fee recipient information.

Note that there is no guarantee that the beacon node will use the supplied fee recipient when creating a block proposal, so on receipt of a proposed block the validator should confirm that it finds the fee recipient within the block acceptable before signing it.

Also note that requests containing currently inactive or unknown validator indices will be accepted, as they may become active at a later epoch.

Parameters

  • <request body> (required):
[
  {
    "validator_index": "1",
    "fee_recipient": "0xabcf8e0d4e9587369b2301d0790347320302cc09"
  }
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/validator/prepare_beacon_proposer" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{request body}'

Responses

  • Code 200: Success. Preparation information has been received.
  • Code 400: Invalid request syntax.
{
  "code": 400,
  "message": "string",
  "stacktraces": [
    "string"
  ]
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/events

Subscribes to Beacon node events.

Provides endpoint to subscribe to beacon node Server-Sent-Events stream. Consumers should use eventsource (opens in a new tab) implementation to listen on those events.

Servers may send SSE comments beginning with : for any purpose, including to keep the event stream connection alive in the presence of proxy servers.

Parameters

  • topics (array[string]; query; required): event types to subscribe to; available values : head, block, block_gossip, attestation, voluntary_exit, bls_to_execution_change, proposer_slashing, attester_slashing, finalized_checkpoint, chain_reorg, contribution_and_proof, light_client_finality_update, light_client_optimistic_update, payload_attributes, blob_sidecar.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/events" \
-H "Accept: text/event-stream"

Responses

  • Code 200: Opened SSE stream.

Head event:

The node has finished processing, resulting in a new head. previous_duty_dependent_root is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch - 1) - 1) and current_duty_dependent_root is get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch) - 1). Both dependent roots use the genesis block root in the case of underflow.

event: head
data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch_transition":false, "previous_duty_dependent_root":"0x5e0043f107cb57913498fbf2f99ff55e730bf1e151f02f221e977c91a90a0e91", "current_duty_dependent_root":"0x5e0043f107cb57913498fbf2f99ff55e730bf1e151f02f221e977c91a90a0e91", "execution_optimistic": false}

Block event:

The node has received a valid block (from P2P or API).

event: block
data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "execution_optimistic": false}

Block gossip event:

The node has received a block (from P2P or API) that passes validation rules of the beacon_block topic.

event: block_gossip
data: {"slot":"10", "block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf"}

Attestation event:

The node has received a valid attestation (from P2P or API).

event: attestation
data: {"aggregation_bits":"0x01", "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "data":{"slot":"1", "index":"1", "beacon_block_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "source":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}, "target":{"epoch":"1", "root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}}

Voluntary exit event:

The node has received a valid voluntary exit (from P2P or API).

event: voluntary_exit
data: {"message":{"epoch":"1", "validator_index":"1"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}

Proposer slashing event:

The node has received a ProposerSlashing (from P2P or API) that passes validation rules of the proposer_slashing topic.

event: proposer_slashing
data: {"signed_header_1":{"message":{"slot":"0","proposer_index":"0","parent_root":"0x0000000000000000000000000000000000000000000000000000000000000000","state_root":"0x0000000000000000000000000000000000000000000000000000000000000000","body_root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"signed_header_2":{"message":{"slot":"0","proposer_index":"0","parent_root":"0x0000000000000000000000000000000000000000000000000000000000000000","state_root":"0x0000000000000000000000000000000000000000000000000000000000000000","body_root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}

Attester slashing event:

The node has received an AttesterSlashing (from P2P or API) that passes validation rules of the attester_slashing topic.

event: attester_slashing
data: {"attestation_1":{"attesting_indices":["0", "1"],"data":{"slot":"0","index":"0","beacon_block_root":"0x0000000000000000000000000000000000000000000000000000000000000000","source":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"target":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"},"attestation_2":{"attesting_indices":["0", "1"],"data":{"slot":"0","index":"0","beacon_block_root":"0x0000000000000000000000000000000000000000000000000000000000000000","source":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"},"target":{"epoch":"0","root":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"signature":"0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}

BLS to execution change event:

The node has received a SignedBLSToExecutionChange (from P2P or API) that passes validation rules of the bls_to_execution_change topic.

event: bls_to_execution_change
data: {"message":{"validator_index":"1", "from_bls_pubkey":"0x933ad9491b62059dd065b560d256d8957a8c402cc6e8d8ee7290ae11e8f7329267a8811c397529dac52ae1342ba58c95", "to_execution_address":"0x9Be8d619c56699667c1feDCD15f6b14D8B067F72"}, "signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}

Finalized checkpoint event:

Finalized checkpoint has been updated.

event: finalized_checkpoint
data: {"block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false }

Chain reorg event:

The node has reorganized its chain.

event: chain_reorg
data: {"slot":"200", "depth":"50", "old_head_block":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_block":"0x76262e91970d375a19bfe8a867288d7b9cde43c8635f598d93d39d041706fc76", "old_head_state":"0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "new_head_state":"0x600e852a08c1200654ddf11025f1ceacb3c2e74bdd5c630cde0838b2591b69f9", "epoch":"2", "execution_optimistic": false}

Contribution and proof event:

The node has received a valid sync committee SignedContributionAndProof (from P2P or API).

event: contribution_and_proof
data: {"message": {"aggregator_index": "997", "contribution": {"slot": "168097", "beacon_block_root": "0x56f1fd4262c08fa81e27621c370e187e621a67fc80fe42340b07519f84b42ea1", "subcommittee_index": "0", "aggregation_bits": "0xffffffffffffffffffffffffffffffff", "signature": "0x85ab9018e14963026476fdf784cc674da144b3dbdb47516185438768774f077d882087b90ad642469902e782a8b43eed0cfc1b862aa9a473b54c98d860424a702297b4b648f3f30bdaae8a8b7627d10d04cb96a2cc8376af3e54a9aa0c8145e3"}, "selection_proof": "0x87c305f04bfe5db27c2b19fc23e00d7ac496ec7d3e759cbfdd1035cb8cf6caaa17a36a95a08ba78c282725e7b66a76820ca4eb333822bd399ceeb9807a0f2926c67ce67cfe06a0b0006838203b493505a8457eb79913ce1a3bcd1cc8e4ef30ed"}, "signature": "0xac118511474a94f857300b315c50585c32a713e4452e26a6bb98cdb619936370f126ed3b6bb64469259ee92e69791d9e12d324ce6fd90081680ce72f39d85d50b0ff977260a8667465e613362c6d6e6e745e1f9323ec1d6f16041c4e358839ac"}

Light client finality update event:

The node's latest known LightClientFinalityUpdate has been updated.

event: light_client_finality_update
data: {"version":"altair", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finalized_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "finality_branch": ["0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"], "sync_aggregate": {"sync_committee_bits":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffbffffffffffffffffffffbffffffffffffff", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}}

Light client optimistic update event:

The node's latest known LightClientOptimisticUpdate has been updated.

event: light_client_optimistic_update
data: {"version":"altair", "data": {"attested_header": {"beacon": {"slot":"1", "proposer_index":"1", "parent_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "state_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "body_root":"0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}}, "sync_aggregate": {"sync_committee_bits":"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffbffffffffffffffffffffbffffffffffffff", "sync_committee_signature":"0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505"}, "signature_slot":"1"}}

Payload attributes event:

The node has computed new payload attributes for execution payload building.

This event gives block builders and relays sufficient information to construct or verify a block at proposal_slot. The meanings of the fields are:

  • version: the identifier of the beacon hard fork at proposal_slot, e.g. "bellatrix", "capella".
  • proposal_slot: the slot at which a block using these payload attributes may be built.
  • parent_block_root: the beacon block root of the parent block to be built upon.
  • parent_block_number: the execution block number of the parent block.
  • parent_block_hash: the execution block hash of the parent block.
  • proposer_index: the validator index of the proposer at proposal_slot on the chain identified by parent_block_root.
  • payload_attributes: beacon API encoding of PayloadAttributesV<N> as defined by the execution-apis specification. The version N must match the payload attributes for the hard fork matching version. The beacon API encoded object must have equivalent fields to its counterpart in execution-apis with two differences: 1) snake_case identifiers must be used rather than camelCase; 2) integers must be encoded as quoted decimals rather than big-endian hex.

The frequency at which this event is sent may depend on beacon node configuration. The fee recipient may also be set via beacon node config, but should likely be ignored by block builders and most other API consumers.

event: payload_attributes
data: {"version": "capella", "data": {"proposer_index": "123", "proposal_slot": "10", "parent_block_number": "9", "parent_block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "parent_block_hash": "0x9a2fefd2fdb57f74993c7780ea5b9030d2897b615b89f808011ca5aebed54eaf", "payload_attributes": {"timestamp": "123456", "prev_randao": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "suggested_fee_recipient": "0x0000000000000000000000000000000000000000", "withdrawals": [{"index": "5", "validator_index": "10", "address": "0x0000000000000000000000000000000000000000", "amount": "15640"}]}}}

Blob sidecar event:

The node has received a BlobSidecar (from P2P or API) that passes all gossip validations on the blob_sidecar_{subnet_id} topic.

event: blob_sidecar
data: {"block_root": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2", "index": "1", "slot": "1", "kzg_commitment": "0x1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505cc411d61252fb6cb3fa0017b679f8bb2305b26a285fa2737f175668d0dff91cc1b66ac1fb663c9bc59509846d6ec05345bd908eda73e670af888da41af171505", "versioned_hash": "0xcf8e0d4e9587369b2301d0790347320302cc0943d5a1884560367e8208d920f2"}
  • Code 400: The topics supplied could not be parsed.
{
  "code": 400,
  "message": "Invalid topic: weather_forecast"
}
  • Code 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

Rewards

Endpoints to query rewards and penalties for validators.

POST /eth/v1/beacon/rewards/sync_committee/{block_id}

Retrieves sync committee rewards.

Retrieves the rewards info for sync committee members specified by array of public keys or validator index. If no array is provided, return reward info for every committee member.

Parameters

  • block_id (string; path; required): Block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.
  • <request body>: an array of either hex encoded public key (any bytes48 with 0x prefix) or validator index.
[
  "string"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/rewards/sync_committee/{block_id}" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{request_body}'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": [
    {
      "validator_index": "0",
      "reward": "2000"
    }
  ]
}
  • 400: Invalid get sync committee rewards request.
{
  "code": 400,
  "message": "Invalid request to retrieve sync committee rewards info"
}
  • 404: Block not found.
{
  "code": 404,
  "message": "Block not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

GET /eth/v1/beacon/rewards/blocks/{block_id}

Retrieves sync committee rewards.

Retrieves the rewards info for sync committee members specified by array of public keys or validator index. If no array is provided, return reward info for every committee member.

Parameters

  • block_id (string; path; required): Block identifier. Can be one of: head (canonical head in node's view), genesis, finalized, <slot>, <hex encoded blockRoot with 0x prefix>.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/rewards/blocks/{block_id}" \
  -H 'Accept: application/json'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "proposer_index": "123",
    "total": "123",
    "attestations": "123",
    "sync_aggregate": "123",
    "proposer_slashings": "123",
    "attester_slashings": "123"
  }
}
  • 400: Invalid get block rewards request.
{
  "code": 400,
  "message": "Invalid request to retrieve sync committee rewards info"
}
  • 404: Block or required state not found.
{
  "code": 404,
  "message": "Block not found"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}

POST /eth/v1/beacon/rewards/attestations/{epoch}

Retrieves attestations rewards.

Retrieves attestation reward info for validators specified by array of public keys or validator index. If no array is provided, return reward info for every validator.

Parameters

  • epoch (string; path; required): the epoch to get rewards info from.
  • <request body>: an array of either hex encoded public key (any bytes48 with 0x prefix) or validator index.
[
  "string"
]

Request example

curl -X POST "https://rpc.ankr.com/premium-http/eth_beacon/{your_token}/eth/v1/beacon/rewards/attestations/{epoch}" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{request_body}'

Responses

  • 200: Success.
{
  "execution_optimistic": false,
  "finalized": false,
  "data": {
    "ideal_rewards": [
      {
        "effective_balance": "1000000000",
        "head": "2500",
        "target": "5000",
        "source": "5000",
        "inclusion_delay": "5000",
        "inactivity": "5000"
      }
    ],
    "total_rewards": [
      {
        "validator_index": "0",
        "head": "2000",
        "target": "2000",
        "source": "4000",
        "inclusion_delay": "2000",
        "inactivity": "2000"
      }
    ]
  }
}
  • 400: Invalid get attestations rewards request.
{
  "code": 400,
  "message": "Invalid request to retrieve attestations rewards info"
}
  • 404: Epoch not known or required data not available.
{
  "code": 404,
  "message": "Epoch not known or required data not available"
}
  • 500: Beacon node internal error.
{
  "code": 500,
  "message": "Internal server error"
}