Repository navigation
Conversation
palas
requested review from
Jimbo4350,
carbolymer,
disassembler and
kevinhammond
as code owners
November 5, 2026 01:24
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Both new golden tests fail while decoding the non-null guard datum during signing because the required dependency fix is missing, preventing them from reaching transaction view.
1 open issue
What changed in this PR
Adds guard credentials and required top-level guards to Dijkstra transaction views, addressing the inspection work tracked in cardano-api#1382.
Changes:
- Renders guards and optional guard datums, using
nullfor empty collections. - Adds JSON and YAML golden tests covering key and script guards.
- Updates existing Dijkstra fixtures and adds a changelog entry.
| File | Description |
|---|---|
cardano-cli/test/cardano-cli-golden/Test/Golden/Debug/TransactionView.hs |
Adds guard-rendering golden tests. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction/build-raw-plutus-v4-script-witnesses.out |
Adds empty guard fields to script-witness output. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-witnesses-mint.yaml |
Updates witness/mint YAML with guard fields. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-witnesses-mint.json |
Updates witness/mint JSON with guard fields. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-order.yaml |
Adds guard fields to ordering YAML. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-order.json |
Adds guard fields to ordering JSON. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-metadata-aux-scripts.yaml |
Adds guard fields to metadata/scripts YAML. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-metadata-aux-scripts.json |
Adds guard fields to metadata/scripts JSON. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-body-fields.yaml |
Records existing key guards in body-fields YAML. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-sub-tx-body-fields.json |
Records existing key guards in body-fields JSON. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-intervals.yaml |
Adds empty guard fields to intervals YAML. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-intervals.json |
Adds empty guard fields to intervals JSON. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-intervals-signed.yaml |
Updates signed intervals YAML with guard fields. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-intervals-signed.json |
Updates signed intervals JSON with guard fields. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-guards.yaml |
Adds expected guards and optional datums in YAML. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-guards.json |
Adds expected guards and optional datums in JSON. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-direct-deposits.yaml |
Adds empty guard fields to deposits YAML. |
cardano-cli/test/cardano-cli-golden/files/golden/dijkstra/transaction-view-direct-deposits.json |
Adds empty guard fields to deposits JSON. |
cardano-cli/src/Cardano/CLI/Compatible/Json/Friendly.hs |
Implements Dijkstra guard rendering. |
.changes/20261104_173428_cardano-cli_pablo.lamela_friendly_guards.yml |
Documents the transaction-view feature. |
Review effort: Balanced
16 of 25 tasks
Jimbo4350
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Context
This PR is part of the effort to address: IntersectMBO/cardano-api#1382. The PR addresses the 5th checkbox of the 6th step: "Render guard credentials and required top-level guards.".
How to trust this PR
The actual code changes is really small and straightforward. The most opinionated choice is to use
nullwhen the guard list is empty, instead of[], and it is done this way to mimic "required signatures".Another thing we may want to change is getting rid of "required signers" from Dijkstra on.
It also includes a golden test with both key and script guards (both in provided and required).
Checklist
.changes/