Skip to content

v8.0.0

Latest
Compare
Choose a tag to compare
@hanssv hanssv released this 18 Apr 07:18
ffdd4ec

Added

  • Bitwise operations for integers: band, bor, bxor, bnot, << and >>.
  • Int.mulmod - combined builtin operation for multiplication and modulus.
  • Crypto.poseidon - a ZK/SNARK-friendly hash function (over the BLS12-381 scalar field).
  • Address.to_bytes - convert an address to its binary representation (for hashing, etc.).
  • Raw data pointers added to AENS. In short we have introduced a new namespace
    AENSv2; they contain types similar to the old AENS; AENS.name and
    AENS.pointee, where the latter now has a constructor DataPt(bytes()). All
    AENS actions have been moved to AENSv2, and AENSv2.lookup and
    AENSv2.update consume and produce the new types. The old AENS namespace
    only contains the old datatypes, that can be used to interface existing
    contracts. Standard library AENSCompat is added to convert between old and
    new pointers.
  • Introduce arbitrary sized binary arrays (type bytes()); adding Bytes.split_any,
    Bytes.to_fixed_size, Bytes.to_any_size, Bytes.size, String.to_bytes,
    and Int.to_bytes; and adjust Bytes.concat to allow both fixed and arbitrary
    sized byte arrays.
  • Chain.network_id - a function to get hold of the Chain's network id.
  • Allowing Bytes.to_any_size in calldata creation, to enable creation of arguments
    with arbitray size.
  • Signature literals sg_... - they have type signature (which is an alias for bytes(64)).

Changed

  • Crypto.verify_sig is changed to have msg : bytes(). I.e. the
    signed data can be of any length (used to be limited to bytes(32)/hash).
  • System aliases are handled explicitly when converting to a Sophia value, this is only
    observable for signature where a value of type signature is now represented as a
    (new) signature literal.
  • Allow self-qualification, i.e. referencing X.foo when in namespace X.
  • Support for OTP-27 - no changes in behavior.

Removed

  • Bitwise.aes standard library is removed - the builtin operations are superior.

Full Changelog: v7.4.1...v8.0.0