| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Shelley.Node
Contents
Synopsis
- newtype MaxMajorProtVer = MaxMajorProtVer {}
- data ProtocolParamsShelleyBased c = ProtocolParamsShelleyBased {}
- data Nonce
- = Nonce !(Hash Blake2b_256 Nonce)
- | NeutralNonce
- data ProtVer = ProtVer {}
- data ShelleyGenesis = ShelleyGenesis {
- sgSystemStart ∷ !UTCTime
- sgNetworkMagic ∷ !Word32
- sgNetworkId ∷ !Network
- sgActiveSlotsCoeff ∷ !PositiveUnitInterval
- sgSecurityParam ∷ !(NonZero Word64)
- sgEpochLength ∷ !EpochSize
- sgSlotsPerKESPeriod ∷ !Word64
- sgMaxKESEvolutions ∷ !Word64
- sgSlotLength ∷ !NominalDiffTimeMicro
- sgUpdateQuorum ∷ !Word64
- sgMaxLovelaceSupply ∷ !Word64
- sgProtocolParams ∷ !(PParams ShelleyEra)
- sgGenDelegs ∷ !(Map (KeyHash 'GenesisRole) GenDelegPair)
- sgInitialFunds ∷ ListMap Addr Coin
- sgStaking ∷ ShelleyGenesisStaking
- sgExtraConfig ∷ !(StrictMaybe ShelleyExtraConfig)
- data ShelleyGenesisStaking = ShelleyGenesisStaking {}
- emptyGenesisStaking ∷ ShelleyGenesisStaking
- data ShelleyLeaderCredentials c = ShelleyLeaderCredentials {
- shelleyLeaderCredentialsCanBeLeader ∷ PraosCanBeLeader c
- shelleyLeaderCredentialsLabel ∷ Text
- protocolClientInfoShelley ∷ ProtocolClientInfo (ShelleyBlock proto era)
- protocolInfoShelley ∷ (IOLike m, AgentCrypto c, ShelleyCompatible (TPraos c) ShelleyEra, MonadKESAgent m) ⇒ SomeHasFS m → ShelleyGenesis → ProtocolParamsShelleyBased c → ProtVer → m (ProtocolInfo (ShelleyBlock (TPraos c) ShelleyEra), Tracer m KESAgentClientTrace → m [MkBlockForging m (ShelleyBlock (TPraos c) ShelleyEra)])
- protocolInfoTPraosShelleyBased ∷ ∀ m era c. (ShelleyCompatible (TPraos c) era, KESAgentContext c m) ⇒ SomeHasFS m → ProtocolParamsShelleyBased c → TransitionConfig era → ProtVer → m (ProtocolInfo (ShelleyBlock (TPraos c) era), Tracer m KESAgentClientTrace → m [MkBlockForging m (ShelleyBlock (TPraos c) era)])
- validateGenesis ∷ ShelleyGenesis → Either String ()
Documentation
newtype MaxMajorProtVer #
Constructors
| MaxMajorProtVer | |
Fields | |
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
| |
Evolving nonce type.
Constructors
| Nonce !(Hash Blake2b_256 Nonce) | |
| NeutralNonce | Identity element |
Instances
| FromJSON Nonce Source # | |||||
| ToJSON Nonce Source # | |||||
| FromCBOR Nonce Source # | |||||
| ToCBOR Nonce Source # | |||||
| DecCBOR Nonce Source # | |||||
| EncCBOR Nonce Source # | |||||
| ToPlutusData Nonce Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData | |||||
| NFData Nonce Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Eq Nonce Source # | |||||
| Ord Nonce Source # | |||||
| Generic Nonce Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Nonce Source # | |||||
| NoThunks Nonce Source # | |||||
| type Rep Nonce Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.22.0.0-c45e86a9420b4cabd7b4441fe1f01a4a90cffb77a6fbfa80dfcb84c19226d668" '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
| FromJSON ProtVer Source # | |||||
| ToJSON ProtVer Source # | |||||
| FromCBOR ProtVer Source # | |||||
| ToCBOR ProtVer Source # | |||||
| DecCBOR ProtVer Source # | |||||
| EncCBOR ProtVer Source # | |||||
| DecCBORGroup ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes Methods | |||||
| EncCBORGroup ProtVer Source # | |||||
| ToPlutusData ProtVer Source # | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData | |||||
| NFData ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Eq ProtVer Source # | |||||
| Ord ProtVer Source # | |||||
| Generic ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show ProtVer Source # | |||||
| NoThunks ProtVer Source # | |||||
| type Rep ProtVer Source # | |||||
Defined in Cardano.Ledger.BaseTypes type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.22.0.0-c45e86a9420b4cabd7b4441fe1f01a4a90cffb77a6fbfa80dfcb84c19226d668" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Version) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32))) | |||||
data ShelleyGenesis Source #
Shelley genesis information
Note that this is needed only for a pure Shelley network, hence it being defined here rather than in its own module. In mainnet, Shelley will transition naturally from Byron, and thus will never have its own genesis information.
Constructors
| ShelleyGenesis | |
Fields
| |
Instances
| FromJSON ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods parseJSON ∷ Value → Parser ShelleyGenesis Source # | |||||
| ToJSON ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods toJSON ∷ ShelleyGenesis → Value Source # toEncoding ∷ ShelleyGenesis → Encoding Source # toJSONList ∷ [ShelleyGenesis] → Value Source # | |||||
| FromCBOR ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| ToCBOR ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods toCBOR ∷ ShelleyGenesis → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ShelleyGenesis → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyGenesis] → Size Source # | |||||
| DecCBOR ShelleyGenesis Source # | Genesis are always encoded with the version of era they are defined in. | ||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| EncCBOR ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods | |||||
| ToKeyValuePairs ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyGenesis → [kv] Source # | |||||
| NFData ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods rnf ∷ ShelleyGenesis → () # | |||||
| Eq ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods (==) ∷ ShelleyGenesis → ShelleyGenesis → Bool # (/=) ∷ ShelleyGenesis → ShelleyGenesis → Bool # | |||||
| Generic ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Associated Types
| |||||
| Show ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods showsPrec ∷ Int → ShelleyGenesis → ShowS # show ∷ ShelleyGenesis → String # showList ∷ [ShelleyGenesis] → ShowS # | |||||
| NoThunks ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| type Rep ShelleyGenesis Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis type Rep ShelleyGenesis = D1 ('MetaData "ShelleyGenesis" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.19.1.0-bfc01d5af38d8ef2858e1fed7ee4fa3df9836affc0ace699b6c17767b128f172" 'False) (C1 ('MetaCons "ShelleyGenesis" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "sgSystemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 UTCTime) :*: S1 ('MetaSel ('Just "sgNetworkMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word32)) :*: (S1 ('MetaSel ('Just "sgNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: S1 ('MetaSel ('Just "sgActiveSlotsCoeff") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PositiveUnitInterval))) :*: ((S1 ('MetaSel ('Just "sgSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 (NonZero Word64)) :*: S1 ('MetaSel ('Just "sgEpochLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 EpochSize)) :*: (S1 ('MetaSel ('Just "sgSlotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgMaxKESEvolutions") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))) :*: (((S1 ('MetaSel ('Just "sgSlotLength") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 NominalDiffTimeMicro) :*: S1 ('MetaSel ('Just "sgUpdateQuorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just "sgMaxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Just "sgProtocolParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (PParams ShelleyEra)))) :*: ((S1 ('MetaSel ('Just "sgGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'GenesisRole) GenDelegPair)) :*: S1 ('MetaSel ('Just "sgInitialFunds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap Addr Coin))) :*: (S1 ('MetaSel ('Just "sgStaking") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShelleyGenesisStaking) :*: S1 ('MetaSel ('Just "sgExtraConfig") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe ShelleyExtraConfig))))))) | |||||
data ShelleyGenesisStaking Source #
Genesis Shelley staking configuration.
This allows us to configure some initial stake pools and delegation to them, in order to test Praos in a static configuration, without requiring on-chain registration and delegation.
For simplicity, pools defined in the genesis staking do not pay deposits for their registration.
Constructors
| ShelleyGenesisStaking | |
Fields
| |
Instances
| FromJSON ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| ToJSON ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| DecCBOR ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| EncCBOR ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods | |||||
| ToKeyValuePairs ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods toKeyValuePairs ∷ KeyValue e kv ⇒ ShelleyGenesisStaking → [kv] Source # | |||||
| NFData ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods rnf ∷ ShelleyGenesisStaking → () # | |||||
| Monoid ShelleyGenesisStaking Source # | |||||
| Semigroup ShelleyGenesisStaking Source # | |||||
| Eq ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods (==) ∷ ShelleyGenesisStaking → ShelleyGenesisStaking → Bool # (/=) ∷ ShelleyGenesisStaking → ShelleyGenesisStaking → Bool # | |||||
| Generic ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Associated Types
Methods from ∷ ShelleyGenesisStaking → Rep ShelleyGenesisStaking x # | |||||
| Show ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis Methods showsPrec ∷ Int → ShelleyGenesisStaking → ShowS # show ∷ ShelleyGenesisStaking → String # showList ∷ [ShelleyGenesisStaking] → ShowS # | |||||
| NoThunks ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis | |||||
| type Rep ShelleyGenesisStaking Source # | |||||
Defined in Cardano.Ledger.Shelley.Genesis type Rep ShelleyGenesisStaking = D1 ('MetaData "ShelleyGenesisStaking" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.19.1.0-bfc01d5af38d8ef2858e1fed7ee4fa3df9836affc0ace699b6c17767b128f172" 'False) (C1 ('MetaCons "ShelleyGenesisStaking" 'PrefixI 'True) (S1 ('MetaSel ('Just "sgsPools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'StakePool) StakePoolParams)) :*: S1 ('MetaSel ('Just "sgsStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'Staking) (KeyHash 'StakePool))))) | |||||
emptyGenesisStaking ∷ ShelleyGenesisStaking Source #
Empty genesis staking
data ShelleyLeaderCredentials c Source #
Constructors
| ShelleyLeaderCredentials | |
Fields
| |
protocolClientInfoShelley ∷ ProtocolClientInfo (ShelleyBlock proto era) Source #
protocolInfoShelley ∷ (IOLike m, AgentCrypto c, ShelleyCompatible (TPraos c) ShelleyEra, MonadKESAgent m) ⇒ SomeHasFS m → ShelleyGenesis → ProtocolParamsShelleyBased c → ProtVer → m (ProtocolInfo (ShelleyBlock (TPraos c) ShelleyEra), Tracer m KESAgentClientTrace → m [MkBlockForging m (ShelleyBlock (TPraos c) ShelleyEra)]) Source #
protocolInfoTPraosShelleyBased Source #
Arguments
| ∷ ∀ m era c. (ShelleyCompatible (TPraos c) era, KESAgentContext c m) | |
| ⇒ SomeHasFS m | |
| → ProtocolParamsShelleyBased c | |
| → TransitionConfig era | |
| → ProtVer | see |
| → m (ProtocolInfo (ShelleyBlock (TPraos c) era), Tracer m KESAgentClientTrace → m [MkBlockForging m (ShelleyBlock (TPraos c) era)]) |
validateGenesis ∷ ShelleyGenesis → Either String () Source #
Check the validity of the genesis config. To be used in conjunction with
assertWithMsg.
Orphan instances
| ShelleyCompatible proto era ⇒ BlockSupportsMetrics (ShelleyBlock proto era) Source # | |
Methods isSelfIssued ∷ BlockConfig (ShelleyBlock proto era) → Header (ShelleyBlock proto era) → WhetherSelfIssued Source # | |
| ConsensusProtocol proto ⇒ BlockSupportsSanityCheck (ShelleyBlock proto era) Source # | |
Methods configAllSecurityParams ∷ TopLevelConfig (ShelleyBlock proto era) → NonEmpty SecurityParam Source # | |
| (ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), BlockSupportsSanityCheck (ShelleyBlock proto era), TxLimits (ShelleyBlock proto era), NoHardForks (ShelleyBlock proto era), Crypto (ProtoCrypto proto), SerialiseNodeToNodeConstraints (ShelleyBlock proto era), ShowProxy (PerasCert (ShelleyBlock proto era)), ShowProxy (PerasVote (ShelleyBlock proto era))) ⇒ RunNode (ShelleyBlock proto era) Source # | |