IntersectMBO / IntersectMBO/plutus
Plutus Core specification: be careful about sizes of builtin arguments of integral types
- Dominant language
- Haskell
- Stars
- 1.6k
- Forks
- 508
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
The builtins machinery allows you to define a builtin which takes arguments of PLC type `integer` and have them automatically converted into values of fixed-width Haskell types like `Int` and so on which are supplied to the denotation when the builtin is called. There's a [range check](https://github.com/IntersectMBO/plutus/blob/0c024899c7aa4ec65802e181206c33f804700452/plutus-core/plutus-core/src/PlutusCore/Default/Universe.hs#L385) when the builtin is called which will cause an error if the argument doesn't fit in to the smaller type: this happens with the indices in `sliceByteString` for example. These range restrictions aren't mentioned in the specification, but they should be.
Contributor guide
Assessment
This issue has not been assessed yet.