Skip to content

1.67.0.0

Latest

Choose a tag to compare

@zliu41 zliu41 released this 07 Aug 16:12
48e9bf0

plutus-core

Removed

  • LowerInitialCharacter is no longer exported from PlutusCore.Evaluation.Machine.ExBudget; it existed solely to support deriving-aeson, which plutus-core no longer depends on.

Added

  • New builtin multiIndexArray (CIP-0156) of type forall a. array a -> list integer -> list a, returning the array elements at the given indices in order (duplicates preserved) and failing the whole call on any out-of-bounds index. Placeholder costing; gated under futurePV, so it is not available in any released protocol version.

  • The policies builtin (CIP-0168): returns the currency symbols of a Value in ascending order. Expected to be enabled at PV12.

  • A PIR optimization pass, CollapseCase, that rewrites list casing into dropList.

Changed

  • Replaced the deriving-aeson-based JSON instances of the cost model types with plain aeson generic instances. The JSON format is unchanged.

plutus-ledger-api

Added

  • Shell completion (bash/zsh/fish) and worked Examples sections in --help
    for the uplc, plc and pir executables, via completion metadata in the
    shared plutus-execlib option parsers and a new PlutusCore.Executable.Help
    module.

  • unsafeLovelaceValueOf in PlutusLedgerApi.V1.Value and PlutusLedgerApi.V1.Data.Value: assumes the first amount of the first currency represents lovelace without verifying this, which makes it much faster than lovelaceValueOf. It is sound only when this is true.

  • PlutusLedgerApi.V2, PlutusLedgerApi.V3, and PlutusLedgerApi.Data.V1/V2/V3 re-export the full Value API that PlutusLedgerApi.V1 already exposed (read accessors, AssetClass, helpers), and all of these umbrellas (including V1) now also expose geq, gt, leq, lt, and withCurrencySymbol. Reading or comparing a Value from these modules no longer requires importing PlutusLedgerApi.V1.Value or PlutusLedgerApi.V1.Data.Value.

  • Add first draft Plutus V4 script context types.

  • The uplc and plc executables now deduce the input and output format from
    the file extension when --if/--of is not supplied: .uplc/.plc/.pir
    → textual, .flat → flat, and (for uplc only) .hex → hex and .cbor
    serialised. An explicit --if/--of always overrides the deduced format, and
    reading from stdin, writing to stdout, or an unrecognised extension still
    falls back to textual.

  • The apply command now deduces the format of each input file independently
    from its own extension, so a script and arguments in different formats can be
    applied together (for example a textual script applied to flat-encoded
    arguments). An explicit --if still forces a single format for every file.

Changed

  • When an output file is given with -o but no --of, the output format is now
    deduced from the file's extension instead of always defaulting to textual. A
    command that relied on the old default (for example uplc convert -i p.uplc -o p.flat with no --of) will now write the format implied by the extension;
    pass --of textual explicitly to restore the previous behaviour.

Fixed

  • The plc executable no longer advertises the serialised, hex and
    blueprint formats, which it never supported: --if/--of now accept only
    textual and the flat variants, and unsupported values are rejected when
    the command line is parsed rather than a failure occurring at runtime.

plutus-tx

Added

  • PlutusTx.Builtins.multiIndexArray: the multiIndexArray builtin from
    CIP-0156, returning the array elements at the given
    indices and failing on any out-of-bounds index.

  • PlutusTx.Builtins.policies, exposing the policies builtin (CIP-0168). Expected to be enabled at PV12.

Changed

  • Improve asData codegen to use list casing instead of head and tail.

Fixed

  • Evaluating the Haskell definition of PlutusTx.Builtins.indexArray with an index exceeding
    maxBound :: Int now fails, matching the builtin, instead of silently indexing with the
    wrapped value.

  • The Haskell definitions of indexByteString, sliceByteString, readBit, replicateByte
    and caseInteger likewise check their integer arguments in the Integer domain, matching
    the builtins, instead of silently wrapping values that exceed the machine-integer range.

  • The Haskell definition of consByteString now follows the PlutusV3 builtin semantics and
    fails on a byte outside [0..255]; the PlutusV1/V2 builtins reduce the byte modulo 256
    instead, which a single Haskell definition cannot also mirror.

  • The Haskell definitions of shiftByteString and rotateByteString now fail when the shift
    or rotation amount does not fit in a machine Int, matching the builtin semantics that the
    van Rossem HF activates (variants D and E); earlier variants accept any amount on-chain.

plutus-tx-plugin

Removed

  • Removed the BuiltinCasing option for Plinth compiler flag datatypes.
    Use the SumsOfProducts option (which is the default) to enable builtin casing.

Added

  • Compilation support for the multiIndexArray builtin
    (CIP-0156).

plutus-executables

No changes.

plutus-metatheory

Added

  • Postulated definitions for Value and its corresponding built-in functions

Fixed

  • Fixed a performance bug in the certifier regarding decidable equality.

Full Changelog: 1.66.0.0...1.67.0.0