Skip to content
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 eras/allegra/impl/cardano-ledger-allegra.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ library
bytestring,
cardano-crypto-class,
cardano-ledger-binary ^>=1.3,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-ledger-shelley >=1.13 && <1.15,
cardano-strict-containers,
cardano-slotting,
Expand Down
2 changes: 1 addition & 1 deletion eras/alonzo/impl/cardano-ledger-alonzo.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ library
cardano-ledger-allegra ^>=1.6,
cardano-crypto-class,
cardano-ledger-binary ^>=1.3,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-ledger-mary ^>=1.7,
cardano-ledger-shelley >=1.13 && <1.15,
cardano-slotting,
Expand Down
2 changes: 1 addition & 1 deletion eras/babbage/impl/cardano-ledger-babbage.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ library
cardano-ledger-allegra ^>=1.6,
cardano-ledger-alonzo >=1.9 && <1.11,
cardano-ledger-binary ^>=1.3,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-ledger-mary ^>=1.7,
cardano-ledger-shelley >=1.13 && <1.15,
cardano-strict-containers,
Expand Down
2 changes: 1 addition & 1 deletion eras/conway/impl/cardano-ledger-conway.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ library
cardano-ledger-allegra ^>=1.6,
cardano-ledger-alonzo ^>=1.10,
cardano-ledger-babbage ^>=1.9,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-ledger-mary ^>=1.7,
cardano-ledger-shelley >=1.13 && <1.15,
cardano-slotting,
Expand Down
2 changes: 1 addition & 1 deletion eras/mary/impl/cardano-ledger-mary.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ library
cardano-data ^>=1.2,
cardano-ledger-allegra ^>=1.6,
cardano-ledger-binary ^>=1.3,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-ledger-shelley >=1.13 && <1.15,
containers,
deepseq,
Expand Down
1 change: 1 addition & 0 deletions eras/shelley/impl/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 1.14.0.0

* Remove protocol version argument from `mkShelleyGlobals` (`maxMajorPV` was removed from `Globals`)
* Added `EncCBOR` instances for:
* `UtxoEnv`
* `CertEnv`
Expand Down
2 changes: 1 addition & 1 deletion eras/shelley/impl/cardano-ledger-shelley.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ library
cardano-data ^>=1.2.2,
cardano-ledger-binary ^>=1.3,
cardano-ledger-byron,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-slotting,
vector-map ^>=1.1,
containers,
Expand Down
5 changes: 1 addition & 4 deletions eras/shelley/impl/src/Cardano/Ledger/Shelley/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ import Cardano.Ledger.BaseTypes (
Network,
Nonce (..),
PositiveUnitInterval,
Version,
mkActiveSlotCoeff,
)
import Cardano.Ledger.Binary (
Expand Down Expand Up @@ -676,15 +675,13 @@ validateGenesis
mkShelleyGlobals ::
ShelleyGenesis c ->
EpochInfo (Either Text) ->
Version ->
Globals
mkShelleyGlobals genesis epochInfoAc maxMajorPV =
mkShelleyGlobals genesis epochInfoAc =
Globals
{ activeSlotCoeff = sgActiveSlotCoeff genesis
, epochInfo = epochInfoAc
, maxKESEvo = sgMaxKESEvolutions genesis
, maxLovelaceSupply = sgMaxLovelaceSupply genesis
, maxMajorPV = maxMajorPV
, networkId = sgNetworkId genesis
, quorum = sgUpdateQuorum genesis
, randomnessStabilisationWindow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,12 +571,11 @@ defaultInitImpTestState nes = do
nes & nesEsL . esLStateL . lsUTxOStateL . utxosUtxoL <>~ UTxO (Map.singleton rootTxIn rootTxOut)
prepState <- get
let StateGen qcGen = getSubState prepState
majProtVer = pvMajor (nes ^. nesEsL . curPParamsEpochStateL . ppProtocolVersionL)
epochInfoE =
fixedEpochInfo
(sgEpochLength shelleyGenesis)
(mkSlotLength . fromNominalDiffTimeMicro $ sgSlotLength shelleyGenesis)
globals = mkShelleyGlobals shelleyGenesis epochInfoE majProtVer
globals = mkShelleyGlobals shelleyGenesis epochInfoE
epochNo = nesWithRoot ^. nesELL
slotNo = runIdentity $ runReaderT (epochInfoFirst (epochInfoPure globals) epochNo) globals
pure $
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ library
cardano-data >=1.2,
cardano-ledger-binary:{cardano-ledger-binary, testlib} >=1.3,
cardano-ledger-byron,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.11 && <1.15,
cardano-ledger-core:{cardano-ledger-core, testlib} >=1.11 && <1.16,
cardano-ledger-shelley:{cardano-ledger-shelley, testlib} >=1.14,
cardano-protocol-tpraos:{cardano-protocol-tpraos, testlib} >=1.0.1,
cardano-slotting:{cardano-slotting, testlib},
Expand Down
2 changes: 1 addition & 1 deletion libs/cardano-ledger-api/cardano-ledger-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ library
cardano-ledger-babbage ^>=1.9,
cardano-ledger-binary ^>=1.3,
cardano-ledger-conway >=1.13 && <1.18,
cardano-ledger-core ^>=1.14,
cardano-ledger-core ^>=1.15,
cardano-ledger-mary ^>=1.7,
cardano-ledger-shelley >=1.13 && <1.15,
cardano-strict-containers,
Expand Down
4 changes: 2 additions & 2 deletions libs/cardano-ledger-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Version history for `cardano-ledger-core`

## 1.14.0.1
## 1.15.0.0

*
* Remove `maxMajorPV` from `Globals`

## 1.14.0.0

Expand Down
2 changes: 1 addition & 1 deletion libs/cardano-ledger-core/cardano-ledger-core.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 3.0
name: cardano-ledger-core
version: 1.14.0.0
version: 1.15.0.0
license: Apache-2.0
maintainer: [email protected]
author: IOHK
Expand Down
2 changes: 0 additions & 2 deletions libs/cardano-ledger-core/src/Cardano/Ledger/BaseTypes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,6 @@ data Globals = Globals
-- ^ Maximum number of KES iterations
, quorum :: !Word64
-- ^ Quorum for update system votes and MIR certificates
, maxMajorPV :: !Version
-- ^ All blocks invalid after this protocol version
, maxLovelaceSupply :: !Word64
-- ^ Maximum number of lovelace in the system
, activeSlotCoeff :: !ActiveSlotCoeff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ testGlobals =
, securityParameter = 10
, maxKESEvo = 10
, quorum = 5
, maxMajorPV = maxBound
, maxLovelaceSupply = 45 * 1000 * 1000 * 1000 * 1000 * 1000
, activeSlotCoeff = mkActiveSlotCoeff . unsafeBoundRational $ 0.9
, networkId = Testnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module Bench.Cardano.Ledger.StakeDistr (
where

import Cardano.Ledger.Alonzo (AlonzoEra)
import Cardano.Ledger.BaseTypes (BlocksMade (..), Globals (..), pvMajor)
import Cardano.Ledger.BaseTypes (BlocksMade (..), Globals (..))
import Cardano.Ledger.Binary.Plain as Plain (FromCBOR (..), decodeFullDecoder)
import Cardano.Ledger.Coin (CompactForm (CompactCoin), DeltaCoin (..))
import Cardano.Ledger.Core
Expand Down Expand Up @@ -107,9 +107,7 @@ type CurrentEra = AlonzoEra StandardCrypto
-- Stored constants read from files. Globals and NewEpochState

readGlobals :: IO Globals
readGlobals = pure $ mkGlobals shelleyGenesis pp
where
pp = def
readGlobals = pure $ mkGlobals shelleyGenesis

readNewEpochState :: IO (NewEpochState CurrentEra)
readNewEpochState = do
Expand Down Expand Up @@ -141,11 +139,10 @@ bogusNewEpochState =
(PoolDistr Map.empty $ CompactCoin 1)
def

mkGlobals :: ShelleyGenesis StandardCrypto -> PParams CurrentEra -> Globals
mkGlobals genesis pp =
mkShelleyGlobals genesis epochInfoE majorPParamsVer
mkGlobals :: ShelleyGenesis StandardCrypto -> Globals
mkGlobals genesis =
mkShelleyGlobals genesis epochInfoE
where
majorPParamsVer = pvMajor $ pp ^. ppProtocolVersionL
epochInfoE =
fixedEpochInfo
(sgEpochLength genesis)
Expand Down
12 changes: 4 additions & 8 deletions libs/ledger-state/bench/Performance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import Data.Aeson
import Data.Bifunctor (first)
import Data.ByteString.Base16.Lazy as BSL16
import Data.ByteString.Lazy (ByteString)
import Data.Default.Class (def)
import Data.Foldable as F
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
Expand All @@ -55,9 +54,7 @@ main = do

let toMempoolState :: NewEpochState CurrentEra -> MempoolState CurrentEra
toMempoolState NewEpochState {nesEs = EpochState {esLState}} = esLState
pp :: PParams CurrentEra
pp = def
!globals = mkGlobals genesis pp
!globals = mkGlobals genesis
!slotNo = SlotNo 55733343
applyTx' mempoolEnv mempoolState =
either (error . show) seqTuple
Expand Down Expand Up @@ -241,11 +238,10 @@ validatedTx3 =
\7120c2d3482751b14f06dd41d7ff023eeae6e63933b097c023c1ed19df6a061173c45aa\
\54cceb568ff1886e2716e84e6260df5f6"

mkGlobals :: ShelleyGenesis StandardCrypto -> PParams CurrentEra -> Globals
mkGlobals genesis pp =
mkShelleyGlobals genesis epochInfoE majorPParamsVer
mkGlobals :: ShelleyGenesis StandardCrypto -> Globals
mkGlobals genesis =
mkShelleyGlobals genesis epochInfoE
where
majorPParamsVer = pvMajor $ pp ^. ppProtocolVersionL
epochInfoE =
fixedEpochInfo
(sgEpochLength genesis)
Expand Down
1 change: 0 additions & 1 deletion libs/ledger-state/ledger-state.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ benchmark performance
cardano-slotting,
containers,
criterion,
data-default-class,
deepseq,
ledger-state,
microlens,
Expand Down