Skip to content

Investigate incorporating cquisitor-style local tx validation (phase 1 + phase 2) into cardano-cli #1367

@Jimbo4350

Description

@Jimbo4350

Context

There is currently no cardano-cli command to perform a local dry run of a signed transaction — i.e. run phase 1 and phase 2 validation against the current ledger state without actually submitting the tx to the network.

A community tool, cquisitor (built by Evgenii Lisitskii, a core contributor to cardano-serialization-lib), already does this:

Users repeatedly hit cryptic submission errors and resort to external tools like cquisitor to debug them. We should investigate folding equivalent functionality into cardano-cli directly.

Originating discussion: a user asked in Slack whether there is a dry-run command for tx submission to check phases 1 and 2 without submitting, and was directed to cquisitor as the answer.

Investigation tasks

  • Review cquisitor's implementation to understand how it runs phase 1 and phase 2 validation locally (what ledger APIs / serialization libs it uses, how it sources protocol parameters and UTxO context).
  • Identify the equivalent Haskell building blocks already available in cardano-api / cardano-ledger for running phase 1 (evaluateTransactionBalance, era-specific tx validation rules) and phase 2 (evaluateTransactionExecutionUnits, Plutus script evaluation with detailed traces).
  • Determine what's missing in cardano-api to expose a clean "validate signed tx end-to-end against current ledger state" entry point.
  • Decide whether validation should be done against a live node (via local-state-query) or fully offline with user-supplied protocol params + UTxO snapshot (or both).
  • Propose a cardano-cli UX for the feature, e.g. cardano-cli <era> transaction validate --tx-file <signed.tx> that returns structured phase-1 / phase-2 results with rich error messages.
  • Scope the work and open follow-up implementation issues.

Why this matters

  • Better developer experience — users currently leave the cardano-cli toolchain to debug tx errors.
  • Faster iteration on script-heavy transactions without burning collateral on failed submissions.
  • A natural home for the rich error reporting that the ledger already produces but cardano-cli submit swallows.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions