Skip to content

Commit

Permalink
Remove unused fields from PraosParams (#1289)
Browse files Browse the repository at this point in the history
Noticed while looking at #1285
  • Loading branch information
amesgen authored Oct 22, 2024
2 parents 7dd936f + 9f158de commit 25af5a0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Patch

- Adapted to removed `PraosParams` fields.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ import qualified Cardano.Ledger.Shelley.API as SL
import Cardano.Prelude (cborError)
import qualified Cardano.Protocol.TPraos.OCert as Absolute (KESPeriod (..),
ocertKESPeriod)
import Cardano.Slotting.Time (SystemStart (SystemStart))
import qualified Codec.CBOR.Decoding as CBOR
import Codec.CBOR.Encoding (Encoding)
import qualified Codec.CBOR.Encoding as CBOR
Expand Down Expand Up @@ -735,11 +734,7 @@ protocolInfoCardano paramsCardano
praosLeaderF = SL.mkActiveSlotCoeff $ SL.sgActiveSlotsCoeff genesisShelley,
praosSecurityParam = SecurityParam $ SL.sgSecurityParam genesisShelley,
praosMaxKESEvo = SL.sgMaxKESEvolutions genesisShelley,
praosQuorum = SL.sgUpdateQuorum genesisShelley,
praosMaxMajorPV = maxMajorProtVer,
praosMaxLovelaceSupply = SL.sgMaxLovelaceSupply genesisShelley,
praosNetworkId = SL.sgNetworkId genesisShelley,
praosSystemStart = SystemStart $ SL.sgSystemStart genesisShelley,
praosRandomnessStabilisationWindow =
-- This value is used for all Praos eras /except/ Babbage, see
-- 'partialConsensusConfigBabbage'.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Breaking

- Removed unused fields from `PraosParams`.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ import Cardano.Slotting.EpochInfo (EpochInfo, epochInfoEpoch,
epochInfoFirst, hoistEpochInfo)
import Cardano.Slotting.Slot (EpochNo (EpochNo), SlotNo (SlotNo),
WithOrigin, unSlotNo)
import Cardano.Slotting.Time (SystemStart)
import qualified Codec.CBOR.Encoding as CBOR
import Codec.Serialise (Serialise (decode, encode))
import Control.Exception (throw)
Expand Down Expand Up @@ -198,19 +197,9 @@ data PraosParams = PraosParams
praosSecurityParam :: !SecurityParam,
-- | Maximum number of KES iterations, see 'Globals.maxKESEvo'.
praosMaxKESEvo :: !Word64,
-- | Quorum for update system votes and MIR certificates, see
-- 'Globals.quorum'.
praosQuorum :: !Word64,
-- | All blocks invalid after this protocol version, see
-- 'Globals.maxMajorPV'.
praosMaxMajorPV :: !MaxMajorProtVer,
-- | Maximum number of lovelace in the system, see
-- 'Globals.maxLovelaceSupply'.
praosMaxLovelaceSupply :: !Word64,
-- | Testnet or mainnet?
praosNetworkId :: !SL.Network,
-- | The system start, as projected from the chain's genesis block.
praosSystemStart :: !SystemStart,
-- | The number of slots before the start of an epoch where the
-- corresponding epoch nonce is snapshotted. This has to be at least one
-- stability window such that the nonce is stable at the beginning of the
Expand Down

0 comments on commit 25af5a0

Please sign in to comment.