Metrics & REST API

Metrics

TPS

Transactions per second. Sliding window of 2.5 blocks (~1 s at 400 ms block time).

{"seq": 43, "TPS": 2450}

ContentionData

Storage slot contention analysis. Sent once per block (at BlockEnd).

FieldTypeDescription
block_numberu64Block number
block_wall_time_nsu64Block execution wall time (ns)
total_tx_time_nsu64Total transaction time (ns)
parallel_efficiency_pctf64Parallel execution efficiency (%)
total_unique_slotsu32Total unique slots
contended_slot_countu32Slots with contention
contention_ratiof64Ratio of contended slots
total_txn_countu32Total transactions
top_contended_slotsarrayTop contended slots
top_contended_contractsarrayTop contended contracts
contract_edgesarrayLinks between contracts via shared transactions

How to interpret ContentionData:

  • parallel_efficiency_pct is the key metric: 90%+ = excellent parallelization, 70-90% = some contention bottlenecks, <70% = significant sequential execution due to storage conflicts
  • contention_ratio shows what fraction of accessed slots had competing transactions. High ratio + low efficiency = many transactions hitting the same storage slots
  • top_contended_contracts helps identify which contracts cause parallelization bottlenecks
  • contract_edges reveals contract interdependencies: contracts sharing transactions may create implicit dependencies

TopAccesses

Most accessed accounts and storage slots, tracked using the Space-Saving algorithm. Useful for identifying storage hot spots and optimizing contract design.

{
  "seq": 45,
  "TopAccesses": {
    "account": [{"key": "0xADDRESS", "count": 150}],
    "storage": [{"key": ["0xADDRESS", "0xSLOT"], "count": 80}]
  }
}

Lifecycle

Block stage transitions. See Lifecycle subscription reference for full field descriptions.


REST Endpoints

All REST endpoints are available by default on the same address as the WebSocket (:8443).

GET /v1/tps

{"tps": 2450}

GET /v1/contention

Latest ContentionData (same format as in WebSocket).

GET /v1/status

{
  "status": "healthy",
  "block_number": 56147820,
  "connected_clients": 12,
  "uptime_secs": 86400,
  "last_event_age_secs": 0,
  "ring_seqno": 54321,
  "oldest_seqno": 4321,
  "newest_seqno": 54321
}
FieldDescription
status"healthy" (events within 10s) or "degraded"
block_numberLatest block
connected_clientsActive WebSocket connections
uptime_secsServer uptime
last_event_age_secsSeconds since the last event
ring_seqnoCurrent seq in the event ring
oldest_seqnoOldest seq in the resume buffer (0 = buffer empty)
newest_seqnoNewest seq

GET /v1/blocks/lifecycle

Array of lifecycle records for all tracked blocks.

GET /v1/blocks/:number/lifecycle

Lifecycle of a specific block by number. Returns an error if the block is not in the tracker.

GET /health

{"jsonrpc": "2.0", "result": {"healthy": true, "number": 56147820, "last_event_age_secs": 0}}
  • 200: healthy
  • 503: no events for 30+ seconds → {"healthy": false, ...} + graceful shutdown

GET /metrics

Prometheus metrics in text format (counters, histograms, gauges).

POST / (JSON-RPC 2.0)

{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": [], "id": 1}

Response: {"jsonrpc": "2.0", "result": {"number": "0x359a8fc"}, "id": 1}

Unsupported methods: -32601 Method not found.