Repository navigation
Conversation
500b206 to
faaaed3
Compare
3bd2822 to
54dc1b0
Compare
54dc1b0 to
6ea3d63
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
| , maybe | ||
| (Exp.NativeGuardWitness (Exp.SReferenceScript input)) | ||
| (uncurry $ plutusWitness (P.PReferenceScript input)) |
There was a problem hiding this comment.
One thing that is a bit unfriendly to users is that if you fail to provide a redeemer (when using ref scripts) it will only fail when you submit the transaction. At least for transaction build, we could check this. The other way around has a similar problem.
On the other hand, while it is nice that the number of flags is small because we reuse, if we had different flags for native and Plutus we could catch this even in build-raw
| "Plutus guard " | ||
| <> pretty (L.credToText credential) | ||
| <> " requires --guard-redeemer-* and --guard-execution-units." | ||
| <> " requires --guard-redeemer-* and --guard-execution-units (transaction build calculates execution units automatically)." |
There was a problem hiding this comment.
| <> " requires --guard-redeemer-* and --guard-execution-units (transaction build calculates execution units automatically)." | |
| <> " requires --guard-redeemer-* and --guard-execution-units (except for transaction build, which calculates execution units automatically)." |
Maybe clearer. Alternatively, we can customise the error depending on the command that issued it. For example, by passing an enum like (AutoBalance / ManualBalance)
| fileArgs = ["--required-signer", keyFile] | ||
| hashArgs = ["--required-signer-hash", Text.unpack $ serialiseToRawBytesHexText keyHash] | ||
| forM_ [fileArgs, hashArgs, fileArgs ++ hashArgs] $ \args -> do | ||
| void $ execCardanoCLI $ transactionArgs "conway" ++ args ++ ["--out-file", bodyFile] |
There was a problem hiding this comment.
We probably should be removing the output file between iterations to make sure the command does something in every case
| input <- | ||
| H.evalEither $ | ||
| deserialiseFromRawBytesHex "63e6a9a8e58e48cc025cae04daaed9d36fc7b70bc292721d9f5057ae37b24981" | ||
| forM_ [[], ["--guard-redeemer-value", "42", "--guard-execution-units", "(3,4)"]] $ \redeemer -> do |
Dijkstra's top-level transaction builders could not supply native or Plutus script guard witnesses. Add guard options to
transaction build,build-raw, andbuild-estimate, supporting inline and reference scripts, Plutus V4 guarding redeemers, and automatic or explicit execution budgets.The builders populate guard credentials and witnesses, collect guard reference inputs, and render guarding redeemers in transaction views. Add regression tests for guard serialization, redeemer indexing and integrity hashing, validation, era gating, and offline fee estimation, plus updated help goldens.
Rebased onto
masterat7c04e3f9band uses publishedcardano-api 11.11.0.0from CHaP. The temporarysource-repository-packagehas been removed. Builders carry required key signatures and script guards through one era-indexed parameter, backed by a single validatedTxGuardscollection in Dijkstra; Conway retains its required-signer representation.Validation against released
cardano-api 11.11.0.0(GHC 9.12.4): CLI and both test executables built successfully; all 54 selected guard, sub-transaction, direct-deposit, and script-validity regression tests passed, including required-signer file/hash equivalence, duplicate key requirements, and signing key guards. All 7 selected help and Conway transaction-view goldens passed. Fourmolu, HLint, and whitespace checks passed. Online execution-unit evaluation was not exercised against a running node.Changelog