Repository navigation
Add Dijkstra sub-transaction witness and assemble commands - #1485
Conversation
dbe9134 to
0a79720
Compare
0a79720 to
49e101c
Compare
7be9938 to
97af027
Compare
97af027 to
b79da31
Compare
b79da31 to
da46d85
Compare
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the detached sub-transaction witnessing and assembly changes.
No open issues 🎉
What changed in this PR
Adds detached key witnessing and assembly for Dijkstra sub-transactions, allowing signing keys to be used separately while preserving original body bytes and script payloads. Byron keys and bootstrap witnesses remain unsupported.
Changes:
- Adds
sub-transaction witnessandsub-transaction assemblecommand definitions, parsers, and execution. - Adds tests for direct-signing equivalence, byte preservation, witness combinations, and invalid inputs.
- Updates CLI help goldens and adds a feature changelog entry.
| File | Description |
|---|---|
cardano-cli/test/cardano-cli-test/Test/Cli/Transaction/SubTransaction.hs |
Tests detached signing, payload preservation, and input rejection. |
cardano-cli/test/cardano-cli-golden/files/golden/help/dijkstra_sub-transaction.cli |
Lists the new subcommands. |
cardano-cli/test/cardano-cli-golden/files/golden/help/dijkstra_sub-transaction_witness.cli |
Records witness command help. |
cardano-cli/test/cardano-cli-golden/files/golden/help/dijkstra_sub-transaction_assemble.cli |
Records assemble command help. |
cardano-cli/test/cardano-cli-golden/files/golden/help.cli |
Updates aggregate CLI help. |
cardano-cli/src/Cardano/CLI/EraBased/Transaction/SubTransaction/Run.hs |
Implements witness creation and assembly. |
cardano-cli/src/Cardano/CLI/EraBased/Transaction/SubTransaction/Option.hs |
Parses the new commands and their arguments. |
cardano-cli/src/Cardano/CLI/EraBased/Transaction/SubTransaction/Command.hs |
Defines command types and rendering. |
.changes/20261023_sub_transaction_witness_assemble.yml |
Documents the feature in the changelog. |
Review effort: Balanced
| subTransactionArgs :: [String] | ||
| subTransactionArgs = ["dijkstra", "sub-transaction", "build-raw", "--tx-in", txIn] | ||
|
|
||
| subTransactionFileArgs :: String -> FilePath -> [String] | ||
| subTransactionFileArgs command input = ["dijkstra", "sub-transaction", command, "--sub-tx-file", input] | ||
|
|
||
| transactionArgs :: String -> [String] | ||
| transactionArgs era = [era, "transaction", "build-raw", "--tx-in", txIn, "--fee", "200000"] |
There was a problem hiding this comment.
I think these are a bit of a weird way of abstracting this. It may have been better to have this inlined. Also the naming. subTransactionArgs should maybe be called "buildRawSubTx", or something like that? But that is from a previous PR.
|
@Jimbo4350, one thing Claude suggested:
I didn't think to check that, but it is a good idea, it would be most user friendly to do it |
Add Dijkstra
sub-transaction witnessandsub-transaction assemblefor separate key witnessing and assembly, preserving the original body bytes and script payloads.Tests cover equivalence with direct signing, canonical/noncanonical bodies, empty/multiple/duplicate witnesses, and invalid inputs. Byron keys/bootstrap witnesses remain unsupported by these CLI commands.
Includes updated help goldens and a changelog fragment.