From 7f33ffe69e2ed07d3463e2367a44572bb76cde84 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Thu, 21 Nov 2024 14:29:49 -0700 Subject: [PATCH 01/17] Fix typo --- cardano-api/internal/Cardano/Api/Certificate.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-api/internal/Cardano/Api/Certificate.hs b/cardano-api/internal/Cardano/Api/Certificate.hs index b31ab11135..de080e6345 100644 --- a/cardano-api/internal/Cardano/Api/Certificate.hs +++ b/cardano-api/internal/Cardano/Api/Certificate.hs @@ -362,7 +362,7 @@ makeStakePoolRetirementCertificate req = ConwayCertificate atMostBab $ Ledger.mkRetirePoolTxCert (unStakePoolKeyHash poolId) retirementEpoch -data GenesisKeyDelegationRequirements ere where +data GenesisKeyDelegationRequirements era where GenesisKeyDelegationRequirements :: ShelleyToBabbageEra era -> Hash GenesisKey From 50f900c61e07119242978f4deb78677c43df7a8e Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 18:54:52 -0700 Subject: [PATCH 02/17] Fix `cabal check` warnings --- cardano-api-gen/cardano-api-gen.cabal | 2 +- scripts/ci/check-cabal-files.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cardano-api-gen/cardano-api-gen.cabal b/cardano-api-gen/cardano-api-gen.cabal index 8621228972..9720e11f4e 100644 --- a/cardano-api-gen/cardano-api-gen.cabal +++ b/cardano-api-gen/cardano-api-gen.cabal @@ -17,7 +17,7 @@ license-files: NOTICE build-type: Simple -extra-source-files: +extra-doc-files: CHANGELOG.md README.md diff --git a/scripts/ci/check-cabal-files.sh b/scripts/ci/check-cabal-files.sh index 5771c266d5..7efa2def26 100755 --- a/scripts/ci/check-cabal-files.sh +++ b/scripts/ci/check-cabal-files.sh @@ -6,6 +6,6 @@ for cabal_file in $(git ls-files "*.cabal") do cd "$(dirname "$cabal_file")" || { echo "Cannot cd"; exit 1; } echo "$(pwd)> cabal-check" - cabal check + cabal check --ignore=missing-upper-bounds cd - || { echo "Cannot cd back"; exit 1; } done From ae968dada7ef02612eb7475d9583dfd1171b474c Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 16:21:02 -0700 Subject: [PATCH 03/17] Bump Hackage and CHaP indexes --- cabal.project | 4 ++-- flake.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cabal.project b/cabal.project index c09b9ee267..93c68b5f59 100644 --- a/cabal.project +++ b/cabal.project @@ -13,8 +13,8 @@ repository cardano-haskell-packages -- See CONTRIBUTING for information about these, including some Nix commands -- you need to run if you change them index-state: - , hackage.haskell.org 2024-10-10T08:11:33Z - , cardano-haskell-packages 2024-10-14T23:19:53Z + , hackage.haskell.org 2024-12-24T12:56:48Z + , cardano-haskell-packages 2025-01-08T16:35:32Z packages: cardano-api diff --git a/flake.lock b/flake.lock index 785b5bc9f9..b5b3c3417a 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1728953092, - "narHash": "sha256-DBqT9uexf/yoZjtEP3263ltnhP/o7iBl8IZdJRfPjJs=", + "lastModified": 1736355014, + "narHash": "sha256-2eKlS3k8Up/2oxDSBrw5aoXHFhBq+WV1HwjWwjetom4=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "fd5e5cf056090977ecbd661ad07f602eb7e2614d", + "rev": "b7f0f0885cd6f507cc767263488f4a07ebdd79d1", "type": "github" }, "original": { @@ -205,11 +205,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1728952051, - "narHash": "sha256-nCNldd8iA8/T3qUKbSFzBmiHu4oFjmgwz0DFrZaUJhU=", + "lastModified": 1736382484, + "narHash": "sha256-z1wBpMV1uqkZKCo4q4aXVwHcinYtwD0LHI5AEDtpnVA=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "1762ac2d3054cb53246ff77e8a6786f6d7357b4f", + "rev": "db572909cbd9ea2179284e594e04a0ec6e480ce0", "type": "github" }, "original": { From 647111fcc6e03f5c2f2dfcde865a33fa11290582 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 18 Dec 2024 22:41:40 -0700 Subject: [PATCH 04/17] hedgehog-extras upgrade: 0.7.0 --- cardano-api/cardano-api.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index d1cb46b7f7..9bae30e2a8 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -406,7 +406,7 @@ test-suite cardano-api-golden errors, filepath, hedgehog >=1.1, - hedgehog-extras ^>=0.6.1.0, + hedgehog-extras ^>=0.7, microlens, parsec, plutus-core ^>=1.36, From 09bc725c439c256161d61e4d369fa1da990e9067 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Thu, 28 Nov 2024 18:31:27 -0700 Subject: [PATCH 05/17] plutus upgrade: increase dependency version bounds --- cardano-api/cardano-api.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 9bae30e2a8..7617b7527b 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -211,7 +211,7 @@ library internal ouroboros-network-framework, ouroboros-network-protocols, parsec, - plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.36, + plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.38, prettyprinter, prettyprinter-ansi-terminal, prettyprinter-configurable ^>=1.36, @@ -409,7 +409,7 @@ test-suite cardano-api-golden hedgehog-extras ^>=0.7, microlens, parsec, - plutus-core ^>=1.36, + plutus-core ^>=1.38, plutus-ledger-api, tasty, tasty-hedgehog, From 0796e2b553a893454ae5df2740d4cce8574fc4d5 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 4 Dec 2024 13:38:00 -0700 Subject: [PATCH 06/17] plutus-upgrade: adjust golden file for new MintValue type --- .../ScriptErrorEvaluationFailed.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-api/test/cardano-api-golden/files/golden/errors/Cardano.Api.Fees.ScriptExecutionError/ScriptErrorEvaluationFailed.txt b/cardano-api/test/cardano-api-golden/files/golden/errors/Cardano.Api.Fees.ScriptExecutionError/ScriptErrorEvaluationFailed.txt index 1ab8477c1c..30e7153241 100644 --- a/cardano-api/test/cardano-api-golden/files/golden/errors/Cardano.Api.Fees.ScriptExecutionError/ScriptErrorEvaluationFailed.txt +++ b/cardano-api/test/cardano-api-golden/files/golden/errors/Cardano.Api.Fees.ScriptExecutionError/ScriptErrorEvaluationFailed.txt @@ -31,7 +31,7 @@ Script arguments: with referenceScript ] Fee: 0 - Value minted: Value {getValue = Map {unMap = [(c61bfa1c138524b69f378bc69504322f39289ce554d549db4d1e2b50,Map {unMap = [("MillarCoin",5)]})]}} + Value minted: UnsafeMintValue (Map {unMap = [(c61bfa1c138524b69f378bc69504322f39289ce554d549db4d1e2b50,Map {unMap = [("MillarCoin",5)]})]}) TxCerts: [ TxCertRegStaking (ScriptCredential c61bfa1c138524b69f378bc69504322f39289ce554d549db4d1e2b50) (Just 400000) ] Wdrl: [] Valid range: (-∞ , +∞) From ffd48d69daecbb537ab321390b79897814b5718d Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 16:36:32 -0700 Subject: [PATCH 07/17] cardano-ledger upgrade: loosen dependency version bounds --- cabal.project | 1 - cardano-api/cardano-api.cabal | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cabal.project b/cabal.project index 93c68b5f59..995fd5d99b 100644 --- a/cabal.project +++ b/cabal.project @@ -54,4 +54,3 @@ semaphore: True constraints: Cabal < 3.14, - cardano-ledger-shelley ^>= 1.14.1 diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 7617b7527b..2217ea101b 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -173,7 +173,7 @@ library internal cardano-data >=1.0, cardano-ledger-allegra >=1.6, cardano-ledger-alonzo >=1.10.2, - cardano-ledger-api ^>=1.9.3, + cardano-ledger-api >=1.9.3, cardano-ledger-babbage >=1.9, cardano-ledger-binary >=1.3, cardano-ledger-byron >=1.0.1, @@ -324,7 +324,7 @@ test-suite cardano-api-test cardano-crypto-test ^>=1.5, cardano-crypto-tests ^>=2.1, cardano-ledger-alonzo, - cardano-ledger-api ^>=1.9, + cardano-ledger-api >=1.9, cardano-ledger-binary, cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14, cardano-ledger-mary, @@ -395,7 +395,7 @@ test-suite cardano-api-golden cardano-crypto-class ^>=2.1.2, cardano-data >=1.0, cardano-ledger-alonzo, - cardano-ledger-api ^>=1.9, + cardano-ledger-api >=1.9, cardano-ledger-babbage >=1.9, cardano-ledger-binary, cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14, From e486532bab25311a902fe019408b51cacc8e9964 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 17:15:24 -0700 Subject: [PATCH 08/17] cardano-ledger upgrade: accommodate the new VRFVerKeyHash type --- cardano-api/internal/Cardano/Api/Certificate.hs | 6 +++--- cardano-api/internal/Cardano/Api/Keys/Praos.hs | 2 +- cardano-api/internal/Cardano/Api/LedgerState.hs | 2 +- cardano-api/internal/Cardano/Api/ReexposeLedger.hs | 4 +++- .../cardano-api-golden/Test/Golden/Cardano/Api/Genesis.hs | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/Certificate.hs b/cardano-api/internal/Cardano/Api/Certificate.hs index de080e6345..0f2a837ca3 100644 --- a/cardano-api/internal/Cardano/Api/Certificate.hs +++ b/cardano-api/internal/Cardano/Api/Certificate.hs @@ -381,7 +381,7 @@ makeGenesisKeyDelegationCertificate ShelleyRelatedCertificate atMostEra $ shelleyToBabbageEraConstraints atMostEra $ Ledger.ShelleyTxCertGenesisDeleg $ - Ledger.GenesisDelegCert hGenKey hGenDelegKey hVrfKey + Ledger.GenesisDelegCert hGenKey hGenDelegKey (Ledger.toVRFVerKeyHash hVrfKey) data MirCertificateRequirements era where MirCertificateRequirements @@ -613,7 +613,7 @@ toShelleyPoolParams -- do simple client-side sanity checks, e.g. on the pool metadata url Ledger.PoolParams { Ledger.ppId = poolkh - , Ledger.ppVrf = vrfkh + , Ledger.ppVrf = Ledger.toVRFVerKeyHash vrfkh , Ledger.ppPledge = stakePoolPledge , Ledger.ppCost = stakePoolCost , Ledger.ppMargin = @@ -685,7 +685,7 @@ fromShelleyPoolParams } = StakePoolParameters { stakePoolId = StakePoolKeyHash ppId - , stakePoolVRF = VrfKeyHash ppVrf + , stakePoolVRF = VrfKeyHash (Ledger.fromVRFVerKeyHash ppVrf) , stakePoolCost = ppCost , stakePoolMargin = Ledger.unboundRational ppMargin , stakePoolRewardAccount = fromShelleyStakeAddr ppRewardAccount diff --git a/cardano-api/internal/Cardano/Api/Keys/Praos.hs b/cardano-api/internal/Cardano/Api/Keys/Praos.hs index ad83c77b94..cca7caa20e 100644 --- a/cardano-api/internal/Cardano/Api/Keys/Praos.hs +++ b/cardano-api/internal/Cardano/Api/Keys/Praos.hs @@ -200,7 +200,7 @@ instance Key VrfKey where verificationKeyHash :: VerificationKey VrfKey -> Hash VrfKey verificationKeyHash (VrfVerificationKey vkey) = - VrfKeyHash (Shelley.hashVerKeyVRF vkey) + VrfKeyHash (Crypto.hashVerKeyVRF vkey) instance SerialiseAsRawBytes (VerificationKey VrfKey) where serialiseToRawBytes (VrfVerificationKey vk) = diff --git a/cardano-api/internal/Cardano/Api/LedgerState.hs b/cardano-api/internal/Cardano/Api/LedgerState.hs index a960aaaf72..e656026bcd 100644 --- a/cardano-api/internal/Cardano/Api/LedgerState.hs +++ b/cardano-api/internal/Cardano/Api/LedgerState.hs @@ -2291,6 +2291,6 @@ toLedgerIndividualPoolStake :: Consensus.IndividualPoolStake c -> SL.IndividualP toLedgerIndividualPoolStake ips = SL.IndividualPoolStake { SL.individualPoolStake = Consensus.individualPoolStake ips - , SL.individualPoolStakeVrf = Consensus.individualPoolStakeVrf ips + , SL.individualPoolStakeVrf = SL.toVRFVerKeyHash $ Consensus.individualPoolStakeVrf ips , SL.individualTotalPoolStake = SL.CompactCoin 0 } diff --git a/cardano-api/internal/Cardano/Api/ReexposeLedger.hs b/cardano-api/internal/Cardano/Api/ReexposeLedger.hs index e56352c044..60e1df6e5d 100644 --- a/cardano-api/internal/Cardano/Api/ReexposeLedger.hs +++ b/cardano-api/internal/Cardano/Api/ReexposeLedger.hs @@ -17,6 +17,8 @@ module Cardano.Api.ReexposeLedger , hashKey , hashVerKeyVRF , hashWithSerialiser + , fromVRFVerKeyHash + , toVRFVerKeyHash , PoolParams (..) , HasKeyRole , MIRPot (..) @@ -225,7 +227,7 @@ import Cardano.Ledger.Credential (Credential (..), credToText) import Cardano.Ledger.Crypto (ADDRHASH, Crypto, StandardCrypto) import Cardano.Ledger.DRep (DRep (..), drepAnchorL, drepDepositL, drepExpiryL) import Cardano.Ledger.Keys (HasKeyRole, KeyHash (..), KeyRole (..), VKey (..), - hashWithSerialiser) + fromVRFVerKeyHash, hashWithSerialiser, toVRFVerKeyHash) import Cardano.Ledger.Plutus.Data (Data (..), unData) import Cardano.Ledger.Plutus.Language (Language, Plutus, languageToText, plutusBinary) import Cardano.Ledger.PoolParams (PoolMetadata (..), PoolParams (..), StakePoolRelay (..)) diff --git a/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/Genesis.hs b/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/Genesis.hs index a6d84e1243..10f3ed0783 100644 --- a/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/Genesis.hs +++ b/cardano-api/test/cardano-api-golden/Test/Golden/Cardano/Api/Genesis.hs @@ -17,7 +17,7 @@ import Cardano.Ledger.Credential (Credential (..), PaymentCredential, StakeReference (..)) import Cardano.Ledger.Crypto (StandardCrypto) import Cardano.Ledger.Keys (GenDelegPair (..), Hash, KeyHash (..), KeyRole (..), - VerKeyVRF) + VerKeyVRF, toVRFVerKeyHash) import Cardano.Ledger.Shelley.Genesis (emptyGenesisStaking) import Cardano.Slotting.Slot (EpochSize (..)) @@ -51,7 +51,7 @@ exampleShelleyGenesis = fromList [ ( genesisVerKeyHash - , GenDelegPair delegVerKeyHash delegVrfKeyHash + , GenDelegPair delegVerKeyHash (toVRFVerKeyHash delegVrfKeyHash) ) ] , sgInitialFunds = ListMap [(initialFundedAddress, initialFunds)] From f54110534f73cd70f90e281b76b95eb5bf76dd49 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 17:44:30 -0700 Subject: [PATCH 09/17] cardano-ledger upgrade: use Cardano.Ledger.Core instead of Cardano.Ledger.Era --- cardano-api/internal/Cardano/Api/Block.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-api/internal/Cardano/Api/Block.hs b/cardano-api/internal/Cardano/Api/Block.hs index 7e3a0ae83f..cdc0ec9824 100644 --- a/cardano-api/internal/Cardano/Api/Block.hs +++ b/cardano-api/internal/Cardano/Api/Block.hs @@ -62,7 +62,7 @@ import qualified Cardano.Crypto.Hash.Class as Crypto import qualified Cardano.Crypto.Hashing import qualified Cardano.Ledger.Api as L import qualified Cardano.Ledger.Block as Ledger -import qualified Cardano.Ledger.Era as Ledger +import qualified Cardano.Ledger.Core as Ledger import Cardano.Slotting.Block (BlockNo) import Cardano.Slotting.Slot (EpochNo, SlotNo, WithOrigin (..)) import qualified Ouroboros.Consensus.Block as Consensus From db132987177bb261c362da5b5d0d4e6e0ae15495 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 17:45:45 -0700 Subject: [PATCH 10/17] cardano-ledger upgrade: add support for the GovRemovedVotes event --- .../Cardano/Api/LedgerEvents/ConvertLedgerEvent.hs | 2 ++ .../internal/Cardano/Api/LedgerEvents/LedgerEvent.hs | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/cardano-api/internal/Cardano/Api/LedgerEvents/ConvertLedgerEvent.hs b/cardano-api/internal/Cardano/Api/LedgerEvents/ConvertLedgerEvent.hs index f8ab2b4ad9..0399ffc5df 100644 --- a/cardano-api/internal/Cardano/Api/LedgerEvents/ConvertLedgerEvent.hs +++ b/cardano-api/internal/Cardano/Api/LedgerEvents/ConvertLedgerEvent.hs @@ -170,6 +170,8 @@ toLedgerEventConway evt = case govEvent of Conway.GovNewProposals txid props -> Just $ NewGovernanceProposals txid (AnyProposals props) + Conway.GovRemovedVotes txid replacedVotes unregisteredDReps -> + Just $ RemovedGovernanceVotes txid replacedVotes unregisteredDReps instance ConvertLedgerEvent (HardForkBlock (Consensus.CardanoEras StandardCrypto)) where toLedgerEvent wrappedLedgerEvent = diff --git a/cardano-api/internal/Cardano/Api/LedgerEvents/LedgerEvent.hs b/cardano-api/internal/Cardano/Api/LedgerEvents/LedgerEvent.hs index 04569fe33a..4c593243aa 100644 --- a/cardano-api/internal/Cardano/Api/LedgerEvents/LedgerEvent.hs +++ b/cardano-api/internal/Cardano/Api/LedgerEvents/LedgerEvent.hs @@ -67,6 +67,13 @@ data LedgerEvent -- | Newly submittted governance proposals in a single transaction. NewGovernanceProposals (Ledger.TxId StandardCrypto) AnyProposals + | -- | Governance votes that were invalidated. + RemovedGovernanceVotes + (Ledger.TxId StandardCrypto) + (Set (Ledger.Voter StandardCrypto, Ledger.GovActionId StandardCrypto)) + -- ^ Votes that were replaced in this tx. + (Set (Ledger.Credential 'Ledger.DRepRole StandardCrypto)) + -- ^ Any votes from these DReps in this or in previous txs are removed | -- | The current state of governance matters at the epoch boundary. -- I.E the current constitution, committee, protocol parameters, etc. EpochBoundaryRatificationState AnyRatificationState From fa4ef375b45b2290005a0b59b038368ec0b227ee Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Mon, 9 Dec 2024 22:38:33 -0700 Subject: [PATCH 11/17] cardano-ledger upgrade: StakePoolTargetNum change to Word16 --- cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs | 4 ++-- cardano-api/internal/Cardano/Api/ProtocolParameters.hs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs index 26eafc9733..4081e38724 100644 --- a/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs +++ b/cardano-api/gen/Test/Gen/Cardano/Api/Typed.hs @@ -1005,7 +1005,7 @@ genProtocolParameters era = do protocolParamStakePoolDeposit <- genLovelace protocolParamMinPoolCost <- genLovelace protocolParamPoolRetireMaxEpoch <- genEpochInterval - protocolParamStakePoolTargetNum <- genNat + protocolParamStakePoolTargetNum <- genWord16 protocolParamPoolPledgeInfluence <- genRationalInt64 protocolParamMonetaryExpansion <- genRational protocolParamTreasuryCut <- genRational @@ -1042,7 +1042,7 @@ genProtocolParametersUpdate era = do protocolUpdateStakePoolDeposit <- Gen.maybe genLovelace protocolUpdateMinPoolCost <- Gen.maybe genLovelace protocolUpdatePoolRetireMaxEpoch <- Gen.maybe genEpochInterval - protocolUpdateStakePoolTargetNum <- Gen.maybe genNat + protocolUpdateStakePoolTargetNum <- Gen.maybe genWord16 protocolUpdatePoolPledgeInfluence <- Gen.maybe genRationalInt64 protocolUpdateMonetaryExpansion <- Gen.maybe genRational protocolUpdateTreasuryCut <- Gen.maybe genRational diff --git a/cardano-api/internal/Cardano/Api/ProtocolParameters.hs b/cardano-api/internal/Cardano/Api/ProtocolParameters.hs index 9290ae35be..8f71cfb73b 100644 --- a/cardano-api/internal/Cardano/Api/ProtocolParameters.hs +++ b/cardano-api/internal/Cardano/Api/ProtocolParameters.hs @@ -326,7 +326,7 @@ data CommonProtocolParametersUpdate , cppKeyDeposit :: StrictMaybe Ledger.Coin , cppPoolDeposit :: StrictMaybe Ledger.Coin , cppPoolRetireMaxEpoch :: StrictMaybe Ledger.EpochInterval - , cppStakePoolTargetNum :: StrictMaybe Natural + , cppStakePoolTargetNum :: StrictMaybe Word16 , cppPoolPledgeInfluence :: StrictMaybe Ledger.NonNegativeInterval , cppTreasuryExpansion :: StrictMaybe Ledger.UnitInterval , cppMonetaryExpansion :: StrictMaybe Ledger.UnitInterval @@ -526,7 +526,7 @@ data ProtocolParameters , protocolParamPoolRetireMaxEpoch :: Ledger.EpochInterval -- ^ The maximum number of epochs into the future that stake pools -- are permitted to schedule a retirement. - , protocolParamStakePoolTargetNum :: Natural + , protocolParamStakePoolTargetNum :: Word16 -- ^ The equilibrium target number of stake pools. -- -- This is the \"k\" incentives parameter from the design document. @@ -710,7 +710,7 @@ data ProtocolParametersUpdate , protocolUpdatePoolRetireMaxEpoch :: Maybe Ledger.EpochInterval -- ^ The maximum number of epochs into the future that stake pools -- are permitted to schedule a retirement. - , protocolUpdateStakePoolTargetNum :: Maybe Natural + , protocolUpdateStakePoolTargetNum :: Maybe Word16 -- ^ The equilibrium target number of stake pools. -- -- This is the \"k\" incentives parameter from the design document. From 2b206c6519bea23359c084b39763ce1446225118 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Thu, 25 Jul 2024 21:33:57 +0200 Subject: [PATCH 12/17] ouroboros-network upgrade: update to use typed-protocols-0.3.0.0 --- cardano-api/cardano-api.cabal | 6 +-- cardano-api/internal/Cardano/Api/IPC.hs | 26 ++++++++----- .../internal/Cardano/Api/LedgerState.hs | 38 +++++++++---------- .../Cardano/Api/ChainSync/ClientPipelined.hs | 2 +- 4 files changed, 39 insertions(+), 33 deletions(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 2217ea101b..01ce765f23 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -207,7 +207,7 @@ library internal ouroboros-consensus-diffusion ^>=0.18, ouroboros-consensus-protocol ^>=0.9.0.2, ouroboros-network, - ouroboros-network-api ^>=0.10, + ouroboros-network-api ^>=0.11, ouroboros-network-framework, ouroboros-network-protocols, parsec, @@ -226,7 +226,7 @@ library internal time, transformers, transformers-except ^>=0.1.3, - typed-protocols ^>=0.1.1, + typed-protocols ^>=0.3, vector, yaml, @@ -262,7 +262,7 @@ library memory, nothunks, ouroboros-network-protocols, - typed-protocols ^>=0.1.1, + typed-protocols, library gen import: project-config diff --git a/cardano-api/internal/Cardano/Api/IPC.hs b/cardano-api/internal/Cardano/Api/IPC.hs index c277fc35a5..4171cf9032 100644 --- a/cardano-api/internal/Cardano/Api/IPC.hs +++ b/cardano-api/internal/Cardano/Api/IPC.hs @@ -122,6 +122,7 @@ import qualified Ouroboros.Network.Protocol.LocalTxSubmission.Client as Net.Tx import Control.Concurrent.STM (TMVar, atomically, newEmptyTMVarIO, putTMVar, takeTMVar, tryPutTMVar) +import Control.Exception (throwIO) import Control.Monad (void) import Control.Monad.IO.Class import Control.Tracer (nullTracer) @@ -202,15 +203,19 @@ connectToLocalNodeWithVersion , localConsensusModeParams } clients = - liftIO $ Net.withIOManager $ \iomgr -> - Net.connectTo - (Net.localSnocket iomgr) - Net.NetworkConnectTracers - { Net.nctMuxTracer = nullTracer - , Net.nctHandshakeTracer = nullTracer - } - versionedProtocls - (unFile localNodeSocketPath) + liftIO $ Net.withIOManager $ \iomgr -> do + r <- + Net.connectTo + (Net.localSnocket iomgr) + Net.NetworkConnectTracers + { Net.nctMuxTracer = nullTracer + , Net.nctHandshakeTracer = nullTracer + } + versionedProtocls + (unFile localNodeSocketPath) + case r of + Left e -> throwIO e + Right _ -> pure () where versionedProtocls = -- First convert from the mode-parametrised view of things to the @@ -302,10 +307,11 @@ mkVersionedProtocols networkid ptcl unversionedClients = ) , localStateQueryProtocol = Net.InitiatorProtocolOnly $ - Net.mkMiniProtocolCbFromPeer $ + Net.mkMiniProtocolCbFromPeerSt $ const ( nullTracer , cStateQueryCodec + , Net.Query.StateIdle , maybe Net.localStateQueryPeerNull Net.Query.localStateQueryClientPeer diff --git a/cardano-api/internal/Cardano/Api/LedgerState.hs b/cardano-api/internal/Cardano/Api/LedgerState.hs index e656026bcd..a3a0396add 100644 --- a/cardano-api/internal/Cardano/Api/LedgerState.hs +++ b/cardano-api/internal/Cardano/Api/LedgerState.hs @@ -220,7 +220,7 @@ import qualified Data.Yaml as Yaml import Formatting.Buildable (build) import GHC.Exts (IsList (..)) import Lens.Micro -import Network.TypedProtocol.Pipelined (Nat (..)) +import Network.TypedProtocol.Core (Nat (..)) import System.FilePath data InitialLedgerStateError @@ -1097,45 +1097,45 @@ instance FromJSON NodeConfig where <*> parseBabbageHardForkEpoch o <*> parseConwayHardForkEpoch o - parseShelleyHardForkEpoch :: Object -> Parser Consensus.TriggerHardFork + parseShelleyHardForkEpoch :: Object -> Parser (Consensus.CardanoHardForkTrigger blk) parseShelleyHardForkEpoch o = asum - [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestShelleyHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 2 -- Mainnet default + [ Consensus.CardanoTriggerHardForkAtEpoch <$> o .: "TestShelleyHardForkAtEpoch" + , pure Consensus.CardanoTriggerHardForkAtDefaultVersion ] - parseAllegraHardForkEpoch :: Object -> Parser Consensus.TriggerHardFork + parseAllegraHardForkEpoch :: Object -> Parser (Consensus.CardanoHardForkTrigger blk) parseAllegraHardForkEpoch o = asum - [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestAllegraHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 3 -- Mainnet default + [ Consensus.CardanoTriggerHardForkAtEpoch <$> o .: "TestAllegraHardForkAtEpoch" + , pure Consensus.CardanoTriggerHardForkAtDefaultVersion ] - parseMaryHardForkEpoch :: Object -> Parser Consensus.TriggerHardFork + parseMaryHardForkEpoch :: Object -> Parser (Consensus.CardanoHardForkTrigger blk) parseMaryHardForkEpoch o = asum - [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestMaryHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 4 -- Mainnet default + [ Consensus.CardanoTriggerHardForkAtEpoch <$> o .: "TestMaryHardForkAtEpoch" + , pure Consensus.CardanoTriggerHardForkAtDefaultVersion ] - parseAlonzoHardForkEpoch :: Object -> Parser Consensus.TriggerHardFork + parseAlonzoHardForkEpoch :: Object -> Parser (Consensus.CardanoHardForkTrigger blk) parseAlonzoHardForkEpoch o = asum - [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestAlonzoHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 5 -- Mainnet default + [ Consensus.CardanoTriggerHardForkAtEpoch <$> o .: "TestAlonzoHardForkAtEpoch" + , pure Consensus.CardanoTriggerHardForkAtDefaultVersion ] - parseBabbageHardForkEpoch :: Object -> Parser Consensus.TriggerHardFork + parseBabbageHardForkEpoch :: Object -> Parser (Consensus.CardanoHardForkTrigger blk) parseBabbageHardForkEpoch o = asum - [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestBabbageHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 7 -- Mainnet default + [ Consensus.CardanoTriggerHardForkAtEpoch <$> o .: "TestBabbageHardForkAtEpoch" + , pure Consensus.CardanoTriggerHardForkAtDefaultVersion ] - parseConwayHardForkEpoch :: Object -> Parser Consensus.TriggerHardFork + parseConwayHardForkEpoch :: Object -> Parser (Consensus.CardanoHardForkTrigger blk) parseConwayHardForkEpoch o = asum - [ Consensus.TriggerHardForkAtEpoch <$> o .: "TestConwayHardForkAtEpoch" - , pure $ Consensus.TriggerHardForkAtVersion 9 -- Mainnet default + [ Consensus.CardanoTriggerHardForkAtEpoch <$> o .: "TestConwayHardForkAtEpoch" + , pure Consensus.CardanoTriggerHardForkAtDefaultVersion ] ---------------------------------------------------------------------- diff --git a/cardano-api/src/Cardano/Api/ChainSync/ClientPipelined.hs b/cardano-api/src/Cardano/Api/ChainSync/ClientPipelined.hs index 0ff1ba8e89..e794708a29 100644 --- a/cardano-api/src/Cardano/Api/ChainSync/ClientPipelined.hs +++ b/cardano-api/src/Cardano/Api/ChainSync/ClientPipelined.hs @@ -34,4 +34,4 @@ where import Ouroboros.Network.Protocol.ChainSync.ClientPipelined import Ouroboros.Network.Protocol.ChainSync.PipelineDecision -import Network.TypedProtocol.Pipelined (N (..), Nat (..), natToInt) +import Network.TypedProtocol.Core (N (..), Nat (..), natToInt) From 03a5505a9388079f91e043a39bdb72be590515fc Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 17:46:03 -0700 Subject: [PATCH 13/17] ouroboros-network upgrade: drop NodeToClient versions < 16 --- cardano-api/internal/Cardano/Api/Query.hs | 48 +++++++++++------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/cardano-api/internal/Cardano/Api/Query.hs b/cardano-api/internal/Cardano/Api/Query.hs index bfdef390f4..2d1ac760e0 100644 --- a/cardano-api/internal/Cardano/Api/Query.hs +++ b/cardano-api/internal/Cardano/Api/Query.hs @@ -156,12 +156,12 @@ data QueryInMode result where instance NodeToClientVersionOf (QueryInMode result) where nodeToClientVersionOf = \case - QueryCurrentEra -> NodeToClientV_9 + QueryCurrentEra -> NodeToClientV_16 QueryInEra q -> nodeToClientVersionOf q - QueryEraHistory -> NodeToClientV_9 - QuerySystemStart -> NodeToClientV_9 - QueryChainBlockNo -> NodeToClientV_10 - QueryChainPoint -> NodeToClientV_10 + QueryEraHistory -> NodeToClientV_16 + QuerySystemStart -> NodeToClientV_16 + QueryChainBlockNo -> NodeToClientV_16 + QueryChainPoint -> NodeToClientV_16 data EraHistory where EraHistory @@ -220,7 +220,7 @@ data QueryInEra era result where -> QueryInEra era result instance NodeToClientVersionOf (QueryInEra era result) where - nodeToClientVersionOf QueryByronUpdateState = NodeToClientV_9 + nodeToClientVersionOf QueryByronUpdateState = NodeToClientV_16 nodeToClientVersionOf (QueryInShelleyBasedEra _ q) = nodeToClientVersionOf q deriving instance Show (QueryInEra era result) @@ -306,23 +306,23 @@ data QueryInShelleyBasedEra era result where -- * https://ouroboros-network.cardano.intersectmbo.org/ouroboros-network/Ouroboros-Network-NodeToClient.html#t:NodeToClientVersion -- * https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/QueryVersioning/#implementation instance NodeToClientVersionOf (QueryInShelleyBasedEra era result) where - nodeToClientVersionOf QueryEpoch = NodeToClientV_9 - nodeToClientVersionOf QueryGenesisParameters = NodeToClientV_9 - nodeToClientVersionOf QueryProtocolParameters = NodeToClientV_9 - nodeToClientVersionOf QueryProtocolParametersUpdate = NodeToClientV_9 - nodeToClientVersionOf QueryStakeDistribution = NodeToClientV_9 + nodeToClientVersionOf QueryEpoch = NodeToClientV_16 + nodeToClientVersionOf QueryGenesisParameters = NodeToClientV_16 + nodeToClientVersionOf QueryProtocolParameters = NodeToClientV_16 + nodeToClientVersionOf QueryProtocolParametersUpdate = NodeToClientV_16 + nodeToClientVersionOf QueryStakeDistribution = NodeToClientV_16 nodeToClientVersionOf (QueryUTxO f) = nodeToClientVersionOf f - nodeToClientVersionOf (QueryStakeAddresses _ _) = NodeToClientV_9 - nodeToClientVersionOf QueryStakePools = NodeToClientV_9 - nodeToClientVersionOf (QueryStakePoolParameters _) = NodeToClientV_9 - nodeToClientVersionOf QueryDebugLedgerState = NodeToClientV_9 - nodeToClientVersionOf QueryProtocolState = NodeToClientV_9 - nodeToClientVersionOf QueryCurrentEpochState = NodeToClientV_9 + nodeToClientVersionOf (QueryStakeAddresses _ _) = NodeToClientV_16 + nodeToClientVersionOf QueryStakePools = NodeToClientV_16 + nodeToClientVersionOf (QueryStakePoolParameters _) = NodeToClientV_16 + nodeToClientVersionOf QueryDebugLedgerState = NodeToClientV_16 + nodeToClientVersionOf QueryProtocolState = NodeToClientV_16 + nodeToClientVersionOf QueryCurrentEpochState = NodeToClientV_16 -- Babbage >= v13 - nodeToClientVersionOf (QueryPoolState _) = NodeToClientV_14 - nodeToClientVersionOf (QueryPoolDistribution _) = NodeToClientV_14 - nodeToClientVersionOf (QueryStakeSnapshot _) = NodeToClientV_14 - nodeToClientVersionOf (QueryStakeDelegDeposits _) = NodeToClientV_15 + nodeToClientVersionOf (QueryPoolState _) = NodeToClientV_16 + nodeToClientVersionOf (QueryPoolDistribution _) = NodeToClientV_16 + nodeToClientVersionOf (QueryStakeSnapshot _) = NodeToClientV_16 + nodeToClientVersionOf (QueryStakeDelegDeposits _) = NodeToClientV_16 -- Conway >= v16 nodeToClientVersionOf QueryAccountState = NodeToClientV_16 nodeToClientVersionOf QueryConstitution = NodeToClientV_16 @@ -356,9 +356,9 @@ data QueryUTxOFilter deriving (Eq, Show) instance NodeToClientVersionOf QueryUTxOFilter where - nodeToClientVersionOf QueryUTxOWhole = NodeToClientV_9 - nodeToClientVersionOf (QueryUTxOByAddress _) = NodeToClientV_9 - nodeToClientVersionOf (QueryUTxOByTxIn _) = NodeToClientV_9 + nodeToClientVersionOf QueryUTxOWhole = NodeToClientV_16 + nodeToClientVersionOf (QueryUTxOByAddress _) = NodeToClientV_16 + nodeToClientVersionOf (QueryUTxOByTxIn _) = NodeToClientV_16 newtype ByronUpdateState = ByronUpdateState Byron.Update.State deriving Show From cdded9c5e657e1643f83ecc56fe01c59a3ce5700 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 17:13:00 -0700 Subject: [PATCH 14/17] ouroboros-network upgrade: use the new namespace for Network.Mux types --- cardano-api/cardano-api.cabal | 1 + cardano-api/internal/Cardano/Api/IPC.hs | 1 + cardano-api/internal/Cardano/Api/LedgerState.hs | 4 ++-- cardano-api/internal/Cardano/Api/Orphans.hs | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 01ce765f23..49fc27d603 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -202,6 +202,7 @@ library internal microlens-aeson, mtl, network, + network-mux, ouroboros-consensus ^>=0.21, ouroboros-consensus-cardano ^>=0.20, ouroboros-consensus-diffusion ^>=0.18, diff --git a/cardano-api/internal/Cardano/Api/IPC.hs b/cardano-api/internal/Cardano/Api/IPC.hs index 4171cf9032..bfba54487b 100644 --- a/cardano-api/internal/Cardano/Api/IPC.hs +++ b/cardano-api/internal/Cardano/Api/IPC.hs @@ -130,6 +130,7 @@ import Data.Aeson (ToJSON, object, toJSON, (.=)) import qualified Data.ByteString.Lazy as LBS import Data.Void (Void) import GHC.Exts (IsList (..)) +import qualified Network.Mux as Net -- ---------------------------------------------------------------------------- -- The types for the client side of the node-to-client IPC protocols diff --git a/cardano-api/internal/Cardano/Api/LedgerState.hs b/cardano-api/internal/Cardano/Api/LedgerState.hs index a3a0396add..a8175a074a 100644 --- a/cardano-api/internal/Cardano/Api/LedgerState.hs +++ b/cardano-api/internal/Cardano/Api/LedgerState.hs @@ -176,7 +176,6 @@ import Ouroboros.Consensus.Storage.Serialisation import Ouroboros.Consensus.TypeFamilyWrappers (WrapLedgerEvent (WrapLedgerEvent)) import Ouroboros.Network.Block (blockNo) import qualified Ouroboros.Network.Block -import Ouroboros.Network.Mux (MuxError) import qualified Ouroboros.Network.Protocol.ChainSync.Client as CS import qualified Ouroboros.Network.Protocol.ChainSync.ClientPipelined as CSP import Ouroboros.Network.Protocol.ChainSync.PipelineDecision @@ -220,6 +219,7 @@ import qualified Data.Yaml as Yaml import Formatting.Buildable (build) import GHC.Exts (IsList (..)) import Lens.Micro +import qualified Network.Mux as Mux import Network.TypedProtocol.Core (Nat (..)) import System.FilePath @@ -374,7 +374,7 @@ data FoldBlocksError = FoldBlocksInitialLedgerStateError !InitialLedgerStateError | FoldBlocksApplyBlockError !LedgerStateError | FoldBlocksIOException !IOException - | FoldBlocksMuxError !MuxError + | FoldBlocksMuxError !Mux.Error deriving Show instance Error FoldBlocksError where diff --git a/cardano-api/internal/Cardano/Api/Orphans.hs b/cardano-api/internal/Cardano/Api/Orphans.hs index a52f6840d0..fe85b5c174 100644 --- a/cardano-api/internal/Cardano/Api/Orphans.hs +++ b/cardano-api/internal/Cardano/Api/Orphans.hs @@ -73,7 +73,6 @@ import qualified Ouroboros.Consensus.Shelley.Eras as Consensus import Ouroboros.Consensus.Shelley.Ledger.Block (ShelleyHash (..)) import qualified Ouroboros.Consensus.Shelley.Ledger.Query as Consensus import Ouroboros.Network.Block (HeaderHash, Tip (..)) -import Ouroboros.Network.Mux (MuxError) import qualified PlutusLedgerApi.Common as P import qualified PlutusLedgerApi.V2 as V2 @@ -98,6 +97,7 @@ import GHC.Generics import GHC.Stack (HasCallStack) import GHC.TypeLits import Lens.Micro +import qualified Network.Mux as Mux deriving instance Generic (L.ApplyTxError era) @@ -558,7 +558,7 @@ instance Semigroup (Ledger.ConwayPParams StrictMaybe era) where lastMappendWithTHKD :: (a -> Ledger.THKD g StrictMaybe b) -> a -> a -> Ledger.THKD g StrictMaybe b lastMappendWithTHKD f a b = Ledger.THKD $ lastMappendWith (Ledger.unTHKD . f) a b -instance Pretty MuxError where +instance Pretty Mux.Error where pretty err = "Mux layer error:" <+> prettyException err instance A.FromJSON V2.ParamName where From 81f77eed67b57fea3d5d492239426e0712a10c4c Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 20 Nov 2024 18:20:26 -0700 Subject: [PATCH 15/17] ouroboros-network upgrade: stop using deprecated API function --- cardano-api/cardano-api.cabal | 1 + cardano-api/src/Cardano/Api/ChainSync/Client.hs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 49fc27d603..45d8dff794 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -262,6 +262,7 @@ library deepseq, memory, nothunks, + ouroboros-network, ouroboros-network-protocols, typed-protocols, diff --git a/cardano-api/src/Cardano/Api/ChainSync/Client.hs b/cardano-api/src/Cardano/Api/ChainSync/Client.hs index 39c5c56da4..30fca163db 100644 --- a/cardano-api/src/Cardano/Api/ChainSync/Client.hs +++ b/cardano-api/src/Cardano/Api/ChainSync/Client.hs @@ -8,11 +8,12 @@ module Cardano.Api.ChainSync.Client , ClientStIntersect (..) -- * Null chain sync client - , chainSyncClientNull + , chainSyncPeerNull -- * Utilities , mapChainSyncClient ) where +import Ouroboros.Network.NodeToClient import Ouroboros.Network.Protocol.ChainSync.Client From 40c8cb0806edbf485fcfd9883229550b65b0fb60 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Thu, 2 Jan 2025 16:06:09 +0100 Subject: [PATCH 16/17] ouroboros-network upgrade: use ouroboros-network-api-0.12 --- cardano-api/cardano-api.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index 45d8dff794..a0e67a4b37 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -208,7 +208,7 @@ library internal ouroboros-consensus-diffusion ^>=0.18, ouroboros-consensus-protocol ^>=0.9.0.2, ouroboros-network, - ouroboros-network-api ^>=0.11, + ouroboros-network-api ^>=0.12, ouroboros-network-framework, ouroboros-network-protocols, parsec, From f93b1cf1b5f2649e14c42f70a948ca9c2e5edc70 Mon Sep 17 00:00:00 2001 From: Neil Mayhew Date: Wed, 8 Jan 2025 13:42:30 -0700 Subject: [PATCH 17/17] ouroboros-consensus upgrade: increase dependency bounds --- cardano-api/cardano-api.cabal | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index a0e67a4b37..d57bcad5e4 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -203,10 +203,10 @@ library internal mtl, network, network-mux, - ouroboros-consensus ^>=0.21, - ouroboros-consensus-cardano ^>=0.20, - ouroboros-consensus-diffusion ^>=0.18, - ouroboros-consensus-protocol ^>=0.9.0.2, + ouroboros-consensus ^>=0.22, + ouroboros-consensus-cardano ^>=0.21, + ouroboros-consensus-diffusion ^>=0.19, + ouroboros-consensus-protocol ^>=0.10, ouroboros-network, ouroboros-network-api ^>=0.12, ouroboros-network-framework,