ouroboros-consensus-cardano-0.16.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Shelley.Node.TPraos

Synopsis

Documentation

newtype MaxMajorProtVer Source #

The maximum major protocol version.

Must be at least the current major protocol version. For Cardano mainnet, the Shelley era has major protocol verison 2.

Constructors

MaxMajorProtVer 

Instances

Instances details
Generic MaxMajorProtVer 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Associated Types

type Rep MaxMajorProtVerTypeType #

Show MaxMajorProtVer 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Eq MaxMajorProtVer 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

NoThunks MaxMajorProtVer 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

type Rep MaxMajorProtVer 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

type Rep MaxMajorProtVer = D1 ('MetaData "MaxMajorProtVer" "Ouroboros.Consensus.Protocol.Praos.Common" "ouroboros-consensus-protocol-0.9.0.0-inplace" 'True) (C1 ('MetaCons "MaxMajorProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMaxMajorProtVer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Version)))

data family ProtocolParams blk Source #

Instances

Instances details
data ProtocolParams ByronBlock Source #

Parameters needed to run Byron

Instance details

Defined in Ouroboros.Consensus.Byron.Node

data ProtocolParams (CardanoBlock c) Source #

Parameters needed to run Cardano.

Instance details

Defined in Ouroboros.Consensus.Cardano.Node

data ProtocolParams (ShelleyBlock (Praos c) (BabbageEra c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Praos

data ProtocolParams (ShelleyBlock (Praos c) (ConwayEra c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.Praos

data ProtocolParams (ShelleyBlock (TPraos c) (AllegraEra c)) Source #

Parameters needed to run Allegra

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.TPraos

data ProtocolParams (ShelleyBlock (TPraos c) (AlonzoEra c)) Source #

Parameters needed to run Alonzo

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.TPraos

data ProtocolParams (ShelleyBlock (TPraos c) (MaryEra c)) Source #

Parameters needed to run Mary

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.TPraos

data ProtocolParams (ShelleyBlock (TPraos c) (ShelleyEra c)) Source #

Parameters needed to run Shelley

Instance details

Defined in Ouroboros.Consensus.Shelley.Node.TPraos

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

data Nonce Source #

Evolving nonce type.

Constructors

Nonce !(Hash Blake2b_256 Nonce) 
NeutralNonce

Identity element

Instances

Instances details
FromJSON Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep NonceTypeType #

Methods

fromNonceRep Nonce x #

toRep Nonce x → Nonce #

Show Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntNonceShowS #

showNonceString #

showList ∷ [Nonce] → ShowS #

FromCBOR Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBORNonceEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy NonceSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [Nonce] → Size Source #

DecCBOR Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORNonceEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy NonceSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [Nonce] → Size Source #

NFData Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfNonce → () #

Eq Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)NonceNonceBool #

(/=)NonceNonceBool #

Ord Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareNonceNonceOrdering #

(<)NonceNonceBool #

(<=)NonceNonceBool #

(>)NonceNonceBool #

(>=)NonceNonceBool #

maxNonceNonceNonce #

minNonceNonceNonce #

NoThunks Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Nonce 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep Nonce = D1 ('MetaData "Nonce" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.12.0.0-6c5b42e7cf1f0a4d2595f254e42de3de25b593585a48ddcae1d5053fda47d093" 'False) (C1 ('MetaCons "Nonce" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash Blake2b_256 Nonce))) :+: C1 ('MetaCons "NeutralNonce" 'PrefixI 'False) (U1TypeType))

data ProtVer Source #

Constructors

ProtVer 

Fields

Instances

Instances details
FromJSON ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToJSON ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Generic ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Associated Types

type Rep ProtVerTypeType #

Methods

fromProtVerRep ProtVer x #

toRep ProtVer x → ProtVer #

Show ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

showsPrecIntProtVerShowS #

showProtVerString #

showList ∷ [ProtVer] → ShowS #

FromCBOR ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

ToCBOR ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

toCBORProtVerEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy ProtVerSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ProtVer] → Size Source #

DecCBOR ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBOR ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

encCBORProtVerEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy ProtVerSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ProtVer] → Size Source #

DecCBORGroup ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

EncCBORGroup ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

NFData ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

rnfProtVer → () #

Eq ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

(==)ProtVerProtVerBool #

(/=)ProtVerProtVerBool #

Ord ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

Methods

compareProtVerProtVerOrdering #

(<)ProtVerProtVerBool #

(<=)ProtVerProtVerBool #

(>)ProtVerProtVerBool #

(>=)ProtVerProtVerBool #

maxProtVerProtVerProtVer #

minProtVerProtVerProtVer #

NoThunks ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ProtVer 
Instance details

Defined in Cardano.Ledger.BaseTypes

type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.12.0.0-6c5b42e7cf1f0a4d2595f254e42de3de25b593585a48ddcae1d5053fda47d093" '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.

Constructors

ShelleyGenesis 

Fields

Instances

Instances details
Crypto c ⇒ FromJSON (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ ToJSON (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Generic (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Associated Types

type Rep (ShelleyGenesis c) ∷ TypeType #

Methods

fromShelleyGenesis c → Rep (ShelleyGenesis c) x #

toRep (ShelleyGenesis c) x → ShelleyGenesis c #

Crypto c ⇒ Show (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ FromCBOR (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ ToCBOR (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Methods

toCBORShelleyGenesis c → Encoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (ShelleyGenesis c) → Size Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyGenesis c] → Size Source #

Crypto c ⇒ DecCBOR (ShelleyGenesis c)

Genesis are always encoded with the version of era they are defined in.

Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ EncCBOR (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Methods

encCBORShelleyGenesis c → Encoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (ShelleyGenesis c) → Size Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [ShelleyGenesis c] → Size Source #

Crypto c ⇒ Eq (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ NoThunks (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep (ShelleyGenesis c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep (ShelleyGenesis c) = D1 ('MetaData "ShelleyGenesis" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.11.0.0-71b632947a9ac71ad3fea4cb822e59da4c7bc74191ae6079335271e79e73cfcc" '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 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 c))) :*: S1 ('MetaSel ('Just "sgGenDelegs") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Map (KeyHash 'Genesis c) (GenDelegPair c)))) :*: (S1 ('MetaSel ('Just "sgInitialFunds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (Addr c) Coin)) :*: S1 ('MetaSel ('Just "sgStaking") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ShelleyGenesisStaking c)))))))

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.

Constructors

ShelleyGenesisStaking 

Fields

  • sgsPoolsListMap (KeyHash 'StakePool c) (PoolParams c)

    Pools to register

    The key in this map is the hash of the public key of the _pool_. This need not correspond to any payment or staking key, but must correspond to the cold key held by TPraosIsCoreNode.

  • sgsStakeListMap (KeyHash 'Staking c) (KeyHash 'StakePool c)

    Stake-holding key hash credentials and the pools to delegate that stake to. We require the raw staking key hash in order to:

    • Avoid pointer addresses, which would be tricky when there's no slot or transaction to point to.
    • Avoid script credentials.

Instances

Instances details
Crypto c ⇒ FromJSON (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ ToJSON (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Monoid (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Semigroup (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Generic (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Associated Types

type Rep (ShelleyGenesisStaking c) ∷ TypeType #

Show (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ DecCBOR (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Crypto c ⇒ EncCBOR (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

Eq (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

NoThunks (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep (ShelleyGenesisStaking c) 
Instance details

Defined in Cardano.Ledger.Shelley.Genesis

type Rep (ShelleyGenesisStaking c) = D1 ('MetaData "ShelleyGenesisStaking" "Cardano.Ledger.Shelley.Genesis" "cardano-ledger-shelley-1.11.0.0-71b632947a9ac71ad3fea4cb822e59da4c7bc74191ae6079335271e79e73cfcc" 'False) (C1 ('MetaCons "ShelleyGenesisStaking" 'PrefixI 'True) (S1 ('MetaSel ('Just "sgsPools") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'StakePool c) (PoolParams c))) :*: S1 ('MetaSel ('Just "sgsStake") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (ListMap (KeyHash 'Staking c) (KeyHash 'StakePool c)))))

data ShelleyLeaderCredentials c Source #

Constructors

ShelleyLeaderCredentials 

Fields

shelleyBlockForging ∷ ∀ m era c. (ShelleyCompatible (TPraos c) era, PraosCrypto c, c ~ EraCrypto era, TxLimits (ShelleyBlock (TPraos c) era), IOLike m) ⇒ TPraosParamsTxOverrides (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 ∷ ∀ m c era. (PraosCrypto c, ShelleyEraWithCrypto c (TPraos c) era, IOLike m) ⇒ HotKey c m → (SlotNoKESPeriod) → 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.

validateGenesisPraosCrypto c ⇒ ShelleyGenesis c → Either String () Source #

Check the validity of the genesis config. To be used in conjunction with assertWithMsg.