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

Add integerToByteString and byteStringToInteger to PlutusV2 at PV10 #6056

Merged
merged 1 commit into from
May 20, 2024

Conversation

zliu41
Copy link
Member

@zliu41 zliu41 commented May 17, 2024

This can be used by e2e testing to verify that adding new builtins to existing ledger languages actually works. Only adding these two for now to make the change minimal; more primitives can be added to V1 and V2 later.

Copy link
Contributor

@effectfully effectfully left a comment

Choose a reason for hiding this comment

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

LGTM, but scary!

Comment on lines +179 to +182
Map.filterWithKey (const . alreadyIntroduced) builtinsIntroducedIn
where
builtinAvailableIn :: (PlutusLedgerLanguage, MajorProtocolVersion) -> Bool
builtinAvailableIn (introducedInLv,introducedInPv) =
alreadyIntroduced :: (PlutusLedgerLanguage, MajorProtocolVersion) -> Bool
alreadyIntroduced (introducedInLv,introducedInPv) =
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for doing that.

@kwxm you were going to take a look at it, did you manage to do it in the end?

Copy link
Contributor

Choose a reason for hiding this comment

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

@kwxm you were going to take a look at it, did you manage to do it in the end?

A look at what?

Copy link
Contributor

Choose a reason for hiding this comment

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

At the idea of replacing takeWhileAntitone with filterWithKey here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can see how the highlighted diff and my comment were really confusing. Sorry!

Copy link
Contributor

Choose a reason for hiding this comment

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

At the idea of replacing takeWhileAntitone with filterWithKey here.

I have no memory of that at all!

Copy link
Contributor

Choose a reason for hiding this comment

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

See this thread.

Copy link
Contributor

Choose a reason for hiding this comment

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

TBH, this whole Versions module needs some rework.

@zliu41 zliu41 merged commit 1529ef8 into master May 20, 2024
7 checks passed
@zliu41 zliu41 deleted the zliu41/v2-new-prims branch May 20, 2024 15:59
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

4 participants