Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains just the type of protocol parameters.
Synopsis
-
data
PParams'
f era =
PParams
{
- _minfeeA :: !( HKD f Natural )
- _minfeeB :: !( HKD f Natural )
- _maxBBSize :: !( HKD f Natural )
- _maxTxSize :: !( HKD f Natural )
- _maxBHSize :: !( HKD f Natural )
- _keyDeposit :: !( HKD f Coin )
- _poolDeposit :: !( HKD f Coin )
- _eMax :: !( HKD f EpochNo )
- _nOpt :: !( HKD f Natural )
- _a0 :: !( HKD f NonNegativeInterval )
- _rho :: !( HKD f UnitInterval )
- _tau :: !( HKD f UnitInterval )
- _d :: !( HKD f UnitInterval )
- _extraEntropy :: !( HKD f Nonce )
- _protocolVersion :: !( HKD f ProtVer )
- _minUTxOValue :: !( HKD f Coin )
- _minPoolCost :: !( HKD f Coin )
- type PParams era = PParams' Identity era
- emptyPParams :: PParams era
- type family HKD f a where ...
- class HKDFunctor f where
- data PPUpdateEnv era = PPUpdateEnv SlotNo ( GenDelegs era)
- newtype ProposedPPUpdates era = ProposedPPUpdates ( Map ( KeyHash ' Genesis ( Crypto era)) ( PParamsDelta era))
- emptyPPPUpdates :: ProposedPPUpdates era
- type PParamsUpdate era = PParams' StrictMaybe era
- emptyPParamsUpdate :: PParamsUpdate era
- data Update era = Update !( ProposedPPUpdates era) ! EpochNo
- updatePParams :: PParams era -> PParamsUpdate era -> PParams era
Documentation
Protocol parameters.
We use the HKD type family so that the protocol parameters type and
the type for the updates to the protocol parameters can share records fields.
The protocol parameters will have type
PParams'
Identity
, and the updates
will have type
PParams'
StrictMaybe
, though
Identity
will be hidden from use.
For example:
myParameters = PParams { _minfeeA = 0, _minfeeB = 0, ... } myUpdate = PParamsUpdate { _minfeeA = SNothing, _minfeeB = SJust 42, ... }
PParams | |
|
Instances
emptyPParams :: PParams era Source #
Returns a basic "empty"
PParams
structure with all zero values.
class HKDFunctor f where Source #
Instances
HKDFunctor Maybe Source # | |
HKDFunctor Identity Source # | |
HKDFunctor StrictMaybe Source # | |
Defined in Cardano.Ledger.Shelley.PParams hkdMap :: Proxy StrictMaybe -> (a -> b) -> HKD StrictMaybe a -> HKD StrictMaybe b Source # |
data PPUpdateEnv era Source #
PPUpdateEnv SlotNo ( GenDelegs era) |
Instances
newtype ProposedPPUpdates era Source #
Update operation for protocol parameters structure @PParams
ProposedPPUpdates ( Map ( KeyHash ' Genesis ( Crypto era)) ( PParamsDelta era)) |
Instances
emptyPPPUpdates :: ProposedPPUpdates era Source #
type PParamsUpdate era = PParams' StrictMaybe era Source #
emptyPParamsUpdate :: PParamsUpdate era Source #
Update Proposal
Update !( ProposedPPUpdates era) ! EpochNo |
Instances
updatePParams :: PParams era -> PParamsUpdate era -> PParams era Source #