Skip to content

Add more Plutus TxInfo tests#5724

Draft
koslambrou wants to merge 1 commit intomasterfrom
more-plutus-txinfo-tests
Draft

Add more Plutus TxInfo tests#5724
koslambrou wants to merge 1 commit intomasterfrom
more-plutus-txinfo-tests

Conversation

@koslambrou
Copy link
Copy Markdown
Contributor

Description

Add Test.Cardano.Ledger.Alonzo.TxInfoSpec with three property tests for Alonzo TxInfo translation:

  • correctly translate tx with alonzo-era features
  • translation fails when input not in UTxO
  • translation fails for slot past horizon

Call Alonzo.txInfoSpecV1 in Babbage.TxInfoSpec for reusability.

Checklist

  • Commits in meaningful sequence and with useful messages.
  • Tests added or updated when needed.
  • CHANGELOG.md files updated for packages with externally visible changes.
    NOTE: New section is never added with the code changes. (See RELEASING.md).
  • Versions updated in .cabal and CHANGELOG.md files when necessary, according to the
    versioning process.
  • Version bounds in .cabal files updated when necessary.
    NOTE: If bounds change in a cabal file, that package itself must have a version increase. (See RELEASING.md).
  • Code formatted (use scripts/fourmolize.sh).
  • Cabal files formatted (use scripts/cabal-format.sh).
  • CDDL files are up to date (use scripts/gen-cddl.sh)
  • hie.yaml updated (use scripts/gen-hie.sh).
  • Self-reviewed the diff.

@koslambrou koslambrou force-pushed the more-plutus-txinfo-tests branch from 78331cd to 5ebd237 Compare April 10, 2026 12:38
@koslambrou
Copy link
Copy Markdown
Contributor Author

@lehins Once you have some time, can you validate the Alonzo tests to see if I'm on the right track. What that what you had in mind?

I haven't completed the Babbage tests yet, but added a property test for testing the translation for some of the TxInfo fields. I'll complete once you give me a +1.

@koslambrou koslambrou force-pushed the more-plutus-txinfo-tests branch 2 times, most recently from 4afd8ad to bd14b0e Compare April 15, 2026 19:27
…lation

Add `Test.Cardano.Ledger.Alonzo.TxInfoSpec` with three property tests
for Alonzo TxInfo translation:
* correctly translate tx with alonzo-era features
* translation fails when input not in UTxO
* translation fails for slot past horizon

Extend `Test.Cardano.Ledger.Babbage.TxInfoSpec` with a property test for
Babbage TxInfo translation across PlutusV1/V2/V3/V4:
* correctly translate tx with babbage-era features
@koslambrou koslambrou force-pushed the more-plutus-txinfo-tests branch from bd14b0e to ebca61c Compare April 15, 2026 19:28
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