Skip to content

Commit 36ee8cc

Browse files
Aniket DeshpandeJimbo4350
authored andcommitted
Latest ledger, network, consensus and plutus
1 parent 7269f13 commit 36ee8cc

72 files changed

Lines changed: 710 additions & 801 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cabal.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repository cardano-haskell-packages
1414
-- you need to run if you change them
1515
index-state:
1616
, hackage.haskell.org 2025-03-17T12:01:29Z
17-
, cardano-haskell-packages 2025-03-03T04:46:42Z
17+
, cardano-haskell-packages 2025-03-25T16:05:50Z
1818

1919
packages:
2020
cardano-api

cardano-api/cardano-api.cabal

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,20 @@ library
115115
cardano-addresses ^>=4.0.0,
116116
cardano-binary,
117117
cardano-crypto,
118-
cardano-crypto-class ^>=2.1.2,
119-
cardano-crypto-wrapper ^>=1.5,
118+
cardano-crypto-class ^>=2.2.1,
119+
cardano-crypto-wrapper ^>=1.6,
120120
cardano-data >=1.0,
121-
cardano-ledger-allegra >=1.6,
122-
cardano-ledger-alonzo >=1.10.2,
123-
cardano-ledger-api >=1.9.3,
124-
cardano-ledger-babbage >=1.9,
125-
cardano-ledger-binary >=1.3,
126-
cardano-ledger-byron >=1.0.1,
127-
cardano-ledger-conway >=1.16,
128-
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
129-
cardano-ledger-mary >=1.7,
130-
cardano-ledger-shelley >=1.13,
131-
cardano-protocol-tpraos >=1.2,
121+
cardano-ledger-allegra >=1.7,
122+
cardano-ledger-alonzo >=1.13,
123+
cardano-ledger-api >=1.11,
124+
cardano-ledger-babbage >=1.11,
125+
cardano-ledger-binary >=1.6,
126+
cardano-ledger-byron >=1.1,
127+
cardano-ledger-conway >=1.19,
128+
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.17,
129+
cardano-ledger-mary >=1.8,
130+
cardano-ledger-shelley >=1.16,
131+
cardano-protocol-tpraos >=1.4,
132132
cardano-slotting >=0.2.0.0,
133133
cardano-strict-containers >=0.1,
134134
cborg,
@@ -154,21 +154,20 @@ library
154154
network-mux,
155155
nothunks,
156156
ordered-containers,
157-
ouroboros-consensus ^>=0.22,
158-
ouroboros-consensus-cardano ^>=0.21,
159-
ouroboros-consensus-diffusion ^>=0.19 || ^>=0.20,
160-
ouroboros-consensus-protocol ^>=0.10,
157+
ouroboros-consensus ^>=0.23,
158+
ouroboros-consensus-cardano ^>=0.22,
159+
ouroboros-consensus-diffusion ^>=0.19 || ^>=0.21,
160+
ouroboros-consensus-protocol ^>=0.11,
161161
ouroboros-network,
162-
ouroboros-network-api ^>=0.12,
162+
ouroboros-network-api >=0.13,
163163
ouroboros-network-framework,
164164
ouroboros-network-protocols,
165165
parsec,
166-
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.40,
166+
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.43,
167167
prettyprinter,
168168
prettyprinter-ansi-terminal,
169169
prettyprinter-configurable ^>=1.36,
170170
random,
171-
reflection,
172171
safe-exceptions,
173172
scientific,
174173
serialise,
@@ -296,8 +295,8 @@ library gen
296295
bytestring,
297296
cardano-api,
298297
cardano-binary >=1.6 && <1.8,
299-
cardano-crypto-class ^>=2.1.2,
300-
cardano-crypto-test ^>=1.5,
298+
cardano-crypto-class ^>=2.2.1,
299+
cardano-crypto-test ^>=1.6,
301300
cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib} >=1.8.1,
302301
cardano-ledger-byron-test >=1.5,
303302
cardano-ledger-conway:testlib,
@@ -327,9 +326,9 @@ test-suite cardano-api-test
327326
cardano-api:gen,
328327
cardano-binary,
329328
cardano-crypto,
330-
cardano-crypto-class ^>=2.1.2,
331-
cardano-crypto-test ^>=1.5,
332-
cardano-crypto-tests ^>=2.1,
329+
cardano-crypto-class ^>=2.2.1,
330+
cardano-crypto-test ^>=1.6,
331+
cardano-crypto-tests ^>=2.2,
333332
cardano-ledger-alonzo,
334333
cardano-ledger-api >=1.9,
335334
cardano-ledger-binary,
@@ -399,14 +398,15 @@ test-suite cardano-api-golden
399398
cardano-api,
400399
cardano-api:gen,
401400
cardano-binary,
402-
cardano-crypto-class ^>=2.1.2,
401+
cardano-crypto-class ^>=2.2.1,
403402
cardano-data >=1.0,
404403
cardano-ledger-alonzo,
405404
cardano-ledger-api >=1.9,
406405
cardano-ledger-binary,
407406
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
408407
cardano-ledger-shelley,
409408
cardano-ledger-shelley-test >=1.2.0.1,
409+
cardano-protocol-tpraos,
410410
cardano-slotting ^>=0.2.0.0,
411411
containers,
412412
errors,
@@ -415,7 +415,7 @@ test-suite cardano-api-golden
415415
hedgehog-extras ^>=0.7,
416416
microlens,
417417
parsec,
418-
plutus-core ^>=1.40,
418+
plutus-core ^>=1.43,
419419
plutus-ledger-api,
420420
tasty,
421421
tasty-hedgehog,

cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ genLedgerValueForTxOut sbe = do
519519
)
520520
sbe
521521

522-
genLedgerMultiAssetValue :: Gen (L.MultiAsset L.StandardCrypto)
522+
genLedgerMultiAssetValue :: Gen L.MultiAsset
523523
genLedgerMultiAssetValue = Q.arbitrary
524524

525525
-- Note that we expect to sometimes generate duplicate policy id keys since we

cardano-api/src/Cardano/Api.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,6 @@ module Cardano.Api
10391039
, queryPoolDistribution
10401040
, queryPoolState
10411041
, queryProtocolParameters
1042-
, queryProtocolParametersUpdate
10431042
, queryProtocolState
10441043
, queryStakeAddresses
10451044
, queryStakeDelegDeposits
@@ -1059,6 +1058,8 @@ module Cardano.Api
10591058
, queryProposals
10601059
, queryCommitteeMembersState
10611060
, queryStakeVoteDelegatees
1061+
, queryStakePoolDefaultVote
1062+
, queryLedgerConfig
10621063

10631064
-- ** Committee State Query
10641065
, MemberStatus (..)

cardano-api/src/Cardano/Api/Internal/Address.hs

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ import Cardano.Chain.Common qualified as Byron
106106
import Cardano.Ledger.Address qualified as Shelley
107107
import Cardano.Ledger.BaseTypes qualified as Shelley
108108
import Cardano.Ledger.Credential qualified as Shelley
109-
import Cardano.Ledger.Crypto (StandardCrypto)
110109
import Cardano.Ledger.Plutus.TxInfo qualified as Plutus
111110
import PlutusLedgerApi.V1 qualified as PlutusAPI
112111

@@ -188,8 +187,8 @@ data Address addrtype where
188187
-- in Shelley era and are thus supported from the Shelley era onwards
189188
ShelleyAddress
190189
:: Shelley.Network
191-
-> Shelley.PaymentCredential StandardCrypto
192-
-> Shelley.StakeReference StandardCrypto
190+
-> Shelley.PaymentCredential
191+
-> Shelley.StakeReference
193192
-> Address ShelleyAddr
194193

195194
-- Note that the two ledger credential types here are parametrised by
@@ -231,7 +230,7 @@ instance SerialiseAsRawBytes (Address ByronAddr) where
231230
$ addr
232231

233232
deserialiseFromRawBytes (AsAddress AsByronAddr) bs =
234-
case Shelley.decodeAddr bs :: Maybe (Shelley.Addr StandardCrypto) of
233+
case Shelley.decodeAddr bs :: Maybe Shelley.Addr of
235234
Nothing -> Left (SerialiseAsRawBytesError "Unable to deserialise Address ByronAddr")
236235
Just Shelley.Addr{} -> Left (SerialiseAsRawBytesError "Unable to deserialise Address ByronAddr")
237236
Just (Shelley.AddrBootstrap (Shelley.BootstrapAddress addr)) ->
@@ -352,7 +351,7 @@ instance SerialiseAddress AddressAny where
352351
(AddressByron <$> deserialiseAddress (AsAddress AsByronAddr) t)
353352
<|> (AddressShelley <$> deserialiseAddress (AsAddress AsShelleyAddr) t)
354353

355-
fromShelleyAddrToAny :: Shelley.Addr StandardCrypto -> AddressAny
354+
fromShelleyAddrToAny :: Shelley.Addr -> AddressAny
356355
fromShelleyAddrToAny (Shelley.AddrBootstrap (Shelley.BootstrapAddress addr)) =
357356
AddressByron $ ByronAddress addr
358357
fromShelleyAddrToAny (Shelley.Addr nw pc scr) =
@@ -531,7 +530,7 @@ makeShelleyAddressInEra sbe nw pc scr =
531530
data StakeAddress where
532531
StakeAddress
533532
:: Shelley.Network
534-
-> Shelley.StakeCredential StandardCrypto
533+
-> Shelley.StakeCredential
535534
-> StakeAddress
536535
deriving (Eq, Ord, Show)
537536

@@ -634,7 +633,7 @@ shelleyPayAddrToPlutusPubKHash (ShelleyAddress _ payCred _) =
634633
-- Internal conversion functions
635634
--
636635

637-
toShelleyAddr :: AddressInEra era -> Shelley.Addr StandardCrypto
636+
toShelleyAddr :: AddressInEra era -> Shelley.Addr
638637
toShelleyAddr (AddressInEra ByronAddressInAnyEra (ByronAddress addr)) =
639638
Shelley.AddrBootstrap (Shelley.BootstrapAddress addr)
640639
toShelleyAddr
@@ -644,7 +643,7 @@ toShelleyAddr
644643
) =
645644
Shelley.Addr nw pc scr
646645

647-
toShelleyStakeAddr :: StakeAddress -> Shelley.RewardAccount StandardCrypto
646+
toShelleyStakeAddr :: StakeAddress -> Shelley.RewardAccount
648647
toShelleyStakeAddr (StakeAddress nw sc) =
649648
Shelley.RewardAccount
650649
{ Shelley.raNetwork = nw
@@ -653,23 +652,23 @@ toShelleyStakeAddr (StakeAddress nw sc) =
653652

654653
toShelleyPaymentCredential
655654
:: PaymentCredential
656-
-> Shelley.PaymentCredential StandardCrypto
655+
-> Shelley.PaymentCredential
657656
toShelleyPaymentCredential (PaymentCredentialByKey (PaymentKeyHash kh)) =
658657
Shelley.KeyHashObj kh
659658
toShelleyPaymentCredential (PaymentCredentialByScript sh) =
660659
Shelley.ScriptHashObj (toShelleyScriptHash sh)
661660

662661
toShelleyStakeCredential
663662
:: StakeCredential
664-
-> Shelley.StakeCredential StandardCrypto
663+
-> Shelley.StakeCredential
665664
toShelleyStakeCredential (StakeCredentialByKey (StakeKeyHash kh)) =
666665
Shelley.KeyHashObj kh
667666
toShelleyStakeCredential (StakeCredentialByScript sh) =
668667
Shelley.ScriptHashObj (toShelleyScriptHash sh)
669668

670669
toShelleyStakeReference
671670
:: StakeAddressReference
672-
-> Shelley.StakeReference StandardCrypto
671+
-> Shelley.StakeReference
673672
toShelleyStakeReference (StakeAddressByValue stakecred) =
674673
Shelley.StakeRefBase (toShelleyStakeCredential stakecred)
675674
toShelleyStakeReference (StakeAddressByPointer ptr) =
@@ -680,7 +679,7 @@ toShelleyStakeReference NoStakeAddress =
680679
fromShelleyAddrIsSbe
681680
:: ()
682681
=> ShelleyBasedEra era
683-
-> Shelley.Addr StandardCrypto
682+
-> Shelley.Addr
684683
-> AddressInEra era
685684
fromShelleyAddrIsSbe sbe = \case
686685
Shelley.AddrBootstrap (Shelley.BootstrapAddress addr) ->
@@ -690,7 +689,7 @@ fromShelleyAddrIsSbe sbe = \case
690689

691690
fromShelleyAddr
692691
:: ShelleyBasedEra era
693-
-> Shelley.Addr StandardCrypto
692+
-> Shelley.Addr
694693
-> AddressInEra era
695694
fromShelleyAddr _ (Shelley.AddrBootstrap (Shelley.BootstrapAddress addr)) =
696695
AddressInEra ByronAddressInAnyEra (ByronAddress addr)
@@ -699,27 +698,27 @@ fromShelleyAddr sBasedEra (Shelley.Addr nw pc scr) =
699698
(ShelleyAddressInEra sBasedEra)
700699
(ShelleyAddress nw pc scr)
701700

702-
fromShelleyStakeAddr :: Shelley.RewardAccount StandardCrypto -> StakeAddress
701+
fromShelleyStakeAddr :: Shelley.RewardAccount -> StakeAddress
703702
fromShelleyStakeAddr (Shelley.RewardAccount nw sc) = StakeAddress nw sc
704703

705704
fromShelleyStakeCredential
706-
:: Shelley.StakeCredential StandardCrypto
705+
:: Shelley.StakeCredential
707706
-> StakeCredential
708707
fromShelleyStakeCredential (Shelley.KeyHashObj kh) =
709708
StakeCredentialByKey (StakeKeyHash kh)
710709
fromShelleyStakeCredential (Shelley.ScriptHashObj sh) =
711710
StakeCredentialByScript (fromShelleyScriptHash sh)
712711

713712
fromShelleyPaymentCredential
714-
:: Shelley.PaymentCredential StandardCrypto
713+
:: Shelley.PaymentCredential
715714
-> PaymentCredential
716715
fromShelleyPaymentCredential (Shelley.KeyHashObj kh) =
717716
PaymentCredentialByKey (PaymentKeyHash kh)
718717
fromShelleyPaymentCredential (Shelley.ScriptHashObj sh) =
719718
PaymentCredentialByScript (ScriptHash sh)
720719

721720
fromShelleyStakeReference
722-
:: Shelley.StakeReference StandardCrypto
721+
:: Shelley.StakeReference
723722
-> StakeAddressReference
724723
fromShelleyStakeReference (Shelley.StakeRefBase stakecred) =
725724
StakeAddressByValue (fromShelleyStakeCredential stakecred)

cardano-api/src/Cardano/Api/Internal/Anchor.hs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ module Cardano.Api.Internal.Anchor
55
where
66

77
import Cardano.Ledger.BaseTypes qualified as L
8-
import Cardano.Ledger.Crypto qualified as Crypto
9-
import Cardano.Ledger.SafeHash qualified as L
8+
import Cardano.Ledger.Hashes qualified as L
109

1110
-- | The URL to build the anchor to pass to DRep registration certificate
1211
newtype AnchorUrl = AnchorUrl
@@ -16,6 +15,6 @@ newtype AnchorUrl = AnchorUrl
1615

1716
-- | The hash to build the anchor to pass to DRep registration certificate
1817
newtype AnchorDataHash = AnchorDataHash
19-
{ unAnchorDataHash :: L.SafeHash Crypto.StandardCrypto L.AnchorData
18+
{ unAnchorDataHash :: L.SafeHash L.AnchorData
2019
}
2120
deriving (Eq, Show)

cardano-api/src/Cardano/Api/Internal/Block.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ import Cardano.Api.Internal.Tx.Sign
6363

6464
import Cardano.Crypto.Hash.Class qualified as Crypto
6565
import Cardano.Crypto.Hashing qualified
66-
import Cardano.Ledger.Api qualified as L
6766
import Cardano.Ledger.Block qualified as Ledger
6867
import Cardano.Ledger.Core qualified as Ledger
68+
import Cardano.Protocol.Crypto qualified as L
6969
import Cardano.Slotting.Block (BlockNo)
7070
import Cardano.Slotting.Slot (EpochNo, SlotNo, WithOrigin (..))
7171
import Ouroboros.Consensus.Block qualified as Consensus

0 commit comments

Comments
 (0)