-
Notifications
You must be signed in to change notification settings - Fork 163
Refactor transValidityInterval: era split, remove protocol branching,… #5147
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
Conversation
… cleanup Alonzo/Conway logic - 2025-07-01 07:33:54
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your changes are all correct with respect to Alonzo and Babbage eras, but for Conway you are missing the new implementation of transValidityInterval
that did the new style translation. In other words, you can't use the implementation of transValidityInterval
from Alonzo in Conway, instead you need a new implementation of this function that has semantics of hardforkConwayTranslateUpperBoundForPlutusScripts
Other than that it looks good.
Hey @danbaruka did you still want to finish this task. It's ok if you don't, I can pass this on to finish to one of my teammates, but if you do wanna finish it yourself that is ok too, just let me know. There is no rush. |
Hey thanks for your feedback, I'll definitely work on that and fix it as soon as possible. I now understand. |
…; remove outdated Alonzo comment - 2025-07-21 08:18:42
Conway: Implement new transValidityInterval with open upper bound semantics; clean up Alonzo comment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still some issues. Also compilation warnings need to be addressed
…tion logic - 2025-07-22 12:06:56
All requested changes have been addressed:
Let me know if anything else needs to be updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, at the very least make sure your PR builds without any warnings and passes all the tests before asking for review.
pure $ PV1.Interval (PV1.lowerBound PV1.NegInf) (PV1.strictUpperBound t) | ||
| otherwise -> PV1.to <$> slotToTime i | ||
ValidityInterval (SJust i) (SJust j) | ||
| pvMajor pv >= natVersion @9 -> do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's up with this protocol version? The whole reason why this refactoring was suggested precisely to avoid branching on protocol version. Also this function is never gonna be applied to protocol version 9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well noted thank
…protocol version checks - 2025-07-23 13:53:00
Closing in favor of a correctly implemented #5230 |
… cleanup Alonzo/Conway logic - 2025-07-01 07:33:54
Refactor transValidityInterval to use era-specific logic: implement Conway-specific translation (no protocol branching, always strict upper bound), update Conway instances, and clean up Alonzo to always use pre-Conway logic. Remove protocol-version-based branching and obsolete helpers.