Skip to content

Commit c9943eb

Browse files
authored
Merge pull request #1328 from IntersectMBO/koslambrou/prepare-11.2
Update ouroboros-consensus, cardano-ledger dependencies for node 11.2
2 parents 0f98cc7 + 1cb964d commit c9943eb

42 files changed

Lines changed: 614 additions & 245 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
description: |
2+
Added `stakePoolBlsKey :: Maybe Ledger.BlsKey` to `StakePoolParameters`, wired
3+
to `sppBlsKey` in both `toShelleyPoolParams` and `fromShelleyPoolParams`.
4+
Existing record-construction sites must add the field; use `Nothing` for pools
5+
that do not register a BLS voting key. The field holds a BLS verification key
6+
together with its proof of possession, registrable from the Dijkstra era
7+
onwards. Use `toLedgerBlsKey :: SigningKey BlsKey -> Ledger.BlsKey` (new) to
8+
derive that pair from a BLS signing key. `Ledger.BlsKey` is now re-exported
9+
from `Cardano.Api.Ledger` to avoid a direct `cardano-ledger-core` dependency
10+
at call sites.
11+
kind:
12+
- feature
13+
- breaking
14+
pr: 1328
15+
project: cardano-api
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
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
description: |
2+
Add the Leios protocol parameters to pparams updates via
3+
`createIntroducedInDijkstraPParams` by extending
4+
`pparamsUpdateToIntroducedInDijkstraPParams`
5+
kind:
6+
- breaking
7+
- feature
8+
pr: 1328
9+
project: cardano-api

‎.gitignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.stack-work/
22
.ghc.environment.*
33
.nix-shell-cabal.project
4+
.direnv
5+
.envrc
46
/cabal.project.diff
57
/cabal.project.freeze
68
/cabal.project.local*

‎cabal.project‎

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ 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
17-
, cardano-haskell-packages 2026-09-24T00:08:56Z
16+
, hackage.haskell.org 2026-09-02T14:05:07Z
17+
, cardano-haskell-packages 2026-10-02T13:31:03Z
1818

1919
packages:
2020
cardano-api
@@ -50,16 +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
54-
55-
-- cardano-crypto-class (in cardano-api and in the cardano-keys dependency)
56-
-- requires crypton < 1.1. The GHC 9.14 solver otherwise greedily picks
57-
-- crypton 1.1.4 and then cannot resolve cardano-crypto-class; older
58-
-- compilers settle on 1.0.x by themselves.
59-
if impl(ghc >= 9.14)
60-
constraints:
61-
, crypton < 1.1
62-
53+
, any.crypton-x509-system (< 1.6.8 || >= 1.7)
6354

6455
-- WASM compilation specific
6556

@@ -109,6 +100,25 @@ if arch(wasm32)
109100
tag: ab92e48e9fdf3abe214f85fdbe5301c1280e14e9
110101
--sha256: sha256-U+ln/gbXoQZpNjZHydNa0FG/9GdJFgL1+T3+7KTzDWo=
111102

103+
source-repository-package
104+
type: git
105+
location: https://github.com/palas/ram
106+
tag: 73125424da174adf25e607d7584014becd5fb6a7
107+
--sha256: sha256-fo3MlxW+0kUdXFSJILZ6L4HFmATr8R8oytlbyyaKYn0=
108+
109+
source-repository-package
110+
type: git
111+
location: https://github.com/palas/direct-sqlite
112+
tag: c7dfc6b8a1993eb1d92edbdb21ece20a1cf1cc8b
113+
--sha256: sha256-RuQqcmEpvlUDa4zxiNmZJMaf/wrU2vZWoMQPm5d24RY=
114+
115+
-- The wasm fork of `network` above is pinned at 3.2.7.0, while
116+
-- cardano-config requires ^>=3.2.8. The 3.2.8 release only adds the
117+
-- IP_DONTFRAG/IP_MTU_DISCOVER and KeepInit socket options, neither of
118+
-- which cardano-config uses (it only needs `PortNumber`), so relax the
119+
-- lower bound rather than carrying a forked 3.2.8.
120+
allow-older: cardano-config:network
121+
112122
package cardano-crypto-praos
113123
flags: -external-libsodium-vrf
114124

@@ -140,6 +150,8 @@ allow-newer:
140150
, microstache:aeson
141151
, monad-control:transformers
142152
, http-api-data:text-iso8601
153+
-- cardano-addresses-4.0.x bounds crypton < 1.1 but we have 1.1.4
154+
, cardano-addresses:crypton
143155

144156
-- cabal-allow-newer begin
145157
if impl(ghc >=9.14)

‎cardano-api/cardano-api.cabal‎

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,23 @@ library
136136
cardano-base ^>=0.1,
137137
cardano-binary,
138138
cardano-crypto,
139-
cardano-crypto-class ^>=2.5,
140-
cardano-crypto-wrapper ^>=1.7,
139+
cardano-crypto-class ^>=2.6,
140+
cardano-crypto-wrapper ^>=1.8,
141141
cardano-data >=1.0,
142-
cardano-diffusion:{api, cardano-diffusion} ^>=1.1,
142+
cardano-diffusion:{api, cardano-diffusion} ^>=1.3,
143143
cardano-keys ^>=11.0,
144144
cardano-ledger-allegra >=1.7,
145-
cardano-ledger-alonzo >=1.15,
146-
cardano-ledger-api ^>=1.14,
145+
cardano-ledger-alonzo >=1.17,
146+
cardano-ledger-api ^>=1.15,
147147
cardano-ledger-babbage >=1.11,
148148
cardano-ledger-binary >=1.9.1,
149149
cardano-ledger-byron >=1.2,
150150
cardano-ledger-conway >=1.19,
151-
cardano-ledger-core >=1.20,
151+
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.22,
152152
cardano-ledger-dijkstra >=0.1,
153153
cardano-ledger-mary >=1.8,
154154
cardano-ledger-shelley >=1.16,
155-
cardano-protocol ^>=0.1,
155+
cardano-protocol ^>=0.2,
156156
cardano-protocol-tpraos >=1.4,
157157
cardano-slotting >=0.2.0.0,
158158
cardano-strict-containers >=0.1,
@@ -180,21 +180,21 @@ library
180180
network-mux,
181181
nothunks,
182182
ordered-containers,
183-
ouroboros-consensus:{cardano, diffusion, ouroboros-consensus, protocol} ^>=4.2.1.0,
184-
ouroboros-network:{api, framework, ouroboros-network, protocols} ^>=1.2,
183+
ouroboros-consensus:{cardano, diffusion, ouroboros-consensus, protocol} ^>=5.0,
184+
ouroboros-network:{api, framework, ouroboros-network, protocols} ^>=1.3,
185185
parsec,
186-
plutus-core ^>=1.70,
187-
plutus-ledger-api ^>=1.70,
186+
plutus-core ^>=1.71,
187+
plutus-ledger-api ^>=1.71,
188188
pretty-simple,
189189
prettyprinter,
190190
prettyprinter-ansi-terminal,
191191
prettyprinter-configurable ^>=1.36,
192-
resource-registry ^>=0.3,
192+
resource-registry ^>=0.4,
193193
safe-exceptions,
194194
scientific,
195195
serialise,
196196
singletons,
197-
small-steps ^>=1.1,
197+
small-steps ^>=1.2,
198198
sop-core,
199199
sop-extras,
200200
stm,
@@ -331,8 +331,8 @@ library gen
331331
bytestring,
332332
cardano-api,
333333
cardano-binary >=1.6 && <1.10,
334-
cardano-crypto-class ^>=2.5,
335-
cardano-crypto-wrapper:testlib ^>=1.7,
334+
cardano-crypto-class ^>=2.6,
335+
cardano-crypto-wrapper:testlib ^>=1.8,
336336
cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib},
337337
cardano-ledger-byron:testlib,
338338
cardano-ledger-conway:testlib,
@@ -375,15 +375,15 @@ test-suite cardano-api-test
375375
cardano-api:gen,
376376
cardano-binary,
377377
cardano-crypto,
378-
cardano-crypto-class:{cardano-crypto-class, testlib} ^>=2.5,
378+
cardano-crypto-class:{cardano-crypto-class, testlib} ^>=2.6,
379379
cardano-crypto-wrapper:testlib,
380380
cardano-data >=1.0,
381381
cardano-ledger-alonzo,
382-
cardano-ledger-api ^>=1.14,
382+
cardano-ledger-api ^>=1.15,
383383
cardano-ledger-babbage,
384384
cardano-ledger-binary,
385385
cardano-ledger-conway,
386-
cardano-ledger-core,
386+
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.22,
387387
cardano-ledger-dijkstra,
388388
cardano-ledger-mary,
389389
cardano-ledger-shelley,
@@ -398,6 +398,7 @@ test-suite cardano-api-test
398398
hedgehog >=1.1,
399399
hedgehog-extras,
400400
hedgehog-quickcheck,
401+
mempack,
401402
microlens,
402403
mtl,
403404
ouroboros-consensus:{cardano, ouroboros-consensus, protocol},
@@ -412,6 +413,7 @@ test-suite cardano-api-test
412413
Test.Cardano.Api.Address
413414
Test.Cardano.Api.Bech32
414415
Test.Cardano.Api.CBOR
416+
Test.Cardano.Api.Certificate
415417
Test.Cardano.Api.Cip129
416418
Test.Cardano.Api.Crypto
417419
Test.Cardano.Api.Envelope
@@ -465,7 +467,7 @@ test-suite cardano-api-golden
465467
cardano-crypto-class,
466468
cardano-data >=1.0,
467469
cardano-ledger-alonzo,
468-
cardano-ledger-api ^>=1.14,
470+
cardano-ledger-api ^>=1.15,
469471
cardano-ledger-binary,
470472
cardano-ledger-core,
471473
cardano-ledger-shelley,
@@ -477,8 +479,8 @@ test-suite cardano-api-golden
477479
hedgehog >=1.1,
478480
hedgehog-extras ^>=0.10,
479481
microlens,
480-
plutus-core ^>=1.70,
481-
plutus-ledger-api ^>=1.70,
482+
plutus-core ^>=1.71,
483+
plutus-ledger-api ^>=1.71,
482484
tasty,
483485
tasty-discover,
484486
tasty-hedgehog,

‎cardano-api/gen/Test/Gen/Cardano/Api/ProtocolParameters.hs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,15 @@ genIntroducedInDijkstraPParams =
166166
<*> genStrictMaybe Q.arbitrary
167167
<*> genStrictMaybe Q.arbitrary
168168
<*> genStrictMaybe Q.arbitrary
169+
<*> genStrictMaybe Q.arbitrary
170+
<*> genStrictMaybe Q.arbitrary
171+
<*> genStrictMaybe Q.arbitrary
172+
<*> genStrictMaybe Q.arbitrary
173+
<*> genStrictMaybe Q.arbitrary
174+
<*> genStrictMaybe Q.arbitrary
175+
<*> genStrictMaybe Q.arbitrary
176+
<*> genStrictMaybe Q.arbitrary
177+
<*> genStrictMaybe Q.arbitrary
169178

170179
genDijkstraEraBasedProtocolParametersUpdate
171180
:: MonadGen m => m (EraBasedProtocolParametersUpdate DijkstraEra)

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ fromConsensusPointHF (Consensus.BlockPoint slot (Consensus.OneEraHash h)) =
312312
-- | Convert a 'Consensus.Point' for single Shelley-era block type
313313
toConsensusPoint
314314
:: forall ledgerera protocol
315-
. Consensus.ShelleyCompatible protocol ledgerera
316-
=> ChainPoint
315+
. ChainPoint
317316
-> Consensus.Point (Consensus.ShelleyBlock protocol ledgerera)
318317
toConsensusPoint ChainPointAtGenesis = Consensus.GenesisPoint
319318
toConsensusPoint (ChainPoint slot (HeaderHash h)) =
@@ -327,8 +326,7 @@ toConsensusPoint (ChainPoint slot (HeaderHash h)) =
327326
-- | Convert a 'Consensus.Point' for single Shelley-era block type
328327
fromConsensusPoint
329328
:: forall protocol ledgerera
330-
. Consensus.ShelleyCompatible protocol ledgerera
331-
=> Consensus.Point (Consensus.ShelleyBlock protocol ledgerera)
329+
. Consensus.Point (Consensus.ShelleyBlock protocol ledgerera)
332330
-> ChainPoint
333331
fromConsensusPoint Consensus.GenesisPoint = ChainPointAtGenesis
334332
fromConsensusPoint (Consensus.BlockPoint slot h) =

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ data StakePoolParameters
5050
= StakePoolParameters
5151
{ stakePoolId :: PoolId
5252
, stakePoolVRF :: Hash VrfKey
53+
, stakePoolBlsKey :: Maybe Ledger.BlsKey
54+
-- ^ The pool's BLS voting key and its proof of possession. Only registrable
55+
-- from the Dijkstra era onwards; 'Nothing' for a pool that does not vote.
5356
, stakePoolCost :: L.Coin
5457
, stakePoolMargin :: Rational
5558
, stakePoolRewardAccount :: StakeAddress
@@ -86,11 +89,12 @@ data StakePoolMetadataReference
8689
-- Internal conversion functions
8790
--
8891

89-
toShelleyPoolParams :: StakePoolParameters -> Ledger.StakePoolParams
92+
toShelleyPoolParams :: StakePoolParameters -> Ledger.StakePoolParams era
9093
toShelleyPoolParams
9194
StakePoolParameters
9295
{ stakePoolId = StakePoolKeyHash poolkh
9396
, stakePoolVRF = VrfKeyHash vrfkh
97+
, stakePoolBlsKey
9498
, stakePoolCost
9599
, stakePoolMargin
96100
, stakePoolRewardAccount
@@ -120,6 +124,7 @@ toShelleyPoolParams
120124
, Ledger.sppMetadata =
121125
toShelleyPoolMetadata
122126
<$> Ledger.maybeToStrictMaybe stakePoolMetadata
127+
, Ledger.sppBlsKey = Ledger.maybeToStrictMaybe stakePoolBlsKey
123128
}
124129
where
125130
toShelleyStakePoolRelay :: StakePoolRelay -> Ledger.StakePoolRelay
@@ -159,7 +164,7 @@ toShelleyPoolParams
159164
Ledger.textToUrl (Text.length url) url
160165

161166
fromShelleyPoolParams
162-
:: Ledger.StakePoolParams
167+
:: Ledger.StakePoolParams era
163168
-> StakePoolParameters
164169
fromShelleyPoolParams
165170
Ledger.StakePoolParams
@@ -172,10 +177,12 @@ fromShelleyPoolParams
172177
, Ledger.sppOwners
173178
, Ledger.sppRelays
174179
, Ledger.sppMetadata
180+
, Ledger.sppBlsKey
175181
} =
176182
StakePoolParameters
177183
{ stakePoolId = StakePoolKeyHash sppId
178184
, stakePoolVRF = VrfKeyHash (Ledger.fromVRFVerKeyHash sppVrf)
185+
, stakePoolBlsKey = Ledger.strictMaybeToMaybe sppBlsKey
179186
, stakePoolCost = sppCost
180187
, stakePoolMargin = Ledger.unboundRational sppMargin
181188
, stakePoolRewardAccount = fromShelleyStakeAddr sppAccountAddress

0 commit comments

Comments
 (0)