gRPC: Dijkstra era support gaps in UTxO RPC

Đang mở
#1,263 0 bình luận 1 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@carbolymer đang làm issue này rồi.

Từ ngày 23/7/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
Haskell
Star
41
Fork
33
Merge trung bình
3 ngày 3 giờ
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntersectMBO/cardano-api

Tất cả issue của IntersectMBO/cardano-api

Issue tương tự

Thêm issue về Haskell

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.