Repository navigation
Add origin to the Dijkstra native script guard clause - #45
Open
carbolymer wants to merge 2 commits into
Open
carbolymer wants to merge 2 commits into
carbolymer wants to merge 2 commits into
Conversation
The local bindings numerator and denominator shadowed the Prelude functions of the same name.
The guard clause of a native script carried only the credential hash, so clients could not tell a key guard from a script guard and could not rebuild the script from its JSON. The clause now has an origin field (verificationKey or script), as the transaction-level guards already do. The JSON decoder reads it too: it used to decode every guard as a script credential. A missing origin still decodes as a script, for compatibility with older clients, and an unknown value is an error. Update the schema, the generated TypeScript types and the test vectors.
carbolymer
marked this pull request as ready for review
November 27, 2026 09:01
Jimbo4350
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ogmios wrote the
guardclause of a Dijkstra native script as a bare credential hash, so a client could not tell a key guard from a script guard. Without that, a client cannot rebuild the exact native script from its JSON. Kupo needs this to index native scripts with guards when Ogmios runs without--include-script-cbor.The clause now has an
originfield, with the same values as the transaction-levelguards:{ "clause": "guard", "from": "<hash>", "origin": "verificationKey" }The JSON decoder reads
origintoo. Before, it decoded every guard as a script credential, so a key guard came back as a different script. A missingoriginstill decodes as a script, for older clients, and an unknown value is an error.This also updates the schema, the generated TypeScript types and the test vectors, and fixes two name-shadowing warnings in
OptionsSpec.Related: