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

Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

Synopsis

Documentation

data HotIdentity c Source #

Hot block issuer identity for the purpose of Shelley block diffusion pipelining.

Constructors

HotIdentity 

Fields

  • hiIssuer ∷ !(KeyHash BlockIssuer c)

    Hash of the cold key.

  • hiIssueNo ∷ !Word64

    The issue number/opcert counter. Even if the opcert was compromised and hence an attacker forges blocks with a specific cold identity, the owner of the cold key can issue a new opcert with an incremented counter, and their minted blocks will be pipelined.

Instances

Instances details
Generic (HotIdentity c) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

Associated Types

type Rep (HotIdentity c) ∷ TypeType #

Methods

fromHotIdentity c → Rep (HotIdentity c) x #

toRep (HotIdentity c) x → HotIdentity c #

Show (HotIdentity c) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

Methods

showsPrecIntHotIdentity c → ShowS #

showHotIdentity c → String #

showList ∷ [HotIdentity c] → ShowS #

Eq (HotIdentity c) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

Methods

(==)HotIdentity c → HotIdentity c → Bool #

(/=)HotIdentity c → HotIdentity c → Bool #

Ord (HotIdentity c) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

NoThunks (HotIdentity c) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

type Rep (HotIdentity c) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

type Rep (HotIdentity c) = D1 ('MetaData "HotIdentity" "Ouroboros.Consensus.Shelley.Node.DiffusionPipelining" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "HotIdentity" 'PrefixI 'True) (S1 ('MetaSel ('Just "hiIssuer") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (KeyHash 'BlockIssuer c)) :*: S1 ('MetaSel ('Just "hiIssueNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64)))

data ShelleyTentativeHeaderState proto Source #

Constructors

ShelleyTentativeHeaderState 

Fields

  • !(WithOrigin BlockNo)

    The block number of the last trap tentative header.

  • !(Set (HotIdentity (ProtoCrypto proto)))

    The set of all hot identies of those who issued trap tentative headers for the recorded block number.

    Remember that TentativeHeaderStates are maintained in different contexts, and we might record different identities per block number in them:

    • In ChainSel, we record all identities of trap headers we sent.
    • In the BlockFetch punishment logic, for each upstream peer, we record the identities of trap headers they sent.

Instances

Instances details
Generic (ShelleyTentativeHeaderState proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

Associated Types

type Rep (ShelleyTentativeHeaderState proto) ∷ TypeType #

Show (ShelleyTentativeHeaderState proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

Eq (ShelleyTentativeHeaderState proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

NoThunks (ShelleyTentativeHeaderState proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

type Rep (ShelleyTentativeHeaderState proto) Source # 
Instance details

Defined in Ouroboros.Consensus.Shelley.Node.DiffusionPipelining

type Rep (ShelleyTentativeHeaderState proto) = D1 ('MetaData "ShelleyTentativeHeaderState" "Ouroboros.Consensus.Shelley.Node.DiffusionPipelining" "ouroboros-consensus-cardano-0.20.0.0-inplace" 'False) (C1 ('MetaCons "ShelleyTentativeHeaderState" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (WithOrigin BlockNo)) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (HotIdentity (ProtoCrypto proto))))))

Orphan instances

(ShelleyCompatible proto era, BlockSupportsProtocol (ShelleyBlock proto era)) ⇒ BlockSupportsDiffusionPipelining (ShelleyBlock proto era) Source #

A header can be pipelined iff no trap header with the same block number and by the same issuer was pipelined before. See HotIdentity for what exactly we use for the issuer identity.

Instance details

Associated Types

type TentativeHeaderState (ShelleyBlock proto era) Source #

type TentativeHeaderView (ShelleyBlock proto era) Source #