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 script purpose #3960

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Plutus script purpose #3960

merged 3 commits into from
Jan 16, 2024

Conversation

lehins
Copy link
Contributor

@lehins lehins commented Dec 30, 2023

Description

Fixes #3663
Fixes #3533

Introduce PlutusPurpose:

ScriptPurpuse and RdmrPtr are very much related concepts. This commit
replaces them with a single type family that is parametric on the era
and on the type that does the selection whether it is a plutus script
purpose or it is a redeemer pointer. Those types are called AsItem and
AsIndex respectively.

Besides making plutus script purpose parametric this commit also
introduces new purposes for Conway: Voting and Proposing

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 force-pushed the lehins/plutus-script-purpose branch 6 times, most recently from 09067e7 to ffbc90d Compare January 12, 2024 09:18
@lehins lehins marked this pull request as ready for review January 12, 2024 09:24
@lehins lehins force-pushed the lehins/plutus-script-purpose branch from ffbc90d to 846e660 Compare January 12, 2024 10:37
@lehins lehins mentioned this pull request Jan 12, 2024
9 tasks
@lehins lehins force-pushed the lehins/plutus-script-purpose branch 3 times, most recently from f7aeba6 to 5c909cf Compare January 16, 2024 12:01
@lehins lehins force-pushed the lehins/plutus-script-purpose branch from 5c909cf to 6d97b11 Compare January 16, 2024 12:47
@lehins lehins mentioned this pull request Jan 16, 2024
9 tasks
@lehins lehins force-pushed the lehins/plutus-script-purpose branch from 6d97b11 to 5fccd5a Compare January 16, 2024 15:08
Copy link
Contributor

@Soupstraw Soupstraw left a comment

Choose a reason for hiding this comment

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

LGTM

ScriptPurpuse and RdmrPtr are very much related concepts. This commit
replaces them with a single type family that is parametric on the era
and on the type that does the selection whether it is a plutus script
purpose or it is a redeemer pointer. Those types are called `AsItem` and
`AsIndex` respectively.

Besides making plutus script purpose parametric this commit also
introduces new purposes for Conway: `Voting` and `Proposing`
@lehins lehins force-pushed the lehins/plutus-script-purpose branch from 5fccd5a to d223ee4 Compare January 16, 2024 16:07
@lehins lehins enabled auto-merge January 16, 2024 16:49
@lehins lehins merged commit 518a2d5 into master Jan 16, 2024
11 of 14 checks passed
lehins added a commit that referenced this pull request Mar 2, 2024
Unfortunately we can't fix this problem for Babbage era, because that
would break the node-to-client protocol. So, we need to wait until we
are in Conway to fix this serialization issue with `PlutusPurpose`. With
respect to fixing this problem for Conway, this is already done. It has
been fixed with introduction of `ConwayPlutusPurpose` type in #3960
lehins added a commit that referenced this pull request Mar 2, 2024
Unfortunately we can't fix this problem for Babbage era, because that
would break the node-to-client protocol. So, we need to wait until we
are in Conway to fix this serialization issue with `PlutusPurpose`. With
respect to fixing this problem for Conway, this is already done. It has
been fixed with introduction of `ConwayPlutusPurpose` type in #3960
lehins added a commit that referenced this pull request Mar 4, 2024
Unfortunately we can't fix this problem for Babbage era, because that
would break the node-to-client protocol. So, we need to wait until we
are in Conway to fix this serialization issue with `PlutusPurpose`. With
respect to fixing this problem for Conway, this is already done. It has
been fixed with introduction of `ConwayPlutusPurpose` type in #3960
lehins added a commit that referenced this pull request Mar 4, 2024
Unfortunately we can't fix this problem for Babbage era, because that
would break the node-to-client protocol. So, we need to wait until we
are in Conway to fix this serialization issue with `PlutusPurpose`. With
respect to fixing this problem for Conway, this is already done. It has
been fixed with introduction of `ConwayPlutusPurpose` type in #3960
@neilmayhew neilmayhew deleted the lehins/plutus-script-purpose branch March 8, 2024 21:07
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.

Implement redeemer pointers for new scripts Add ScriptPurpose to Conway
3 participants