Skip to content

Enable Dijkstra-era transaction construction and balancing - #1312

Open
palas wants to merge 1 commit into
dispatch-dijkstra-queriesfrom
enable-dijkstra-tx-construction
Open

Enable Dijkstra-era transaction construction and balancing#1312
palas wants to merge 1 commit into
dispatch-dijkstra-queriesfrom
enable-dijkstra-tx-construction

Conversation

@palas

@palas palas commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Context

Dijkstra transactions can now be built, fee-estimated and auto-balanced.

The experimental makeUnsignedTx, estimateBalancedTxBody and makeTransactionBodyAutoBalance all work in Dijkstra.

Extra key witnesses become key-hash guards, the era's replacement for required signer hashes.

Breaking: BalanceIsNegative now carries the era's UnsignedTx instead of a Conway-specific one.

No new dependencies: everything builds against released packages.

How to trust this PR

Minimal generalisation changes. Use Hide whitespace when viewing the diff.

The one genuine API change is BalanceIsNegative carrying UnsignedTx era (a strict generalization of the previously Conway-hardcoded field).

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

@palas palas self-assigned this Aug 22, 2026
Copilot AI lite review requested due to automatic review settings August 22, 2026 02:13
@palas
palas force-pushed the enable-dijkstra-tx-construction branch from e7c5e30 to 01fa0cb Compare August 22, 2026 02:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 BalanceIsNegative to carry UnsignedTx era (breaking), and add a changelog fragment marking feature + 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
palas force-pushed the enable-dijkstra-tx-construction branch from 01fa0cb to 1d08fad Compare August 22, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants