Enable Dijkstra-era transaction construction and balancing - #1312
Open
palas wants to merge 1 commit into
Open
Conversation
palas
requested review from
CarlosLopezDeLara,
Jimbo4350,
carbolymer,
disassembler and
erikd
as code owners
August 22, 2026 02:13
palas
force-pushed
the
enable-dijkstra-tx-construction
branch
from
August 22, 2026 02:15
e7c5e30 to
01fa0cb
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the experimental transaction-construction/balancing pipeline to work in the Dijkstra era, primarily by removing Dijkstra “TODO/unsupported” stubs and reusing the existing Conway-era logic with the necessary era-specific pivots. It also introduces a (documented) breaking change by generalizing BalanceIsNegative to carry an era-generic UnsignedTx.
Changes:
- Enable Dijkstra support in transaction construction (
makeUnsignedTx) by translating extra key witnesses into key-hash guards (Dijkstra’s replacement for required signer hashes). - Enable Dijkstra support in experimental fee estimation and auto-balancing by adding Dijkstra-era branches mirroring the Conway-era logic.
- Generalize
BalanceIsNegativeto carryUnsignedTx era(breaking), and add a changelog fragment markingfeature+breaking.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cardano-api/src/Cardano/Api/Tx/Internal/Fee.hs | Switch Conway-onwards constraints use-site to obtainCommonConstraints to support Conway+ (incl. Dijkstra) proposal-procedure rebuilding. |
| cardano-api/src/Cardano/Api/Tx/Internal/Body.hs | Remove Dijkstra “unsupported” stub for vote witness extraction by using the Conway-onwards constraints path for all Conway+ eras. |
| cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Fee.hs | Add Dijkstra-era implementations for fee estimation and auto-balancing; generalize BalanceIsNegative to carry UnsignedTx era. |
| cardano-api/src/Cardano/Api/Experimental/Tx/Internal/BodyContent/New.hs | Make makeUnsignedTx era-generic; translate extra key witnesses into Dijkstra guards; enable vote witness extraction in Dijkstra via an era split. |
| .changes/20260822_035732_cardano-api_palas_dijkstra_tx_construction.yml | Add Herald changelog fragment documenting the new Dijkstra support and the BalanceIsNegative breaking change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The experimental makeUnsignedTx builds Dijkstra transaction bodies, translating extra key witnesses into appended key-hash guards (the era's replacement for required signer hashes); fee estimation, auto-balancing and execution-unit substitution for proposals gain Dijkstra support; BalanceIsNegative carries the era's UnsignedTx instead of a hardcoded Conway one; and vote witness extraction handles Dijkstra in both APIs. Co-Authored-By: John Lotoski <john.lotoski@iohk.io> Co-Authored-By: Mateusz Galazyn <mateusz.galazyn@iohk.io> Co-Authored-By: kderme <k.dermenz@gmail.com>
palas
force-pushed
the
enable-dijkstra-tx-construction
branch
from
August 22, 2026 02:55
01fa0cb to
1d08fad
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.
Context
Dijkstra transactions can now be built, fee-estimated and auto-balanced.
The experimental
makeUnsignedTx,estimateBalancedTxBodyandmakeTransactionBodyAutoBalanceall work in Dijkstra.Extra key witnesses become key-hash guards, the era's replacement for required signer hashes.
Breaking:
BalanceIsNegativenow carries the era'sUnsignedTxinstead of a Conway-specific one.No new dependencies: everything builds against released packages.
How to trust this PR
Minimal generalisation changes. Use
Hide whitespacewhen viewing the diff.The one genuine API change is
BalanceIsNegativecarryingUnsignedTx era(a strict generalization of the previously Conway-hardcoded field).Checklist
.changes/