Skip to main content
Subscribe to RPC endpoints via WebSocket (eth_subscribe with newHeads) and measure when blocks arrive at the Portal versus when they appear at the RPC. Use this to monitor relative latency. The watcher is a query-transformer combo that already includes the block query it needs. Pass it directly as the source’s outputs:
Parameters:
  • rpcUrl: Array of RPC WebSocket or HTTP URLs to compare against Portal
Output: Each batch carries the observed block’s number and timestamp, portal.receivedAt (when the block arrived from the Portal), and an rpc array with url, hash, receivedAt, and portalDelayMs per endpoint.
Measured values include client-side network latency. Results are end-to-end delays as seen by the client, not pure Portal or RPC processing performance.
See the Data freshness monitoring guide for a complete example with Prometheus metrics.