Repository navigation
Keep additionalUtxo in the Dijkstra era - #36
Conversation
Jimbo4350
left a comment
There was a problem hiding this comment.
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.
adcc2ea to
ac6f11e
Compare
Addressed in: a378c0a |
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:
mergeUtxoupgrades the older UTxO set to the newer era instead of dropping it.utxoFromMempoolusesmergeUtxotoo, as upstream does since commit 839e491.additionalUtxocan hold Dijkstra outputs, including native scripts with aguardclause. Like upstream, the hash in aguardclause is read as a script hash.The second commit adds two tests and a changelog entry: a property for
mergeUtxoacross eras, and a golden UTxO with aguardscript. Both tests fail without the fix.The third commit is not from upstream:
additionalUtxonow also reads scripts with"language": "plutus:v4", the way Ogmios writes them. It is a separate commit, so it is easy to drop.