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

Update v2 cost models #1022

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Update v2 cost models #1022

merged 2 commits into from
Sep 18, 2024

Conversation

MicroProofs
Copy link
Member

@MicroProofs MicroProofs commented Sep 17, 2024

So in Conway the plutusV2 cost model was updated, but not the PlutusV1 cost model.

This PR reflects the mainnet changes.

@MicroProofs MicroProofs requested a review from a team as a code owner September 17, 2024 20:16
@MicroProofs MicroProofs marked this pull request as draft September 17, 2024 20:16
@MicroProofs MicroProofs changed the title Start updating v2 cost models Update v2 cost models Sep 17, 2024
@MicroProofs MicroProofs marked this pull request as ready for review September 18, 2024 16:06
@MicroProofs MicroProofs merged commit b50fa91 into main Sep 18, 2024
11 of 12 checks passed
@MicroProofs MicroProofs deleted the cost-model-fixes branch September 18, 2024 16:06
@nau
Copy link

nau commented Sep 19, 2024

No, this is wrong. They changed multiplyInteger after Conway in V1 and V2. Look at builtinCostModelB.json and builtinCostModelC.json. They both have multiplied_sized.

And according to (https://github.com/input-output-hk/plutus/blob/00beff4c8be236fa39123afd956abd910a2bbb50/plutus-ledger-api/src/PlutusLedgerApi/Common/ProtocolVersions.hs) semvar B is used for V1 and V2 after Chang.

@nau
Copy link

nau commented Sep 19, 2024

So builtins costs are now BuiltinSemanticVariant dependant, which is Plutus version and protocol version dependent.

@MicroProofs
Copy link
Member Author

No, this is wrong. They changed multiplyInteger after Conway in V1 and V2. Look at builtinCostModelB.json and builtinCostModelC.json. They both have multiplied_sized.

And according to (https://github.com/input-output-hk/plutus/blob/00beff4c8be236fa39123afd956abd910a2bbb50/plutus-ledger-api/src/PlutusLedgerApi/Common/ProtocolVersions.hs) semvar B is used for V1 and V2 after Chang.

Cost model A is still the same and that represents PlutusV1

@MicroProofs
Copy link
Member Author

Ok I see they changed it all to use cost model B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ In Next Release
Development

Successfully merging this pull request may close these issues.

2 participants