ouroboros-consensus-protocol-0.1.0.0: Cardano consensus protocols.
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Protocol.Praos.Common

Contents

Description

Various things common to iterations of the Praos protocol.

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
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.1.0.0-inplace" 'True) (C1 ('MetaCons "MaxMajorProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "getMaxMajorProtVer") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural)))

data PraosCanBeLeader c Source #

Constructors

PraosCanBeLeader 

Fields

Instances

Instances details
Generic (PraosCanBeLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Associated Types

type Rep (PraosCanBeLeader c) ∷ TypeType Source #

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

Defined in Ouroboros.Consensus.Protocol.Praos.Common

Methods

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

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

showTypeOfProxy (PraosCanBeLeader c) → String #

type Rep (PraosCanBeLeader c) Source # 
Instance details

Defined in Ouroboros.Consensus.Protocol.Praos.Common

type Rep (PraosCanBeLeader c) = D1 ('MetaData "PraosCanBeLeader" "Ouroboros.Consensus.Protocol.Praos.Common" "ouroboros-consensus-protocol-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PraosCanBeLeader" 'PrefixI 'True) (S1 ('MetaSel ('Just "praosCanBeLeaderOpCert") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (OCert c)) :*: (S1 ('MetaSel ('Just "praosCanBeLeaderColdVerKey") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (VKey 'BlockIssuer c)) :*: S1 ('MetaSel ('Just "praosCanBeLeaderSignKeyVRF") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (SignKeyVRF c)))))

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 the leader value of the chain tip, with lower values preferred.

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.1.0.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 "csvLeaderVRF") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (OutputVRF (VRF c)))))))

node support

data PraosNonces Source #

Constructors

PraosNonces 

Fields

class ConsensusProtocol p ⇒ PraosProtocolSupportsNode p where Source #

The node has Praos-aware code that inspects nonces in order to support some Cardano API queries that are crucial to the user exprience

The interface being used for that has grown and needs review, but we're adding to it here under time pressure. See https://github.com/input-output-hk/cardano-node/issues/3864

Methods

getPraosNonces ∷ proxy p → ChainDepState p → PraosNonces Source #

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

Instances

Instances details
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 #

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

Defined in Ouroboros.Consensus.Protocol.Praos

Methods

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

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