gRPC: Dijkstra era support gaps in UTxO RPC

Open
#1,263 0 comments 1 reaction 1 assignee View on GitHub

Maintainers usually reply within 2 days

@carbolymer is already working on this.

Since Jul 23, 2026.

Assessment

This issue has not been assessed yet.

Description

This is a work-in-progress tracking issue for Dijkstra era support gaps in cardano-rpc and the UTxO RPC integration.
It will be extended with new findings as Dijkstra support work continues.

Native guard scripts (CIP-112)

The utxorpc spec's NativeScript message has no variant for Dijkstra's RequireGuard constructor. utxorpc/spec#215 adds script_require_guard to the v1 spec. cardano-rpc compiles against v1beta, so it cannot use the new variant until it moves to v1.

Guard-bearing native scripts are encoded as empty messages

Since #1247, Dijkstra scripts no longer go through fromAllegraTimelock, so serving a guard-bearing native script no longer crashes. Instead, cardano-rpc encodes RequireGuard as an empty NativeScript, both for witness and auxiliary scripts and for reference scripts in outputs, which silently drops the guard. This stays until cardano-rpc can use the v1 variant.

RedeemerPurpose enum has no guarding value

The v1beta RedeemerPurpose enum has no value for Dijkstra's guarding purpose, so cardano-rpc maps GuardingScript to REDEEMER_PURPOSE_UNSPECIFIED. utxorpc/spec#215 adds REDEEMER_PURPOSE_GUARDING to v1.

Leios support (CIP-164)

utxorpc/spec#215 merged on 2026-11-17. It adds the Leios header and body fields to v1 and specifies that a certifying ranking block (CertRB) exposes the transactions of the endorser block it certifies in body.tx. Merging the spec does not complete cardano-rpc's migration to v1.

Leios #1106 tracks the client API work. Design PR #1154 proposes the remaining UTxO RPC behavior and implementation tasks; it is still open and marked DO NOT MERGE. Treat its unresolved decisions as proposals.

Implementation and verification

Status checked on 2026-11-20:

  • Review and integrate #1418, which adds helpers for finding the preceding block's EB announcement and decoding the block returned by consensus.
  • Review and integrate #1421, which uses those helpers to fill certified EB transactions in FetchBlock and FollowTip rollback (undo) responses. Both PRs target leios-prototype; verify the changes also reach the intended release branch before treating this as shipped.
  • Fill certified EB transactions in the ChainDB follower used by FollowTip apply responses and WaitForTx. #1421 explicitly leaves FollowTip apply for a follow-up PR. This work can proceed on v1beta, separately from the v1 migration.
  • Verify that FollowTip apply and undo responses contain the same certified EB transactions, and that WaitForTx reports an EB transaction as confirmed when its CertRB is adopted, as proposed in the linked Leios design PR.
  • Verify that a CertRB is never returned with silently omitted EB transactions when those transactions cannot be loaded; return an explicit failure. #1421 introduces CertRbWithoutEbTxs for the block-fetch path; cover the follower path too.
  • Add end-to-end tests with a running Leios node for block fetching, streaming, confirmation and rollback. #1418's helper tests use LeiosTestBlock, and #1421 does not test fetchBlock end to end against a running node.
Decisions to settle in the specification
  • Settle native_bytes for a CertRB and add a conformance test. The linked Leios design PR proposes the original on-chain bytes, while decoded body.tx includes certified EB transactions; #1421 implements that choice. This differs from the N2C form and requires a documented exception to any rule that decoded fields exactly match native_bytes.
  • Finalize the proposed rule that EB transactions belong to their CertRB for query block_ref, watch apply/undo events and confirmation timing. Track the specification decision in Leios #1154 and #1106, and verify the applicable cardano-rpc endpoints against it.

Announced but uncertified EBs remain outside the initial scope proposed in the linked Leios design PR.

Moving cardano-rpc to utxorpc v1

utxorpc/spec#215 adds the Dijkstra fields to v1 only, while cardano-rpc compiles against v1beta. To use them, cardano-rpc needs to move to v1 and add conversions for the following:

  • the Tx/TxCommon split and sub transactions;
  • guards and required top-level guards;
  • direct deposits and account balance intervals;
  • pool BLS keys;
  • the new protocol parameters and PParamsUpdate;
  • the Leios header and body fields;
  • ReadTx lookups by sub transaction hash.

#910 (switch to the utxorpc package) is related.

Related

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.