Update compatible transaction building for the cardano-api changes - #1408
Open
carbolymer wants to merge 1 commit into
Open
Update compatible transaction building for the cardano-api changes#1408carbolymer wants to merge 1 commit into
carbolymer wants to merge 1 commit into
Conversation
carbolymer
force-pushed
the
mgalazyn/feature/update-compatible-tx
branch
from
August 13, 2026 15:18
bcacc88 to
4a530f9
Compare
carbolymer
marked this pull request as ready for review
August 13, 2026 15:31
carbolymer
requested review from
disassembler,
kevinhammond,
newhoggy and
palas
as code owners
August 13, 2026 15:31
Contributor
There was a problem hiding this comment.
Pull request overview
Updates cardano-cli to align with upstream cardano-api changes, primarily around compatible transaction construction and a few related cleanups in CLI parsing and JSON output.
Changes:
- Refactors compatible transaction creation to build from
defaultCompatibleTxBodyContentand set fields explicitly. - Extends Bech32 KES key parsing to handle
Bech32InvalidUtf8. - Minor naming/import adjustments in JSON output and genesis testnet data code.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cardano-cli/src/Cardano/CLI/Type/Output.hs | Renames the ChainTip block number binder for clearer JSON encoding code. |
| cardano-cli/src/Cardano/CLI/EraBased/Genesis/CreateTestnetData/Run.hs | Adjusts ledger import list (currently breaks StandardCrypto usage later in the file). |
| cardano-cli/src/Cardano/CLI/EraBased/Common/Option.hs | Adds handling for Bech32InvalidUtf8 in KES key parsing; exposes an error-message mismatch in the hex fallback. |
| cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs | Updates compatible tx building to the newer defaultCompatibleTxBodyContent-based API shape. |
Suppressed comments (1)
cardano-cli/src/Cardano/CLI/EraBased/Common/Option.hs:1962
- The hex fallback error message says "Invalid stake pool verification key" but this parser is for a KES verification key, so the message is misleading for users.
Left err@(Bech32InvalidUtf8 _) -> Left $ displayError err
-- The input was not valid Bech32. Attempt to deserialise it as hex.
Left (Bech32DecodingError _) ->
first
(\e -> docToString $ "Invalid stake pool verification key: " <> prettyError e)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
carbolymer
force-pushed
the
mgalazyn/feature/update-compatible-tx
branch
2 times, most recently
from
August 13, 2026 15:45
de6d781 to
4721ced
Compare
9 tasks
carbolymer
force-pushed
the
mgalazyn/feature/update-compatible-tx
branch
from
August 13, 2026 16:09
4721ced to
c8cb8d4
Compare
carbolymer
force-pushed
the
mgalazyn/feature/update-compatible-tx
branch
from
August 13, 2026 17:47
c8cb8d4 to
92790ca
Compare
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.
Description
Adapts
cardano-cli's compatible transaction building to cardano-api's newCompatibleTxBodyContentAPI from IntersectMBO/cardano-api#1282.Motivated by the tx-generator migration in IntersectMBO/cardano-node#6602.
Changes:
runCompatibleTransactionCmdnow builds the transaction by passing a singleCompatibleTxBodyContentrecord tocreateCompatibleTx, starting fromdefaultCompatibleTxBodyContentand overriding the fields it needs (inputs, outputs, supplemental datums, fee, protocol update, voting procedures, certificates).Bech32InvalidUtf8case to the KES verification key Bech32 error handling inpKesVerificationKey.blockNobinding toblockNumberinQueryTipLocalStateOutput'sToJSONinstance to avoid shadowing.StandardCryptoimport inCreateTestnetData/Run.hs.compatible transaction signed-transactiongains--protocol-params-fileand--tx-in-collateraloptions, required to build transactions with plutus witnesses (the script integrity hash needs protocol parameters, and plutus spends need collateral).Note
cardano-api is temporarily pinned to the head of IntersectMBO/cardano-api#1282 via a source-repository-package stanza; the pin will be dropped once that release reaches CHaP.
Checklist
.changes/