Skip to content

Commit

Permalink
Integrate latest ledger and ouroboros-consensus for 8.6.0-pre - WIP (…
Browse files Browse the repository at this point in the history
…SRP)
  • Loading branch information
teodanciu committed Oct 17, 2023
1 parent 7e54356 commit 001d9c0
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 27 deletions.
47 changes: 46 additions & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
40 changes: 20 additions & 20 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 9 additions & 3 deletions cardano-api/internal/Cardano/Api/Orphans.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}

Expand All @@ -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 (..))
Expand Down Expand Up @@ -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)

Check notice

Code scanning / HLint

Avoid lambda Note

cardano-api/internal/Cardano/Api/Orphans.hs:(320,36)-(321,86): Suggestion: Avoid lambda
  
Found:
  \ x
    -> fromNoUpdate @StrictMaybe @ProtVer (Ledger.cppProtocolVersion x)
  
Perhaps:
  fromNoUpdate @StrictMaybe @ProtVer . Ledger.cppProtocolVersion
) p1 p2
, Ledger.cppMinPoolCost = lastMappendWith (\x -> Ledger.cppMinPoolCost x) p1 p2

Check warning

Code scanning / HLint

Avoid lambda Warning

cardano-api/internal/Cardano/Api/Orphans.hs:323:47-77: Warning: Avoid lambda
  
Found:
  (\ x -> Ledger.cppMinPoolCost x)
  
Perhaps:
  Ledger.cppMinPoolCost
, Ledger.cppCoinsPerUTxOByte = lastMappendWith Ledger.cppCoinsPerUTxOByte p1 p2
, Ledger.cppCostModels = lastMappendWith Ledger.cppCostModels p1 p2
, Ledger.cppPrices = lastMappendWith Ledger.cppPrices p1 p2
Expand Down
9 changes: 6 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 001d9c0

Please sign in to comment.