Skip to content

txBuilder: committee cert redeemers are never resolved to a certificate index #518

Description

@solidsnakedev

Summary

authCommitteeHot and resignCommitteeCold store their redeemer under cert:{coldCredentialHash}, but the assembly loop only matches certificates on stakeCredential and drepCredential. committeeColdCredential is never checked, so the lookup always fails, logs a warning, and skips the redeemer.

A Plutus-script committee cold credential therefore produces a transaction with no redeemer for its certificate, which the node rejects. Native-script cold credentials are unaffected, since #494 made those require no redeemer.

Affected

  • packages/evolution/src/sdk/builders/internal/txBuilder.ts:613-631 (loop checks only stakeCredential and drepCredential)
  • packages/evolution/src/sdk/builders/internal/txBuilder.ts:632-635 (unresolved index logs a warning and continues)
  • packages/evolution/src/sdk/builders/operations/Governance.ts:260, 323 (redeemer keyed by coldCredential)

Fix

  • Add a committeeColdCredential branch to the assembly loop.
  • Consider failing instead of warning when a cert redeemer cannot be resolved. Building a transaction that is known to be missing a required redeemer is not a useful default.

Test

Add coverage asserting a Plutus-script authCommitteeHot emits a redeemer at the certificate's index.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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