Skip to content
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 Alonzo script integrity hash bug #2730

Merged
merged 1 commit into from Apr 18, 2022

Conversation

JaredCorduan
Copy link
Contributor

In the Alonzo era, the map of languages to cost models was mistakenly encoded using an indefinite CBOR map (contrary to canonical CBOR, as intended) when computing the script integrity hash.

For this reason, PlutusV1 remains with this encoding. Future versions of Plutus, starting with PlutusV2 in the Babbage era, will
use the intended definite length encoding.

PR #2703 accidentally reversed this Alonzo bug, this commit restores it. See https://github.com/input-output-hk/cardano-ledger/pull/2703/files#diff-600ae5ce75fa519690c6b948aa3c3453878235d279c5b800efe49e79d2927363L494-L500

In the Alonzo era, the map of languages to cost models was mistakenly encoded
using an indefinite CBOR map (contrary to cannonical CBOR, as intended) when
computing the script integrity hash.

For this reason, PlutusV1 remains with this encoding.
Future versions of Plutus, starting with PlutusV2 in the Babbage era, will
use the intended definite length encoding.

PR #2703 accidentally reversed this Alonzo bug, this commit restores it.
Copy link
Contributor

@lehins lehins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a feeling this issue had something to do with CostModels serialization.
💯

@JaredCorduan JaredCorduan merged commit f86be16 into master Apr 18, 2022
@iohk-bors iohk-bors bot deleted the jc/fix-alonzo-script-integrity-hash branch April 18, 2022 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants