Skip to content

Add support for NodeToClientV_24 and transaction validate integration tests#6582

Draft
palas wants to merge 5 commits into
masterfrom
tx-validation
Draft

Add support for NodeToClientV_24 and transaction validate integration tests#6582
palas wants to merge 5 commits into
masterfrom
tx-validation

Conversation

@palas
Copy link
Copy Markdown
Contributor

@palas palas commented May 27, 2026

Description

Adds support for the new NodeToClientV_24 protocol version and comprehensive integration tests for the transaction validate CLI command.

Part of IntersectMBO/cardano-cli#1380.

Big picture: transaction validate currently applies applyTx client-side with an empty UTxO set, making it unable to properly validate transactions. This cross-repo change adds a new ValidateTx query to the LocalStateQuery protocol so the node validates transactions against its real ledger state and UTxO set.

transaction validate PR list:

What this PR does

  • Adds NodeToClientV_24 -> 24 to nodeToClientVersionToInt in startup tracers
  • Adds ShelleyNodeToClientVersion16 to the ToJSON orphan instance in OrphanInstances.Shelley
  • Adds integration tests (hprop_transaction_validate and hprop_transaction_validate_all_errors) in cardano-testnet covering:
    • Valid transactions: simple ADA transfer and Plutus V3 script execution
    • Phase-1 errors: fee too low, value not conserved, missing witnesses, missing script witnesses, no collateral for Plutus txs, max tx size exceeded
    • Phase-2 errors: Plutus script evaluation failure
    • Multi-error: transactions triggering multiple simultaneous validation failures
    • All tests compare output against golden files
  • Adds SRP stanzas (via stanzaman) for ouroboros-consensus, ouroboros-network, cardano-api, and cardano-cli

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Running tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant