Safe Haskell | None |
---|---|
Language | Haskell2010 |
The various Cardano protocol parameters, including:
- the current values of updatable protocol parameters:
ProtocolParameters
- updates to protocol parameters:
ProtocolParametersUpdate
- update proposals that can be embedded in transactions:
UpdateProposal
- parameters fixed in the genesis file:
GenesisParameters
Synopsis
- data ProtocolParameters = ProtocolParameters {
- protocolParamProtocolVersion :: (Natural, Natural)
- protocolParamDecentralization :: Maybe Rational
- protocolParamExtraPraosEntropy :: Maybe PraosNonce
- protocolParamMaxBlockHeaderSize :: Natural
- protocolParamMaxBlockBodySize :: Natural
- protocolParamMaxTxSize :: Natural
- protocolParamTxFeeFixed :: Coin
- protocolParamTxFeePerByte :: Coin
- protocolParamMinUTxOValue :: Maybe Coin
- protocolParamStakeAddressDeposit :: Coin
- protocolParamStakePoolDeposit :: Coin
- protocolParamMinPoolCost :: Coin
- protocolParamPoolRetireMaxEpoch :: EpochInterval
- protocolParamStakePoolTargetNum :: Natural
- protocolParamPoolPledgeInfluence :: Rational
- protocolParamMonetaryExpansion :: Rational
- protocolParamTreasuryCut :: Rational
- protocolParamCostModels :: Map AnyPlutusScriptVersion CostModel
- protocolParamPrices :: Maybe ExecutionUnitPrices
- protocolParamMaxTxExUnits :: Maybe ExecutionUnits
- protocolParamMaxBlockExUnits :: Maybe ExecutionUnits
- protocolParamMaxValueSize :: Maybe Natural
- protocolParamCollateralPercent :: Maybe Natural
- protocolParamMaxCollateralInputs :: Maybe Natural
- protocolParamUTxOCostPerByte :: Maybe Coin
- checkProtocolParameters :: ShelleyBasedEra era -> ProtocolParameters -> Either ProtocolParametersError ()
- data EpochNo
- newtype LedgerProtocolParameters era = LedgerProtocolParameters {}
- data EraBasedProtocolParametersUpdate era where
- ShelleyEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> DeprecatedAfterMaryPParams ShelleyEra -> DeprecatedAfterBabbagePParams ShelleyEra -> ShelleyToAlonzoPParams ShelleyEra -> EraBasedProtocolParametersUpdate ShelleyEra
- AllegraEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> DeprecatedAfterMaryPParams AllegraEra -> ShelleyToAlonzoPParams AllegraEra -> DeprecatedAfterBabbagePParams ShelleyEra -> EraBasedProtocolParametersUpdate AllegraEra
- MaryEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> DeprecatedAfterMaryPParams MaryEra -> ShelleyToAlonzoPParams MaryEra -> DeprecatedAfterBabbagePParams ShelleyEra -> EraBasedProtocolParametersUpdate MaryEra
- AlonzoEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> ShelleyToAlonzoPParams AlonzoEra -> AlonzoOnwardsPParams AlonzoEra -> DeprecatedAfterBabbagePParams ShelleyEra -> EraBasedProtocolParametersUpdate AlonzoEra
- BabbageEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> AlonzoOnwardsPParams BabbageEra -> DeprecatedAfterBabbagePParams ShelleyEra -> IntroducedInBabbagePParams BabbageEra -> EraBasedProtocolParametersUpdate BabbageEra
- ConwayEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> AlonzoOnwardsPParams ConwayEra -> IntroducedInBabbagePParams ConwayEra -> IntroducedInConwayPParams (ShelleyLedgerEra ConwayEra) -> EraBasedProtocolParametersUpdate ConwayEra
- data AlonzoOnwardsPParams ledgerera = AlonzoOnwardsPParams {}
- data CommonProtocolParametersUpdate = CommonProtocolParametersUpdate {
- cppMinFeeA :: StrictMaybe Coin
- cppMinFeeB :: StrictMaybe Coin
- cppMaxBlockBodySize :: StrictMaybe Word32
- cppMaxTxSize :: StrictMaybe Word32
- cppMaxBlockHeaderSize :: StrictMaybe Word16
- cppKeyDeposit :: StrictMaybe Coin
- cppPoolDeposit :: StrictMaybe Coin
- cppPoolRetireMaxEpoch :: StrictMaybe EpochInterval
- cppStakePoolTargetNum :: StrictMaybe Natural
- cppPoolPledgeInfluence :: StrictMaybe NonNegativeInterval
- cppTreasuryExpansion :: StrictMaybe UnitInterval
- cppMonetaryExpansion :: StrictMaybe UnitInterval
- cppMinPoolCost :: StrictMaybe Coin
- newtype DeprecatedAfterBabbagePParams ledgerera = DeprecatedAfterBabbagePParams (StrictMaybe ProtVer)
- newtype DeprecatedAfterMaryPParams ledgerera = DeprecatedAfterMaryPParams (StrictMaybe Coin)
- data ShelleyToAlonzoPParams ledgerera = ShelleyToAlonzoPParams (StrictMaybe Nonce) (StrictMaybe UnitInterval)
- newtype IntroducedInBabbagePParams era = IntroducedInBabbagePParams (StrictMaybe CoinPerByte)
- data IntroducedInConwayPParams era = IntroducedInConwayPParams {
- icPoolVotingThresholds :: StrictMaybe PoolVotingThresholds
- icDRepVotingThresholds :: StrictMaybe DRepVotingThresholds
- icMinCommitteeSize :: StrictMaybe Natural
- icCommitteeTermLength :: StrictMaybe EpochInterval
- icGovActionLifetime :: StrictMaybe EpochInterval
- icGovActionDeposit :: StrictMaybe Coin
- icDRepDeposit :: StrictMaybe Coin
- icDRepActivity :: StrictMaybe EpochInterval
- icMinFeeRefScriptCostPerByte :: StrictMaybe NonNegativeInterval
- createEraBasedProtocolParamUpdate :: ShelleyBasedEra era -> EraBasedProtocolParametersUpdate era -> PParamsUpdate (ShelleyLedgerEra era)
- convertToLedgerProtocolParameters :: ShelleyBasedEra era -> ProtocolParameters -> Either ProtocolParametersConversionError (LedgerProtocolParameters era)
- createPParams :: ShelleyBasedEra era -> EraBasedProtocolParametersUpdate era -> PParams (ShelleyLedgerEra era)
- data ProtocolParametersUpdate = ProtocolParametersUpdate {
- protocolUpdateProtocolVersion :: Maybe (Natural, Natural)
- protocolUpdateDecentralization :: Maybe Rational
- protocolUpdateExtraPraosEntropy :: Maybe (Maybe PraosNonce)
- protocolUpdateMaxBlockHeaderSize :: Maybe Word16
- protocolUpdateMaxBlockBodySize :: Maybe Word32
- protocolUpdateMaxTxSize :: Maybe Word32
- protocolUpdateTxFeeFixed :: Maybe Coin
- protocolUpdateTxFeePerByte :: Maybe Coin
- protocolUpdateMinUTxOValue :: Maybe Coin
- protocolUpdateStakeAddressDeposit :: Maybe Coin
- protocolUpdateStakePoolDeposit :: Maybe Coin
- protocolUpdateMinPoolCost :: Maybe Coin
- protocolUpdatePoolRetireMaxEpoch :: Maybe EpochInterval
- protocolUpdateStakePoolTargetNum :: Maybe Natural
- protocolUpdatePoolPledgeInfluence :: Maybe Rational
- protocolUpdateMonetaryExpansion :: Maybe Rational
- protocolUpdateTreasuryCut :: Maybe Rational
- protocolUpdateCostModels :: Map AnyPlutusScriptVersion CostModel
- protocolUpdatePrices :: Maybe ExecutionUnitPrices
- protocolUpdateMaxTxExUnits :: Maybe ExecutionUnits
- protocolUpdateMaxBlockExUnits :: Maybe ExecutionUnits
- protocolUpdateMaxValueSize :: Maybe Natural
- protocolUpdateCollateralPercent :: Maybe Natural
- protocolUpdateMaxCollateralInputs :: Maybe Natural
- protocolUpdateUTxOCostPerByte :: Maybe Coin
- data ProtocolParametersError
- data ProtocolParametersConversionError
- = PpceOutOfBounds !ProtocolParameterName !Rational
- | PpceVersionInvalid !ProtocolParameterVersion
- | PpceInvalidCostModel !CostModel !CostModelApplyError
- | PpceMissingParameter !ProtocolParameterName
- data PraosNonce
- makePraosNonce :: ByteString -> PraosNonce
- data ExecutionUnits = ExecutionUnits {}
- data ExecutionUnitPrices = ExecutionUnitPrices {}
- newtype CostModels = CostModels {}
- newtype CostModel = CostModel [Int64]
- fromAlonzoCostModels :: CostModels -> Map AnyPlutusScriptVersion CostModel
- data UpdateProposal = UpdateProposal !(Map (Hash GenesisKey) ProtocolParametersUpdate) !EpochNo
- makeShelleyUpdateProposal :: ProtocolParametersUpdate -> [Hash GenesisKey] -> EpochNo -> UpdateProposal
- toLedgerNonce :: Maybe PraosNonce -> Nonce
- toLedgerUpdate :: ShelleyBasedEra era -> UpdateProposal -> Either ProtocolParametersConversionError (Update (ShelleyLedgerEra era))
- fromLedgerUpdate :: (ShelleyLedgerEra era ~ ledgerera, EraCrypto ledgerera ~ StandardCrypto) => ShelleyBasedEra era -> Update ledgerera -> UpdateProposal
- toLedgerProposedPPUpdates :: ShelleyBasedEra era -> Map (Hash GenesisKey) ProtocolParametersUpdate -> Either ProtocolParametersConversionError (ProposedPPUpdates (ShelleyLedgerEra era))
- fromLedgerProposedPPUpdates :: (ShelleyLedgerEra era ~ ledgerera, EraCrypto ledgerera ~ StandardCrypto) => ShelleyBasedEra era -> ProposedPPUpdates ledgerera -> Map (Hash GenesisKey) ProtocolParametersUpdate
- toLedgerPParams :: ShelleyBasedEra era -> ProtocolParameters -> Either ProtocolParametersConversionError (PParams (ShelleyLedgerEra era))
- toLedgerPParamsUpdate :: ShelleyBasedEra era -> ProtocolParametersUpdate -> Either ProtocolParametersConversionError (PParamsUpdate (ShelleyLedgerEra era))
- fromLedgerPParams :: ShelleyBasedEra era -> PParams (ShelleyLedgerEra era) -> ProtocolParameters
- fromLedgerPParamsUpdate :: ShelleyBasedEra era -> PParamsUpdate (ShelleyLedgerEra era) -> ProtocolParametersUpdate
- toAlonzoPrices :: ExecutionUnitPrices -> Either ProtocolParametersConversionError Prices
- fromAlonzoPrices :: Prices -> ExecutionUnitPrices
- toAlonzoScriptLanguage :: AnyPlutusScriptVersion -> Language
- fromAlonzoScriptLanguage :: Language -> AnyPlutusScriptVersion
- toAlonzoCostModel :: CostModel -> Language -> Either ProtocolParametersConversionError CostModel
- fromAlonzoCostModel :: CostModel -> CostModel
- toAlonzoCostModels :: Map AnyPlutusScriptVersion CostModel -> Either ProtocolParametersConversionError CostModels
- data family AsType t
The updatable protocol parameters
data ProtocolParameters Source #
Deprecated: Use the ledger's PParams (from module Cardano.Api.Ledger) type instead of ProtocolParameters. The type will be removed after Chang hard fork.
The values of the set of updatable protocol parameters. At any particular point on the chain there is a current set of parameters in use.
These parameters can be updated (at epoch boundaries) via an
UpdateProposal
, which contains a ProtocolParametersUpdate
.
The ProtocolParametersUpdate
is essentially a diff for the
ProtocolParameters
.
There are also parameters fixed in the Genesis file. See GenesisParameters
.
ProtocolParameters | Deprecated: Use the ledger's PParams (from module Cardano.Api.Ledger) type instead of ProtocolParameters. The type will be removed after Chang hard fork. |
|
Instances
checkProtocolParameters :: ShelleyBasedEra era -> ProtocolParameters -> Either ProtocolParametersError () Source #
Deprecated: Use the ledger's PParams (from module Cardano.Api.Ledger) type instead of ProtocolParameters. The type will be removed after Chang hard fork. PParams natively enforce these checks.
An epoch, i.e. the number of the epoch.
Instances
FromJSON EpochNo | |||||
Defined in Cardano.Slotting.Slot | |||||
ToJSON EpochNo | |||||
Defined in Cardano.Slotting.Slot | |||||
Enum EpochNo | |||||
Defined in Cardano.Slotting.Slot succ :: EpochNo -> EpochNo Source # pred :: EpochNo -> EpochNo Source # toEnum :: Int -> EpochNo Source # fromEnum :: EpochNo -> Int Source # enumFrom :: EpochNo -> [EpochNo] Source # enumFromThen :: EpochNo -> EpochNo -> [EpochNo] Source # enumFromTo :: EpochNo -> EpochNo -> [EpochNo] Source # enumFromThenTo :: EpochNo -> EpochNo -> EpochNo -> [EpochNo] Source # | |||||
Generic EpochNo | |||||
Defined in Cardano.Slotting.Slot
| |||||
Show EpochNo | |||||
FromCBOR EpochNo | |||||
ToCBOR EpochNo | |||||
DecCBOR EpochNo | |||||
EncCBOR EpochNo | |||||
NFData EpochNo | |||||
Defined in Cardano.Slotting.Slot | |||||
Eq EpochNo | |||||
Ord EpochNo | |||||
NoThunks EpochNo | |||||
Condense EpochNo | |||||
Serialise EpochNo | |||||
Defined in Cardano.Slotting.Slot | |||||
type Rep EpochNo | |||||
Defined in Cardano.Slotting.Slot type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.0-1881c023e0886f672d28a4c45a256e973fe8d96632667e110b19ce5f49f52117" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) |
The updatable protocol parameters
newtype LedgerProtocolParameters era Source #
Instances
IsShelleyBasedEra era => Show (LedgerProtocolParameters era) Source # | |
Defined in Cardano.Api.ProtocolParameters | |
IsShelleyBasedEra era => Eq (LedgerProtocolParameters era) Source # | |
Defined in Cardano.Api.ProtocolParameters (==) :: LedgerProtocolParameters era -> LedgerProtocolParameters era -> Bool Source # (/=) :: LedgerProtocolParameters era -> LedgerProtocolParameters era -> Bool Source # |
data EraBasedProtocolParametersUpdate era where Source #
Each constructor corresponds to the set of protocol parameters available in a given era.
ShelleyEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> DeprecatedAfterMaryPParams ShelleyEra -> DeprecatedAfterBabbagePParams ShelleyEra -> ShelleyToAlonzoPParams ShelleyEra -> EraBasedProtocolParametersUpdate ShelleyEra | |
AllegraEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> DeprecatedAfterMaryPParams AllegraEra -> ShelleyToAlonzoPParams AllegraEra -> DeprecatedAfterBabbagePParams ShelleyEra -> EraBasedProtocolParametersUpdate AllegraEra | |
MaryEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> DeprecatedAfterMaryPParams MaryEra -> ShelleyToAlonzoPParams MaryEra -> DeprecatedAfterBabbagePParams ShelleyEra -> EraBasedProtocolParametersUpdate MaryEra | |
AlonzoEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> ShelleyToAlonzoPParams AlonzoEra -> AlonzoOnwardsPParams AlonzoEra -> DeprecatedAfterBabbagePParams ShelleyEra -> EraBasedProtocolParametersUpdate AlonzoEra | |
BabbageEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> AlonzoOnwardsPParams BabbageEra -> DeprecatedAfterBabbagePParams ShelleyEra -> IntroducedInBabbagePParams BabbageEra -> EraBasedProtocolParametersUpdate BabbageEra | |
ConwayEraBasedProtocolParametersUpdate :: CommonProtocolParametersUpdate -> AlonzoOnwardsPParams ConwayEra -> IntroducedInBabbagePParams ConwayEra -> IntroducedInConwayPParams (ShelleyLedgerEra ConwayEra) -> EraBasedProtocolParametersUpdate ConwayEra |
Instances
Show (EraBasedProtocolParametersUpdate era) Source # | |
Defined in Cardano.Api.ProtocolParameters |
data AlonzoOnwardsPParams ledgerera Source #
Instances
Show (AlonzoOnwardsPParams ledgerera) Source # | |
Defined in Cardano.Api.ProtocolParameters |
data CommonProtocolParametersUpdate Source #
Protocol parameters common to each era. This can only ever be reduced if parameters are deprecated.
CommonProtocolParametersUpdate | |
|
Instances
newtype DeprecatedAfterBabbagePParams ledgerera Source #
Instances
Show (DeprecatedAfterBabbagePParams ledgerera) Source # | |
Defined in Cardano.Api.ProtocolParameters |
newtype DeprecatedAfterMaryPParams ledgerera Source #
Instances
Show (DeprecatedAfterMaryPParams ledgerera) Source # | |
Defined in Cardano.Api.ProtocolParameters |
data ShelleyToAlonzoPParams ledgerera Source #
ShelleyToAlonzoPParams | |
|
Instances
Show (ShelleyToAlonzoPParams ledgerera) Source # | |
Defined in Cardano.Api.ProtocolParameters |
newtype IntroducedInBabbagePParams era Source #
IntroducedInBabbagePParams (StrictMaybe CoinPerByte) | Coins per UTxO byte |
Instances
Show (IntroducedInBabbagePParams era) Source # | |
Defined in Cardano.Api.ProtocolParameters |
data IntroducedInConwayPParams era Source #
IntroducedInConwayPParams | |
|
Instances
Show (IntroducedInConwayPParams era) Source # | |
Defined in Cardano.Api.ProtocolParameters |
createEraBasedProtocolParamUpdate :: ShelleyBasedEra era -> EraBasedProtocolParametersUpdate era -> PParamsUpdate (ShelleyLedgerEra era) Source #
convertToLedgerProtocolParameters :: ShelleyBasedEra era -> ProtocolParameters -> Either ProtocolParametersConversionError (LedgerProtocolParameters era) Source #
Deprecated: Use the ledger's PParams (from module Cardano.Api.Ledger) type instead of ProtocolParameters. The type will be removed after Chang hard fork.
createPParams :: ShelleyBasedEra era -> EraBasedProtocolParametersUpdate era -> PParams (ShelleyLedgerEra era) Source #
Deprecated
data ProtocolParametersUpdate Source #
The representation of a change in the ProtocolParameters
.
ProtocolParametersUpdate | |
|
Instances
Monoid ProtocolParametersUpdate Source # | |
Semigroup ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
Show ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
FromCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters | |
ToCBOR ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters toCBOR :: ProtocolParametersUpdate -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ProtocolParametersUpdate -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ProtocolParametersUpdate] -> Size Source # | |
Eq ProtocolParametersUpdate Source # | |
Defined in Cardano.Api.ProtocolParameters |
Errors
data ProtocolParametersError Source #
Instances
Show ProtocolParametersError Source # | |
Defined in Cardano.Api.ProtocolParameters | |
Error ProtocolParametersError Source # | |
Defined in Cardano.Api.ProtocolParameters prettyError :: ProtocolParametersError -> Doc ann Source # |
data ProtocolParametersConversionError Source #
PpceOutOfBounds !ProtocolParameterName !Rational | |
PpceVersionInvalid !ProtocolParameterVersion | |
PpceInvalidCostModel !CostModel !CostModelApplyError | |
PpceMissingParameter !ProtocolParameterName |
Instances
Data ProtocolParametersConversionError Source # | |
Defined in Cardano.Api.ProtocolParameters gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ProtocolParametersConversionError -> c ProtocolParametersConversionError Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ProtocolParametersConversionError Source # toConstr :: ProtocolParametersConversionError -> Constr Source # dataTypeOf :: ProtocolParametersConversionError -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ProtocolParametersConversionError) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ProtocolParametersConversionError) Source # gmapT :: (forall b. Data b => b -> b) -> ProtocolParametersConversionError -> ProtocolParametersConversionError Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ProtocolParametersConversionError -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ProtocolParametersConversionError -> r Source # gmapQ :: (forall d. Data d => d -> u) -> ProtocolParametersConversionError -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> ProtocolParametersConversionError -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ProtocolParametersConversionError -> m ProtocolParametersConversionError Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ProtocolParametersConversionError -> m ProtocolParametersConversionError Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ProtocolParametersConversionError -> m ProtocolParametersConversionError Source # | |
Show ProtocolParametersConversionError Source # | |
Defined in Cardano.Api.ProtocolParameters | |
Error ProtocolParametersConversionError Source # | |
Defined in Cardano.Api.ProtocolParameters prettyError :: ProtocolParametersConversionError -> Doc ann Source # | |
Eq ProtocolParametersConversionError Source # | |
PraosNonce
data PraosNonce Source #
Instances
FromJSON PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters parseJSON :: Value -> Parser PraosNonce # parseJSONList :: Value -> Parser [PraosNonce] # | |||||
ToJSON PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters toJSON :: PraosNonce -> Value # toEncoding :: PraosNonce -> Encoding # toJSONList :: [PraosNonce] -> Value # toEncodingList :: [PraosNonce] -> Encoding # omitField :: PraosNonce -> Bool # | |||||
IsString PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters fromString :: String -> PraosNonce Source # | |||||
Generic PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters
from :: PraosNonce -> Rep PraosNonce x Source # to :: Rep PraosNonce x -> PraosNonce Source # | |||||
Show PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters | |||||
HasTypeProxy PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters
| |||||
SerialiseAsRawBytes PraosNonce Source # | |||||
FromCBOR PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters | |||||
ToCBOR PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters toCBOR :: PraosNonce -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy PraosNonce -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [PraosNonce] -> Size Source # | |||||
Eq PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters (==) :: PraosNonce -> PraosNonce -> Bool Source # (/=) :: PraosNonce -> PraosNonce -> Bool Source # | |||||
Ord PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters compare :: PraosNonce -> PraosNonce -> Ordering Source # (<) :: PraosNonce -> PraosNonce -> Bool Source # (<=) :: PraosNonce -> PraosNonce -> Bool Source # (>) :: PraosNonce -> PraosNonce -> Bool Source # (>=) :: PraosNonce -> PraosNonce -> Bool Source # max :: PraosNonce -> PraosNonce -> PraosNonce Source # min :: PraosNonce -> PraosNonce -> PraosNonce Source # | |||||
type Rep PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters type Rep PraosNonce = D1 ('MetaData "PraosNonce" "Cardano.Api.ProtocolParameters" "cardano-api-10.3.0.0-inplace-internal" 'True) (C1 ('MetaCons "PraosNonce" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPraosNonce") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Hash StandardCrypto ByteString)))) | |||||
data AsType PraosNonce Source # | |||||
Defined in Cardano.Api.ProtocolParameters |
Execution units, prices and cost models,
data ExecutionUnits Source #
The units for how long a script executes for and how much memory it uses. This is used to declare the resources used by a particular use of a script.
This type is also used to describe the limits for the maximum overall execution units per transaction or per block.
ExecutionUnits | |
|
Instances
FromJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script parseJSON :: Value -> Parser ExecutionUnits # parseJSONList :: Value -> Parser [ExecutionUnits] # | |
ToJSON ExecutionUnits Source # | |
Defined in Cardano.Api.Script toJSON :: ExecutionUnits -> Value # toEncoding :: ExecutionUnits -> Encoding # toJSONList :: [ExecutionUnits] -> Value # toEncodingList :: [ExecutionUnits] -> Encoding # omitField :: ExecutionUnits -> Bool # | |
Show ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
FromCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script | |
ToCBOR ExecutionUnits Source # | |
Defined in Cardano.Api.Script toCBOR :: ExecutionUnits -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ExecutionUnits -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ExecutionUnits] -> Size Source # | |
Eq ExecutionUnits Source # | |
Defined in Cardano.Api.Script (==) :: ExecutionUnits -> ExecutionUnits -> Bool Source # (/=) :: ExecutionUnits -> ExecutionUnits -> Bool Source # |
data ExecutionUnitPrices Source #
The prices for ExecutionUnits
as a fraction of a Coin
.
These are used to determine the fee for the use of a script within a
transaction, based on the ExecutionUnits
needed by the use of the script.
Instances
FromJSON ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters parseJSON :: Value -> Parser ExecutionUnitPrices # parseJSONList :: Value -> Parser [ExecutionUnitPrices] # | |
ToJSON ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters toJSON :: ExecutionUnitPrices -> Value # toEncoding :: ExecutionUnitPrices -> Encoding # toJSONList :: [ExecutionUnitPrices] -> Value # toEncodingList :: [ExecutionUnitPrices] -> Encoding # omitField :: ExecutionUnitPrices -> Bool # | |
Show ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters | |
FromCBOR ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters | |
ToCBOR ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters toCBOR :: ExecutionUnitPrices -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy ExecutionUnitPrices -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [ExecutionUnitPrices] -> Size Source # | |
Eq ExecutionUnitPrices Source # | |
Defined in Cardano.Api.ProtocolParameters (==) :: ExecutionUnitPrices -> ExecutionUnitPrices -> Bool Source # (/=) :: ExecutionUnitPrices -> ExecutionUnitPrices -> Bool Source # |
newtype CostModels Source #
Instances
FromJSON CostModels Source # | |
Defined in Cardano.Api.ProtocolParameters parseJSON :: Value -> Parser CostModels # parseJSONList :: Value -> Parser [CostModels] # | |
ToJSON CostModels Source # | |
Defined in Cardano.Api.ProtocolParameters toJSON :: CostModels -> Value # toEncoding :: CostModels -> Encoding # toJSONList :: [CostModels] -> Value # toEncodingList :: [CostModels] -> Encoding # omitField :: CostModels -> Bool # | |
Show CostModels Source # | |
Defined in Cardano.Api.ProtocolParameters | |
Eq CostModels Source # | |
Defined in Cardano.Api.ProtocolParameters (==) :: CostModels -> CostModels -> Bool Source # (/=) :: CostModels -> CostModels -> Bool Source # |
Instances
Data CostModel Source # | |
Defined in Cardano.Api.ProtocolParameters gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CostModel -> c CostModel Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CostModel Source # toConstr :: CostModel -> Constr Source # dataTypeOf :: CostModel -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CostModel) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CostModel) Source # gmapT :: (forall b. Data b => b -> b) -> CostModel -> CostModel Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CostModel -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CostModel -> r Source # gmapQ :: (forall d. Data d => d -> u) -> CostModel -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> CostModel -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> CostModel -> m CostModel Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CostModel -> m CostModel Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CostModel -> m CostModel Source # | |
Show CostModel Source # | |
FromCBOR CostModel Source # | |
ToCBOR CostModel Source # | |
Eq CostModel Source # | |
Update proposals to change the protocol parameters
data UpdateProposal Source #
Instances
Show UpdateProposal Source # | |||||
Defined in Cardano.Api.ProtocolParameters | |||||
HasTypeProxy UpdateProposal Source # | |||||
Defined in Cardano.Api.ProtocolParameters
| |||||
SerialiseAsCBOR UpdateProposal Source # | |||||
HasTextEnvelope UpdateProposal Source # | |||||
FromCBOR UpdateProposal Source # | |||||
Defined in Cardano.Api.ProtocolParameters | |||||
ToCBOR UpdateProposal Source # | |||||
Defined in Cardano.Api.ProtocolParameters toCBOR :: UpdateProposal -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy UpdateProposal -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [UpdateProposal] -> Size Source # | |||||
Eq UpdateProposal Source # | |||||
Defined in Cardano.Api.ProtocolParameters (==) :: UpdateProposal -> UpdateProposal -> Bool Source # (/=) :: UpdateProposal -> UpdateProposal -> Bool Source # | |||||
data AsType UpdateProposal Source # | |||||
Defined in Cardano.Api.ProtocolParameters |
makeShelleyUpdateProposal :: ProtocolParametersUpdate -> [Hash GenesisKey] -> EpochNo -> UpdateProposal Source #
Internal conversion functions
toLedgerNonce :: Maybe PraosNonce -> Nonce Source #
toLedgerUpdate :: ShelleyBasedEra era -> UpdateProposal -> Either ProtocolParametersConversionError (Update (ShelleyLedgerEra era)) Source #
fromLedgerUpdate :: (ShelleyLedgerEra era ~ ledgerera, EraCrypto ledgerera ~ StandardCrypto) => ShelleyBasedEra era -> Update ledgerera -> UpdateProposal Source #
toLedgerProposedPPUpdates :: ShelleyBasedEra era -> Map (Hash GenesisKey) ProtocolParametersUpdate -> Either ProtocolParametersConversionError (ProposedPPUpdates (ShelleyLedgerEra era)) Source #
fromLedgerProposedPPUpdates :: (ShelleyLedgerEra era ~ ledgerera, EraCrypto ledgerera ~ StandardCrypto) => ShelleyBasedEra era -> ProposedPPUpdates ledgerera -> Map (Hash GenesisKey) ProtocolParametersUpdate Source #
toLedgerPParams :: ShelleyBasedEra era -> ProtocolParameters -> Either ProtocolParametersConversionError (PParams (ShelleyLedgerEra era)) Source #
toLedgerPParamsUpdate :: ShelleyBasedEra era -> ProtocolParametersUpdate -> Either ProtocolParametersConversionError (PParamsUpdate (ShelleyLedgerEra era)) Source #
fromLedgerPParams :: ShelleyBasedEra era -> PParams (ShelleyLedgerEra era) -> ProtocolParameters Source #
Deprecated: Use the ledger's PParams (from module Cardano.Api.Ledger) type instead of ProtocolParameters. The type will be removed after Chang hard fork.
fromLedgerPParamsUpdate :: ShelleyBasedEra era -> PParamsUpdate (ShelleyLedgerEra era) -> ProtocolParametersUpdate Source #
toAlonzoCostModel :: CostModel -> Language -> Either ProtocolParametersConversionError CostModel Source #
toAlonzoCostModels :: Map AnyPlutusScriptVersion CostModel -> Either ProtocolParametersConversionError CostModels Source #
Data family instances
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Instances
data AsType AddressAny Source # | |
Defined in Cardano.Api.Address | |
data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType StakeAddress Source # | |
Defined in Cardano.Api.Address | |
data AsType BlockHeader Source # | |
Defined in Cardano.Api.Block | |
data AsType DRepMetadata Source # | |
Defined in Cardano.Api.DRepMetadata | |
data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType BabbageEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ConwayEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType GovernancePoll Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType GovernancePollAnswer Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType ByronKey Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType ByronKeyLegacy Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType KesKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType VrfKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType CommitteeColdExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeColdKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisUTxOKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakePoolKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType OperationalCertificate Source # | |
data AsType OperationalCertificateIssueCounter Source # | |
data AsType PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV3 Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptHash Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
data AsType SimpleScript' Source # | |
Defined in Cardano.Api.Script | |
data AsType HashableScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType ScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
data AsType ByronUpdateProposal Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType ByronVote Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType StakePoolMetadata Source # | |
Defined in Cardano.Api.StakePoolMetadata | |
data AsType TxId Source # | |
Defined in Cardano.Api.TxIn | |
data AsType TxMetadata Source # | |
Defined in Cardano.Api.TxMetadata | |
data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
data AsType (Address addrtype) Source # | |
Defined in Cardano.Api.Address | |
data AsType (AddressInEra era) Source # | |
Defined in Cardano.Api.Address | |
data AsType (Certificate era) Source # | |
Defined in Cardano.Api.Certificate | |
data AsType (Proposal era) Source # | |
data AsType (VotingProcedure era) Source # | |
data AsType (VotingProcedures era) Source # | |
data AsType (Hash a) Source # | |
Defined in Cardano.Api.Hash | |
data AsType (SigningKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (VerificationKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (PlutusScript lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
data AsType (KeyWitness era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (TxBody era) Source # | |
Defined in Cardano.Api.Tx.Sign |