Skip to content

Keep additionalUtxo in the Dijkstra era - #36

Merged
palas merged 6 commits into
masterfrom
fix-28-dijkstra-additional-utxo
Nov 20, 2026
Merged

palas merged 6 commits into
masterfrom
fix-28-dijkstra-additional-utxo

Conversation

@palas

@palas palas commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Fixes #28.

Upstream commit CardanoSolutions@3f985b3 does not cherry-pick here, because it also drops Babbage support, which this fork keeps. So the first commit ports only what this issue needs:

  • mergeUtxo upgrades the older UTxO set to the newer era instead of dropping it. utxoFromMempool uses mergeUtxo too, as upstream does since commit 839e491.
  • additionalUtxo can hold Dijkstra outputs, including native scripts with a guard clause. Like upstream, the hash in a guard clause is read as a script hash.

The second commit adds two tests and a changelog entry: a property for mergeUtxo across eras, and a golden UTxO with a guard script. Both tests fail without the fix.

The third commit is not from upstream: additionalUtxo now also reads scripts with "language": "plutus:v4", the way Ogmios writes them. It is a separate commit, so it is easy to drop.

@palas
palas added this pull request to stack #40 November 18, 2026 21:09
@palas palas self-assigned this Nov 18, 2026

@Jimbo4350 Jimbo4350 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

decodeDijkstraNativeScript accepts a top-level guard, but guards inside all, any, or some are rejected: the fallback calls decodeNativeScript, which recursively uses itself and doesn’t recognise guard.

These combinations are supported by the ledger and already emitted by Ogmios’s Dijkstra encoder. Could we make child decoding recurse through the Dijkstra-aware decoder and add tests for guards inside all three combinators? The current golden test only covers a top-level guard.

Base automatically changed from fix-27-exit-code to master November 19, 2026 15:09
@palas
palas force-pushed the fix-28-dijkstra-additional-utxo branch from adcc2ea to ac6f11e Compare November 19, 2026 15:09
@palas

palas commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator Author

decodeDijkstraNativeScript accepts a top-level guard, but guards inside all, any, or some are rejected: the fallback calls decodeNativeScript, which recursively uses itself and doesn’t recognise guard.

These combinations are supported by the ledger and already emitted by Ogmios’s Dijkstra encoder. Could we make child decoding recurse through the Dijkstra-aware decoder and add tests for guards inside all three combinators? The current golden test only covers a top-level guard.

Addressed in: a378c0a

@palas
palas merged commit 54bb8c1 into master Nov 20, 2026
9 checks passed
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.

evaluateTransaction ignores additionalUtxo in Dijkstra when the mempool has transactions

3 participants