Skip to content

Generalise the Bounded module to support more datatypes such as Uint8, Int64, etc...

François Thiré requested to merge francois@bounded-generalisation into master

This MR reworks the Bounded module to support more int datatypes. The supported datatypes are:

  • int64
  • int32
  • int (int31)
  • int16
  • uint16
  • int8
  • uint8

Because of the interface compatibilities with previous environments, some hacks were introduced. In particular, because the underlying datatype t for module signature S is not change, those hacks are indeed retro-compatible. The main point for retro-compatibility is to check that the newly introduced module lib_protocol_environment/structs/v5_bounded.ml implements the NonNegativeInt32 module in a retro-compatible way. The current structure of the code is made so that we have to ensure that (even though it is not that important because only the SCORU code uses this datatype and it is still behind a feature flag except for test newtorks).

TODO:

  • Add some tests

Sounds hard to extend PBT tests in a generic way. Should we extend them?

Edited by François Thiré

Merge request reports