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 plutus to 1.13 #3738

Closed

Conversation

carbolymer
Copy link
Contributor

Description

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@carbolymer carbolymer force-pushed the mgalazyn/fix/fix-build-for-newer-plutus-core branch from 799c703 to 07609b4 Compare September 19, 2023 15:10
@carbolymer carbolymer changed the title Fix building with newer plutus-core Fix building cardano-api with newer plutus-core Sep 19, 2023
@carbolymer carbolymer force-pushed the mgalazyn/fix/fix-build-for-newer-plutus-core branch from 07609b4 to 6f2577c Compare September 20, 2023 08:52
@carbolymer carbolymer changed the title Fix building cardano-api with newer plutus-core Update plutus to 1.13 Sep 20, 2023
@carbolymer carbolymer force-pushed the mgalazyn/fix/fix-build-for-newer-plutus-core branch 3 times, most recently from d361fa6 to 328a57e Compare September 20, 2023 09:17
@carbolymer carbolymer force-pushed the mgalazyn/fix/fix-build-for-newer-plutus-core branch from 328a57e to 4cea234 Compare September 20, 2023 09:49
Copy link
Collaborator

@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.

Looks like this PR is filing to build due to this change described in the changelog: https://github.com/input-output-hk/plutus/blob/04dca913a4b582c1c2574a27b38383f1c6156818/plutus-ledger-api/CHANGELOG.md?plain=1#L7

@carbolymer Did you wanna finish this PR? If not you could pass it to someone on the Plutus team. Alternatively one of the Ledger team members could pick it up eventually.


testingCostModelV1 :: CostModel
testingCostModelV1 =
fromRight (error "testingCostModelV1 is not well-formed") $
mkCostModel PlutusV1 (0 <$ Map.elems costModelParamsForTesting)
mkCostModel PlutusV1 (0 <$ costModelParamsForTesting)
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are now plutus version specific testing functions, which shoul dbe used instead of all using PlutusV3 version

Suggested change
mkCostModel PlutusV1 (0 <$ costModelParamsForTesting)
mkCostModel PlutusV1 (0 <$ PV1.costModelParamsForTesting)


testingCostModelV2 :: CostModel
testingCostModelV2 =
fromRight (error "testingCostModelV2 is not well-formed") $
mkCostModel PlutusV2 (0 <$ Map.elems costModelParamsForTesting)
mkCostModel PlutusV2 (0 <$ costModelParamsForTesting)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here:

Suggested change
mkCostModel PlutusV2 (0 <$ costModelParamsForTesting)
mkCostModel PlutusV2 (0 <$ PV1.costModelParamsForTesting)

@@ -5,18 +5,17 @@ import Cardano.Ledger.Alonzo.Language (BinaryPlutus (..), Language (..), Plutus
import Cardano.Ledger.Alonzo.Scripts (AlonzoScript (PlutusScript), CostModel, mkCostModel)
import Data.ByteString.Short (pack)
import Data.Either (fromRight)
import qualified Data.Map as Map
import PlutusLedgerApi.Test.EvaluationContext (costModelParamsForTesting)
import PlutusLedgerApi.Test.V3.EvaluationContext (costModelParamsForTesting)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import PlutusLedgerApi.Test.V3.EvaluationContext (costModelParamsForTesting)
import qualified PlutusLedgerApi.Test.V1.EvaluationContext as PV1 (costModelParamsForTesting)
import qualified PlutusLedgerApi.Test.V2.EvaluationContext as PV2 (costModelParamsForTesting)

@carbolymer
Copy link
Contributor Author

carbolymer commented Sep 26, 2023

Thanks @lehins . I think we don't require upgrading plutus 1.13 in API at this moment, so we should be good after IntersectMBO/cardano-api#270 . Therefore I won't be working on this anymore, feel free to pick it up.

@lehins
Copy link
Collaborator

lehins commented Sep 26, 2023

@carbolymer Cool. I'll have someone from ledger pick up and finish this PR at some later point.
Thank you.

@lehins
Copy link
Collaborator

lehins commented Sep 27, 2023

Closing as duplicate of #3764

@lehins lehins closed this Sep 27, 2023
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.

2 participants