Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump CHaP #610

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 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 2024-08-15T08:53:32Z
, cardano-haskell-packages 2024-08-15T10:40:33Z
, cardano-haskell-packages 2024-09-03T00:18:11Z

packages:
cardano-api
Expand Down
40 changes: 20 additions & 20 deletions cardano-api/cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,16 @@ library internal
cardano-crypto-class ^>=2.1.2,
cardano-crypto-wrapper ^>=1.5,
cardano-data >=1.0,
cardano-ledger-allegra >=1.5,
cardano-ledger-alonzo >=1.10,
cardano-ledger-api ^>=1.9.2,
cardano-ledger-babbage >=1.8.2,
cardano-ledger-binary ^>=1.3.3,
cardano-ledger-allegra >=1.6,
cardano-ledger-alonzo >=1.10.2,
cardano-ledger-api ^>=1.9.3,
cardano-ledger-babbage >=1.9,
cardano-ledger-binary ^>=1.3,
cardano-ledger-byron >=1.0.1,
cardano-ledger-conway >=1.16,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.13.2,
cardano-ledger-mary >=1.6.1,
cardano-ledger-shelley >=1.12,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
cardano-ledger-mary >=1.7,
cardano-ledger-shelley >=1.13,
cardano-protocol-tpraos >=1.2,
cardano-slotting >=0.2.0.0,
cardano-strict-containers >=0.1,
Expand All @@ -199,18 +199,18 @@ library internal
network,
optparse-applicative-fork,
ouroboros-consensus ^>=0.20,
ouroboros-consensus-cardano ^>=0.18,
ouroboros-consensus-cardano ^>=0.19,
ouroboros-consensus-diffusion ^>=0.17,
ouroboros-consensus-protocol ^>=0.9.0.1,
ouroboros-network,
ouroboros-network-api ^>=0.7.3,
ouroboros-network-api ^>=0.9,
ouroboros-network-framework,
ouroboros-network-protocols,
parsec,
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.31,
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.32,
prettyprinter,
prettyprinter-ansi-terminal,
prettyprinter-configurable ^>=1.31,
prettyprinter-configurable ^>=1.32.1,
random,
safe-exceptions,
scientific,
Expand Down Expand Up @@ -285,9 +285,9 @@ library gen
cardano-crypto-test ^>=1.5,
cardano-ledger-alonzo:{cardano-ledger-alonzo, testlib} >=1.8.1,
cardano-ledger-byron-test >=1.5,
cardano-ledger-conway:testlib >=1.10.0,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.8,
cardano-ledger-shelley >=1.7.0,
cardano-ledger-conway:testlib,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
cardano-ledger-shelley >=1.13,
containers,
filepath,
hedgehog >=1.1,
Expand Down Expand Up @@ -317,7 +317,7 @@ test-suite cardano-api-test
cardano-ledger-alonzo,
cardano-ledger-api ^>=1.9,
cardano-ledger-binary,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.8,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
cardano-ledger-mary,
cardano-ledger-shelley,
cardano-protocol-tpraos,
Expand Down Expand Up @@ -384,8 +384,8 @@ test-suite cardano-api-golden
cardano-data >=1.0,
cardano-ledger-alonzo,
cardano-ledger-api ^>=1.9,
cardano-ledger-babbage >=1.6.0,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.8,
cardano-ledger-babbage >=1.9,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.14,
cardano-ledger-shelley,
cardano-ledger-shelley-test >=1.2.0.1,
cardano-slotting ^>=0.2.0.0,
Expand All @@ -396,8 +396,8 @@ test-suite cardano-api-golden
hedgehog-extras ^>=0.6.1.0,
microlens,
parsec,
plutus-core ^>=1.31,
plutus-ledger-api ^>=1.31,
plutus-core ^>=1.32,
plutus-ledger-api ^>=1.32,
tasty,
tasty-hedgehog,
text,
Expand Down
43 changes: 6 additions & 37 deletions cardano-api/internal/Cardano/Api/LedgerState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ import qualified Ouroboros.Consensus.HardFork.Combinator.AcrossEras as HFC
import qualified Ouroboros.Consensus.HardFork.Combinator.Basics as HFC
import qualified Ouroboros.Consensus.Ledger.Abstract as Ledger
import qualified Ouroboros.Consensus.Ledger.Extended as Ledger
import qualified Ouroboros.Consensus.Mempool.Capacity as TxLimits
import qualified Ouroboros.Consensus.Node.ProtocolInfo as Consensus
import Ouroboros.Consensus.Protocol.Abstract (ChainDepState, ConsensusProtocol (..))
import qualified Ouroboros.Consensus.Protocol.Praos.Common as Consensus
Expand Down Expand Up @@ -1285,55 +1284,25 @@ mkProtocolInfoCardano
mkProtocolInfoCardano (GenesisCardano dnc byronGenesis shelleyGenesisHash transCfg) =
Consensus.protocolInfoCardano
Consensus.CardanoProtocolParams
{ Consensus.paramsByron =
{ Consensus.byronProtocolParams =
Consensus.ProtocolParamsByron
{ Consensus.byronGenesis = byronGenesis
, Consensus.byronPbftSignatureThreshold =
Consensus.PBftSignatureThreshold <$> ncPBftSignatureThreshold dnc
, Consensus.byronProtocolVersion = ncByronProtocolVersion dnc
, Consensus.byronSoftwareVersion = Byron.softwareVersion
, Consensus.byronLeaderCredentials = Nothing
, Consensus.byronMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.paramsShelleyBased =
, Consensus.shelleyBasedProtocolParams =
Consensus.ProtocolParamsShelleyBased
{ Consensus.shelleyBasedInitialNonce = shelleyPraosNonce shelleyGenesisHash
, Consensus.shelleyBasedLeaderCredentials = []
}
, Consensus.paramsShelley =
Consensus.ProtocolParamsShelley
{ Consensus.shelleyProtVer = ProtVer (natVersion @3) 0
, Consensus.shelleyMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.paramsAllegra =
Consensus.ProtocolParamsAllegra
{ Consensus.allegraProtVer = ProtVer (natVersion @4) 0
, Consensus.allegraMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.paramsMary =
Consensus.ProtocolParamsMary
{ Consensus.maryProtVer = ProtVer (natVersion @5) 0
, Consensus.maryMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.paramsAlonzo =
Consensus.ProtocolParamsAlonzo
{ Consensus.alonzoProtVer = ProtVer (natVersion @7) 0
, Consensus.alonzoMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.paramsBabbage =
Consensus.ProtocolParamsBabbage
{ Consensus.babbageProtVer = ProtVer (natVersion @9) 0
, Consensus.babbageMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.paramsConway =
Consensus.ProtocolParamsConway
{ Consensus.conwayProtVer = ProtVer (natVersion @10) 0
, Consensus.conwayMaxTxCapacityOverrides = TxLimits.mkOverrides TxLimits.noOverridesMeasure
}
, Consensus.hardForkTriggers = ncHardForkTriggers dnc
, Consensus.ledgerTransitionConfig = transCfg
, Consensus.cardanoHardForkTriggers = ncHardForkTriggers dnc
, Consensus.cardanoLedgerTransitionConfig = transCfg
, -- NOTE: this can become a parameter once https://github.com/IntersectMBO/cardano-node/issues/5730 is implemented.
Consensus.checkpoints = Consensus.emptyCheckpointsMap
Consensus.cardanoCheckpoints = Consensus.emptyCheckpointsMap
, Consensus.cardanoProtocolVersion = ProtVer (natVersion @10) 0
}

-- | Compute the Nonce from the hash of the Genesis file.
Expand Down
13 changes: 7 additions & 6 deletions cardano-api/internal/Cardano/Api/Protocol.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
Expand All @@ -22,18 +23,18 @@ where
import Cardano.Api.Modes

import Ouroboros.Consensus.Block.Forging (BlockForging)
import qualified Ouroboros.Consensus.Byron.Ledger as Byron
import Ouroboros.Consensus.Cardano
import Ouroboros.Consensus.Cardano.Block
import Ouroboros.Consensus.Cardano.ByronHFC (ByronBlockHFC)
import Ouroboros.Consensus.Cardano.Node
import Ouroboros.Consensus.HardFork.Combinator.Embed.Unary
import qualified Ouroboros.Consensus.Ledger.SupportsProtocol as Consensus
import qualified Ouroboros.Consensus.Ledger.SupportsProtocol as Consensus (LedgerSupportsProtocol)
import Ouroboros.Consensus.Node.ProtocolInfo (ProtocolClientInfo (..), ProtocolInfo (..))
import Ouroboros.Consensus.Node.Run (RunNode)
import qualified Ouroboros.Consensus.Protocol.TPraos as Consensus
import qualified Ouroboros.Consensus.Shelley.Eras as Consensus
import qualified Ouroboros.Consensus.Shelley.Ledger.Block as Consensus
import qualified Ouroboros.Consensus.Shelley.Eras as Consensus (ShelleyEra)
import qualified Ouroboros.Consensus.Shelley.Ledger.Block as Consensus (ShelleyBlock)
import Ouroboros.Consensus.Shelley.Ledger.SupportsProtocol ()
import Ouroboros.Consensus.Shelley.ShelleyHFC (ShelleyBlockHFC)
import Ouroboros.Consensus.Util.IOLike (IOLike)

Expand All @@ -55,7 +56,7 @@ class RunNode blk => ProtocolClient blk where

-- | Run PBFT against the Byron ledger
instance IOLike m => Protocol m ByronBlockHFC where
data ProtocolInfoArgs ByronBlockHFC = ProtocolInfoArgsByron (ProtocolParams Byron.ByronBlock)
data ProtocolInfoArgs ByronBlockHFC = ProtocolInfoArgsByron ProtocolParamsByron
protocolInfo (ProtocolInfoArgsByron params) =
( inject $ protocolInfoByron params
, pure . map inject $ blockForgingByron params
Expand Down Expand Up @@ -95,7 +96,7 @@ instance
= ProtocolInfoArgsShelley
(ShelleyGenesis StandardCrypto)
(ProtocolParamsShelleyBased StandardCrypto)
(ProtocolParams (Consensus.ShelleyBlock (Consensus.TPraos StandardCrypto) StandardShelley))
ProtVer
protocolInfo (ProtocolInfoArgsShelley genesis paramsShelleyBased_ paramsShelley_) =
bimap inject (fmap $ map inject) $ protocolInfoShelley genesis paramsShelleyBased_ paramsShelley_

Expand Down
6 changes: 3 additions & 3 deletions flake.lock

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

Loading