- Improve error reporting for
CostModel
json parsing
- Add
subStateL
toHasSubState
- Create a catch all
Inject a a
instance for the same type - Remove unnecessary instances:
Inject a ()
andInject Void a
- Add
integralToBounded
toBaseTypes
- Add
PlutusScriptContext
type family moved from Alonzo - Add
LegacyPlutusArgs
data - Add
PlutusArgs
data family toPlutusLanguage
and instances - Change signature of
evaluatePlutusRunnable
andevaluatePlutusRunnableBudget
to replace data list withPlutusArgs
- Rename test scripts:
alwaysSucceeds2
->alwaysSucceedsNoDatum
alwaysSucceeds3
->alwaysSucceedsWithDatum
alwaysFails2
->alwaysFailsNoDatum
alwaysFails3
->alwaysFailsWithDatum
guessTheNumber3
->redeemerSameAsDatum
evendata3
->evenDatum
evenRedeemer2
->evenRedeemerNoDatum
evenRedeemer3
->evenRedeemerWithDatum
- Remove test scripts:
odddata
,oddRedeemer
,oddRedeemer2
,sumsTo10
,guessTheNumber2
,redeemerIs102
- Change
computeDRepPulser
to also process proposal-deposits for SPOs. #4324- Add
sumAllStakeCompact
. - Add
UMap.umElemDelegations
to extract SPO, DRep and rewards for a given stake credential. - Add
pdTotalActiveStake
field toPoolDistr
, to hold the total active stake delegated to pools, including proposal deposits. - Add
individualTotalPoolStake
toIndividualPoolStake
to hold the delegated stake as an absolute number, including proposal deposits. - Add lenses:
individualTotalPoolStakeL
poolDistrTotalL
- Add
- Add lenses to
RewardAccount
. #4309rewardAccountCredentialL
rewardAccountNetworkL
- Add
umElemDRepDelegatedReward
toUMap
. #4273 - Add
fromDeltaCoin
- Add trivial
Inject
instances for()
andVoid
- Add
byteStringToNum
- Add functions
rdRewardCoin
,rdDepositCoin
in UMap.hs - Add function
mkCoinTxOut
in Core.hs - Add typeclass
HKDApplicative
and make instances for the following: #4252HKD Identity
HKD Maybe
HKD StrictMaybe
- Move
Metadatum
fromcardano-ledger-shelley
into a new moduleCardano.Ledger.Metadata
- Add
mkBasicTxAuxData
andmetadataTxAuxDataL
toEraTxAuxData
type class. - Add
Random
,Uniform
andUniformRange
instances forLanguage
- Add
decodeCostModelsLenient
anddecodeCostModelsFailing
- Make decoder for
CostModels
very lenient starting with protocol version9
. - Deprecate
decodeValidAndUnknownCostModels
- Disable deserialization of
CostModels
forPlutusV3
and newer whenever current protocol version is not set to at least version9
- Remove
CostModelError
andcostModelsErrors
- Stop re-exporting
CostModelApplyError
- Change
CostModel
parameter value type fromInteger
toInt64
. Affects type signatures of all functions that work on raw cost model parameter values. mkCostModelsLenient
was changed to work inMonadFail
, since failures during construction is now again possible.- Deprecate
decodeCostModelFailHard
in favor of newdecodeCostModel
.
- Export
subState
- Remove
FlexibleCostModels
and makeArbitrary
instance forCostModels
more flexible.
- Add
shouldSatisfyExpr
- Add
EraRuleEvent
,InjectRuleEvent
- Add
NFData
instance forObligations
,PlutusWithContext
,PlutusDatums
- Add
Eq
,Show
,Generic
instances forPlutusDatums
- Add
CommitteeAuthorization
and use it to represent hot key credential inCommitteeState
- Change
applySTSValidateSuchThat
andapplySTSNonStatic
to useNonEmpty (PredicateFailure _)
instead of[PredicateFailure _]
- Added
boom
placeholder - Add
EraRuleFailure
type family andInjectRuleFailure
type class - Add
VoidFailure
- Fix
ToJSON
/FromJSON
instances ofPrices
- Update
FromJSON
instance ofBoundedRatio
- Fix
ToJSON
instance ofBoundedRatio
to avoid precision loss - Add
pwcScriptHash
field toPlutusWithContext
- Parameterize
PlutusWithContext c
on crypto. - Extract
hashScript
outside ofEraScript
type class. - Add
plutusLanguageTag
andhashPlutusScript
- Add
setMinFeeTxUtxo
- Add
getMinFeeTxUtxo
toEraUTxO
- Change signature by adding
refScriptsSize
parameter for:getMinFeeTx
inEraTx
setMinFeeTx
estimateMinFeeTx
- Add
originalBytesSize
and default implementation toSafeToHash
typeclass - Rename
RewardAccount
fieldsgetRwdNetwork
andgetRwdCred
toraNetwork
andraCredential
respectively - Deprecate
ppRewardAcnt
in favor ofppRewardAccount
- Deprecate
fromCborRewardAcnt
in favor offromCborRewardAccount
- Deprecate
decodeRewardAcnt
in favor ofdecodeRewardAccount
- Deprecate
putRewardAcnt
in favor ofputRewardAccount
- Deprecate
deserialiseRewardAcnt
in favor ofdeserialiseRewardAccount
- Deprecate
serialiseRewardAcnt
in favor ofserialiseRewardAccount
- Deprecate
RewardAcnt
in favor ofRewardAccount
- Modify
Prices
andNonce
JSON instances to matchcardano-api
- Add
shouldContainExpr
- Add
EraRuleProof
,UnliftRules
,roundTripAllPredicateFailures
- Add
Test.Cardano.Ledger.Plutus.ScriptTestContext
- Add
genByronVKeyAddr
,genByronAddrFromVKey
- Add
Uniform
instances forByronKeyPair
andKeyPair
- Add
mkKeyPairWithSeed
andmkBootKeyPairWithSeed
- Remove
epsilonMaybeEq
fromUtils
- Add
PlutusArgs
,ScriptTestContext
- Add
txInAt
- Add
mkScriptAddr
- Deprecate
deserialiseRewardAcntOld
in favor ofdeserialiseRewardAccountOld
- Deprecate
mkVKeyRwdAcnt
in favor ofmkVKeyRewardAccount
- Add
Stateful
random interface:HasStatefulGen
,HasGenEnv
,HasSubState
,StatefulGen
,StateGen
,StateGenM
,uniformM
,uniformRM
,uniformListM
,uniformListRM
,uniformByteStringM
,uniformShortByteStringM
- Re-export the whole of
quickcheck-classes
fromImp.Common
- Re-export
replicateM_
andreplicateM
fromImp.Common
- Add
umElemsL
- Add
txIdTxBody
andtxIdTx
. Deprecatedtxid
. - Add
getGenesisKeyHashCountTxBody
toEraTxBody
- Add
calcMinFeeTx
andcalcMinFeeTxNativeScriptWits
,estimateMinFeeTx
,addDummyWitsTx
and movesetMinFeeTx
toCardano.Ledger.Tools
- Add
kindObject
- Add
ToJSON
instance forTxOutSource
andPoolCert
- Expose
txInToText
- Add
getWitsVKeyNeeded
toEraUTxO
- Changed the type of the lenses
ppMaxBBSizeL
,ppMaxTxSizeL
,ppMaxBHSizeL
,ppuMaxBBSizeL
,ppuMaxTxSizeL
andppuMaxBHSizeL
- Add
txInsFilter
- Fix
ToJSON
/FromJSON
forCostModels
. Make sure thatCostModels
can roundtrip through JSON. Also reportCostModels
failures in JSON. - Add
costModelParamsCount
- Move Plutus related
Arbitrary
instances:ExUnits
,CostModels
,FlexibleCostModels
,CostModel
,Prices
,Language
- Add
Cardano.Ledger.Plutus
that re-exports all plutus related functionality - Add
Semigroup
andMonoid
instances forCostModels
- Add
mkCostModels
and exposeflattenCostModels
- Stop exporting
CostModels
constructor in order to improve safety. - Fix
Eq
/Ord
and addEncCBOR
/DecCBOR
instances forCostModelError
- Re-export
Cardano.Ledger.Keys.Bootstrap
andCardano.Ledger.Keys.WitsVKey
fromCardano.Ledger.Keys
- Add
unData
,getCostModelEvaluationContext
- Changes to
Cardano.Ledger.Plutus.Evaluate
:- Make
PlutusWithContext
era agnostic, but Language aware.pwcScript
can be either in decoded or binary format.pwcProtocolVersion
was added too. debugPlutus
,runPlutusScript
,runPlutusScriptWithLogs
andexplainPlutusEvaluationError
no longer acceptProtVer
as argument, since major protocol version has been added toPlutusWithContext
- Change constructor of
ScriptFailure
fromPlutusSF
toScriptFailure
and add record names:scriptFailureMessage
andscriptFailurePlutus
- Remove
PlutusDebugLang
,PlutusDebug
,PlutusData
andPlutusError
- Stop re-exporting removed:
EraPlutusContext
,PlutusTxCert
,unTxCertV1
,unTxCertV2
andunTxCertV3
- Add
evaluatePlutusWithContext
- Remove
deserialiseAndEvaluateScript
in favor ofevaluatePlutusWithContext
- Make
- Changes to
Cardano.Ledger.Plutus.Language
:- Rename
BinaryPlutus
toPlutusBinary
for consistency with names of other Plutus types. - Add
Plutus
with helpers:decodeWithPlutus
,isValidPlutus
- Add
PlutusRunnable
with helpers:plutusFromRunnable
- Add
asSLanguage
- Add
plutusSLanguage
andplutusLanguage
- Deprecated
fromSLanguage
in favor of more generalplutusLanguage
- Rename
IsLanguage
class toPlutusLanguage
and add these functions to the class:decodePlutusRunnable
,evaluatePlutusRunnable
andevaluatePlutusRunnableBudget
- Rename
- Changes to
Cardano.Ledger.Plutus.TxInfo
:NFData
instance forTxOutSource
- Remove:
transDataHash'
,transHash
(usehashToBytes
instead),transTxOutAddr
,txInfoIn'
,getWitVKeyHash
,VersionedTxInfo
,EraPlutusContext
,PlutusTxCert
,unTxCertV1
,unTxCertV2
,unTxCertV3
andtxInfoId
(usetransTxId
instead) - Add
transCoinToValue
,transTxId
- Add
fromNativeScript
- Remove unused
mapMaybeValidation
andrunTestMaybe
- Remove
InjectMaybe
type class in favor of more generalInject
- Move
decodeAddrShort
anddecodeAddrShortEither
tocardano-ledger-api:Cardano.Ledger.Api.Tx.Address
- Remove deprecated
Cardano.Ledger.CompactAddress
andCardano.Ledger.UMapCompact
- Add the newtype
EpochInterval
- Change the type of
ppEMaxL
andppuEMaxL
- Moved
ToExpr
instances out of the main library and into the testlib.
- Add
integralToByteStringN
- Add
ByronKeyPair
- Add
Arbitrary
instances for Byron types:Address
,Attributes
andAddrAttributes
- Add
Test.Cardano.Ledger.Core.JSON
withroundTripJsonSpec
,roundTripJsonEraSpec
androundTripJsonProperty
- Add
zeroTestingCostModel
andzeroTestingCostModels
- Add
mkCostModelConst
- Add
diffExprCompact
- Add
expectLeftDeep_
,expectRightDeep_
- Two new modules
Test.Cardano.Ledger.Plutus
andTest.Cardano.Ledger.Plutus.Examples
- Add
certsTotalDepositsTxBody
andcertsTotalRefundsTxBody
- Add
getTotalDepositsTxBody
andgetTotalRefundsTxBody
toEraTxBody
. Corresponding functions have been removed fromShelleyEraTxBody
in favor of the two above - Add
getTotalDepositsTxCerts
andgetTotalRefundsTxCerts
toEraTxCert
- Deprecated
Cardano.Ledger.Ap
, since we no longer use this module - Moved
Cardano.Ledger.Language
toCardano.Ledger.Plutus.Language
with deprecation. - Move
ExUnits
andPrices
fromCardano.Ledger.Alonzo.Scripts
to newCardano.Ledger.Plutus.ExUnits
module. - Move
CostModels
fromCardano.Ledger.Alonzo.Scripts
to newCardano.Ledger.Plutus.CostModels
module. - Move
Cardano.Ledger.Alonzo.Scritps.Data
toCardano.Ledger.Plutus.Data
- Move some parts of
Cardano.Ledger.Alonzo.TxInfo
intoCardano.Ledger.Plutus.TxInfo
andCardano.Ledger.Plutus.Evaluate
- Expose
decodeValidAndUnknownCostModels
inCostModels
- Addition of
Test.Cardano.Ledger.Imp.Common
- Re-export
ToExpr
,showExpr
,diffExpr
,assertBool
andassertFailure
- Add
shouldBeExpr
,shouldBeRight
,shouldBeRightExpr
,shouldBeLeft
andshouldBeLeftExpr
- Add
expectRight
,expectRightDeep
,expectRightExpr
,expectRightDeepExpr
,expectLeft
,expectLeftExpr
,expectLeftDeep
andexpectLeftDeepExpr
- Add
ToJSON
/FromJSON
andToJSONKey
/FromJSONKey
instances forDRep
- Add
parseCredential
- Add
NoUpdate
,HKDNoUpdate
- Add
toNoUpdate
andfromNoUpdate
methods toHKDFunctor
- Add
Updatable
instance forNoUpdate
- Change functions to methods of
EraPParams
:ppProtocolVersionL
ppuProtocolVersionL
- Add
Generic
instance forAuxiliaryDataHash
- Add
ToExpr
instances for:CompactAddr
AuxiliaryDataHash
CompactDeltaCoin
VKey
- Add
setMinFeeTx
- Add
ScriptsProvided
- Require new
EraUTxO
class methodgetScriptsProvided
EraTx
replacedEraTxBody
superclass forEraUTxO
- Add
testGlobals
andmkDummySafeHash
- Add
Test.Cardano.Ledger.Core.Rational
- Require
ToExpr
forEraTx
class - Add
upgradeTx
function toEraTx
class - Require
ToExpr
forEraTxBody
class - Add
upgradeTxBody
function toEraTxBody
class - Require
ToExpr
forEraTxWits
class - Add
upgradeTxWits
function toEraTxWits
class - Add
ToExpr
instance to:CompactAddr
Withdrawals
AuxiliaryDataHash
VKey
ChainCode
BootstrapWitness
WitVKey
- Add
Generic
instance toAuxiliaryDataHash
- Add
vsNumDormantEpochs
toVState
to track the number of contiguous epochs in which there were no governance proposals to vote on. #3729 - Add
fromEraShareCBOR
- Remove redundant
DecCBOR
constraint ineraDecoder
- Add
FromJSON
instance toAnchor
- Change
ToJSON/FromJSON
implementation ofCredential
to usekeyHash
vskey hash
andscriptHash
vsscript hash
JSON keys. - Change
ToJSONKey/FromJSONKey
implementation ofCredential
to usekeyHash-
vskeyhash-
andscriptHash-
vsscripthash-
prefixes.
- Added
BinaryUpgradeOpts
- Add
Arbitrary
instance forDRepDistr
- Move
Arbitrary
instance forSnapShot
andSnapShots
fromcardano-ledger-shelley:testlib
- Add
Test.Cardano.Ledger.Core.Binary.RoundTrip
with:roundTripEraSpec
roundTripAnnEraSpec
roundTripEraTypeSpec
roundTripAnnEraTypeSpec
roundTripShareEraSpec
roundTripShareEraTypeSpec
roundTripEraExpectation
roundTripEraTypeExpectation
roundTripAnnEraExpectation
roundTripAnnEraTypeExpectation
roundTripShareEraExpectation
roundTripShareEraTypeExpectation
roundTripCoreEraTypesSpec
- Add
lookupRegStakeTxCert
andlookupUnRegStakeTxCert
toEraTxCert
typeclass #3700 - Change
ToJSONKey
/FromJSONKey
implementation ofCredential
to flat text - Add one more parameter to
getConsumedValue
to lookup DRep deposits #3688Credential 'DRepRole (EraCrypto era) -> Maybe Coin
- Add
Ap
,hoistAp
,runAp
,runAp_
- Add
eqBootstrapWitnessRaw
andeqWitVKeyRaw
- Add
eqRawType
- Add
EqRaw
type class witheqRaw
. - Add
EqRaw
instance forWitVKey
andBootstrapWitness
- Require
EqRaw
instance forScript
,TxWits
,TxAuxData
,TxBody
andTx
- Add
ToExpr
instance forPoolCert
- Require
ToExpr
instance forScript
,TxAuxData
andTxCert
- Require an extra argument for
decodePositiveCoin
in order to improve error reporting #3694
- Add
drepDeposit
to theDRepState
#3628 - Introduce
CommitteeState
andcsCommitteeCredsL
. - Change then name and the type of
vsCommitteeHotKeys
tovsCommitteeState
andvsCommitteeHotKeysL
tovsCommitteeStateL
- Add
drepExpiryL
anddrepAnchorL
- Add
eraName
- Add
addrPtrNormalize
- Add
upgradeTxOut
function toEraTxOut
- Add
upgradeScript
function toEraScript
- Add
upgradeTxAuxData
function toEraTxAuxData
- Add
upgradeTxCert
function andTxCertUpgradeError
family toEraTxCert
- Add
Default
instance forAnchor
- Add
Anchor
andAnchorDataHash
- Add
DRepState
- Change
vsDReps
to a map - Rename key roles #3588
Voting
toDRepRole
CommitteeHotKey
toHotCommitteeRole
CommitteeColdKey
toColdCommitteeRole
- Change
VState
to allow committee cold keys to be script-hashes #3581vsCommitteeHotKeys :: Map (Credential 'CommitteeColdKey eracrypto) (Maybe (Credential 'CommitteeHotKey eracrypto))
- Adopt
Default
instances #3556- Moved instances for
SafeHash
,RewardAcnt
andCredential
from Shelley.RewardProvenance
- Moved instances for
- Change
VState
to allow committee hot keys to be script-hashes #3552vsCommitteeHotKeys :: Map (KeyHash 'CommitteeColdKey eracrypto) (Maybe (Credential 'CommitteeHotKey eracrypto))
- Added
withSLanguage
- Move
BinaryPlutus
fromcardano-ledger-alonzo
and changed itsShow
instance to display as base64 encoding. - Added
Plutus
- Changed
Phase2Script
constructor of thePhaseScript
type. It now accepts newPlutus
type instead ofLanguage
andShortByteString
- Remove default implementation for
spendableInputsTxBodyL
- Add lenses:
dsUnifiedL
dsGenDelegsL
dsIRewardsL
dsFutureGenDelegsL
certDStateL
certPStateL
certVStateL
- Add
getProducedValue
toEraUTxO
- Add
spendableInputsTxBodyL
- Added
DRep
,DRepCredential
- Changed type
Credential 'Voting c
->DRep c
in:UMElem
umElemAsTuple
umElemDRep
UMap
DRepUView
dRepUView
dRepMap
unify
- Addition of
getPoolCertTxCert
- Add delegated representatives to the
UMap
and make its interface more coherent #3426- Additions
- Add
Credential 'Voting (EraCrypto era)
as the fourth element to theUMap
n-tuple. umElemPtrs :: UMElem c -> Maybe (Set Ptr)
umElemDRep :: UMElem c -> Maybe (Credential 'Voting (EraCrypto era))
UView (DRepUView)
constructor anddRepUView
invPtrMap :: UMap c -> Map (Credential 'Staking c) (Set Ptr)
dRepMap :: UMap c -> Map (Credential 'Staking c) (Credential 'Voting c)
- synonym
unionL = (∪)
- synonym
unionR = (⨃)
- synonym
domDelete = (⋪)
- synonym
rngDelete = (⋫)
- Add
- Renames
Trip
toUMElem
, patternTriple
toUMElem
viewTrip
toumElemAsTuple
tripRewardActiveDelegation
toumElemRDActive
tripReward
toumElemRDPair
tripDelegation
toumElemSPool
View (RewardDeposits, Delegations, Ptrs)
toUView (RewDepUView, SPoolUView, PtrUView)
rdPairs
torewDepUView
delegations
tosPoolUView
ptrs
toptrUView
unView
tounUView
viewtoVMap
tounUnifyToVMap
rewView
torewardMap
compactRewView
tocompactRewardMap
depositView
todepositMap
rdPairView
tordPairMap
delView
tosPoolMap
ptrView
toptrMap
domRestrictedView
todomRestrictedMap
zero
tonullUMElem
zeroMaybe
tonullUMElemMaybe
sumRewardsView
tosumRewardsUView
sumDepositView
tosumDepositUView
- Reimplementations
unionRewAgg
NOTE: It does not requireassert (Map.valid result) result
any more and has been tested for equivalence with the older version with--qc-max-success=10000 --qc-max-size=1000
. The test is added toUMapSpec
.
- Additions
- Add
certsTxBodyL
toEraTxBody
- Introduce
TxCert
type family andEraTxCert
type class. - Deprecate
Delegation
- Add
toKeyHashWitness
- Addition of
getVKeyWitnessTxCert
andgetScriptWitnessTxCert
toEraTxCert
type class - Add new key roles:
CommitteeColdKey
andCommitteeHotKey
- Remove
ConstitutionalDelegCert
. Instead it now lives incardano-ledger-shelley
asGenesisDelegCert
- Add
StakeCredentials
and two helper functions:toStakeCredentials
anddomRestrictedStakeCredentials
- Add
genValidUMapWithCreds
anduniformSubset
- Deprecate
Cardano.Ledger.UMapCompact
in favor ofCardano.Ledger.UMap
and add tests for it. #3371- Add
Cardano.Ledger.UMap.rdPairView
to view the reward-deposits pair from theUMap
.
- Add
- Replace
DPState c
withCertState era
- Add
VState
- Add
certVState
- Parametrize
DState
andPState
by era - Rename
Cardano.Ledger.DPState
module toCardano.Ledger.CertState
- Rename:
lsDPState
->lsCertState
dpsPState
->certPState
dpsDState
->certDState
obligationDPState
->obligationCertState
- Add support for
PlutusV3
- Add
ToJSON (PParamsHKD f era)
superclass constraints forEraPParams
. - Add
ToJSON (TxOut era)
superclass constraints forEraTxOut
. - Add superclass constraints for
Val
:NoThunks
,EncCBOR
,DecCBOR
,ToJSON
,NFData
,Show
EncCBOR (CompactForm t)
,DecCBOR (CompactForm t)
- Add
ToJSONKey
/FromJSONKey
instances forScriptHash
- Add
ToJSON
/FromJSON
instances forCompactForm Coin
,SafeHash
andTxId
- Add
ToJSON
instances for:Ptr
,CertIx
,TxIx
Trip
andUMap
DeltaCoin
andCompactForm DeltaCoin
InstantaneousRewards
,FutureGenDeleg
,PState
,DState
andDPState
.UTxO
andTxIn
Stake
,SnapShot
,SnapShots
,PoolDistr
andIndividualPoolStake
Reward
andRewardType
AuxiliaryDataHash
Credential
- Make
getConsumedValue
accept a deposit lookup function instead of aDPState
- Add
lookupDepositDState
andlookupRewardDState
. Former can be used withgetConsumedValue
to regain previous behavior. - Add
hashScriptTxWitsL
- Remove custom
Fail
type, in favor ofFailT
package - Move
bBodySize
intoCardano.Ledger.Core
- Rename
TxId
field from_unTxId
tounTxId
- Remove
runFailError
in favor oferrorFail
fromFailT
package
- First properly versioned release.