Skip to content

1.73.0.0

Latest

Choose a tag to compare

@Unisay Unisay released this 01 Dec 22:58
8891793

plutus-core

Added

  • NFData instances for PIR programs, terms, bindings, datatypes, recursivity,
    and strictness, for PLC variable and type-variable declarations, and for Ann,
    Inline, Case, Provenance and DatatypeComponent.

Changed

  • Sped up evaluation (-5% for validation and -7% for nofib) by adjusting GHC pragmas
    in the CEK machine

  • keepPolicies and dropPolicies fail on a list of more than 256 policy ids (policyFilterMaxIds), repeated ids and ids longer than 32 bytes included. Their limit of 8191 policies on the Value is removed.

  • UPLC optimizer: hoisting builtins is only done if the builtin may be called multiple times.

Data.RandomAccessList.SkewBinary.contIndexOne now takes a single continuation
instead of separate failure and success arguments. Its type changed from:

contIndexOne :: forall a b. b -> (a -> b) -> RAList a -> Word64 -> b

to:

contIndexOne :: forall a b. (Maybe a -> b) -> RAList a -> Word64 -> b

The continuation receives Nothing for an out-of-bounds index or Just x for a
successful lookup. Callers should construct their failure result in the Nothing
branch to avoid wasting allocations on successful lookups.

  • The default CPU cost of unionValue was recalibrated to charge the same amount in both argument orders.

  • UPLC Case and CEK FrameCases now store branches in Data.Primitive.Array.Array
    instead of Data.Vector.Vector.

  • caseBuiltin and unCaserBuiltin now take Array# branches instead of Vector.

Fixed

  • The EvaluateBuiltins passes in PIR and UPLC no longer evaluate builtin applications that have impure arguments.

plutus-ledger-api

No changes.

plutus-tx

Added

  • PlutusTx.Builtins exports the BuiltinValue type, so code using its Value functions no longer has to import it from PlutusTx.Builtins.Internal.

Changed

  • keepPolicies and dropPolicies fail on a list of more than 256 policy ids, repeated ids and ids longer than 32 bytes included, matching the builtins. Their limit of 8191 policies on the Value is removed.

plutus-tx-plugin

Added

  • Plinth compilation stages are now reported among GHC's own phases under
    -ddump-timings (or -v2), with CPU time and allocation per stage. The new
    force-timings plugin option fully evaluates each stage's result before its
    timer stops, so lazy work is charged to the stage that produced it.

plutus-executables

No changes.

plutus-metatheory

Added

  • Adds casing on data to the CEK implementation in the metatheory.

  • Implemented the semantics of BuiltinArray and its corresponding Batch 6 and Batch 7 builtins. Proved some properties about the functions.

  • Added a simple ByteString library, with a focus on the basic operations necessary for formalizing the semantics of Cardano-specific builtins. The library also contains proofs for the correctness of these operations. It is not intended to be efficient as the focus is on the ease of writing specifications and proofs.

  • Added formalizations of the "programmatic" (non-crypto, non-serialization) Cardano builtins in Agda, together with the relevant documentation extracted from the PDF spec.

  • Added Value∞, a mathematical model of values with no bounds on key lengths or quantities, as the foundation of the Value builtin type, with its operations and their properties: values are determined by their quantities, form a commutative group and a module over the integers, and are equivalent to their nested representation.

  • Added a formalization of the Value builtin type and the semantics of its builtin functions (insertCoin, lookupCoin, unionValue, valueContains, scaleValue, valueData, unValueData, policies, assetCount, keepPolicies and dropPolicies), with proofs of their main properties.

  • Added a formalization of the Data builtin type over the pure ByteString library, with decidable equality and the semantics of the Data builtin functions other than serialiseData.

  • Added Builtin.CByteString, which formalises Cardano ByteStrings: ByteStrings of at most 65536 bytes. Also added wrappers for the ByteString builtins that require their arguments to be within this bound.

Changed

  • Generalized the lexicographic order on ByteStrings and redefined it using the standard library, in the new Builtin.ByteString.Order module.

  • Made the bound proofs in CInteger irrelevant.

Fixed

  • writeBits in the Agda CEK machine now fails on inputs longer than 4096 bytes, as the Plutus Core evaluator does.

Full Changelog: 1.72.0.0...1.73.0.0