-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ScriptErrorEvaluationFailed with DebugPlutusFailure #672
Conversation
4381cde
to
794a018
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, this is a nice improvement.
Script arguments: ScriptInfo: CertifyingScript 0 (TxCertRegStaking (ScriptCredential c61bfa1c138524b69f378bc69504322f39289ce554d549db4d1e2b50) (Just 400000))
TxInfo:
This makes it look like "Script arguments" and "TxInfo" are at the same level. The following would be better:
Script arguments:
argument 1:
ScriptInfo: ...
TxInfo: ...
...
Can you also print the base64-encoded arguments? That would be more useful for re-running the script locally. Or is it already printed elsewhere?
Made the changes however I'm not sure why it's saying |
794a018
to
1c5000d
Compare
I'm not sure. It doesn't look like this is from the plutus repo: grepping "unknown error code" returns no result. |
6243fa4
to
da6d106
Compare
It comes from: https://github.com/IntersectMBO/cardano-api/pull/672/files#diff-4909897d92b6ddafd851db4cfc8d8584ad03948c0d94a42a41c8a3391711cd48R73 |
It's a bug in Plutus - I'll fix it. By the way, I don't think you'd want to look up everything in that map and prints "unknown error code" if not found. The log may also contain arbitrary strings the user puts there. |
Fixed in IntersectMBO/plutus#6635 |
ab45861
to
4bba5b7
Compare
} | ||
deriving (Eq, Show) | ||
|
||
renderDebugPlutusFailure :: DebugPlutusFailure -> Text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe an instance of Pretty
would be better suited here rather than a function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually have more render functions. We need to make a decision if we are going to rely on Pretty
or these rendering functions (or both?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favour of pretty.
4bba5b7
to
4dbd9fc
Compare
fb6f656
to
d2ed942
Compare
d2ed942
to
a832c69
Compare
a832c69
to
f54c809
Compare
f54c809
to
1cbd09a
Compare
d8ad228
to
c4e66dc
Compare
Improved plutus script error debugging output.
Before:
After:
Changelog
Context
Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.
How to trust this PR
Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.
Checklist