Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.Config
Synopsis
- data TopLevelConfig blk = TopLevelConfig {
- topLevelConfigProtocol ∷ !(ConsensusConfig (BlockProtocol blk))
- topLevelConfigLedger ∷ !(LedgerConfig blk)
- topLevelConfigBlock ∷ !(BlockConfig blk)
- topLevelConfigCodec ∷ !(CodecConfig blk)
- topLevelConfigStorage ∷ !(StorageConfig blk)
- topLevelConfigCheckpoints ∷ !(CheckpointsMap blk)
- castTopLevelConfig ∷ (Coercible (ConsensusConfig (BlockProtocol blk)) (ConsensusConfig (BlockProtocol blk')), LedgerConfig blk ~ LedgerConfig blk', Coercible (BlockConfig blk) (BlockConfig blk'), Coercible (CodecConfig blk) (CodecConfig blk'), Coercible (StorageConfig blk) (StorageConfig blk'), Coercible (HeaderHash blk) (HeaderHash blk')) ⇒ TopLevelConfig blk → TopLevelConfig blk'
- mkTopLevelConfig ∷ ConsensusConfig (BlockProtocol blk) → LedgerConfig blk → BlockConfig blk → CodecConfig blk → StorageConfig blk → CheckpointsMap blk → TopLevelConfig blk
- newtype CheckpointsMap blk = CheckpointsMap {
- unCheckpointsMap ∷ Map BlockNo (HeaderHash blk)
- data DiffusionPipeliningSupport
- castCheckpointsMap ∷ Coercible (HeaderHash blk) (HeaderHash blk') ⇒ CheckpointsMap blk → CheckpointsMap blk'
- emptyCheckpointsMap ∷ CheckpointsMap blk
- configBlock ∷ TopLevelConfig blk → BlockConfig blk
- configCodec ∷ TopLevelConfig blk → CodecConfig blk
- configConsensus ∷ TopLevelConfig blk → ConsensusConfig (BlockProtocol blk)
- configLedger ∷ TopLevelConfig blk → LedgerConfig blk
- configStorage ∷ TopLevelConfig blk → StorageConfig blk
- configSecurityParam ∷ ConsensusProtocol (BlockProtocol blk) ⇒ TopLevelConfig blk → SecurityParam
- module Ouroboros.Consensus.Config.SecurityParam
The top-level node configuration
data TopLevelConfig blk Source #
The top-level node configuration
Constructors
TopLevelConfig | |
Fields
|
Instances
castTopLevelConfig ∷ (Coercible (ConsensusConfig (BlockProtocol blk)) (ConsensusConfig (BlockProtocol blk')), LedgerConfig blk ~ LedgerConfig blk', Coercible (BlockConfig blk) (BlockConfig blk'), Coercible (CodecConfig blk) (CodecConfig blk'), Coercible (StorageConfig blk) (StorageConfig blk'), Coercible (HeaderHash blk) (HeaderHash blk')) ⇒ TopLevelConfig blk → TopLevelConfig blk' Source #
mkTopLevelConfig ∷ ConsensusConfig (BlockProtocol blk) → LedgerConfig blk → BlockConfig blk → CodecConfig blk → StorageConfig blk → CheckpointsMap blk → TopLevelConfig blk Source #
Checkpoints map
newtype CheckpointsMap blk Source #
Checkpoints are block hashes that are expected to be present in the honest historical chain.
Each checkpoint is associated with a BlockNo
, and any block with a
BlockNo
in the checkpoints map is expected to have the corresponding hash.
Constructors
CheckpointsMap | |
Fields
|
Instances
Monoid (CheckpointsMap blk) Source # | |||||
Defined in Ouroboros.Consensus.Config Methods mempty ∷ CheckpointsMap blk # mappend ∷ CheckpointsMap blk → CheckpointsMap blk → CheckpointsMap blk # mconcat ∷ [CheckpointsMap blk] → CheckpointsMap blk # | |||||
Semigroup (CheckpointsMap blk) Source # | |||||
Defined in Ouroboros.Consensus.Config Methods (<>) ∷ CheckpointsMap blk → CheckpointsMap blk → CheckpointsMap blk # sconcat ∷ NonEmpty (CheckpointsMap blk) → CheckpointsMap blk # stimes ∷ Integral b ⇒ b → CheckpointsMap blk → CheckpointsMap blk # | |||||
Generic (CheckpointsMap blk) Source # | |||||
Defined in Ouroboros.Consensus.Config Associated Types
Methods from ∷ CheckpointsMap blk → Rep (CheckpointsMap blk) x # to ∷ Rep (CheckpointsMap blk) x → CheckpointsMap blk # | |||||
NoThunks (HeaderHash blk) ⇒ NoThunks (CheckpointsMap blk) Source # | |||||
Defined in Ouroboros.Consensus.Config | |||||
type Rep (CheckpointsMap blk) Source # | |||||
Defined in Ouroboros.Consensus.Config type Rep (CheckpointsMap blk) = D1 ('MetaData "CheckpointsMap" "Ouroboros.Consensus.Config" "ouroboros-consensus-0.26.0.0-inplace" 'True) (C1 ('MetaCons "CheckpointsMap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unCheckpointsMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map BlockNo (HeaderHash blk))))) |
data DiffusionPipeliningSupport Source #
Configure consensus layer how to handle some cases of invalid data
when processing mini protocol communication in the presence of diffusion
pipelining. See also BlockSupportsDiffusionPipelining
Constructors
DiffusionPipeliningOn | |
DiffusionPipeliningOff |
Instances
Show DiffusionPipeliningSupport Source # | |
Defined in Ouroboros.Consensus.Config Methods showsPrec ∷ Int → DiffusionPipeliningSupport → ShowS # |
castCheckpointsMap ∷ Coercible (HeaderHash blk) (HeaderHash blk') ⇒ CheckpointsMap blk → CheckpointsMap blk' Source #
Derived extraction functions
configBlock ∷ TopLevelConfig blk → BlockConfig blk Source #
configCodec ∷ TopLevelConfig blk → CodecConfig blk Source #
configConsensus ∷ TopLevelConfig blk → ConsensusConfig (BlockProtocol blk) Source #
configLedger ∷ TopLevelConfig blk → LedgerConfig blk Source #
configStorage ∷ TopLevelConfig blk → StorageConfig blk Source #
Additional convenience functions
configSecurityParam ∷ ConsensusProtocol (BlockProtocol blk) ⇒ TopLevelConfig blk → SecurityParam Source #