Repository navigation
Remove --update-proposal-file CLI flag and dead TxUpdateProposal threading - #1372
Merged
Merged
Conversation
The `_txUpdateProposal` parameter to `runTxBuild` and the matching read in `runTransactionBuildRawCmd` were both flagged with `TODO`s to remove them. Update proposals are deprecated since Conway and the value was never consumed downstream. This drops the dead bindings, the unused `runTxBuild` parameter, and the corresponding field destructures, but leaves the CLI flag (`--update-proposal-file`) and the record fields in `TransactionBuildCmdArgs` / `TransactionBuildRawCmdArgs` intact, so this is not a user-visible CLI change.
Jimbo4350
requested review from
carbolymer,
disassembler,
kevinhammond,
newhoggy and
palas
as code owners
May 4, 2026 14:17
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes end-to-end threading of deprecated TxUpdateProposal values through transaction build and transaction build-raw in the era-based transaction runner, simplifying the build pipeline while keeping the --update-proposal-file flag in the CLI surface.
Changes:
- Removes reading/binding of update proposal files in
runTransactionBuildCmdandrunTransactionBuildRawCmd. - Drops the
TxUpdateProposal eraparameter fromrunTxBuildand removes its call-site argument(s). - Cleans up now-unused record field destructuring related to
mUpdateProposalFile/mUpdateProprosalFile.
Comments suppressed due to low confidence (2)
cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs:317
- Removing the
mUpdateProposalFileplumbing means--update-proposal-fileis now completely ignored at runtime (the file is no longer read/validated). Previously, providing the flag could still fail early if the file was missing/invalid due toreadTxUpdateProposal. This is a (small) user-visible behavior change in error cases, so either update the PR description/changelog to reflect that, or keep a warning/validation path when the flag is supplied (even if the value remains unused).
let mCurrenTreasuryValue = case includeCurrentTreasuryValue of
IncludeCurrentTreasuryValue -> unFeatured <$> featuredCurrentTreasuryValueM
ExcludeCurrentTreasuryValue -> Nothing
-- We need to construct the txBodycontent outside of runTxBuild
(balancedTxBody@(Exp.UnsignedTx tx), txBodyContent) <-
fromExceptTCli $
runTxBuild
nodeSocketPath
networkId
mScriptValidity
txinsAndMaybeScriptWits
allReferenceInputs
filteredTxinsc
mReturnCollateral
mTotalCollateral
txOuts
changeAddresses
(mintedMultiAsset, mintingWitnesses)
mValidityLowerBound
mValidityUpperBound
certsAndMaybeScriptWits
withdrawalsAndMaybeScriptWits
requiredSigners
txAuxScripts
txMetadata
mOverrideWitnesses
votingProceduresAndMaybeScriptWits
proposals
mCurrenTreasuryValue
mTreasuryDonation
supplementalDatums
cardano-cli/src/Cardano/CLI/EraBased/Transaction/Run.hs:656
- With the
_txUpdateProposal <- ...block removed,transaction build-raw --update-proposal-file ...will no longer attempt to read/validate the provided file. If the intent is to keep the flag parsing for compatibility, consider emitting a deprecation warning when it is supplied (or update release notes/PR description to note that invalid paths will no longer error).
txAuxScripts <-
fromEitherCli $
validateTxAuxScripts scripts
pparams <- forM mProtocolParamsFile $ \ppf ->
fromExceptTCli (readProtocolParameters ppf)
let mLedgerPParams = LedgerProtocolParameters <$> pparams
requiredSigners <-
mapM (fromEitherIOCli . readRequiredSigner) reqSigners
mReturnCollateralAndDatums <- mapM toTxOutInShelleyBasedEra mReturnColl
let mReturnCollateral = fst <$> mReturnCollateralAndDatums
returnCollDatums = maybe mempty snd mReturnCollateralAndDatums
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Removes the deprecated `--update-proposal-file` flag from the era-based `transaction build` and `transaction build-raw` commands by dropping the two `pUpdateProposalFile` parser hookups and the corresponding record fields (`mUpdateProposalFile` / `mUpdateProprosalFile`) from `TransactionBuildCmdArgs` and `TransactionBuildRawCmdArgs`. Update proposals are deprecated since Conway and the value was already being discarded internally — the flag was a no-op. Conway and later eras already excluded the flag from --help (the `Featured ShelleyToBabbageEra` constraint), so this only affects scripts that were silently passing the flag for show. Compatible-mode (`compatible <era> transaction signed-transaction`) keeps `--update-proposal-file`, since pre-Conway eras still need it.
Jimbo4350
added a commit
that referenced
this pull request
May 7, 2026
The field was hardcoded to null across all eras since the update-proposal handling was removed in #1372. Always-null fields are noise; drop the key entirely and regenerate the goldens.
Jimbo4350
added a commit
that referenced
this pull request
May 7, 2026
The field was hardcoded to null across all eras since the update-proposal handling was removed in #1372. Always-null fields are noise; drop the key entirely and regenerate the goldens.
Jimbo4350
added a commit
that referenced
this pull request
May 7, 2026
The field was hardcoded to null across all eras since the update-proposal handling was removed in #1372. Always-null fields are noise; drop the key entirely and regenerate the goldens.
Jimbo4350
added a commit
that referenced
this pull request
May 8, 2026
The field was hardcoded to null across all eras since the update-proposal handling was removed in #1372. Always-null fields are noise; drop the key entirely and regenerate the goldens.
3 tasks done
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
Removes the deprecated
--update-proposal-fileflag from the era-basedtransaction buildandtransaction build-rawcommands, plus the dead internalTxUpdateProposalplumbing it was wired into. Update proposals are deprecated since Conway (replaced by governance proposals); the read value was already being discarded insiderunTxBuild, so the flag was effectively a no-op.Two commits, intended to be reviewable in order:
TxUpdateProposalthreading from build/build-raw — pure dead-code removal: drops the_txUpdateProposalbind, the unusedrunTxBuildparameter, and the matching field destructures. No CLI change.--update-proposal-filefrom era-based transaction build / build-raw — removes the parser hookups and themUpdateProposalFile/mUpdateProprosalFilerecord fields fromTransactionBuildCmdArgs/TransactionBuildRawCmdArgs. CLI breaking for any script that was passing the flag, though the flag was a no-op for Conway+ already (theFeatured ShelleyToBabbageEraconstraint excluded it from--helpfor those eras).Out of scope:
compatible <era> transaction signed-transactionkeeps--update-proposal-file, since pre-Conway eras still genuinely use it. Byron's separate--byron-update-proposalandcreate-/submit-update-proposalcommands are also untouched.How to trust this PR
cabal build cardano-cli -j4is cleancabal test cardano-cli-golden -j4passes (695/695, including all--helpgoldens)cabal test cardano-cli-test -j4passes (69/69)cardano-cli latest transaction build-raw --helpno longer mentionsupdate-proposal;cardano-cli compatible babbage transaction signed-transaction --helpstill doesChangelog