For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

Ethereum Beacon — ValidatorRequiredApi

API reference for Ethereum Beacon. All methods ->

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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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:

  • Constants for all hard forks known by the beacon node, for example the phase 0 and altair values.
  • Presets for all hard forks supplied to the beacon node, for example the phase 0 and altair values.
  • Configuration for the beacon node, for example the mainnet values.

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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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_ANKR_API_KEY/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"
}