Skip to content

Commit e55b3a8

Browse files
committed
Update ouroboros-consensus, cardano-ledger, grapesy dependencies
* Bump version to 11.6.0.0; configure SRPs and update bounds for 11.2 integration * Fix build compatibility: ByteArrayAccess, XPrv conversion, new ledger fields * Re-export DijkstraTxCert from Cardano.Api.Ledger * Add Dijkstra era protocol parameter update support * Fix SerialisedPoolState to carry an era type parameter; unwrap Serialised in QueryPoolState * Update to era-parameterized PoolCert/StakePoolParams in cardano-rpc certificate types * Add individualPoolStakeBls (SNothing) field to IndividualPoolStake in EpochLeadership test * Update History.Bound and EraParams to new Peras API (PerasRoundNo, NoPerasEnabled) * Adapt cardano-rpc grapesy integration: memory -> ram, ExactException handler signature * Update hackage index-state and flake.lock (hackageNix) to 2026-09-02
1 parent 1526a22 commit e55b3a8

21 files changed

Lines changed: 384 additions & 205 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
description: |
2+
Compatibility updates for ouroboros-consensus 4.0, cardano-ledger, and plutus 1.68:
3+
fix `SerialisedPoolState` to carry an era type parameter, add `individualPoolStakeBls`
4+
field to `IndividualPoolStake`, update `History.Bound` to the new Peras API
5+
(`PerasRoundNo`, `NoPerasEnabled`), and bump dependency bounds accordingly.
6+
kind:
7+
- release
8+
pr: 1328
9+
project: cardano-api
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
description: |
2+
Compatibility updates for grapesy and cardano-ledger: replace `memory` with `ram`,
3+
update `exceptionToClient` to the new `ExactException` handler signature, and adapt
4+
`PoolCert`/`StakePoolParams` usages to their new era type parameter.
5+
kind:
6+
- release
7+
pr: 1328
8+
project: cardano-rpc

cabal.project

Lines changed: 77 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository cardano-haskell-packages
1313
-- See CONTRIBUTING for information about these, including some Nix commands
1414
-- you need to run if you change them
1515
index-state:
16-
, hackage.haskell.org 2026-08-02T17:21:34Z
16+
, hackage.haskell.org 2026-09-02T14:05:07Z
1717
, cardano-haskell-packages 2026-09-03T10:20:53Z
1818

1919
packages:
@@ -50,7 +50,7 @@ semaphore: True
5050

5151
constraints:
5252
-- haskell.nix patch does not work for 1.6.8
53-
, any.crypton-x509-system < 1.6.8
53+
, any.crypton-x509-system (< 1.6.8 || >= 1.7)
5454

5555

5656
-- WASM compilation specific
@@ -132,6 +132,8 @@ allow-newer:
132132
, microstache:aeson
133133
, monad-control:transformers
134134
, http-api-data:text-iso8601
135+
-- cardano-addresses-4.0.x bounds crypton < 1.1 but we have 1.1.4
136+
, cardano-addresses:crypton
135137

136138
-- cabal-allow-newer begin
137139
if impl(ghc >=9.14)
@@ -166,3 +168,76 @@ if impl(ghc >=9.14)
166168
, time-locale-compat:time
167169
, with-utf8:base
168170
-- cabal-allow-newer end
171+
172+
source-repository-package
173+
type: git
174+
location: https://github.com/input-output-hk/kes-agent
175+
tag: 4625f3cf543566517d08882e659c97932d106d86
176+
--sha256: sha256-CSHWndpeJFqCEFNT6ysfyN6x+O4vZ9TtYOOsZKcLnIA=
177+
subdir:
178+
kes-agent
179+
kes-agent-crypto
180+
181+
source-repository-package
182+
type: git
183+
location: https://github.com/IntersectMBO/cardano-ledger
184+
tag: b7abdf46ee4c1661d117ada735a2cea190903e83
185+
--sha256: sha256-X81COGGLFqp0sqBihMKm5GGPwCRXIPtBGnjpEXIpNtU=
186+
subdir:
187+
eras/allegra/impl
188+
eras/alonzo/impl
189+
eras/babbage/impl
190+
eras/byron/chain/executable-spec
191+
eras/byron/crypto
192+
eras/byron/ledger/executable-spec
193+
eras/byron/ledger/impl
194+
eras/conway/impl
195+
eras/dijkstra/impl
196+
eras/mary/impl
197+
eras/shelley/impl
198+
eras/shelley/test-suite
199+
libs/cardano-data
200+
libs/cardano-ledger-api
201+
libs/cardano-ledger-binary
202+
libs/cardano-ledger-core
203+
libs/cardano-protocol
204+
libs/cardano-protocol-tpraos
205+
libs/non-integral
206+
libs/small-steps
207+
libs/vector-map
208+
209+
source-repository-package
210+
type: git
211+
location: https://github.com/intersectmbo/cardano-base.git
212+
--sha256: sha256-WUBluY6UqvBkS5cNsJnKMOaW+1dTfL3mg8iq/kVPV0o=
213+
tag: d92e2e3841eaad354c5e1ef77b458b347f471271
214+
subdir: cardano-crypto-leios
215+
216+
source-repository-package
217+
type: git
218+
location: https://github.com/IntersectMBO/ouroboros-consensus
219+
tag: 0b910ac2bb1ca2412300453653f83c53a6961a11
220+
--sha256: sha256-rpu2UjqgCAhqWdhg7iaqfhmJyXevDIhDPNaOZgS+C9M=
221+
subdir:
222+
.
223+
224+
source-repository-package
225+
type: git
226+
location: https://github.com/well-typed/grapesy
227+
tag: bd6af64f69ff89e3a8fc02e2c81262e648f4715d
228+
--sha256: sha256-4F+bUoytvrgOcQ8aIWbOY9uYsPoTZwQOlmh7ckgyK9M=
229+
subdir:
230+
grapesy
231+
grpc-spec
232+
233+
source-repository-package
234+
type: git
235+
location: https://github.com/input-output-hk/cardano-crypto
236+
tag: ac2e12a471b735ad80949bcbf0f6f634e5dbef77
237+
--sha256: sha256-NvbMk41W2PQy2H91nkG0GtPyGDwia0y6DQNNf9RtoAc=
238+
239+
source-repository-package
240+
type: git
241+
location: https://github.com/IntersectMBO/cardano-addresses
242+
tag: d7d34f3275274fa3b5b08664c7d391eec7059b5b
243+
--sha256: sha256-HgLfcxlz+VC2ENmS5dP4S4dCtF6y9I9sjnd0EbDWo8k=

cardano-api/cardano-api.cabal

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,18 @@ library
135135
cardano-base ^>=0.1,
136136
cardano-binary,
137137
cardano-crypto,
138-
cardano-crypto-class ^>=2.5,
139-
cardano-crypto-wrapper ^>=1.7,
138+
cardano-crypto-class ^>=2.6,
139+
cardano-crypto-wrapper ^>=1.8,
140140
cardano-data >=1.0,
141141
cardano-diffusion:{api, cardano-diffusion} ^>=1.1,
142142
cardano-ledger-allegra >=1.7,
143-
cardano-ledger-alonzo >=1.15,
144-
cardano-ledger-api ^>=1.14,
143+
cardano-ledger-alonzo >=1.17,
144+
cardano-ledger-api ^>=1.15,
145145
cardano-ledger-babbage >=1.11,
146146
cardano-ledger-binary >=1.6,
147147
cardano-ledger-byron >=1.2,
148148
cardano-ledger-conway >=1.19,
149-
cardano-ledger-core >=1.20,
149+
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.20,
150150
cardano-ledger-dijkstra >=0.1,
151151
cardano-ledger-mary >=1.8,
152152
cardano-ledger-shelley >=1.16,
@@ -178,22 +178,22 @@ library
178178
network-mux,
179179
nothunks,
180180
ordered-containers,
181-
ouroboros-consensus:{cardano, diffusion, ouroboros-consensus, protocol} ^>=4.2.1.0,
181+
ouroboros-consensus:{cardano, diffusion, ouroboros-consensus, protocol} ^>=4.0,
182182
ouroboros-network:{api, framework, ouroboros-network, protocols} ^>=1.2,
183183
parsec,
184-
plutus-core ^>=1.65,
185-
plutus-ledger-api ^>=1.65,
184+
plutus-core ^>=1.68,
185+
plutus-ledger-api ^>=1.68,
186186
pretty-simple,
187187
prettyprinter,
188188
prettyprinter-ansi-terminal,
189189
prettyprinter-configurable ^>=1.36,
190190
random,
191-
resource-registry ^>=0.3,
191+
resource-registry ^>=0.4,
192192
safe-exceptions,
193193
scientific,
194194
serialise,
195195
singletons,
196-
small-steps ^>=1.1,
196+
small-steps ^>=1.2,
197197
sop-core,
198198
sop-extras,
199199
stm,
@@ -329,8 +329,8 @@ library gen
329329
bytestring,
330330
cardano-api,
331331
cardano-binary >=1.6 && <1.10,
332-
cardano-crypto-class ^>=2.5,
333-
cardano-crypto-wrapper:testlib ^>=1.7,
332+
cardano-crypto-class ^>=2.6,
333+
cardano-crypto-wrapper:testlib ^>=1.8,
334334
cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib},
335335
cardano-ledger-byron:testlib,
336336
cardano-ledger-conway:testlib,
@@ -373,11 +373,11 @@ test-suite cardano-api-test
373373
cardano-api:gen,
374374
cardano-binary,
375375
cardano-crypto,
376-
cardano-crypto-class:{cardano-crypto-class, testlib} ^>=2.5,
376+
cardano-crypto-class:{cardano-crypto-class, testlib} ^>=2.6,
377377
cardano-crypto-wrapper:testlib,
378378
cardano-data >=1.0,
379379
cardano-ledger-alonzo,
380-
cardano-ledger-api ^>=1.14,
380+
cardano-ledger-api ^>=1.15,
381381
cardano-ledger-babbage,
382382
cardano-ledger-binary,
383383
cardano-ledger-conway,
@@ -463,7 +463,7 @@ test-suite cardano-api-golden
463463
cardano-crypto-class,
464464
cardano-data >=1.0,
465465
cardano-ledger-alonzo,
466-
cardano-ledger-api ^>=1.14,
466+
cardano-ledger-api ^>=1.15,
467467
cardano-ledger-binary,
468468
cardano-ledger-core,
469469
cardano-ledger-shelley,
@@ -475,8 +475,8 @@ test-suite cardano-api-golden
475475
hedgehog >=1.1,
476476
hedgehog-extras ^>=0.10,
477477
microlens,
478-
plutus-core ^>=1.65,
479-
plutus-ledger-api ^>=1.65,
478+
plutus-core ^>=1.68,
479+
plutus-ledger-api ^>=1.68,
480480
tasty,
481481
tasty-discover,
482482
tasty-hedgehog,

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ data StakePoolMetadataReference
8686
-- Internal conversion functions
8787
--
8888

89-
toShelleyPoolParams :: StakePoolParameters -> Ledger.StakePoolParams
89+
toShelleyPoolParams :: StakePoolParameters -> Ledger.StakePoolParams era
9090
toShelleyPoolParams
9191
StakePoolParameters
9292
{ stakePoolId = StakePoolKeyHash poolkh
@@ -104,6 +104,7 @@ toShelleyPoolParams
104104
Ledger.StakePoolParams
105105
{ Ledger.sppId = poolkh
106106
, Ledger.sppVrf = Ledger.toVRFVerKeyHash vrfkh
107+
, Ledger.sppBlsKey = Ledger.SNothing
107108
, Ledger.sppPledge = stakePoolPledge
108109
, Ledger.sppCost = stakePoolCost
109110
, Ledger.sppMargin =
@@ -159,7 +160,7 @@ toShelleyPoolParams
159160
Ledger.textToUrl (Text.length url) url
160161

161162
fromShelleyPoolParams
162-
:: Ledger.StakePoolParams
163+
:: Ledger.StakePoolParams era
163164
-> StakePoolParameters
164165
fromShelleyPoolParams
165166
Ledger.StakePoolParams

cardano-api/src/Cardano/Api/Consensus/Internal/Protocol.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
{-# LANGUAGE StandaloneDeriving #-}
99
{-# LANGUAGE TypeFamilies #-}
1010
{-# LANGUAGE TypeOperators #-}
11+
{-# LANGUAGE UndecidableSuperClasses #-}
1112

1213
module Cardano.Api.Consensus.Internal.Protocol
1314
( BlockType (..)

cardano-api/src/Cardano/Api/Crypto/Ed25519Bip32.hs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import Cardano.Crypto.Util (SignableRepresentation (..))
2626
import Cardano.Crypto.Wallet qualified as CC
2727

2828
import Control.DeepSeq (NFData)
29-
import Data.ByteArray as BA (ByteArrayAccess, ScrubbedBytes, convert)
29+
import Data.ByteArray as BA (ByteArrayAccess, convert, length, withByteArray)
3030
import Data.ByteString (ByteString)
3131
import Data.ByteString qualified as BS
3232
import GHC.Generics (Generic)
@@ -59,12 +59,12 @@ instance DSIGNAlgorithm Ed25519Bip32DSIGN where
5959
deriving NoThunks via InspectHeap CC.XPub
6060

6161
newtype SignKeyDSIGN Ed25519Bip32DSIGN = SignKeyEd25519Bip32DSIGN CC.XPrv
62-
deriving (Generic, ByteArrayAccess)
62+
deriving Generic
6363
deriving newtype NFData
6464
deriving NoThunks via InspectHeap CC.XPrv
6565

6666
newtype SigDSIGN Ed25519Bip32DSIGN = SigEd25519Bip32DSIGN CC.XSignature
67-
deriving (Show, Eq, Generic, ByteArrayAccess)
67+
deriving (Show, Eq, Generic)
6868
deriving NoThunks via InspectHeap CC.XSignature
6969

7070
--
@@ -84,7 +84,7 @@ instance DSIGNAlgorithm Ed25519Bip32DSIGN where
8484

8585
signDSIGN () a (SignKeyEd25519Bip32DSIGN sk) =
8686
SigEd25519Bip32DSIGN $
87-
CC.sign (mempty :: ScrubbedBytes) sk (getSignableRepresentation a)
87+
CC.sign (mempty :: ByteString) sk (getSignableRepresentation a)
8888

8989
verifyDSIGN () (VerKeyEd25519Bip32DSIGN vk) a (SigEd25519Bip32DSIGN sig) =
9090
if CC.verify vk (getSignableRepresentation a) sig
@@ -99,8 +99,16 @@ instance DSIGNAlgorithm Ed25519Bip32DSIGN where
9999
SignKeyEd25519Bip32DSIGN $
100100
CC.generateNew
101101
(getSeedBytes seed)
102-
(mempty :: ScrubbedBytes)
103-
(mempty :: ScrubbedBytes)
102+
(mempty :: ByteString)
103+
(mempty :: ByteString)
104+
105+
instance ByteArrayAccess (SignKeyDSIGN Ed25519Bip32DSIGN) where
106+
length (SignKeyEd25519Bip32DSIGN sk) = BA.length (CC.unXPrv sk)
107+
withByteArray (SignKeyEd25519Bip32DSIGN sk) = BA.withByteArray (CC.unXPrv sk)
108+
109+
instance ByteArrayAccess (SigDSIGN Ed25519Bip32DSIGN) where
110+
length (SigEd25519Bip32DSIGN sig) = BA.length (CC.unXSignature sig)
111+
withByteArray (SigEd25519Bip32DSIGN sig) = BA.withByteArray (CC.unXSignature sig)
104112

105113
instance FixedSizeCodec (VerKeyDSIGN Ed25519Bip32DSIGN) where
106114
type FixedSize (VerKeyDSIGN Ed25519Bip32DSIGN) = 64

cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Certificate.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ makeStakeAddressUnregistrationCertificate scred deposit =
101101
makeStakePoolRegistrationCertificate
102102
:: forall era
103103
. IsEra era
104-
=> Ledger.StakePoolParams
104+
=> Ledger.StakePoolParams (LedgerEra era)
105105
-> Certificate (LedgerEra era)
106106
makeStakePoolRegistrationCertificate poolParams =
107107
obtainCommonConstraints (useEra @era) $

cardano-api/src/Cardano/Api/Experimental/Tx/Internal/Certificate/Compatible.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ makeStakeAddressUnregistrationCertificate scred =
144144
makeStakePoolRegistrationCertificate
145145
:: forall era
146146
. IsShelleyBasedEra era
147-
=> Ledger.StakePoolParams
147+
=> Ledger.StakePoolParams (ShelleyLedgerEra era)
148148
-> Certificate (ShelleyLedgerEra era)
149149
makeStakePoolRegistrationCertificate poolParams =
150150
shelleyBasedEraConstraints (shelleyBasedEra @era) $

0 commit comments

Comments
 (0)