Skip to content

Fail PlutusV1-V3 translation for non-empty subTransactionsTxBody#5669

Draft
Lucsanszky wants to merge 16 commits intolehins/memoize-transaction-validationfrom
ldan/subtransactions-fail-plutus-translation
Draft

Fail PlutusV1-V3 translation for non-empty subTransactionsTxBody#5669
Lucsanszky wants to merge 16 commits intolehins/memoize-transaction-validationfrom
ldan/subtransactions-fail-plutus-translation

Conversation

@Lucsanszky
Copy link
Copy Markdown
Contributor

Description

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.

@Lucsanszky Lucsanszky changed the base branch from master to lehins/memoize-transaction-validation March 23, 2026 22:58
@Lucsanszky Lucsanszky changed the title Ldan/subtransactions fail plutus translation Fail PlutusV1-V3 translation for non-empty subTransactionsTxBody Mar 23, 2026
unless (null (tx ^. bodyTxL . subTransactionsTxBodyL)) $
Left $
inject $
SubTxIsNotSupported @era (txIdTx tx)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it appropriate to use this error here as well, or should we create a separate one? Also, is it okay to use the TopTx's ID as the TxId parameter? If not, then I guess we would like to pass in all the SubTx IDs that are present and modify SubTxIsNotSupported to take a set of Tx IDs (that is if we don't want to create a separate error for this).

Comment on lines +398 to +404
guardDijkstraFeaturesForPlutusV1toV3 ::
forall era.
( EraTx era
, DijkstraEraTxBody era
, Inject (DijkstraContextError era) (ContextError era)
) =>
Tx TopTx era ->
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we might want to create a guard function, just like in the Conway era for example. Let me know if that's not the case.

@lehins lehins force-pushed the lehins/memoize-transaction-validation branch 3 times, most recently from 2a9eb1f to 438ac22 Compare April 16, 2026 18:58
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.

2 participants