Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data BlockGeneratorArgs block s = BlockGeneratorArgs {
- bgaSlotDuration :: DiffTime
- bgaBlockGenerator :: s -> Anchor block -> SlotNo -> (Maybe block, s)
- bgaSeed :: s
- data LimitsAndTimeouts header block = LimitsAndTimeouts {
- chainSyncLimits :: MiniProtocolLimits
- chainSyncSizeLimits :: ProtocolSizeLimits (ChainSync header (Point block) (Tip block)) ByteString
- chainSyncTimeLimits :: ProtocolTimeLimits (ChainSync header (Point block) (Tip block))
- blockFetchLimits :: MiniProtocolLimits
- blockFetchSizeLimits :: ProtocolSizeLimits (BlockFetch block (Point block)) ByteString
- blockFetchTimeLimits :: ProtocolTimeLimits (BlockFetch block (Point block))
- keepAliveLimits :: MiniProtocolLimits
- keepAliveSizeLimits :: ProtocolSizeLimits KeepAlive ByteString
- keepAliveTimeLimits :: ProtocolTimeLimits KeepAlive
- pingPongLimits :: MiniProtocolLimits
- pingPongSizeLimits :: ProtocolSizeLimits PingPong ByteString
- pingPongTimeLimits :: ProtocolTimeLimits PingPong
- handshakeLimits :: MiniProtocolLimits
- handshakeTimeLimits :: ProtocolTimeLimits (Handshake NtNVersion NtNVersionData)
- handhsakeSizeLimits :: ProtocolSizeLimits (Handshake NtNVersion NtNVersionData) ByteString
- peerSharingLimits :: MiniProtocolLimits
- peerSharingTimeLimits :: ProtocolTimeLimits (PeerSharing NtNAddr)
- peerSharingSizeLimits :: ProtocolSizeLimits (PeerSharing NtNAddr) ByteString
- data Interfaces (m :: Type -> Type) = Interfaces {
- iNtnSnocket :: Snocket m (NtNFD m) NtNAddr
- iNtnBearer :: MakeBearer m (NtNFD m)
- iAcceptVersion :: NtNVersionData -> NtNVersionData -> Accept NtNVersionData
- iNtnDomainResolver :: DNSLookupType -> [DomainAccessPoint] -> m (Map DomainAccessPoint (Set NtNAddr))
- iNtcSnocket :: Snocket m (NtCFD m) NtCAddr
- iNtcBearer :: MakeBearer m (NtCFD m)
- iRng :: StdGen
- iDomainMap :: StrictTVar m (Map Domain [(IP, TTL)])
- iLedgerPeersConsensusInterface :: LedgerPeersConsensusInterface m
- iUpdateOutboundConnectionsState :: OutboundConnectionsState -> STM m ()
- data Arguments (m :: Type -> Type) = Arguments {
- aIPAddress :: NtNAddr
- aAcceptedLimits :: AcceptedConnectionsLimit
- aDiffusionMode :: DiffusionMode
- aKeepAliveInterval :: DiffTime
- aPingPongInterval :: DiffTime
- aShouldChainSyncExit :: BlockHeader -> m Bool
- aChainSyncEarlyExit :: Bool
- aPeerTargets :: ConsensusModePeerTargets
- aReadLocalRootPeers :: STM m [(HotValency, WarmValency, Map RelayAccessPoint LocalRootConfig)]
- aReadPublicRootPeers :: STM m (Map RelayAccessPoint PeerAdvertise)
- aReadUseBootstrapPeers :: Script UseBootstrapPeers
- aConsensusMode :: ConsensusMode
- aOwnPeerSharing :: PeerSharing
- aReadUseLedgerPeers :: STM m UseLedgerPeers
- aProtocolIdleTimeout :: DiffTime
- aTimeWaitTimeout :: DiffTime
- aDNSTimeoutScript :: Script DNSTimeout
- aDNSLookupDelayScript :: Script DNSLookupDelay
- aDebugTracer :: Tracer m String
- run :: forall resolver m. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadEvaluate m, MonadFix m, MonadFork m, MonadLabelledSTM m, MonadTraceSTM m, MonadMask m, MonadSay m, MonadST m, MonadTime m, MonadTimer m, MonadThrow (STM m), MonadMVar m, resolver ~ (), forall a. Semigroup a => Semigroup (m a)) => BlockGeneratorArgs Block StdGen -> LimitsAndTimeouts BlockHeader Block -> Interfaces m -> Arguments m -> TracersExtra NtNAddr NtNVersion NtNVersionData NtCAddr NtCVersion NtCVersionData ResolverException m -> Tracer m (TraceLabelPeer NtNAddr (TraceFetchClientState BlockHeader)) -> m Void
- type NtNAddr = TestAddress NtNAddr_
- type NtNFD (m :: Type -> Type) = FD m NtNAddr
- type NtCAddr = TestAddress Int
- type NtCFD (m :: Type -> Type) = FD m NtCAddr
- data AcceptedConnectionsLimit = AcceptedConnectionsLimit {}
- data DiffusionMode
- data PeerAdvertise
- data PeerSelectionTargets = PeerSelectionTargets {}
- config_REPROMOTE_DELAY :: RepromoteDelay
run a node
data BlockGeneratorArgs block s Source #
BlockGeneratorArgs | |
|
data LimitsAndTimeouts header block Source #
Limits and protocol timeouts
data Interfaces (m :: Type -> Type) Source #
Interfaces | |
|
data Arguments (m :: Type -> Type) Source #
run :: forall resolver m. (Alternative (STM m), MonadAsync m, MonadDelay m, MonadEvaluate m, MonadFix m, MonadFork m, MonadLabelledSTM m, MonadTraceSTM m, MonadMask m, MonadSay m, MonadST m, MonadTime m, MonadTimer m, MonadThrow (STM m), MonadMVar m, resolver ~ (), forall a. Semigroup a => Semigroup (m a)) => BlockGeneratorArgs Block StdGen -> LimitsAndTimeouts BlockHeader Block -> Interfaces m -> Arguments m -> TracersExtra NtNAddr NtNVersion NtNVersionData NtCAddr NtCVersion NtCVersionData ResolverException m -> Tracer m (TraceLabelPeer NtNAddr (TraceFetchClientState BlockHeader)) -> m Void Source #
node types
type NtNAddr = TestAddress NtNAddr_ Source #
type NtCAddr = TestAddress Int Source #
extra types used by the node
data AcceptedConnectionsLimit #
Policy which governs how to limit the number of accepted connections.
AcceptedConnectionsLimit | |
|
Instances
data DiffusionMode #
The flag which indicates whether the node runs only initiator or both initiator or responder node.
This data structure has two proposes:
- instruct the diffusion layer if it should listen on incoming connections;
- it is communicated via
NodeToNodeVersionData
during handshake negotiation. In non-p2p mode we always sendInitiatorOnlyDiffusionMode
, in p2p mode we send exactly what the diffusion is given. In non-p2p mode every connection outbound port is ephemeral, the remote side cannot connect to it, however in p2p mode the outbound port is actually the port on which the node is listening (if it runs inInitiatorAndResponderDiffusionMode
).
Instances
Show DiffusionMode | |
Defined in Ouroboros.Network.NodeToNode.Version showsPrec :: Int -> DiffusionMode -> ShowS # show :: DiffusionMode -> String # showList :: [DiffusionMode] -> ShowS # | |
Eq DiffusionMode | |
Defined in Ouroboros.Network.NodeToNode.Version (==) :: DiffusionMode -> DiffusionMode -> Bool # (/=) :: DiffusionMode -> DiffusionMode -> Bool # | |
Ord DiffusionMode | |
Defined in Ouroboros.Network.NodeToNode.Version compare :: DiffusionMode -> DiffusionMode -> Ordering # (<) :: DiffusionMode -> DiffusionMode -> Bool # (<=) :: DiffusionMode -> DiffusionMode -> Bool # (>) :: DiffusionMode -> DiffusionMode -> Bool # (>=) :: DiffusionMode -> DiffusionMode -> Bool # max :: DiffusionMode -> DiffusionMode -> DiffusionMode # min :: DiffusionMode -> DiffusionMode -> DiffusionMode # |
data PeerAdvertise #
Should this peer be advertised to other peers asking for known peers? For certain peers specified by configuration it would be an appropriate policy to keep them private.
Instances
data PeerSelectionTargets #
Adjustable targets for the peer selection mechanism.
These are used by the peer selection governor as targets. They are used by the peer churn governor loop as knobs to adjust, to influence the peer selection governor.
The known, established and active peer targets are targets both from below and from above: the governor will attempt to grow or shrink the sets to hit these targets.
Unlike the other targets, the root peer target is "one sided", it is only a target from below. The governor does not try to shrink the root set to hit it, it simply stops looking for more.
There is also an implicit target that enough local root peers are selected as active. This comes from the configuration for local roots, and is not an independently adjustable target.
PeerSelectionTargets | |
|
Instances
Arbitrary PeerSelectionTargets Source # | |
Show PeerSelectionTargets | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types showsPrec :: Int -> PeerSelectionTargets -> ShowS # show :: PeerSelectionTargets -> String # showList :: [PeerSelectionTargets] -> ShowS # | |
Eq PeerSelectionTargets | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types (==) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool # (/=) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool # |