Update tx-generator to not use deprecated cardano-api API#6602
Open
carbolymer wants to merge 1 commit into
Open
Update tx-generator to not use deprecated cardano-api API#6602carbolymer wants to merge 1 commit into
carbolymer wants to merge 1 commit into
Conversation
16 tasks
2064644 to
0e48d61
Compare
Base automatically changed from
mgalazyn/feature/update-cardano-rpc-11.0
to
master
June 19, 2026 12:45
adb450f to
fd7f5d5
Compare
Contributor
Author
|
Experimental API migration guide: https://gist.github.com/carbolymer/1967d68a8d4ed4b80cbbf50ee8698bf8 |
b95df49 to
892b6c9
Compare
carbolymer
commented
Jun 30, 2026
| , teRawCBOR = "X \vl1~\182\201v(\152\250A\202\157h0\ETX\248h\153\171\SI/m\186\242D\228\NAK\182(&\162" | ||
| } | ||
| era = AnyCardanoEra AllegraEra | ||
| era = AnyCardanoEra ConwayEra |
Contributor
Author
There was a problem hiding this comment.
selftest is a smoke test for tx-generator so I presume we don't have to use Allegra here, and conway is fine?
24672d4 to
44e94ac
Compare
Jimbo4350
requested changes
Jun 30, 2026
44e94ac to
8d46065
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates the tx-generator benchmarking/workbench code from deprecated cardano-api APIs to the experimental transaction-building and era-dispatch APIs, while narrowing the exercised era surface to Conway and Dijkstra.
Changes:
- Switch multiple tx construction/submission paths to
Cardano.Api.Experimentalprimitives (IsEra,useEra,makeUnsignedTx,signTx, etc.). - Narrow era dispatch in benchmarking scripts/selftests to Conway/Dijkstra and update protocol-parameters file references to
protocol-parameters-v10.json. - Remove/comment out pre-Conway (and currently-broken) metadata CBOR property tests, and refactor the remaining metadata sizing implementation to use experimental tx building.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bench/tx-generator/tx-generator.cabal | Updates dependencies/ghc-options to match the experimental API migration and reduced era surface. |
| bench/tx-generator/test/Main.hs | Drops pre-Conway metadata property tests; keeps Conway tests and comments out Dijkstra pending support. |
| bench/tx-generator/src/Cardano/TxGenerator/UTxO.hs | Moves UTxO output/fund construction to IsEra + obtainCommonConstraints. |
| bench/tx-generator/src/Cardano/TxGenerator/Utils.hs | Adds txIdFromTx and updates TxInMode construction to experimental-era constraints. |
| bench/tx-generator/src/Cardano/TxGenerator/Tx.hs | Reimplements genTx using experimental unsigned tx building + signing. |
| bench/tx-generator/src/Cardano/TxGenerator/PureExample.hs | Updates the pure example to a post-Conway era and new protocol-parameters filename. |
| bench/tx-generator/src/Cardano/TxGenerator/Genesis.hs | Ports genesis expenditure transaction building/signing to experimental API. |
| bench/tx-generator/src/Cardano/TxGenerator/Fund.hs | Narrows witness-era matching to Conway/Dijkstra under IsEra. |
| bench/tx-generator/src/Cardano/Benchmarking/Script/Selftest.hs | Updates protocol-parameters filename and switches selftest era to Conway. |
| bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs | Narrows era dispatch and ports generator evaluation/fee estimation to experimental-era constraints. |
| bench/tx-generator/src/Cardano/Benchmarking/GeneratorTx/SubmissionClient.hs | Ports submission client to IsEra and uses txIdFromTx for TxId extraction. |
| bench/tx-generator/src/Cardano/Benchmarking/GeneratorTx/SizedMetadata.hs | Reworks metadata sizing measurement to build dummy txs via the experimental API. |
| bench/tx-generator/src/Cardano/Benchmarking/GeneratorTx.hs | Switches the benchmark entrypoint constraints to IsEra and uses obtainCommonConstraints. |
| bench/tx-generator/app/calibrate-script.hs | Ports the calibration script’s tx sizing/fee approximation logic to experimental tx building and Plutus witness construction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2615b9d to
b6acf4c
Compare
carbolymer
commented
Jul 2, 2026
Jimbo4350
requested changes
Jul 2, 2026
b6acf4c to
4dc6a4b
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.
Summary
Migrate tx-generator to use the experimental cardano-api for transaction building and era dispatch.
IsEraconstraint andCardano.Api.Experimentaltransaction building across the tx construction and submission pipelinemakeUnsignedTxsupport in cardano-apiChecklist
CHANGELOG.mdfor affected package.cabalfiles are updated