gRPC: Replace Ogmios as Kupo's chain data source with cardano-rpc gRPC

Open
#1,229 1 comment 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@carbolymer is already working on this.

Since May 27, 2026.

Assessment

This issue has not been assessed yet.

Description

Goal

Enable Kupo to use cardano-rpc as a drop-in replacement for its Ogmios backend.
Kupo currently uses Ogmios for chain synchronisation via WebSocket/JSON-RPC.
The same capability can be provided natively by cardano-rpc over gRPC, eliminating the need for a separate Ogmios process.

Kupo's Ogmios usage

Kupo depends on exactly three Ogmios methods:

Ogmios method Mini-protocol Purpose
findIntersection ChainSync Resume sync from a known chain point
nextBlock ChainSync Stream blocks (RollForward/RollBackward) with full block data
queryNetwork/genesisConfiguration Network query One-shot Byron genesis bootstrap (optional if local genesis files available)

Additionally, Kupo's HTTP API uses a separate Ogmios connection for ad-hoc historical block lookups (e.g. the /metadata endpoint fetches a block by slot on demand).

Required gRPC services

  1. SyncService.FollowTip - #1219
    Server-streaming RPC delivering blocks as applied/rolled back.
    Must carry full block data (transactions, inputs, outputs, datums, scripts, redeemers, metadata).
    This is the primary blocker - replaces Ogmios's findIntersection + nextBlock streaming.

  2. SyncService.FetchBlock - #1216
    Retrieve a full block by chain point.
    Required for Kupo's HTTP API endpoints that perform ad-hoc historical block lookups (e.g. /metadata).

  3. QueryService.ReadGenesis - #1217
    Return genesis configuration for all eras.
    Only required when Kupo cannot read genesis files from disk.

Prerequisites

  • ADR-019 (node kernel access) - direct ChainDB access is needed for efficient block streaming and block-by-point retrieval.
    Current N2C IPC (one connection per request, double serialisation) cannot support this.

Not required for this goal

  • ReadTip (#1218) - same SyncService cluster, likely lands alongside FollowTip, but Kupo does not use it (tip comes back in FollowTip responses)
  • SubmitTx, EvalTx - already implemented, Kupo does not use them
  • Mempool watching, stake/governance queries - Kupo does not use them

Downstream integration

Once the gRPC services exist, Kupo needs a new ChainProducer backend (alongside its existing CardanoNode, Ogmios, Hydra backends) that connects via gRPC instead of WebSocket.

Dominant language
Haskell
Stars
41
Forks
33
Avg merge
3d 3h
Merged PRs (30d)
15

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IntersectMBO/cardano-api

All issues in IntersectMBO/cardano-api

Similar issues

More Haskell issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.