Plutonomicon / plutarch-plutus

Typed eDSL for writing UPLC /ˈpluː.tɑːk/
MIT License
123 stars 63 forks source link

`PPOSIXTime` must be able to store negative value #704

Open SeungheonOh opened 1 month ago

SeungheonOh commented 1 month ago

PPOSIXTime should be able to store negative integer to store time before 1/1/1970. Currently, instances of PPOSIXTime forbids its value going negative

L-as commented 1 month ago

Why do you need this?

SeungheonOh commented 1 month ago

I don't know @peter-mlabs asked.

Forbidding negative number for PPOSIXTime was over constraint to why not

kozross commented 1 month ago

Are we sure negative times are allowed onchain as such?

SeungheonOh commented 1 month ago

Yeah, it seems to work as expected. There's not special invariant on PlutusLedgerApi

L-as commented 1 month ago

It's almost always invalid on-chain.

Nevertheless, I don't think there's any good reason to maintain this invariant in Plutarch.