Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype MaxMajorProtVer = MaxMajorProtVer {}
- 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 {}
- protocolClientInfoShelley ∷ ProtocolClientInfo (ShelleyBlock proto era)
- protocolInfoShelley ∷ ∀ m c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) (ShelleyEra c), TxLimits (ShelleyBlock (TPraos c) (ShelleyEra c))) ⇒ ShelleyGenesis c → ProtocolParamsShelleyBased c → ProtVer → (ProtocolInfo (ShelleyBlock (TPraos c) (ShelleyEra c)), m [BlockForging m (ShelleyBlock (TPraos c) (ShelleyEra c))])
- protocolInfoTPraosShelleyBased ∷ ∀ m era c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) era, TxLimits (ShelleyBlock (TPraos c) era), c ~ EraCrypto era) ⇒ ProtocolParamsShelleyBased c → TransitionConfig era → ProtVer → (ProtocolInfo (ShelleyBlock (TPraos c) era), m [BlockForging m (ShelleyBlock (TPraos c) era)])
- validateGenesis ∷ PraosCrypto c ⇒ ShelleyGenesis c → Either String ()
Documentation
newtype MaxMajorProtVer Source #
The maximum major protocol version.
This refers to the largest ledger version that this node supports.
Once the ledger protocol version (as reported by the ledger state)
exceeds this version we will consider all blocks invalid. This is
called the "obsolete node check" (see the ObsoleteNode
error
constructor).
Major ledger protocol versions are used to trigger both intra and inter era hard forks, which can potentially change the set of ledger rules that are applied.
Minor ledger protocol versions were intended to signal soft forks but they're currently unused, and they're irrelevant for the consensus logic.
For Cardano mainnet, the Shelley era has major protocol version 2. For more details, see this table
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.
ProtocolParamsShelleyBased | |
|
Evolving nonce type.
Nonce !(Hash Blake2b_256 Nonce) | |
NeutralNonce | Identity element |
Instances
FromJSON Nonce | |
ToJSON Nonce | |
Generic Nonce | |
Show Nonce | |
FromCBOR Nonce | |
ToCBOR Nonce | |
DecCBOR Nonce | |
EncCBOR Nonce | |
NFData Nonce | |
Defined in Cardano.Ledger.BaseTypes | |
Eq Nonce | |
Ord Nonce | |
NoThunks Nonce | |
type Rep Nonce | |
Defined in Cardano.Ledger.BaseTypes type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.15.0.0-7da0e3df1977ade9191b7eae19415d7ea59b658314aec71e6bda46450210a695" '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 | |
ToJSON ProtVer | |
Generic ProtVer | |
Show ProtVer | |
FromCBOR ProtVer | |
ToCBOR ProtVer | |
DecCBOR ProtVer | |
EncCBOR ProtVer | |
DecCBORGroup ProtVer | |
Defined in Cardano.Ledger.BaseTypes | |
EncCBORGroup ProtVer | |
NFData ProtVer | |
Defined in Cardano.Ledger.BaseTypes | |
Eq ProtVer | |
Ord ProtVer | |
NoThunks ProtVer | |
type Rep ProtVer | |
Defined in Cardano.Ledger.BaseTypes type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.15.0.0-7da0e3df1977ade9191b7eae19415d7ea59b658314aec71e6bda46450210a695" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Version) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural))) |
data ShelleyGenesis c 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.
ShelleyGenesis | |
|
Instances
data ShelleyGenesisStaking c 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.
ShelleyGenesisStaking | |
|
Instances
emptyGenesisStaking ∷ ShelleyGenesisStaking c Source #
Empty genesis staking
data ShelleyLeaderCredentials c Source #
ShelleyLeaderCredentials | |
|
protocolClientInfoShelley ∷ ProtocolClientInfo (ShelleyBlock proto era) Source #
protocolInfoShelley ∷ ∀ m c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) (ShelleyEra c), TxLimits (ShelleyBlock (TPraos c) (ShelleyEra c))) ⇒ ShelleyGenesis c → ProtocolParamsShelleyBased c → ProtVer → (ProtocolInfo (ShelleyBlock (TPraos c) (ShelleyEra c)), m [BlockForging m (ShelleyBlock (TPraos c) (ShelleyEra c))]) Source #
protocolInfoTPraosShelleyBased Source #
∷ ∀ m era c. (IOLike m, PraosCrypto c, ShelleyCompatible (TPraos c) era, TxLimits (ShelleyBlock (TPraos c) era), c ~ EraCrypto era) | |
⇒ ProtocolParamsShelleyBased c | |
→ TransitionConfig era | |
→ ProtVer | see |
→ (ProtocolInfo (ShelleyBlock (TPraos c) era), m [BlockForging m (ShelleyBlock (TPraos c) era)]) |
validateGenesis ∷ PraosCrypto c ⇒ ShelleyGenesis c → 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 # | |
isSelfIssued ∷ BlockConfig (ShelleyBlock proto era) → Header (ShelleyBlock proto era) → WhetherSelfIssued Source # | |
ConsensusProtocol proto ⇒ BlockSupportsSanityCheck (ShelleyBlock proto era) Source # | |
configAllSecurityParams ∷ TopLevelConfig (ShelleyBlock proto era) → NonEmpty SecurityParam Source # | |
(ShelleyCompatible proto era, LedgerSupportsProtocol (ShelleyBlock proto era), BlockSupportsSanityCheck (ShelleyBlock proto era), TxLimits (ShelleyBlock proto era)) ⇒ RunNode (ShelleyBlock proto era) Source # | |