-
Notifications
You must be signed in to change notification settings - Fork 720
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
Preserve the CBOR representation of scripts #4537
Conversation
2848bc8
to
f792556
Compare
fb2529e
to
b2564d4
Compare
So this needs a rebase on
Linking to the issue in the description and elaborating on "Preserve the CBOR representation of scripts" in the commit message will save me having to ping you when the next release comes around and I have forgotten the specifics. |
c598dea
to
8d3b75f
Compare
This PR is stale because it has been open 45 days with no activity. |
In many places it's important to retain the original bytes that the user supplied so that the hash is what they expect. This is especially important for data sent as CBOR, since there's multiple way to represent identical arrays.
The `ScriptData` type can be used to build Plutus scripts, but if we store user supplied script data in it directly we will lose their original encoding of the data. `HashableScriptData` attempts to fix this issue by pairing `ScriptData` with the bytes used to represent it. In an attempt to minimise the breakage to code which depends on the API, functions which depended on the value of `ScriptData`, but doesn't need the original bytes now accept both `ScriptData` and `HashableScriptData` via the new `IsScriptData` class.
8d3b75f
to
d92ab59
Compare
Subsumed by: #4886 |
Fixes #4433