diff --git a/cabal.project b/cabal.project index d1cd02b9fe..797c51f22b 100644 --- a/cabal.project +++ b/cabal.project @@ -14,7 +14,7 @@ repository cardano-haskell-packages -- you need to run if you change them index-state: , hackage.haskell.org 2023-08-06T23:58:58Z - , cardano-haskell-packages 2023-09-28T08:17:07Z + , cardano-haskell-packages 2023-09-30T00:00:00Z packages: cardano-api @@ -41,3 +41,48 @@ write-ghc-environment-files: always -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. + +source-repository-package + type: git + location: https://github.com/input-output-hk/ouroboros-consensus + tag: 5101f06ca795d2e0bc13ec295f4ee382e1220396 + --sha256: 0arddssjxb2j05csv7zlihq6fbm58hr6ndf1chfxiyhjj2b304zy + subdir: + ouroboros-consensus + ouroboros-consensus-cardano + ouroboros-consensus-diffusion + ouroboros-consensus-protocol + strict-sop-core + +source-repository-package + type: git + location: https://github.com/input-output-hk/cardano-ledger + tag: 4ff10923904cc7f9e315190c53f3d4aba1dac7ca + --sha256: 07qdy261w5a1kxiywk6wvdcfaamlzsl4zn0104mny2w8nqxbxvmc + subdir: + eras/allegra/impl + eras/alonzo/impl + eras/alonzo/test-suite + eras/babbage/impl + eras/babbage/test-suite + eras/byron/chain/executable-spec + eras/byron/crypto + eras/byron/crypto/test + eras/byron/ledger/executable-spec + eras/byron/ledger/impl + eras/byron/ledger/impl/test + eras/conway/impl + eras/conway/test-suite + eras/mary/impl + eras/shelley/impl + eras/shelley/test-suite + eras/shelley-ma/test-suite + libs/cardano-data + libs/cardano-ledger-api + libs/cardano-ledger-binary + libs/cardano-ledger-core + libs/cardano-ledger-pretty + libs/cardano-protocol-tpraos + libs/small-steps + libs/small-steps-test + libs/vector-map \ No newline at end of file diff --git a/cardano-api/cardano-api.cabal b/cardano-api/cardano-api.cabal index d7f8f517ee..1040f297d4 100644 --- a/cardano-api/cardano-api.cabal +++ b/cardano-api/cardano-api.cabal @@ -150,17 +150,17 @@ library internal , cardano-crypto-class ^>= 2.1.2 , cardano-crypto-wrapper ^>= 1.5 , cardano-data >= 1.0 - , cardano-ledger-alonzo >= 1.3.1.1 - , cardano-ledger-allegra >= 1.2.0.2 - , cardano-ledger-api >= 1.3 - , cardano-ledger-babbage >= 1.4.0.1 + , cardano-ledger-alonzo >= 1.5.0 + , cardano-ledger-allegra >= 1.2.3.1 + , cardano-ledger-api >= 1.6.0.1 + , cardano-ledger-babbage >= 1.5.0 , cardano-ledger-binary , cardano-ledger-byron >= 1.0.0.2 - , cardano-ledger-conway >= 1.5 - , cardano-ledger-core >= 1.4 + , cardano-ledger-conway >= 1.10.0 + , cardano-ledger-core >= 1.8.0 , cardano-ledger-mary >= 1.3.0.2 - , cardano-ledger-shelley >= 1.4.1.0 - , cardano-protocol-tpraos >= 1.0.3.3 + , cardano-ledger-shelley >= 1.7.0 + , cardano-protocol-tpraos >= 1.0.3.6 , cardano-slotting >= 0.1 , cardano-strict-containers >= 0.1 , cborg @@ -187,9 +187,9 @@ library internal , ouroboros-network-framework , ouroboros-network-protocols , parsec - , plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>= 1.11 + , plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>= 1.14 , prettyprinter - , prettyprinter-configurable ^>= 1.11 + , prettyprinter-configurable ^>= 1.14 , random , scientific , serialise @@ -262,12 +262,12 @@ library gen , cardano-binary >= 1.6 && < 1.8 , cardano-crypto-class ^>= 2.1.2 , cardano-crypto-test ^>= 1.5 - , cardano-ledger-alonzo >= 1.3.1.1 + , cardano-ledger-alonzo >= 1.5.0 , cardano-ledger-alonzo-test , cardano-ledger-byron-test >= 1.5 - , cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.4 - , cardano-ledger-shelley >= 1.4.1.0 - , cardano-ledger-conway:testlib >= 1.5 + , cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8.0 + , cardano-ledger-shelley >= 1.7.0 + , cardano-ledger-conway:testlib >= 1.10.0 , containers , filepath , hedgehog >= 1.1 @@ -293,8 +293,8 @@ test-suite cardano-api-test , cardano-crypto-class ^>= 2.1.2 , cardano-crypto-test ^>= 1.5 , cardano-crypto-tests ^>= 2.1 - , cardano-ledger-api >= 1.3 - , cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.4 + , cardano-ledger-api >= 1.6.0.1 + , cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8 , containers , directory , hedgehog >= 1.1 @@ -342,8 +342,8 @@ test-suite cardano-api-golden , cardano-crypto-class ^>= 2.1.2 , cardano-data >= 1.0 , cardano-ledger-alonzo - , cardano-ledger-api >= 1.3 - , cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.4 + , cardano-ledger-api >= 1.6.0.1 + , cardano-ledger-core:{cardano-ledger-core, testlib} >= 1.8 , cardano-ledger-shelley , cardano-ledger-shelley-test >= 1.2.0.1 , cardano-slotting ^>= 0.1 @@ -353,8 +353,8 @@ test-suite cardano-api-golden , hedgehog >= 1.1 , hedgehog-extras ^>= 0.4.7.0 , microlens - , plutus-core ^>= 1.11 - , plutus-ledger-api ^>= 1.11 + , plutus-core ^>= 1.14 + , plutus-ledger-api ^>= 1.14 , tasty , tasty-hedgehog , time diff --git a/cardano-api/internal/Cardano/Api/Orphans.hs b/cardano-api/internal/Cardano/Api/Orphans.hs index 5fff888259..2a2f498c2c 100644 --- a/cardano-api/internal/Cardano/Api/Orphans.hs +++ b/cardano-api/internal/Cardano/Api/Orphans.hs @@ -8,6 +8,7 @@ {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} @@ -18,12 +19,13 @@ module Cardano.Api.Orphans () where import Cardano.Binary (DecoderError (..)) import qualified Cardano.Ledger.Alonzo.PParams as Ledger import qualified Cardano.Ledger.Babbage.PParams as Ledger -import Cardano.Ledger.BaseTypes (strictMaybeToMaybe) +import Cardano.Ledger.BaseTypes (strictMaybeToMaybe, ProtVer) import qualified Cardano.Ledger.BaseTypes as Ledger import qualified Cardano.Ledger.Conway.PParams as Ledger import Cardano.Ledger.Crypto (StandardCrypto) import qualified Cardano.Ledger.Crypto as CC (Crypto) import qualified Cardano.Ledger.Crypto as Crypto +import Cardano.Ledger.HKD (HKDFunctor (..)) import qualified Cardano.Ledger.Shelley.PParams as Ledger import qualified Cardano.Protocol.TPraos.API as Ledger import Cardano.Protocol.TPraos.BHeader (HashHeader (..)) @@ -313,8 +315,12 @@ instance Semigroup (Ledger.ConwayPParams StrictMaybe era) where , Ledger.cppA0 = lastMappendWith Ledger.cppA0 p1 p2 , Ledger.cppRho = lastMappendWith Ledger.cppRho p1 p2 , Ledger.cppTau = lastMappendWith Ledger.cppTau p1 p2 - , Ledger.cppProtocolVersion = lastMappendWith Ledger.cppProtocolVersion p1 p2 - , Ledger.cppMinPoolCost = lastMappendWith Ledger.cppMinPoolCost p1 p2 + , Ledger.cppProtocolVersion = + toNoUpdate @StrictMaybe @ProtVer $ + lastMappendWith (\x -> + fromNoUpdate @StrictMaybe @ProtVer (Ledger.cppProtocolVersion x) + ) p1 p2 + , Ledger.cppMinPoolCost = lastMappendWith (\x -> Ledger.cppMinPoolCost x) p1 p2 , Ledger.cppCoinsPerUTxOByte = lastMappendWith Ledger.cppCoinsPerUTxOByte p1 p2 , Ledger.cppCostModels = lastMappendWith Ledger.cppCostModels p1 p2 , Ledger.cppPrices = lastMappendWith Ledger.cppPrices p1 p2 diff --git a/flake.lock b/flake.lock index 08eb8e1e1d..439d4416d1 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,14 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1695892572, - "narHash": "sha256-2e2dMPExPHjEsdK+FJuDMWqiBcTdGaKB0jJdeUh+I8M=", + "lastModified": 1696553797, + "narHash": "sha256-DLtOawpMWt0L0LnandKtDJKSiCbSqhz2LTWofMw6sLw=", + "lastModified": 1697507008, + "narHash": "sha256-PFDU3qTaNYxyxBxp6sP/+pa0r2ePugBLJYqLBAwMgrw=", "owner": "input-output-hk", "repo": "cardano-haskell-packages", - "rev": "2ec769bb0b46bfe3dd84fa782425242657b6917d", + "rev": "45f0742741418d6973f88cffd0f63733ecbff549", + "rev": "599f3177fd2c67eaf4a607514ac22b5849911e8c", "type": "github" }, "original": {