Repository navigation
Add required top-level guards to sub-transaction build-raw - #1460
Merged
Jimbo4350 merged 2 commits intoOct 14, 2026
Merged
Conversation
Jimbo4350
force-pushed
the
jordan/sub-tx-top-level-guards
branch
2 times, most recently
from
October 13, 2026 14:14
46be884 to
c38f523
Compare
Jimbo4350
marked this pull request as ready for review
October 13, 2026 14:58
Jimbo4350
requested review from
carbolymer,
disassembler,
kevinhammond and
palas
as code owners
October 13, 2026 14:58
Jimbo4350
force-pushed
the
jordan/sub-tx-top-level-guards
branch
from
October 13, 2026 15:02
c38f523 to
24d81f2
Compare
carbolymer
requested changes
Oct 13, 2026
Jimbo4350
force-pushed
the
jordan/sub-tx-top-level-guards
branch
3 times, most recently
from
October 13, 2026 18:18
14dfa5c to
cbfe7fc
Compare
Jimbo4350
force-pushed
the
jordan/basic-sub-tx-integration
branch
2 times, most recently
from
October 13, 2026 20:43
5bc976d to
e0ac3c4
Compare
carbolymer
approved these changes
Oct 14, 2026
| when (isJust mDatum) $ throwCliError $ TxCmdTopLevelGuardUnexpectedDatum path | ||
| PlutusScript version _ -> do | ||
| let language = toAlonzoLanguage (AnyPlutusScriptVersion version) | ||
| unless (language == L.PlutusV4) $ |
Contributor
There was a problem hiding this comment.
Could this be language >= L.PlutusV4?
There is no Plutus V5 yet, so nothing changes today, but the intent is "V4 or later", and == would reject a guard script written for any later version.
The error message would then need to say "V4 or later" as well.
Jimbo4350
force-pushed
the
jordan/sub-tx-top-level-guards
branch
2 times, most recently
from
October 14, 2026 13:58
c0905dc to
522c4ee
Compare
Jimbo4350
force-pushed
the
jordan/sub-tx-top-level-guards
branch
2 times, most recently
from
October 14, 2026 14:43
7ec485d to
5ab9e75
Compare
Jimbo4350
force-pushed
the
jordan/sub-tx-top-level-guards
branch
from
October 14, 2026 14:47
5ab9e75 to
4682a97
Compare
Jimbo4350
merged commit Oct 14, 2026
55cff1e
into
jordan/basic-sub-tx-integration
20 of 22 checks passed
Jimbo4350
added a commit
that referenced
this pull request
Oct 14, 2026
…ards Add required top-level guards to sub-transaction build-raw
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.
Sub-transactions can specify key or script credentials required as guards in the enclosing top-level transaction through
dijkstra sub-transaction build-raw.Key requirements accept repeatable
--top-level-guard-key-hash,--top-level-guard-verification-key, or--top-level-guard-verification-key-fileoptions. Key hashes support any Shelley signing-key role; inline verification keys and key files use payment keys. Key requirements carry no datum.Script requirements use
--top-level-guard-script-hashor--top-level-guard-script-file, with optional data supplied through--top-level-guard-datum-value,--top-level-guard-datum-file, or--top-level-guard-datum-cbor-file. Script files are hashed and checked locally: Plutus scripts must be V4 and require a datum, while native scripts must not have one. Script hashes leave language validation to the ledger.Entries are stored in
requiredTopLevelGuards; these options add no local guard witnesses. Repeated credentials are rejected across all input forms. A key hash and script hash with identical bytes remain distinct credentials.Validation covers key forms, mixed key/script requirements, datum rejection, duplicate aliases, local witness preservation, and canonical output through signing and embedding. All 38 sub-transaction tests and 620 help/pipeline golden tests pass.