plutus icon indicating copy to clipboard operation
plutus copied to clipboard

Propagate semantics variants into Plinth builtins

Open effectfully opened this issue 1 year ago • 2 comments

Plinth builtins don't know anything about semantics variants, meaning Plinth code evaluated as Haskell may give a different result compared to what it gives when evaluated as one of the ledger languages. And Plinth doesn't even have the latest semantics, for example this succeeds:

>>> :set -XOverloadedStrings
>>> import GHC.Real
>>> import Data.Word
>>> consByteString 121212 (BuiltinByteString "")
"|"

while according to the latest semantics variant it's supposed to fail with out of bounds error due to 121212 not fitting into Word8.

We should do one of the following:

  1. propagate semantics variants into Plinth builtins
  2. failing that, make Plinth builtins behave according to the latest semantics variant
  3. give up on evaluating Plinth builtins at all (which would be pretty annoying as evaluating Plinth builtins is useful for tests)

effectfully avatar Aug 09 '24 15:08 effectfully

You mean it is broken for Plinth-in-Haskell ?

bezirg avatar Aug 12 '24 08:08 bezirg

Yes.

effectfully avatar Aug 12 '24 15:08 effectfully

Closing as a duplicate of #5968.

effectfully avatar Oct 03 '24 22:10 effectfully