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

Mapping cooked behaviour to plutus behaviour regarding the translation from posix intervals to time slots. #95

Closed
mmontin opened this issue Apr 15, 2022 · 0 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@mmontin
Copy link
Collaborator

mmontin commented Apr 15, 2022

Cooked behaves differently than Plutus when going from an abstract interval to concrete time slots, leading to inconsistent closures for the boundaries of translated intervals.

The Plutus function in question can be found here:
https://playground.plutus.iohkdev.io/doc/haddock/plutus-contract/html/Plutus-Contract-Request.html#v:currentTime

While the Cooked function can be found here:
https://github.com/tweag/plutus-libs/blob/04f8e7051ef41f3a3860bacd178704273b6aa29b/cooked-validators/src/Cooked/MockChain/Monad/Direct.hs#L226

In practice, Plutus uses the latest time of the current slot, while Cooked uses the earliest, leading to inconsistencies.

@mmontin mmontin added the invalid This doesn't seem right label Apr 15, 2022
GuillaumeGen added a commit that referenced this issue Apr 15, 2022
VictorCMiraldo pushed a commit that referenced this issue Apr 16, 2022
GuillaumeGen added a commit that referenced this issue Apr 29, 2022
GuillaumeGen added a commit that referenced this issue May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants