ouroboros-consensus-protocol-0.3.1.0: Cardano consensus protocols
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Protocol.TPraos

Description

Transitional Praos.

Transitional praos allows for the overlaying of Praos with an overlay schedule determining slots to be produced by BFT

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 

Fields

Instances

Instances details
Eq MaxMajorProtVer Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Show MaxMajorProtVer Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Generic MaxMajorProtVer Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Associated Types

type Rep MaxMajorProtVerTypeType Source #

NoThunks MaxMajorProtVer Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Methods

noThunks ∷ Context → MaxMajorProtVerIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → MaxMajorProtVerIO (Maybe ThunkInfo) #

showTypeOfProxy MaxMajorProtVerString #

type Rep MaxMajorProtVer Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

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

data PraosChainSelectView c Source #

View of the ledger tip for chain selection.

We order between chains as follows:

  1. By chain length, with longer chains always preferred.
  2. If the tip of each chain was issued by the same agent, then we prefer the chain whose tip has the highest ocert issue number.
  3. By a VRF value from the chain tip, with lower values preferred. See pTieBreakVRFValue for which one is used.

Constructors

PraosChainSelectView 

Fields

Instances

Instances details
Crypto c ⇒ Eq (PraosChainSelectView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Crypto c ⇒ Ord (PraosChainSelectView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Crypto c ⇒ Show (PraosChainSelectView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Generic (PraosChainSelectView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Associated Types

type Rep (PraosChainSelectView c) ∷ TypeType Source #

Crypto c ⇒ NoThunks (PraosChainSelectView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Methods

noThunks ∷ Context → PraosChainSelectView c → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → PraosChainSelectView c → IO (Maybe ThunkInfo) #

showTypeOfProxy (PraosChainSelectView c) → String #

type Rep (PraosChainSelectView c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

type Rep (PraosChainSelectView c) = D1 ('MetaData "PraosChainSelectView" "Ouroboros.Consensus.Protocol.Praos.Common" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "PraosChainSelectView" 'PrefixI 'True) ((S1 ('MetaSel ('Just "csvChainLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: S1 ('MetaSel ('Just "csvSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo)) :*: (S1 ('MetaSel ('Just "csvIssuer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VKey 'BlockIssuer c)) :*: (S1 ('MetaSel ('Just "csvIssueNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64) :*: S1 ('MetaSel ('Just "csvTieBreakVRF") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OutputVRF (VRF c)))))))

data TPraos c Source #

Instances

Instances details
Generic (ConsensusConfig (TPraos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (ConsensusConfig (TPraos c)) ∷ TypeType Source #

PraosCrypto c ⇒ ConsensusProtocol (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

PraosCrypto c ⇒ NoThunks (ConsensusConfig (TPraos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → ConsensusConfig (TPraos c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (TPraos c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (TPraos c)) → String #

PraosCrypto c ⇒ PraosProtocolSupportsNode (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

getPraosNonces ∷ proxy (TPraos c) → ChainDepState (TPraos c) → PraosNonces Source #

getOpCertCounters ∷ proxy (TPraos c) → ChainDepState (TPraos c) → Map (KeyHash 'BlockIssuer (PraosProtocolSupportsNodeCrypto (TPraos c))) Word64 Source #

(HASH c1 ~ HASH c2, ADDRHASH c1 ~ ADDRHASH c2, VerKeyDSIGN c1 ~ VerKeyDSIGN c2, VerKeyVRF c1 ~ VerKeyVRF c2) ⇒ TranslateProto (TPraos c1) (Praos c2) Source #

We can translate between TPraos and Praos, provided:

  • They share the same HASH algorithm
  • They share the same ADDRHASH algorithm
  • They share the same DSIGN verification keys
  • They share the same VRF verification keys
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Translate

type Rep (ConsensusConfig (TPraos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (ConsensusConfig (TPraos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpraosParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TPraosParams) :*: S1 ('MetaSel ('Just "tpraosEpochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Except PastHorizonException)))))
data ConsensusConfig (TPraos c) Source #

Static configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type ValidateView (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type ValidationErr (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type ValidationErr (TPraos c) = ChainTransitionError c
type LedgerView (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type LedgerView (TPraos c) = LedgerView c
type SelectView (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type CanBeLeader (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type IsLeader (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type ChainDepState (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type PraosProtocolSupportsNodeCrypto (TPraos c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

data TPraosFields c toSign Source #

Constructors

TPraosFields 

Fields

Instances

Instances details
(Show toSign, PraosCrypto c) ⇒ Show (TPraosFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

showsPrecIntTPraosFields c toSign → ShowS Source #

showTPraosFields c toSign → String Source #

showList ∷ [TPraosFields c toSign] → ShowS Source #

Generic (TPraosFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (TPraosFields c toSign) ∷ TypeType Source #

Methods

fromTPraosFields c toSign → Rep (TPraosFields c toSign) x Source #

toRep (TPraosFields c toSign) x → TPraosFields c toSign Source #

(Condense toSign, PraosCrypto c) ⇒ Condense (TPraosFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

condenseTPraosFields c toSign → String Source #

(NoThunks toSign, PraosCrypto c) ⇒ NoThunks (TPraosFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → TPraosFields c toSign → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → TPraosFields c toSign → IO (Maybe ThunkInfo) #

showTypeOfProxy (TPraosFields c toSign) → String #

type Rep (TPraosFields c toSign) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (TPraosFields c toSign) = D1 ('MetaData "TPraosFields" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpraosSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedKES c toSign)) :*: S1 ('MetaSel ('Just "tpraosToSign") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 toSign)))

data TPraosIsLeader c Source #

Assembled proof that the issuer has the right to issue a block in the selected slot.

Constructors

TPraosIsLeader 

Fields

Instances

Instances details
Generic (TPraosIsLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (TPraosIsLeader c) ∷ TypeType Source #

PraosCrypto c ⇒ NoThunks (TPraosIsLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → TPraosIsLeader c → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → TPraosIsLeader c → IO (Maybe ThunkInfo) #

showTypeOfProxy (TPraosIsLeader c) → String #

type Rep (TPraosIsLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (TPraosIsLeader c) = D1 ('MetaData "TPraosIsLeader" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosIsLeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpraosIsLeaderEta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CertifiedVRF c Nonce)) :*: (S1 ('MetaSel ('Just "tpraosIsLeaderProof") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CertifiedVRF c Natural)) :*: S1 ('MetaSel ('Just "tpraosIsLeaderGenVRFHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Hash c (VerKeyVRF c)))))))

data TPraosParams Source #

TPraos parameters that are node independent

Constructors

TPraosParams 

Fields

Instances

Instances details
Generic TPraosParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep TPraosParamsTypeType Source #

NoThunks TPraosParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → TPraosParamsIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → TPraosParamsIO (Maybe ThunkInfo) #

showTypeOfProxy TPraosParamsString #

type Rep TPraosParams Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep TPraosParams = D1 ('MetaData "TPraosParams" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosParams" 'PrefixI 'True) (((S1 ('MetaSel ('Just "tpraosSlotsPerKESPeriod") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "tpraosLeaderF") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ActiveSlotCoeff)) :*: (S1 ('MetaSel ('Just "tpraosSecurityParam") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SecurityParam) :*: (S1 ('MetaSel ('Just "tpraosMaxKESEvo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "tpraosQuorum") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)))) :*: ((S1 ('MetaSel ('Just "tpraosMaxMajorPV") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MaxMajorProtVer) :*: S1 ('MetaSel ('Just "tpraosMaxLovelaceSupply") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)) :*: (S1 ('MetaSel ('Just "tpraosNetworkId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Network) :*: (S1 ('MetaSel ('Just "tpraosInitialNonce") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Nonce) :*: S1 ('MetaSel ('Just "tpraosSystemStart") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SystemStart))))))

data TPraosState c Source #

Transitional Praos consensus state.

In addition to the ChainDepState provided by the ledger, we track the slot number of the last applied header.

Constructors

TPraosState 

Fields

Instances

Instances details
Eq (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Show (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Generic (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (TPraosState c) ∷ TypeType Source #

Methods

fromTPraosState c → Rep (TPraosState c) x Source #

toRep (TPraosState c) x → TPraosState c Source #

PraosCrypto c ⇒ Serialise (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

encodeTPraosState c → Encoding

decode ∷ Decoder s (TPraosState c)

encodeList ∷ [TPraosState c] → Encoding

decodeList ∷ Decoder s [TPraosState c]

PraosCrypto c ⇒ NoThunks (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → TPraosState c → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → TPraosState c → IO (Maybe ThunkInfo) #

showTypeOfProxy (TPraosState c) → String #

PraosCrypto c ⇒ FromCBOR (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

fromCBOR ∷ Decoder s (TPraosState c)

labelProxy (TPraosState c) → Text

PraosCrypto c ⇒ ToCBOR (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

toCBORTPraosState c → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (TPraosState c) → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [TPraosState c] → Size

type Rep (TPraosState c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (TPraosState c) = D1 ('MetaData "TPraosState" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosState" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpraosStateLastSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin SlotNo)) :*: S1 ('MetaSel ('Just "tpraosStateChainDepState") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (ChainDepState c))))
data Ticked (TPraosState c) Source #

Ticked TPraosState

Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

data TPraosToSign c Source #

Fields arising from transitional praos execution which must be included in the block signature.

Constructors

TPraosToSign 

Fields

  • tpraosToSignIssuerVK ∷ VKey 'BlockIssuer c

    Verification key for the issuer of this block.

    Note that unlike in Classic/BFT where we have a key for the genesis delegate on whose behalf we are issuing this block, this key corresponds to the stake pool/core node actually forging the block.

  • tpraosToSignVrfVK ∷ VerKeyVRF c
     
  • tpraosToSignEta ∷ CertifiedVRF c Nonce

    Verifiable result containing the updated nonce value.

  • tpraosToSignLeader ∷ CertifiedVRF c Natural

    Verifiable proof of the leader value, used to determine whether the node has the right to issue a block in this slot.

    We include a value here even for blocks forged under the BFT schedule. It is not required that such a value be verifiable (though by default it will be verifiably correct, but unused.)

  • tpraosToSignOCert ∷ OCert c

    Lightweight delegation certificate mapping the cold (DSIGN) key to the online KES key.

Instances

Instances details
PraosCrypto c ⇒ Show (TPraosToSign c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Generic (TPraosToSign c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (TPraosToSign c) ∷ TypeType Source #

PraosCrypto c ⇒ NoThunks (TPraosToSign c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → TPraosToSign c → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → TPraosToSign c → IO (Maybe ThunkInfo) #

showTypeOfProxy (TPraosToSign c) → String #

type Rep (TPraosToSign c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (TPraosToSign c) = D1 ('MetaData "TPraosToSign" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosToSign" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tpraosToSignIssuerVK") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VKey 'BlockIssuer c)) :*: S1 ('MetaSel ('Just "tpraosToSignVrfVK") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (VerKeyVRF c))) :*: (S1 ('MetaSel ('Just "tpraosToSignEta") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CertifiedVRF c Nonce)) :*: (S1 ('MetaSel ('Just "tpraosToSignLeader") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (CertifiedVRF c Natural)) :*: S1 ('MetaSel ('Just "tpraosToSignOCert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OCert c))))))

type TPraosValidateView c = BHeader c Source #

Because we are using the executable spec, rather than implementing the protocol directly here, we have a fixed header type rather than an abstraction. So our validate view is fixed to this.

forgeTPraosFields ∷ (PraosCrypto c, KESignable c toSign, Monad m) ⇒ HotKey c m → CanBeLeader (TPraos c) → IsLeader (TPraos c) → (TPraosToSign c → toSign) → m (TPraosFields c toSign) Source #

mkTPraosParams Source #

Arguments

MaxMajorProtVer 
→ Nonce

Initial nonce

→ ShelleyGenesis era 
TPraosParams 

Crypto

class (Crypto c, DSignable c (OCertSignable c), KESignable c (BHBody c), VRFSignable c Seed) ⇒ PraosCrypto c #

Instances

Instances details
PraosCrypto StandardCrypto 
Instance details

Defined in Cardano.Protocol.TPraos.API

data StandardCrypto #

Instances

Instances details
Crypto StandardCrypto 
Instance details

Defined in Cardano.Ledger.Crypto

Associated Types

type HASH StandardCrypto

type ADDRHASH StandardCrypto

type DSIGN StandardCrypto

type KES StandardCrypto

type VRF StandardCrypto

PraosCrypto StandardCrypto 
Instance details

Defined in Cardano.Protocol.TPraos.API

PraosCrypto StandardCrypto Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type ADDRHASH StandardCrypto 
Instance details

Defined in Cardano.Ledger.Crypto

type ADDRHASH StandardCrypto = Blake2b_224
type DSIGN StandardCrypto 
Instance details

Defined in Cardano.Ledger.Crypto

type DSIGN StandardCrypto = Ed25519DSIGN
type HASH StandardCrypto 
Instance details

Defined in Cardano.Ledger.Crypto

type HASH StandardCrypto = Blake2b_256
type KES StandardCrypto 
Instance details

Defined in Cardano.Ledger.Crypto

type KES StandardCrypto = Sum6KES Ed25519DSIGN Blake2b_256
type VRF StandardCrypto 
Instance details

Defined in Cardano.Ledger.Crypto

type VRF StandardCrypto = PraosVRF

CannotForge

data TPraosCannotForge c Source #

Expresses that, whilst we believe ourselves to be a leader for this slot, we are nonetheless unable to forge a block.

Constructors

TPraosCannotForgeKeyNotUsableYet

The KES key in our operational certificate can't be used because the current (wall clock) period is before the start period of the key. current KES period.

Note: the opposite case, i.e., the wall clock period being after the end period of the key, is caught when trying to update the key in updateForgeState.

Fields

  • !KESPeriod

    Current KES period according to the wallclock slot, i.e., the KES period in which we want to use the key.

  • !KESPeriod

    Start KES period of the KES key.

TPraosCannotForgeWrongVRF !(Hash c (VerKeyVRF c)) !(Hash c (VerKeyVRF c))

We are a genesis delegate, but our VRF key (second argument) does not match the registered key for that delegate (first argument).

Instances

Instances details
PraosCrypto c ⇒ Show (TPraosCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Generic (TPraosCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (TPraosCannotForge c) ∷ TypeType Source #

type Rep (TPraosCannotForge c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (TPraosCannotForge c) = D1 ('MetaData "TPraosCannotForge" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosCannotForgeKeyNotUsableYet" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KESPeriod) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 KESPeriod)) :+: C1 ('MetaCons "TPraosCannotForgeWrongVRF" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash c (VerKeyVRF c))) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Hash c (VerKeyVRF c)))))

tpraosCheckCanForge Source #

Arguments

ConsensusConfig (TPraos c) 
→ Hash c (VerKeyVRF c)

Precomputed hash of the VRF verification key

SlotNo 
IsLeader (TPraos c) 
KESInfo 
Either (TPraosCannotForge c) () 

Type instances

data family ConsensusConfig p Source #

Static configuration required to run the consensus protocol

Every method in the ConsensusProtocol class takes the consensus configuration as a parameter, so having this as a data family rather than a type family resolves most ambiguity.

Defined out of the class so that protocols can define this type without having to define the entire protocol at the same time (or indeed in the same module).

Instances

Instances details
Generic (ConsensusConfig (TPraos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Associated Types

type Rep (ConsensusConfig (TPraos c)) ∷ TypeType Source #

Generic (ConsensusConfig (Praos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Associated Types

type Rep (ConsensusConfig (Praos c)) ∷ TypeType Source #

PraosCrypto c ⇒ NoThunks (ConsensusConfig (TPraos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

Methods

noThunks ∷ Context → ConsensusConfig (TPraos c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (TPraos c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (TPraos c)) → String #

PraosCrypto c ⇒ NoThunks (ConsensusConfig (Praos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Methods

noThunks ∷ Context → ConsensusConfig (Praos c) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ConsensusConfig (Praos c) → IO (Maybe ThunkInfo) #

showTypeOfProxy (ConsensusConfig (Praos c)) → String #

type Rep (ConsensusConfig (TPraos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

type Rep (ConsensusConfig (TPraos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.TPraos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "TPraosConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "tpraosParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 TPraosParams) :*: S1 ('MetaSel ('Just "tpraosEpochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Except PastHorizonException)))))
type Rep (ConsensusConfig (Praos c)) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep (ConsensusConfig (Praos c)) = D1 ('MetaData "ConsensusConfig" "Ouroboros.Consensus.Protocol.Praos" "ouroboros-consensus-protocol-0.3.1.0-inplace" 'False) (C1 ('MetaCons "PraosConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "praosParams") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 PraosParams) :*: S1 ('MetaSel ('Just "praosEpochInfo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (EpochInfo (Except PastHorizonException)))))
data ConsensusConfig (TPraos c) Source #

Static configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

data ConsensusConfig (Praos c) Source #

Static configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data family Ticked st Source #

" Ticked " piece of state (LedgerState, LedgerView, ChainIndepState)

Ticking refers to the passage of time (the ticking of the clock). When a piece of state is marked as ticked, it means that time-related changes have been applied to the state (or forecast).

Some examples of time related changes:

  • Scheduled delegations might have been applied in Byron
  • New leader schedule computed for Shelley
  • Transition from Byron to Shelley activated in the hard fork combinator.
  • Nonces switched out at the start of a new epoch.

Instances

Instances details
Show (Ticked ()) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked () → ShowS Source #

showTicked () → String Source #

showList ∷ [Ticked ()] → ShowS Source #

Show (Ticked a) ⇒ Show (Ticked (K a x)) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecIntTicked (K a x) → ShowS Source #

showTicked (K a x) → String Source #

showList ∷ [Ticked (K a x)] → ShowS Source #

Show (Ticked (f a)) ⇒ Show ((Ticked :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

showsPrecInt → (Ticked :.: f) a → ShowS Source #

show ∷ (Ticked :.: f) a → String Source #

showList ∷ [(Ticked :.: f) a] → ShowS Source #

NoThunks (Ticked (f a)) ⇒ NoThunks ((Ticked :.: f) a) 
Instance details

Defined in Ouroboros.Consensus.Ticked

Methods

noThunks ∷ Context → (Ticked :.: f) a → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → (Ticked :.: f) a → IO (Maybe ThunkInfo) #

showTypeOfProxy ((Ticked :.: f) a) → String #

data Ticked () 
Instance details

Defined in Ouroboros.Consensus.Ticked

newtype Ticked (LedgerView c) Source #

Ledger view at a particular slot

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

newtype Ticked (LedgerView c) Source #

Ledger view at a particular slot

Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

newtype Ticked (LedgerView c) = TickedPraosLedgerView {}
data Ticked (TPraosState c) Source #

Ticked TPraosState

Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

data Ticked (PraosState c) Source #

Ticked PraosState

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type HeaderHash (Ticked l) 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

newtype Ticked (K a x) 
Instance details

Defined in Ouroboros.Consensus.Ticked

newtype Ticked (K a x) = TickedK {}