IntersectMBO / IntersectMBO/cardano-cli
Investigate incorporating cquisitor-style local tx validation (phase 1 + phase 2) into cardano-cli
- Dominant language
- Haskell
- Stars
- 71
- Forks
- 24
- Avg merge
- 23h 40m
- Merged PRs (30d)
- 14
Description
## 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**](https://github.com/cardananium/cquisitor) (built by Evgenii Lisitskii, a core contributor to cardano-serialization-lib), already does this:
- Webapp: https://cardananium.github.io/cquisitor/
- Repo: https://github.com/cardananium/cquisitor
- Stack: Rust + JavaScript
- Behaviour: paste a tx CBOR → runs phase 1 and phase 2 validation locally with enhanced failure feedback and a visual breakdown of the transaction structure.
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
- [x] 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).
- [x] 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).
- [x] Determine what's missing in `cardano-api` to expose a clean \"validate signed tx end-to-end against current ledger state\" entry point.
- [x] 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).
- [x] Propose a `cardano-cli` UX for the feature, e.g. `cardano-cli transaction validate --tx-file ` that returns structured phase-1 / phase-2 results with rich error messages.
- [x] 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.
Contributor guide
Assessment
This issue has not been assessed yet.