ouroboros-consensus-protocol-0.1.0.1: Cardano consensus protocols.
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Protocol.Praos

Synopsis

Documentation

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

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

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => NoThunks ( ConsensusConfig ( TPraos c)) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.TPraos

PraosCrypto c => NoThunks ( ConsensusConfig ( Praos c)) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

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.1.0.1-zKRBoYOfUlKsvZd6xB0lb" ' 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.1.0.1-zKRBoYOfUlKsvZd6xB0lb" ' 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 Praos c Source #

Instances

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

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => NoThunks ( ConsensusConfig ( Praos c)) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => ConsensusProtocol ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => PraosProtocolSupportsNode ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

( 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 ( 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.1.0.1-zKRBoYOfUlKsvZd6xB0lb" ' 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 ( Praos c) Source #

Static configuration

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type ValidateView ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type ValidationErr ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type LedgerView ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type SelectView ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type CanBeLeader ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type IsLeader ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type ChainDepState ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type PraosProtocolSupportsNodeCrypto ( Praos c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data PraosCannotForge c Source #

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

Constructors

PraosCannotForgeKeyNotUsableYet

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.

data PraosFields c toSign Source #

Constructors

PraosFields

Fields

Instances

Instances details
( Show toSign, PraosCrypto c) => Show ( PraosFields c toSign) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Generic ( PraosFields c toSign) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Associated Types

type Rep ( PraosFields c toSign) :: Type -> Type Source #

( NoThunks toSign, PraosCrypto c) => NoThunks ( PraosFields c toSign) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep ( PraosFields c toSign) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep ( PraosFields c toSign) = D1 (' MetaData "PraosFields" "Ouroboros.Consensus.Protocol.Praos" "ouroboros-consensus-protocol-0.1.0.1-zKRBoYOfUlKsvZd6xB0lb" ' False ) ( C1 (' MetaCons "PraosFields" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "praosSignature") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( SignedKES c toSign)) :*: S1 (' MetaSel (' Just "praosToSign") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 toSign)))

data PraosParams Source #

Praos parameters that are node independent

Constructors

PraosParams

Fields

Instances

Instances details
Generic PraosParams Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

NoThunks PraosParams Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep PraosParams Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data PraosState c Source #

Praos consensus state.

We track the last slot and the counters for operational certificates, as well as a series of nonces which get updated in different ways over the course of an epoch.

Constructors

PraosState

Fields

Instances

Instances details
Eq ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Show ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Generic ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Associated Types

type Rep ( PraosState c) :: Type -> Type Source #

PraosCrypto c => ToCBOR ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => FromCBOR ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => NoThunks ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => Serialise ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep ( PraosState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data Ticked ( PraosState c) Source #

Ticked PraosState

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data PraosToSign c Source #

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

Constructors

PraosToSign

Fields

Instances

Instances details
PraosCrypto c => Show ( PraosToSign c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Generic ( PraosToSign c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Associated Types

type Rep ( PraosToSign c) :: Type -> Type Source #

PraosCrypto c => NoThunks ( PraosToSign c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep ( PraosToSign c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

data PraosValidationErr c Source #

Errors which we might encounter

Instances

Instances details
PraosCrypto c => Eq ( PraosValidationErr c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => Show ( PraosValidationErr c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

Generic ( PraosValidationErr c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

PraosCrypto c => NoThunks ( PraosValidationErr c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep ( PraosValidationErr c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

type Rep ( PraosValidationErr c) = D1 (' MetaData "PraosValidationErr" "Ouroboros.Consensus.Protocol.Praos" "ouroboros-consensus-protocol-0.1.0.1-zKRBoYOfUlKsvZd6xB0lb" ' False ) ((( C1 (' MetaCons "VRFKeyUnknown" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( KeyHash ' StakePool c))) :+: C1 (' MetaCons "VRFKeyWrongVRFKey" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( KeyHash ' StakePool c)) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Hash c ( VerKeyVRF c))) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( Hash c ( VerKeyVRF c)))))) :+: ( C1 (' MetaCons "VRFKeyBadProof" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 SlotNo ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Nonce ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( CertifiedVRF ( VRF c) InputVRF )))) :+: ( C1 (' MetaCons "VRFLeaderValueTooBig" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Natural ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 Rational ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ActiveSlotCoeff ))) :+: C1 (' MetaCons "KESBeforeStartOCERT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 KESPeriod ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 KESPeriod ))))) :+: (( C1 (' MetaCons "KESAfterEndOCERT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 KESPeriod ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 KESPeriod ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word64 ))) :+: ( C1 (' MetaCons "CounterTooSmallOCERT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word64 ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word64 )) :+: C1 (' MetaCons "CounterOverIncrementedOCERT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word64 ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word64 )))) :+: ( C1 (' MetaCons "InvalidSignatureOCERT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word64 ) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 KESPeriod ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 String ))) :+: ( C1 (' MetaCons "InvalidKesSignatureOCERT" ' PrefixI ' False ) (( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word )) :*: ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 Word ) :*: S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 String ))) :+: C1 (' MetaCons "NoCounterForKeyHashOCERT" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' SourceStrict ' DecidedStrict ) ( Rec0 ( KeyHash ' BlockIssuer c)))))))

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

Show ( Ticked a) => Show ( Ticked ( K a x))
Instance details

Defined in Ouroboros.Consensus.Ticked

Show ( Ticked (f a)) => Show (( Ticked :.: f) a)
Instance details

Defined in Ouroboros.Consensus.Ticked

NoThunks ( Ticked (f a)) => NoThunks (( Ticked :.: f) a)
Instance details

Defined in Ouroboros.Consensus.Ticked

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.TPraos

newtype Ticked ( LedgerView c) Source #

Ledger view at a particular slot

Instance details

Defined in Ouroboros.Consensus.Protocol.Praos

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