Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Node.TPraos
Synopsis
- newtype MaxMajorProtVer = MaxMajorProtVer {
- getMaxMajorProtVer :: Version
- data family ProtocolParams blk
- data ProtocolParamsShelleyBased c = ProtocolParamsShelleyBased {}
- data Nonce
- = Nonce !(Hash Blake2b_256 Nonce)
- | NeutralNonce
- data ProtVer = ProtVer {}
- data ShelleyGenesis c = ShelleyGenesis {
- sgSystemStart :: !UTCTime
- sgNetworkMagic :: !Word32
- sgNetworkId :: !Network
- sgActiveSlotsCoeff :: !PositiveUnitInterval
- sgSecurityParam :: !Word64
- sgEpochLength :: !EpochSize
- sgSlotsPerKESPeriod :: !Word64
- sgMaxKESEvolutions :: !Word64
- sgSlotLength :: !NominalDiffTimeMicro
- sgUpdateQuorum :: !Word64
- sgMaxLovelaceSupply :: !Word64
- sgProtocolParams :: !(PParams (ShelleyEra c))
- sgGenDelegs :: !(Map (KeyHash 'Genesis c) (GenDelegPair c))
- sgInitialFunds :: ListMap (Addr c) Coin
- sgStaking :: ShelleyGenesisStaking c
- data ShelleyGenesisStaking c = ShelleyGenesisStaking {}
- emptyGenesisStaking :: ShelleyGenesisStaking c
- data ShelleyLeaderCredentials c = ShelleyLeaderCredentials {
- shelleyLeaderCredentialsInitSignKey :: SignKeyKES c
- shelleyLeaderCredentialsCanBeLeader :: PraosCanBeLeader c
- shelleyLeaderCredentialsLabel :: Text
- protocolInfoShelley :: forall m c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) (ShelleyEra c), TxLimits (ShelleyBlock (TPraos c) (ShelleyEra c))) => ShelleyGenesis c -> ProtocolParamsShelleyBased c -> ProtocolParams (ShelleyBlock (TPraos c) (ShelleyEra c)) -> (ProtocolInfo (ShelleyBlock (TPraos c) (ShelleyEra c)), m [BlockForging m (ShelleyBlock (TPraos c) (ShelleyEra c))])
- protocolInfoTPraosShelleyBased :: forall m era c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) era, TxLimits (ShelleyBlock (TPraos c) era), c ~ EraCrypto era) => ProtocolParamsShelleyBased c -> TransitionConfig era -> ProtVer -> TxOverrides (ShelleyBlock (TPraos c) era) -> (ProtocolInfo (ShelleyBlock (TPraos c) era), m [BlockForging m (ShelleyBlock (TPraos c) era)])
- shelleyBlockForging :: forall m era c. (ShelleyCompatible (TPraos c) era, PraosCrypto c, c ~ EraCrypto era, TxLimits (ShelleyBlock (TPraos c) era), IOLike m) => TPraosParams -> TxOverrides (ShelleyBlock (TPraos c) era) -> ShelleyLeaderCredentials (EraCrypto era) -> m (BlockForging m (ShelleyBlock (TPraos c) era))
- shelleySharedBlockForging :: forall m c era. (PraosCrypto c, ShelleyEraWithCrypto c (TPraos c) era, IOLike m) => HotKey c m -> (SlotNo -> KESPeriod) -> ShelleyLeaderCredentials c -> TxOverrides (ShelleyBlock (TPraos c) era) -> BlockForging m (ShelleyBlock (TPraos c) era)
- validateGenesis :: PraosCrypto c => ShelleyGenesis c -> Either String ()
Documentation
newtype MaxMajorProtVer #
Constructors
MaxMajorProtVer | |
Fields
|
Instances
data family ProtocolParams blk #
Instances
data ProtocolParamsShelleyBased c Source #
Parameters common to all Shelley-based ledgers.
When running a chain with multiple Shelley-based eras, in addition to the
per-era protocol parameters, one value of ProtocolParamsShelleyBased
will
be needed, which is shared among all Shelley-based eras.
Constructors
ProtocolParamsShelleyBased | |
Fields
|
Constructors
Nonce !(Hash Blake2b_256 Nonce) | |
NeutralNonce |
Instances
FromJSON Nonce | |
Defined in Cardano.Ledger.BaseTypes | |
ToJSON Nonce | |
Defined in Cardano.Ledger.BaseTypes Methods toEncoding :: Nonce -> Encoding toJSONList :: [Nonce] -> Value toEncodingList :: [Nonce] -> Encoding | |
Generic Nonce | |
Show Nonce | |
FromCBOR Nonce | |
ToCBOR Nonce | |
Defined in Cardano.Ledger.BaseTypes Methods encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Nonce -> Size encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Nonce] -> Size | |
DecCBOR Nonce | |
EncCBOR Nonce | |
Defined in Cardano.Ledger.BaseTypes Methods encodedSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy Nonce -> Size encodedListSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy [Nonce] -> Size | |
NFData Nonce | |
Defined in Cardano.Ledger.BaseTypes | |
Eq Nonce | |
Ord Nonce | |
Defined in Cardano.Ledger.BaseTypes | |
NoThunks Nonce | |
ToExpr Nonce | |
Defined in Cardano.Ledger.BaseTypes | |
type Rep Nonce | |
Defined in Cardano.Ledger.BaseTypes type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.9.0.0-1PU7Gr2wD6e8bMdYoXBOob" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1 :: Type -> Type)) |
Instances
data ShelleyGenesis c #
Constructors
ShelleyGenesis | |
Fields
|
Instances
data ShelleyGenesisStaking c #
Constructors
ShelleyGenesisStaking | |
Instances
data ShelleyLeaderCredentials c Source #
Constructors
ShelleyLeaderCredentials | |
Fields
|
protocolInfoShelley :: forall m c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) (ShelleyEra c), TxLimits (ShelleyBlock (TPraos c) (ShelleyEra c))) => ShelleyGenesis c -> ProtocolParamsShelleyBased c -> ProtocolParams (ShelleyBlock (TPraos c) (ShelleyEra c)) -> (ProtocolInfo (ShelleyBlock (TPraos c) (ShelleyEra c)), m [BlockForging m (ShelleyBlock (TPraos c) (ShelleyEra c))]) Source #
protocolInfoTPraosShelleyBased :: forall m era c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) era, TxLimits (ShelleyBlock (TPraos c) era), c ~ EraCrypto era) => ProtocolParamsShelleyBased c -> TransitionConfig era -> ProtVer -> TxOverrides (ShelleyBlock (TPraos c) era) -> (ProtocolInfo (ShelleyBlock (TPraos c) era), m [BlockForging m (ShelleyBlock (TPraos c) era)]) Source #
shelleyBlockForging :: forall m era c. (ShelleyCompatible (TPraos c) era, PraosCrypto c, c ~ EraCrypto era, TxLimits (ShelleyBlock (TPraos c) era), IOLike m) => TPraosParams -> TxOverrides (ShelleyBlock (TPraos c) era) -> ShelleyLeaderCredentials (EraCrypto era) -> m (BlockForging m (ShelleyBlock (TPraos c) era)) Source #
Create a BlockForging
record for a single era.
In case the same credentials should be shared across multiple Shelley-based
eras, use shelleySharedBlockForging
.
shelleySharedBlockForging :: forall m c era. (PraosCrypto c, ShelleyEraWithCrypto c (TPraos c) era, IOLike m) => HotKey c m -> (SlotNo -> KESPeriod) -> ShelleyLeaderCredentials c -> TxOverrides (ShelleyBlock (TPraos c) era) -> BlockForging m (ShelleyBlock (TPraos c) era) Source #
Create a BlockForging
record safely using a given Hotkey
.
The name of the era (separated by a _
) will be appended to each
forgeLabel
.
validateGenesis :: PraosCrypto c => ShelleyGenesis c -> Either String () Source #
Check the validity of the genesis config. To be used in conjunction with
assertWithMsg
.