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 — Beacon (3/3)

API reference for Ethereum Beacon. All methods ->

Part 3 of 3: 1 · 2 · 3

GET /eth/v1/beacon/light_client/optimistic_update

Retrieves the latest known LightClientOptimisticUpdate.

Requests the latest LightClientOptimisticUpdate 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.

Parameters

None.

Request example

curl -X GET "https://rpc.ankr.com/premium-http/eth_beacon/YOUR_ANKR_API_KEY/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_ANKR_API_KEY/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_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"
}

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