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

Plutus modules restructure #3848

Merged
merged 12 commits into from
Nov 7, 2023
Merged

Plutus modules restructure #3848

merged 12 commits into from
Nov 7, 2023

Conversation

lehins
Copy link
Contributor

@lehins lehins commented Nov 4, 2023

Description

This PR is the first stage in untangling Plutus mess. Initial step for #3849

There are no semantic changes in this PR. It only organizes the location of the code. All of the Plutus specific functionality that is era agnostic has been moved into core and organized logically into separate modules. All of git history is preserved, despite what the github diff portrays, which is important that the commits are not squashed together, because history will be lost if that happens.

Here is the re-organization:

  • Move Cardano.Ledger.Language to Cardano.Ledger.Plutus.Language
  • Move Cardano.Ledger.Alonzo.Scripts.Data to Cardano.Ledger.Plutus.Data
  • Extract ExUnits and Prices functionality from Cardano.Ledger.Alonzo.Scripts into Cardano.Ledger.Plutus.ExUnits module.
  • Extract CostModel and CostModels functionality from Cardano.Ledger.Alonzo.Scripts into Cardano.Ledger.Plutus.CostModels module.
  • Move script evaluation functionality from Cardano.Ledger.Alonzo.TxInfo into Cardano.Ledger.Plutus.Evaluate
  • Move era independent plutux context translation functionality from Cardano.Ledger.Alonzo.TxInfo into Cardano.Ledger.Plutus.TxInfo

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

@lehins lehins changed the title Plutus moduleS restructure Plutus modules restructure Nov 4, 2023
@lehins lehins force-pushed the lehins/plutus-module-restructure branch 2 times, most recently from c0c8411 to 40c5cec Compare November 4, 2023 12:20
@lehins lehins added this to In progress in Conway via automation Nov 6, 2023
@lehins lehins added the conway label Nov 6, 2023
@lehins lehins moved this from In progress to In review in Conway Nov 6, 2023
@lehins lehins force-pushed the lehins/plutus-module-restructure branch from 995ac9a to afa512f Compare November 6, 2023 15:33
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Just a few questions about version adjustments.
Awesome git discipline 🤩
Looks good to me.

@lehins lehins force-pushed the lehins/plutus-module-restructure branch from afa512f to ec96724 Compare November 7, 2023 12:29
@lehins lehins enabled auto-merge November 7, 2023 13:43
@lehins lehins merged commit acf35f3 into master Nov 7, 2023
8 of 42 checks passed
@iohk-bors iohk-bors bot deleted the lehins/plutus-module-restructure branch November 7, 2023 14:26
@lehins lehins moved this from In review to Done in Conway Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Conway
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants