You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FR] - TxVotingProcedures accepts ScriptWitness but not broader Witness type #722
Describe the feature you'd like
Constructors such as TxWithdrawals, TxCertificates accepts Witness under BuildTxWith but TxVotingProcedures utilizes ScriptWitness which does not include key witnesses. Is this deliberate? Is it that key witnesses don't make sense in this context? If key witnesses make sense for voting procedures, then not including them may mess up with functions like estimateTransactionKeyWitnessCount.
Thanks!
Yes on both counts: key witnesses do make sense for votes, and estimateTransactionKeyWitnessCount was miscounting them. Both fixed in #1271.
Key witnesses for votes. The ledger demands a VKey witness for every key-credentialed voter: key-hash DReps, CC hot keys, and SPOs (always, since pool ids are key hashes). A transaction missing one fails UTXOW with MissingVKeyWitnessesUTXOW. A key-witnessed vote carries no extra payload (no script, no redeemer), which is probably how the ScriptWitness-only map slipped in: there was nothing to attach. But it made key-witnessed votes unrepresentable, and invisible to fee estimation, exactly as you suspected.
The type. We won't widen the old TxVotingProcedures; that TxBodyContent is deprecated. Its replacement in Cardano.Api.Experimental.Tx already uses AnyWitness, whose AnyKeyWitnessPlaceholder fills the KeyWitness role you were missing.
The estimator. Neither variant counted votes at all, so vote-carrying transactions could get underestimated fees and die with FeeTooSmallUTxO. #1271 fixes both: the experimental one counts placeholders in the vote witness map, and the legacy one reads voter credentials straight out of the ledger VotingProcedures (the same rule the ledger's voterWitnesses applies), so it works despite the narrow type. The experimental function is also now actually exported; it wasn't reachable before.
One deliberate non-change: proposals still contribute no key witnesses, because the ledger never requires one for a proposal.
Activity
smelc commentedon Jan 13, 2025
cc @CarlosLopezDeLara
github-actions commentedon Feb 13, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
github-actions commentedon Mar 16, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
github-actions commentedon Apr 17, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
github-actions commentedon May 18, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
github-actions commentedon Jun 19, 2025
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.
14 remaining items
github-actions commentedon Dec 29, 2025
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 100 days.
github-actions commentedon Apr 1, 2026
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 100 days.
github-actions commentedon Jul 20, 2026
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 100 days.
carbolymer commentedon Jul 30, 2026
Yes on both counts: key witnesses do make sense for votes, and
estimateTransactionKeyWitnessCountwas miscounting them. Both fixed in #1271.Key witnesses for votes. The ledger demands a VKey witness for every key-credentialed voter: key-hash DReps, CC hot keys, and SPOs (always, since pool ids are key hashes). A transaction missing one fails UTXOW with
MissingVKeyWitnessesUTXOW. A key-witnessed vote carries no extra payload (no script, no redeemer), which is probably how theScriptWitness-only map slipped in: there was nothing to attach. But it made key-witnessed votes unrepresentable, and invisible to fee estimation, exactly as you suspected.The type. We won't widen the old
TxVotingProcedures; thatTxBodyContentis deprecated. Its replacement inCardano.Api.Experimental.Txalready usesAnyWitness, whoseAnyKeyWitnessPlaceholderfills theKeyWitnessrole you were missing.The estimator. Neither variant counted votes at all, so vote-carrying transactions could get underestimated fees and die with
FeeTooSmallUTxO. #1271 fixes both: the experimental one counts placeholders in the vote witness map, and the legacy one reads voter credentials straight out of the ledgerVotingProcedures(the same rule the ledger'svoterWitnessesapplies), so it works despite the narrow type. The experimental function is also now actually exported; it wasn't reachable before.One deliberate non-change: proposals still contribute no key witnesses, because the ledger never requires one for a proposal.
Sorry this sat unanswered for so long.