Repository navigation
plutus-core
Added
NFDatainstances for PIR programs, terms, bindings, datatypes, recursivity,
and strictness, for PLC variable and type-variable declarations, and forAnn,
Inline,Case,ProvenanceandDatatypeComponent.
Changed
-
Sped up evaluation (-5% for
validationand -7% fornofib) by adjusting GHC pragmas
in the CEK machine -
keepPoliciesanddropPoliciesfail 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 theValueis 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 -> bto:
contIndexOne :: forall a b. (Maybe a -> b) -> RAList a -> Word64 -> bThe 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
unionValuewas recalibrated to charge the same amount in both argument orders. -
UPLC
Caseand CEKFrameCasesnow store branches inData.Primitive.Array.Array
instead ofData.Vector.Vector. -
caseBuiltinandunCaserBuiltinnow takeArray#branches instead ofVector.
Fixed
- The
EvaluateBuiltinspasses in PIR and UPLC no longer evaluate builtin applications that have impure arguments.
plutus-ledger-api
No changes.
plutus-tx
Added
PlutusTx.Builtinsexports theBuiltinValuetype, so code using itsValuefunctions no longer has to import it fromPlutusTx.Builtins.Internal.
Changed
keepPoliciesanddropPoliciesfail 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 theValueis 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-timingsplugin 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
BuiltinArrayand 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 theValuebuiltin 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
Valuebuiltin type and the semantics of its builtin functions (insertCoin,lookupCoin,unionValue,valueContains,scaleValue,valueData,unValueData,policies,assetCount,keepPoliciesanddropPolicies), with proofs of their main properties. -
Added a formalization of the
Databuiltin type over the pure ByteString library, with decidable equality and the semantics of theDatabuiltin functions other thanserialiseData. -
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.Ordermodule. -
Made the bound proofs in
CIntegerirrelevant.
Fixed
writeBitsin 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