Releases: IntersectMBO/plutus
Release 1.51.0.0
What's Changed
- Include changelog.d fragment files in git add in release script by @zeme-wana in #7228
- Add arrays to metatheory by @ramsay-t in #7127
- More tests, conformance test cases for builtin integer, bool, list casing by @SeungheonOh in #7218
- Add cardano open oracle protocol scripts for
plutus-benchmark
by @SeungheonOh in #7156 - Enable SoPs and all builtins in PlutusV1/V2 at PV11. by @kwxm in #7223
- Release 1.50.0.0 by @Unisay in #7227
- Bump on-headers to 1.1.0 in doc/docusaurus/package.json by @zeme-wana in #7234
- Bump plutus versions to 1.50 in plutus-benchmark.cabal by @zeme-wana in #7237
- Allow 'turtle' package to use a new version of 'optparse-applicative' by @zeme-wana in #7236
- Get nofib-exe to print out names with uniques by @kwxm in #7226
- Invert some error messages in plutus-ledger-api tests by @kwxm in #7240
- Update Values.md by @kwxm in #7244
- Renumber multisig-sm validation scripts by @kwxm in #7245
- Change case order for two branch builtin list casing by @SeungheonOh in #7247
- Release 1.51.0.0 by @ana-pantilie in #7250
Full Changelog: 1.50.0.0...1.51.0.0
1.50.0.0
plutus-core
Removed
- Removed the
caseList
andcaseData
builtins in preparation for adding directCase
ing on lists andData
.
Added
-
In #7029 added support for
Case
ing on booleans and integers. For example,case True a b
now evaluates tob
. -
Added a new UPLC optimisation which removes
force
when applied to case expressions where each branch contains adelay
at the top, or if the delay is under any number of lambda abstractions. -
Added a new emitter mode
logWithCallTraceEmitter
which uses trace messages generated byPlutusTx.Plugin:profile-all
flag of plutus-tx-plugin to create call trace of the functions that led to the evaluation failure. If script passes or script is not compiled withprofile-all
flag,logWithCallTraceEmitter
will behave as regularlogEmitter
. -
Added support for
Case
ing on builtin lists. WhenCase
ing a builtin list, exactly one or two branches are allowed: with a single branch, Case assumes the list is non-empty and applies the head element and the tail to that branch; with two branches, the first branch is selected if the list is empty (and takes no arguments), and the second branch is chosen if the list is non-empty, receiving the head element and the tail as its arguments. Note, the single branch WILL FAIL the script evaluation if empty list is given.
Changed
-
Drop
hex-text
package in favor ofbase16-bytestring
. -
Disable Plutus executable build for wasm
plutus-ledger-api
Added
PlutusLedgerApi.Envelope
module with two functions:compiledCodeEnvelope
: creates a JSON envelope forCompiledCode
with a description.writeCodeEnvelope
: writes a JSON envelope forCompiledCode
to a file.
plutus-tx
Added
- Module 'PlutusTx.Test.Util.Compiled' of the 'plutus-tx-testlib' package got a new function 'countFlatBytes' that counts the size of a 'CompiledCode' in Flat bytes.
plutus-tx-plugin
No changes.
plutus-executables
No changes.
plutus-metatheory
Fixed
Full Changelog: 1.49.0.0...1.50.0.0
1.49.0.0
plutus-core
Added
-
In #7029 added support for
Case
ing on booleans and integers. For example,case True a b
now evaluates tob
. -
Added a new UPLC optimisation which removes
force
when applied to case expressions where each branch contains adelay
at the top, or if the delay is under any number of lambda abstractions.
Changed
- Drop
hex-text
package in favor ofbase16-bytestring
.
plutus-ledger-api
No changes.
plutus-tx
Added
- Module 'PlutusTx.Test.Util.Compiled' of the 'plutus-tx-testlib' package got a new function 'countFlatBytes' that counts the size of a 'CompiledCode' in Flat bytes.
plutus-tx-plugin
No changes.
plutus-executables
No changes.
plutus-metatheory
No changes.
Full Changelog: 1.48.0.0...1.49.0.0
1.48.0.0
plutus-core
No changes.
plutus-ledger-api
No changes.
plutus-tx
No changes.
plutus-tx-plugin
No changes.
plutus-executables
No changes.
plutus-metatheory
No changes.
Full Changelog: 1.47.0.0...1.48.0.0
1.47.0.0
plutus-core
Changed
-
In #7106 improved error reporting in the evaluators.
-
StructuralEvaluationError
andOperationalEvaluationError
were renamed toStructuralError
andOperationalError
respectively. -
_MachineError
was made obsolete in favor of_StructuralError
. -
The tags for the flat encodings of the as-yet-unreleased
dropList
,
lengthOfArray
,listToArray
,indexArray
,caseList
andcaseData
built-in functions have been changed pending the possible removal of
caseList
andcaseData
.
plutus-ledger-api
No changes.
plutus-tx
Added
-
PlutusTx.Test.Run.Code
module was added to theplutus-tx:testlib
package.
This module provides a way to run compiled Plutus code in a test environment,
allowing for easier testing and debugging of Plutus scripts. See more details in the User Guide. -
Added over 30 new functions to
PlutusTx.BuiltinList
-
Added new errors codes:
PT23
->PlutusTx.BuiltinList.head: empty list
PT24
->PlutusTx.BuiltinList.tail: empty list
PT25
->PlutusTx.BuiltinList.last: empty list
-
Added TH help
PlutusTx.IsData.TH.makeIsDataAsList
which generatesToData
,FromData
,UnsafeFromData
instances with internal representation beingData.List
instead ofData.Constr
for given product datatype(only having a single constructor). -
Added
PlutusTx.Test.Util.compiledCodeToHask
andPlutusTx.Test.Util.compiledCodeToHaskUnsafe
for applying parameters toCompiledCodeIn uni fun
tersely. -
Added
PlutusTx.Test.Golden.goldenCodeGen
for generating golden of the generated code from Template Haskell. -
Added
assertResult
for asserting givenCompiledCode Bool
evaluatesTrue
.
Changed
BuiltinList
lookup is made cheaper by using theDropList
builtin function.
plutus-tx-plugin
Added
-
Integrated the compiler certifier into the plugin. This feature can be accessed using the
certify
plugin option. Note that this is currently very experimental, and is released now mainly for testing purposes. -
Added support for
integerEq
into the plugin, enabling use of(==) @Integer
and pattern matching onInteger
type values.
plutus-executables
No changes.
plutus-metatheory
No changes.
Full Changelog: 1.46.0.0...1.47.0.0
1.46.0.0
plutus-core
Removed
- GHC 8.10 is no longer supported. The supported GHC versions are 9.6 (primary), 9.8, and 9.10.
Added
- In #7042 implemented force-delay cancellation when delays appear under ifThenElse
Changed
-
When logs preservation is disabled compiler will inline even "impure" terms
that are determined to be eventually evaluated anyway. -
Enhanced PIR's StrictifyBindings pass with strictness analysis, allowing
many more non-strict bindings to be strictified, thereby reducing overhead.
plutus-ledger-api
Removed
- GHC 8.10 is no longer supported. The supported GHC versions are 9.6 (primary), 9.8, and 9.10.
plutus-tx
Removed
- GHC 8.10 is no longer supported. The supported GHC versions are 9.6 (primary), 9.8, and 9.10.
plutus-tx-plugin
Removed
- GHC 8.10 is no longer supported. The supported GHC versions are 9.6 (primary), 9.8, and 9.10;
plutus-tx-plugin
is only supported on GHC 9.6.
Fixed
- In some cases HEX-encoded string literals were not handled correctly,
causing the "Use of fromString @ PlutusTx.Builtins.HasOpaque.BuiltinByteStringHex with inscrutable content" error.
plutus-executables
No changes.
Full Changelog: 1.45.0.0...1.46.0.0
1.45.0.0
plutus-core
Changed
- Builtin functions are pure when partially applied. Fully applied builtins are impure, as well as incorrectly applied ones (e.g. term argument applied instead of a type argument).
plutus-ledger-api
No changes.
plutus-tx
Added
- Module
PlutusTx.BuiltinList
, containing functions for operating onBuiltinList
.
Changed
PlutusTx.List.indexBuiltinList
is replaced byPlutusTx.BuiltinList.!!
.
plutus-tx-plugin
No changes.
plutus-executables
No changes.
Full Changelog: 1.44.0.0...1.45.0.0
1.44.0.0
plutus-core
Fixed
- Fixed a bug in PIR's callsite inliner that caused it to skip valid inlining in certain cases.
plutus-ledger-api
No changes.
plutus-tx
Removed
- Removed
Data.AssocMap.toDataList
because it suffers from the bug described in #6085.
Added
-
PlutusTx.Data.List.destructList
, which takes a list along with a list of
desired indices, and generates variables bound to the elements at those indices. -
PlutusTx.Data.List.caseList
andcaseList'
, for matching onList
s.
Changed
-
PlutusTx.Lift.liftCode
and related functions now apply the default PIR and UPLC
optimizations during code lifting. To disable these optimizations, useliftCodeUnopt
and related functions. -
PlutusTx.Prelude
no longer re-exportsPlutusTx.List
. There are now two separate
list modules:PlutusTx.List
andPlutusTx.Data.List
. Pick the one that fits your
use case and import it explicitly. -
PlutusTx.Prelude
no longer re-exportsPlutusTx.Foldable
orPlutusTx.Traversable
.
These typeclasses are generally discouraged due to their performance overhead.
For example, instead of usingPlutusTx.Foldable.foldMap
, consider rewriting
your code usingPlutusTx.List.foldr
. -
PlutusTx.Prelude
now re-exportsBuiltinBool
,BuiltinList
,BuiltinPair
,
ToData
,FromData
andUnsafeFromData
.
plutus-tx-plugin
Added
- Plinth compiler flag
inline-callsite-growth
, for setting the inlining threshold
for callsites. 0 disables inlining a binding at a callsite if it increases the AST size;
n
allows inlining if the AST size grows by no more thann
. Keep in mind that
doing so does not mean the final program will be bigger, since inlining can often
unlock further optimizations.
plutus-executables
No changes.
Full Changelog: 1.43.0.0...1.44.0.0
1.43.0.0
plutus-core
No changes.
plutus-ledger-api
Added
- Added a Data-backed version of
MintValue
for Plutus V3.
Changed
- The Data-backed V3
ScriptContext
is updated to now use the Data-backedMintValue
, similar to how the SOPScriptContext
uses the SOPMintValue
.
plutus-tx
Added
-
Added more standard library functions to
Data.List
. -
Added new conversion functions from Data-backed
Map
and Data-backedList
. -
New
Data.AssocMap
library functions:filter
,mapWithKey
,mapMaybe
andmapMaybeWithKey
.
Changed
-
The conversion functions between
Data.AssocMap.Map
and different kinds of lists are now named according to which type of list they support. -
Slightly improved the performance of some of the existing
Data.AssocMap
functions.
plutus-tx-plugin
No changes.
plutus-executables
No changes.
Full Changelog: 1.42.0.0...1.43.0.0
1.42.0.0
plutus-core
Added
-
Switch from
cryptonite
library tocrypton
(a drop in replacement). -
DropList builtin functionality
-
Costing model for the DropList builtin
-
A new type
BuiltinArray
. -
Three functions for working with
BuiltinArray
values:listToArray
(converts a list to aBuiltinArray
)indexArray
(returns an element of aBuiltinArray
by index)lengthOfArray
(returns the length of aBuiltinArray
)
Fixed
- Fixed a bug in Plutus IR's dead code elimination pass that could incorrectly remove
live data constructors or destructors.
plutus-ledger-api
Changed
- Remove un-needed dervied Typeable instances.
plutus-tx
Added
-
PlutusTx.Function.fix
, Plinth's equivalent ofData.Function.fix
. -
Module
PlutusTx.Optimize.SpaceTime
, containing utilities for space-time tradeoff,
such as recursion unrolling. -
Added
PlutusTx.Data.List.null
. -
Added
PlutusTx.Optimize.Inline.inline
. This works likeGHC.Magic.inline
, and can be used
in the form ofinline f
orinline (f args)
. -
Added more functions to PlutusTx.Data.List.
Changed
-
Remove un-needed dervied Typeable instances.
-
Allow
PlutusTx.Optimize.Inline.inline
to inline local bindings. -
Removes the constructor id check from the code
AsData
generates for product types, resulting in better performance.
plutus-tx-plugin
Changed
-
Changed the default value of compiler flag
PlutusTx.Plugin:preserve-logging
to true. -
The Plinth compiler now inlines fixed point operators by default. This can be turned
off by usingno-inline-fix
orconservative-optimisation
. -
The Plinth inliner now inlines local bindings (in addition to top-level bindings)
withINLINE
pragmas. -
AsData
now avoids creating strict dead bindings (which were previously created for
unused fields).
plutus-executables
No changes.
Full Changelog: 1.40.0.0...1.42.0.0