Skip to main content

dispatch-service

Runs on the indexer alongside an Ethereum node. Validates TAP receipts, proxies JSON-RPC requests, signs responses, and persists receipts to PostgreSQL.

Routes


Request flow


TAP receipt validation

The service validates every incoming receipt before forwarding the request:
  • Signature: EIP-712 ECDSA recovery against GraphTallyCollector as verifying contract
  • Sender authorisation: recovered signer must be in authorized_senders config list
  • Staleness: timestamp_ns must be within the configured window
  • Data service: data_service field must match RPCDataService address
Invalid receipts are rejected with 400 Bad Request.

Archive tier detection

The service inspects block parameters to determine if a request requires archive state:
  • Hex block numbers below current head - 128 → routed to archive backend
  • String tags "earliest", "pending" → archive
  • JSON integers → parsed and compared against head
This allows a single endpoint to serve both standard and archive requests when both backends are configured.