A transparent proxy for selected Dora API endpoints, enhanced with additional fields for compatibility with the Beacon Explorer API.
Beacon Explorer is costly to operate (depends on Bigtable and other heavy components) and its API differs from Dora. This proxy uses Dora as the data source while returning responses compatible with the Beacon Explorer API.
-
POST
/api/v1/validator→ upstream/api/v1/validator- What it does:
statusmapping:active_ongoing → active_online;status:withdrawal_done+is_slashed=true → slashed;status:withdrawal_done+is_slashed=false → exited.- add
lastattestationslot(from consensus API).
- What it does:
-
GET
/api/v1/epoch/latest→ upstream/api/v1/epoch/latest- What it does: transparent pass-through, no transformation.
-
GET
/api/v1/slot/{slotOrHash}→ upstream/api/v1/slot/{slotOrHash}- What it does:
- Supports
{slotOrHash}=head: resolves the current head block root via consensus REST, then forwards to upstream. - Enrich with the following fields:
- Eth1:
eth1data_depositcount,eth1data_depositroot,eth1data_blockhash - Execution payload:
exec_logs_bloom,exec_parent_hash,exec_random,exec_receipts_root,exec_state_root,exec_timestamp - Sync aggregate:
syncaggregate_bits,syncaggregate_signature - Randao reveal:
randaoreveal - Signature:
signature
- Eth1:
- Supports
- What it does:
PROXY_LISTEN_ADDR(default:8081) — listen addressPROXY_UPSTREAM_BASE_URL(defaulthttp://localhost:8080) — Dora upstream basePROXY_CONSENSUS_API_URL(defaulthttp://localhost:5052) — Beacon node
Run:
PROXY_LISTEN_ADDR=:8088 PROXY_UPSTREAM_BASE_URL=https://light-beacon.fusionist.io PROXY_CONSENSUS_API_URL=http://your-beacon-node:5052 go run .Build the image:
docker build -t dora-proxy:latest .
docker run --name dora-proxy -d --restart=unless-stopped -p 8081:8081 \
-e PROXY_UPSTREAM_BASE_URL=https://light-beacon.fusionist.io \
-e PROXY_CONSENSUS_API_URL=http://your-beacon-node:5052 \
dora-proxy:latestNotes: In the container, PROXY_LISTEN_ADDR defaults to :8081; override with -e PROXY_LISTEN_ADDR=... if needed.