| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Network.FetchMode
Synopsis
- mkReadFetchMode :: Functor m => ConsensusMode -> m LedgerStateJudgement -> m PraosFetchMode -> m FetchMode
- data ConsensusMode
- data LedgerStateJudgement
- newtype Fingerprint = Fingerprint Word64
- data FetchMode
- data PraosFetchMode
- data ChainSelStarvation
- data WithFingerprint a = WithFingerprint {
- forgetFingerprint :: !a
- getFingerprint :: !Fingerprint
- initialWithFingerprint :: a -> WithFingerprint a
- data BlockFetchConsensusInterface peer header block (m :: Type -> Type) = BlockFetchConsensusInterface {
- readCandidateChains :: STM m (Map peer (AnchoredFragment header))
- readCurrentChain :: STM m (AnchoredFragment header)
- readFetchMode :: STM m FetchMode
- readFetchedBlocks :: STM m (Point block -> Bool)
- mkAddFetchedBlock :: STM m (Point block -> block -> m ())
- readFetchedMaxSlotNo :: STM m MaxSlotNo
- readChainComparison :: STM m (WithFingerprint (ChainComparison header))
- blockFetchSize :: header -> SizeInBytes
- blockMatchesHeader :: header -> block -> Bool
- headerForgeUTCTime :: header -> UTCTime
- readChainSelStarvation :: STM m ChainSelStarvation
- demoteChainSyncJumpingDynamo :: peer -> m ()
- data ChainComparison header = ChainComparison {
- plausibleCandidateChain :: HasCallStack => AnchoredFragment header -> AnchoredFragment header -> Bool
- compareCandidateChains :: HasCallStack => AnchoredFragment header -> AnchoredFragment header -> Ordering
Documentation
Arguments
| :: Functor m | |
| => ConsensusMode | |
| -> m LedgerStateJudgement | Used for |
| -> m PraosFetchMode | Used for |
| -> m FetchMode |
Construct readFetchMode for BlockFetchConsensusInterface by branching
on the ConsensusMode.
data ConsensusMode Source #
Diffusion layer configuration parameter.
The two modes determine which PeerSelectionTargets basis is used
by churn and OG. The node's configuration sets this, and diffusion
is initiated and remains only in this mode.
Constructors
| GenesisMode | When |
| PraosMode | The legacy mode which depends on official relays and/or bootstrap peers configuration. This mode uses only the default target basis irrespective ledger state. |
Instances
| FromJSON ConsensusMode Source # | |||||
Defined in Cardano.Network.ConsensusMode Methods parseJSON :: Value -> Parser ConsensusMode # parseJSONList :: Value -> Parser [ConsensusMode] # | |||||
| Generic ConsensusMode Source # | |||||
Defined in Cardano.Network.ConsensusMode Associated Types
| |||||
| Show ConsensusMode Source # | |||||
Defined in Cardano.Network.ConsensusMode Methods showsPrec :: Int -> ConsensusMode -> ShowS # show :: ConsensusMode -> String # showList :: [ConsensusMode] -> ShowS # | |||||
| Eq ConsensusMode Source # | |||||
Defined in Cardano.Network.ConsensusMode Methods (==) :: ConsensusMode -> ConsensusMode -> Bool # (/=) :: ConsensusMode -> ConsensusMode -> Bool # | |||||
| type Rep ConsensusMode Source # | |||||
Defined in Cardano.Network.ConsensusMode | |||||
data LedgerStateJudgement Source #
Wether the node is caught up or fell too far behind the chain
Constructors
| YoungEnough | |
| TooOld |
Instances
| Generic LedgerStateJudgement Source # | |||||
Defined in Cardano.Network.LedgerStateJudgement Associated Types
Methods from :: LedgerStateJudgement -> Rep LedgerStateJudgement x # to :: Rep LedgerStateJudgement x -> LedgerStateJudgement # | |||||
| Show LedgerStateJudgement Source # | |||||
Defined in Cardano.Network.LedgerStateJudgement Methods showsPrec :: Int -> LedgerStateJudgement -> ShowS # show :: LedgerStateJudgement -> String # showList :: [LedgerStateJudgement] -> ShowS # | |||||
| Eq LedgerStateJudgement Source # | |||||
Defined in Cardano.Network.LedgerStateJudgement Methods (==) :: LedgerStateJudgement -> LedgerStateJudgement -> Bool # (/=) :: LedgerStateJudgement -> LedgerStateJudgement -> Bool # | |||||
| NoThunks LedgerStateJudgement Source # | |||||
Defined in Cardano.Network.LedgerStateJudgement | |||||
| type Rep LedgerStateJudgement Source # | |||||
Defined in Cardano.Network.LedgerStateJudgement | |||||
newtype Fingerprint #
Constructors
| Fingerprint Word64 |
Instances
Constructors
| FetchModeGenesis | |
| PraosFetchMode PraosFetchMode |
data PraosFetchMode #
Constructors
| FetchModeBulkSync | |
| FetchModeDeadline |
Instances
| Show PraosFetchMode | |
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods showsPrec :: Int -> PraosFetchMode -> ShowS # show :: PraosFetchMode -> String # showList :: [PraosFetchMode] -> ShowS # | |
| Eq PraosFetchMode | |
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods (==) :: PraosFetchMode -> PraosFetchMode -> Bool # (/=) :: PraosFetchMode -> PraosFetchMode -> Bool # | |
data ChainSelStarvation #
Constructors
| ChainSelStarvationOngoing | |
| ChainSelStarvationEndedAt Time |
Instances
| Generic ChainSelStarvation | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Associated Types
Methods from :: ChainSelStarvation -> Rep ChainSelStarvation x # to :: Rep ChainSelStarvation x -> ChainSelStarvation # | |||||
| Show ChainSelStarvation | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods showsPrec :: Int -> ChainSelStarvation -> ShowS # show :: ChainSelStarvation -> String # showList :: [ChainSelStarvation] -> ShowS # | |||||
| Eq ChainSelStarvation | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods (==) :: ChainSelStarvation -> ChainSelStarvation -> Bool # (/=) :: ChainSelStarvation -> ChainSelStarvation -> Bool # | |||||
| NoThunks ChainSelStarvation | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods noThunks :: Context -> ChainSelStarvation -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> ChainSelStarvation -> IO (Maybe ThunkInfo) # showTypeOf :: Proxy ChainSelStarvation -> String # | |||||
| type Rep ChainSelStarvation | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface type Rep ChainSelStarvation = D1 ('MetaData "ChainSelStarvation" "Ouroboros.Network.BlockFetch.ConsensusInterface" "ouroboros-network-0.23.0.0-inplace-api" 'False) (C1 ('MetaCons "ChainSelStarvationOngoing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ChainSelStarvationEndedAt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Time))) | |||||
data WithFingerprint a #
Constructors
| WithFingerprint | |
Fields
| |
Instances
| Functor WithFingerprint | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods fmap :: (a -> b) -> WithFingerprint a -> WithFingerprint b # (<$) :: a -> WithFingerprint b -> WithFingerprint a # | |||||
| Generic (WithFingerprint a) | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Associated Types
Methods from :: WithFingerprint a -> Rep (WithFingerprint a) x # to :: Rep (WithFingerprint a) x -> WithFingerprint a # | |||||
| Show a => Show (WithFingerprint a) | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods showsPrec :: Int -> WithFingerprint a -> ShowS # show :: WithFingerprint a -> String # showList :: [WithFingerprint a] -> ShowS # | |||||
| NoThunks a => NoThunks (WithFingerprint a) | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface Methods noThunks :: Context -> WithFingerprint a -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> WithFingerprint a -> IO (Maybe ThunkInfo) # showTypeOf :: Proxy (WithFingerprint a) -> String # | |||||
| type Rep (WithFingerprint a) | |||||
Defined in Ouroboros.Network.BlockFetch.ConsensusInterface type Rep (WithFingerprint a) = D1 ('MetaData "WithFingerprint" "Ouroboros.Network.BlockFetch.ConsensusInterface" "ouroboros-network-0.23.0.0-inplace-api" 'False) (C1 ('MetaCons "WithFingerprint" 'PrefixI 'True) (S1 ('MetaSel ('Just "forgetFingerprint") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Just "getFingerprint") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Fingerprint))) | |||||
initialWithFingerprint :: a -> WithFingerprint a #
data BlockFetchConsensusInterface peer header block (m :: Type -> Type) #
Constructors
| BlockFetchConsensusInterface | |
Fields
| |
data ChainComparison header #
Constructors
| ChainComparison | |
Fields
| |