Skip to content

[FR] - TxVotingProcedures accepts ScriptWitness but not broader Witness type #722

Closed

Description

@sourabhxyz

External

Area
Transaction building.

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!

Activity

  1. smelc commented on Jan 13, 2025

    @smelc
    Contributor
  2. github-actions commented on Feb 13, 2025

    @github-actions
    Contributor

    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.

  3. github-actions commented on Mar 16, 2025

    @github-actions
    Contributor

    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.

  4. github-actions commented on Apr 17, 2025

    @github-actions
    Contributor

    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.

  5. github-actions commented on May 18, 2025

    @github-actions
    Contributor

    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.

  6. github-actions commented on Jun 19, 2025

    @github-actions
    Contributor

    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.

  7. 14 remaining items

  8. github-actions commented on Dec 29, 2025

    @github-actions
    Contributor

    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.

  9. github-actions commented on Apr 1, 2026

    @github-actions
    Contributor

    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.

  10. github-actions commented on Jul 20, 2026

    @github-actions
    Contributor

    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.

  11. self-assigned this
    on Jul 28, 2026
  12. carbolymer commented on Jul 30, 2026

    @carbolymer
    Contributor

    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.

    Sorry this sat unanswered for so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions