HasBlueprintDefinition
andHasSchemaDefinition
instances for data types.
-
A first version of a data-backed
ScriptContext
. The ledger API is similar to the regularScriptContext
; one should import theData
versions of modules instead to use this version. For example,import PlutusLedgerApi.V2.Data.Contexts
instead ofimport PlutusLedgerApi.V2.Contexts
, orimport PlutusLedgerApi.Data.V1
instead ofimport PlutusLedgerApi.V1
. -
Guarded the draft 'modularExponentation' builtin behind a future protocol version.
-
Builtin function
ripemd_160
implementing RIPEMD-160 hashing.
-
Added a new
Value
type backed byData
. This is currently experimental and not yet used in the ledger API. -
Exported the following from
PlutusLedgerApi.Common
in #6178:ExCPU (..)
ExMemory (..)
SatInt (unSatInt)
fromSatInt
- `toOpaque,
fromOpaque
BuiltinData (..)
ToData (..)
FromData (..)
UnsafeFromData (..)
toData
fromData
unsafeFromData
dataToBuiltinData
builtinDataToData
- Fixed the
Pretty
instance forScriptContext
to display the redemeer as well.
- A new cost model for PlutusV3.
-
The
ScriptContext
type for Plutus V3 is modified to contain an optional datum for spending scripts, in thescriptContextScriptInfo
field. The redeemer is now also part ofScriptContext
. As a result, all Plutus V3 scripts, regardless of the purpose, take a single argument:ScriptContext
. -
Datum is now optional for Plutus V3 spending scripts.
-
We now have configurable cost models which allow different costs for different Plutus language versions and protocol versions.
-
The
mkEvaluationContext
functions inplutus-ledger-api
(which provide version-dependent on-chain configuration of the Plutus Core evaluator) now select appropriate cost models as well. -
evaluateScriptRestricting
andevaluateScriptCounting
now require Plutus V3 scripts to returnBuiltinUnit
, otherwise the evaluation is considered to have failed, and aInvalidReturnValue
error is thrown. There is no such requirement on Plutus V1 and V2 scripts.
Codec.CBOR.Extras
module is migrated from here toplutus-core
.
mkEvaluationContext
now takes[Int64]
(instead of[Integer]
).
EvaluationContext
now contains:
PlutusLedgerLanguage
-- a ledger languageMajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun
-- a function returning a semantics variant for every protocol version[(BuiltinSemanticsVariant DefaultFun, DefaultMachineParameters)]
-- a cache of machine parameters for each semantics variant supported by the ledger language
Similarly, mkDynEvaluationContext
now takes additional arguments:
PlutusLedgerLanguage
-- same as above[BuiltinSemanticsVariant DefaultFun]
-- a list of semantics variants supported by the ledger languageMajorProtocolVersion -> BuiltinSemanticsVariant DefaultFun
-- same as above
All this allows us to improve the accuracy of costing in future protocol versions without introducing new ledger languages.
-
PlutusV3 cost model parameter names updated for
ByteStringToInteger
andIntegerToByteString
. -
PlutusLedgerApi.V1.Value.currencySymbolValueOf
, which calculates the total amount for the givenCurrencySymbol
.
- Changed the
TxId
'sBuiltingData
representation: removed a newtype constructor wrapping the underlyingBuiltinByteString
.
-
More fields in the V3 script context use
Lovelace
-
Removed
GovernanceActionId
from theVoting
script purpose. It is not needed because the script for a given voter will be run only once for all votes. -
Updated the
Certifying
andProposing
script purposes, whose arguments now consist of both an integer index and the actual argument (TxCert
andProposalProcedure
). -
Updated the
NewCommittee
variant ofGovernanceAction
toUpdateCommittee
.
-
Added functions for converting between
Lovelace
andValue
:lovelaceValue
andlovelaceValueOf
. -
Added some helper functions for Plutus V3 ScriptContext.
-
Improved the efficiency of
PlutusLedgerApi.V1.Value.leq
andPlutusLedgerApi.V1.Value.geq
. -
Use
Lovelace
instead ofValue
intxInfoFee
,txInfoCurrentTreasuryAmount
andtxInfoTreasuryDonation
for Plutus V3. -
Added constitution script hash to
ParameterChange
andTreasuryWithdrawals
in theScriptContext
of Plutus V3.
- Added two constructors,
TxCertPoolRegister
andTxCertPoolRetire
, toPlutusLedgerApi.V3.Contexts.TxCert
.
- Exposed
unSatInt
andfromSatInt
fromplutus-ledger-api
. AddedNFData
andNoThunks
forCostModelApplyError
.
- Optimized equality checking of
Value
s in #5593
- Added a new data type
PlutusLedgerApi.Common.SerialisedScript.ScriptForEvaluation
, containing a serialised script and a deserialised script.
-
Renamed
PlutusLedgerApi.Common.SerialisedScript.ScriptForExecution
toPlutusLedgerApi.Common.SerialisedScript.ScriptNamedDeBruijn
. -
Added a function
PlutusLedgerApi.Common.SerialisedScript.deserialiseScript
, which converts aSerialisedScript
into aScriptForEvaluation
. -
Removed
PlutusLedgerApi.Common.SerialisedScript.fromSerialisedScript
andPlutusLedgerApi.Common.SerialisedScript.assertScriptWellFormed
. -
Changed
PlutusLedgerApi.Common.ProtocolVersions.ProtocolVersion
toPlutusLedgerApi.Common.ProtocolVersions.MajorProtocolVersion
. The ledger can only provide the major component of the protocol version (not the minor component), and Plutus should only care about the major component anyway.
evalCtxForTesting
in testlib: use insteadV*.mkEvaluationContext
withV*.costModelParamsForTesting
-
Exported
ChangedParameters
in V3. -
costModelParamsForTesting for all plutus versions (PlutusV1,PlutusV2,PlutusV3)
-
A
readParamName
method counterpart of the existingshowParamName
showParamName
method now operates on Text instead of previous String
- costModelParamsForTesting are now returned in the expected ledger order, instead of alphabetical order
ScriptContext
type for PlutusV3.
-
A CBOR script deserialization error now contains more descriptive (typed) errors, see
DeserialiseFailureInfo
. -
Updated
PlutusLedgerApi.V3.Contexts.ScriptContext
:- The
Proposing
ScriptPurpose
now takes anInteger
argument. - The
ParameterChange
GovernanceAction
now takes aChangedParameters
argument. GovernanceActionId
is made optional inGovernanceAction
.Anchor
is removed fromScriptContext
.
- The
- cost model parameters for
keccak_256
builtin - cost model parameters for
blake2b_224
builtin
- New entries for the BLS12-381 types and builtins
- The new built-in functions have been added to futurePV and the tests modified to deal with the additions.
- GHC 9.6 support
- PlutusV3 is now allowed in protocol version 9.
- Plutus Core version 1.1.0 is now allwed in protocol version 9.
deserialiseUPLC
renamed touncheckedDeserialiseUPLC
since it doesn't do the checks for allowable builtins. This is dangerous in the ledger setting where this check is mandatory, so it needs a scarier name.
- Support for multiple Plutus Core language versions.
- The naming around "Plutus langauge versions" changed to talk about "Plutus ledger languages" following CIP-35.
- Fixed numerous bugs in the behaviour of
Interval
s with open endpoints.
- Exported
mkTermToEvaluate
fromPlutusLedgerApi/Common.hs