Beacon API #
specborn run --beacon-api serves a read-only subset of the standard beacon node API (ethereum/beacon-APIs) on 127.0.0.1. It is off by default. It exists so that you, and tools on the same machine (dashboards, scripts, explorers), can read what the node knows: its head, blocks, states, validators, committees and duties.
It is not a validator-client interface. specborn's validator client runs inside the node (Validators); there is no endpoint to submit attestations or blocks, and no other validator client can be attached to specborn.
The evidence for this page is the record of piece beaconapi (docs/pieces/beaconapi.md), merged into main on 2026-11-17 (STATUS.md).
Turning it on #
specborn run --datadir /var/lib/specborn --network ./net --el-genesis ./net/genesis.rlp \
--bootnodes enr:-... --beacon-api # 127.0.0.1:5052
specborn run ... --beacon-api --beacon-api-port 15052 # another port
At start the node prints beacon api: listening on port 5052 (read-only). If the port is taken, the node does not start (exit 1). The address is always 127.0.0.1: only the port can be chosen, and there is no option to listen on another interface. The checkpoint-sync command has no beacon API.
curl -s http://127.0.0.1:5052/eth/v1/node/syncing
curl -s http://127.0.0.1:5052/eth/v1/beacon/headers/head
curl -s -H 'Accept: application/octet-stream' http://127.0.0.1:5052/eth/v2/beacon/blocks/head -o head.ssz
Endpoints #
Everything else answers 404. A known path with the wrong method answers 405.
| Method | Path | Notes |
|---|---|---|
| GET | /eth/v1/node/version | specborn/v<version> |
| GET | /eth/v1/node/syncing | head slot, distance to the wall-clock slot; is_syncing is true while the node is not following the head |
| GET | /eth/v1/node/health | 200 while following, 206 while syncing (or the syncing_status you ask for) |
| GET | /eth/v1/node/peer_count | connected consensus peers (counts only) |
| GET | /eth/v1/config/spec | the entries of config.yaml, the mainnet preset of phase0 to Gloas and the DOMAIN_* constants (generated from the pinned consensus specifications), BLOB_SCHEDULE |
| GET | /eth/v1/config/fork_schedule, /eth/v1/config/deposit_contract | from config.yaml |
| GET | /eth/v1/beacon/genesis | |
| GET | /eth/v1/beacon/headers (query slot, parent_root), /eth/v1/beacon/headers/{block_id} | |
| GET | /eth/v2/beacon/blocks/{block_id} | JSON, or SSZ with Accept: application/octet-stream; Eth-Consensus-Version header |
| GET | /eth/v1/beacon/blocks/{block_id}/root | |
| GET | /eth/v1/beacon/states/{state_id}/root, …/fork, …/finality_checkpoints | |
| GET, POST | /eth/v1/beacon/states/{state_id}/validators (query id, status; POST body ids, statuses), …/validators/{validator_id} | |
| GET, POST | /eth/v1/beacon/states/{state_id}/validator_balances | |
| GET | /eth/v1/beacon/states/{state_id}/committees (query epoch, index, slot) | an epoch the state can compute committees for |
| GET | /eth/v1/beacon/states/{state_id}/sync_committees (query epoch) | the state's sync-committee period or the next |
| POST | /eth/v1/validator/duties/attester/{epoch} | validator indices in the body; computes, changes nothing |
| GET | /eth/v1/validator/duties/proposer/{epoch} | from the state's proposer_lookahead |
| POST | /eth/v1/validator/duties/sync/{epoch} | validator indices in the body; computes, changes nothing |
| GET | /eth/v1/events?topics=head,head_v2,finalized_checkpoint | server-sent events |
Not implemented (404): every endpoint that produces or submits something (blocks, attestations, pools, subscriptions, registrations, preparations), debug, rewards, light client, blobs, PTC duties, node/identity and node/peers. The last two are left out on purpose: the API publishes no peer identities or addresses.
What it answers from #
The answers come from a snapshot the node publishes after each import or slot change: its fork-choice store (the blocks it holds and their post-states), the checkpoint states, its head, sync state and peer count.
- History: only the node's retained window is served. The store prunes at finality, so a slot whose latest canonical block was pruned is answered
404; this is not an archive node. After a restart from a snapshot, the window starts at the snapshot's finalized block. A data directory whose newest snapshot was written by a binary older than piecebeaconapiround 9 has no copy of that block, and it is answered404until the next finality advance writes a new snapshot (docs/pieces/beaconapi.md§1, "Known behaviour"). state_id:headis the head block's post-state;finalizedandjustifiedare the checkpoint states; a slot is the canonical post-state at that slot, or the latest one before it advanced byprocess_slots(at most 64 slots, never past the head); a root is the post-state of a stored block with that state root, or a state of the head chain.execution_optimisticis alwaysfalse: therunnode imports a Fulu block only after its in-process engine answeredVALID, and a Gloas payload only with its envelope. That no stored node is optimistic is TESTED, not PROVED (open item O-beaconapi-11).finalized(the flag in answers) is decided by the identifier, as the reference servers do:headfalse;genesisandfinalizedtrue;justifiedfalse; slotntrue whennis at or below the first slot of the finalized epoch; a root, when its block is canonical and at or below that slot.
Limits #
Fixed in the code (docs/pieces/beaconapi.md §5); none of them can be changed from the command line:
| Limit | Value |
|---|---|
| connections | 32 (when all are taken, the oldest connection that has been quiet for 1 s makes room); at most 16 of them event streams |
| request | header section 8 KiB, body 8 MiB (more: 413), deadline 30 s, idle connection closed after 120 s |
| rate | 100 requests per second per connection (burst 200; more: 429) |
| ids | at most 64 validator ids in a GET query (more: 414); at most 1,000,000 in a POST body (more: 400); repeated and unknown ids are reduced before any work |
| JSON | nesting depth at most 8; at most 64 query parameters |
| state advance | at most 64 slots of process_slots for a slot id past the nearest stored state |
| output | at most 1 GiB of answers queued over all connections; an answer that would pass it is replaced by 503 ("response budget exhausted, retry later") |
| workers | 2 threads compute answers; the node's own work (import, fork choice, validator duties) never waits for the API |
| events | 4 MiB of backlog per stream; the view keeps the newest 64 events and 8,192 blocks |
A duty query for every validator of a mainnet-sized chain (about 22 MB of JSON) is over the 8 MiB body limit and must be split.
The rate limit is per connection, and a new connection starts with a full burst; on loopback there is no address to limit by. A local program can therefore slow other API clients (by holding both workers or every connection place), or have their answers replaced by 503. It cannot change the node or slow its import. If you do not trust every local program, leave the API off.
Security and privacy #
127.0.0.1only; theHostheader must name a loopback address (a defence against DNS rebinding); no CORS headers, so a web page from another origin cannot read the answers; a POST must beapplication/json.- No endpoint changes the node, signs anything or sends anything to the network.
- No request or address is logged; the only line the API prints is the
listeningline above.
Known deviations from other beacon nodes #
Recorded in the live differential runs against Lighthouse and Teku (docs/pieces/beaconapi.md §1, §6). Where those two clients answer differently from each other, specborn can match at most one of them:
- validator ids in a POST body must be JSON strings (
["1","2"]), as the pinned schema requires; a body of JSON numbers ([1,2]) is answered400, where Lighthouse and Teku answered200on the two duty POSTs; - more than 64 ids in a GET query is answered
414; - where Lighthouse and Teku differ (the
justifiedblock id,headersbyparent_rootalone, proposer duties two epochs after the head's), specborn answers as Lighthouse v8.3.3 does; - proposer duties of epoch 0 carry a
dependent_rootdifferent from both references' (the duty entries themselves are listed).
Evidence #
- TESTED, live: run
beaconapi-live-r12(2026-11-17), a local devnet with Lighthouse v8.3.3 and Teku 26.10.3 (latest releases at the time), from the Fulu genesis across the fork into Gloas: 17,060 content comparisons, 0 differences where the two references agree; every one of 8,670 specborn answers valid against the pinned schema; 28,974 metadata comparisons equal; 354 events equal (docs/pieces/beaconapi.md§6; transcripttestnet/kurtosis/logs/beaconapi-live-r12.txt). - TESTED, offline: the
beaconapisuite, 3,576 checks, 0 failures at the merge (STATUS.md, 2026-11-17). - PROVED: among others, that committee and duty answers are the reference specification's
get_beacon_committeeresults, that every JSON answer is well-formed and is the beacon-API mapping of the SSZ value, and the bounds on work per request (docs/pieces/beaconapi.md§2). Open: the endpoint theorems assume the live store is a modelled run's store (O-beaconapi-5a′), and there is no reference for the head right after the Fulu-to-Gloas store conversion (O-beaconapi-9).