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

builtinsAvailableIn doesn't account for backports #5832

Closed
effectfully opened this issue Mar 13, 2024 · 1 comment
Closed

builtinsAvailableIn doesn't account for backports #5832

effectfully opened this issue Mar 13, 2024 · 1 comment

Comments

@effectfully
Copy link
Contributor

We claim that it's possible to extend ParamName data types with new costing parameters without issuing a new language version, however builtinsAvailableIn doesn't account for that. It's defined as

builtinsAvailableIn :: PlutusLedgerLanguage -> MajorProtocolVersion -> Set.Set DefaultFun
builtinsAvailableIn thisLv thisPv = fold $ Map.elems $
    Map.takeWhileAntitone builtinAvailableIn builtinsIntroducedIn
    where
      builtinAvailableIn :: (PlutusLedgerLanguage, MajorProtocolVersion) -> Bool
      builtinAvailableIn (introducedInLv,introducedInPv) =
          -- both should be satisfied
          introducedInLv <= thisLv && introducedInPv <= thisPv

which may look fine on the surface, but note how it's takeWhileAntitone and not filter or something: we can have a situation when introducedInPv <= thisPv fails, because a builtin was introduced in a late protocol version, but there's still room for a few more language versions that introduce builtins in early protocol versions. This needs fixing.

@github-actions github-actions bot added the status: needs triage GH issues that requires triage label Mar 13, 2024
@effectfully effectfully removed the status: needs triage GH issues that requires triage label Mar 13, 2024
@effectfully
Copy link
Contributor Author

Fixed by #6056.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant