Safe Haskell | None |
---|---|
Language | Haskell2010 |
This is the starting point for a module that will bring together the overall node to node protocol, as a collection of mini-protocols.
Synopsis
- nodeToNodeProtocols :: forall (muxMode :: Mode) initiatorCtx responderCtx bytes (m :: Type -> Type) a b. MiniProtocolParameters -> NodeToNodeProtocols muxMode initiatorCtx responderCtx bytes m a b -> NodeToNodeVersion -> PeerSharing -> OuroborosBundle muxMode initiatorCtx responderCtx bytes m a b
- data NodeToNodeProtocols (appType :: Mode) initiatorCtx responderCtx bytes (m :: Type -> Type) a b = NodeToNodeProtocols {
- chainSyncProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b
- blockFetchProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b
- txSubmissionProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b
- keepAliveProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b
- peerSharingProtocol :: RunMiniProtocol appType initiatorCtx responderCtx bytes m a b
- type NodeToNodeProtocolsWithExpandedCtx (appType :: Mode) ntnAddr bytes (m :: Type -> Type) a b = NodeToNodeProtocols appType (ExpandedInitiatorContext ntnAddr m) (ResponderContext ntnAddr) bytes m a b
- type NodeToNodeProtocolsWithMinimalCtx (appType :: Mode) ntnAddr bytes (m :: Type -> Type) a b = NodeToNodeProtocols appType (MinimalInitiatorContext ntnAddr) (ResponderContext ntnAddr) bytes m a b
- data MiniProtocolParameters = MiniProtocolParameters {}
- chainSyncProtocolLimits :: MiniProtocolParameters -> MiniProtocolLimits
- blockFetchProtocolLimits :: MiniProtocolParameters -> MiniProtocolLimits
- txSubmissionProtocolLimits :: MiniProtocolParameters -> MiniProtocolLimits
- keepAliveProtocolLimits :: MiniProtocolParameters -> MiniProtocolLimits
- defaultMiniProtocolParameters :: MiniProtocolParameters
- data NodeToNodeVersion
- data NodeToNodeVersionData = NodeToNodeVersionData {}
- data NetworkConnectTracers addr vNumber = NetworkConnectTracers {
- nctMuxTracer :: Tracer IO (WithBearer (ConnectionId addr) Trace)
- nctHandshakeTracer :: Tracer IO (WithBearer (ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
- nullNetworkConnectTracers :: NetworkConnectTracers addr vNumber
- connectTo :: Snocket IO Socket SockAddr -> NetworkConnectTracers SockAddr NodeToNodeVersion -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx 'InitiatorMode SockAddr ByteString IO a b) -> Maybe SockAddr -> SockAddr -> IO (Either SomeException (Either a b))
- data NetworkServerTracers addr vNumber = NetworkServerTracers {
- nstMuxTracer :: Tracer IO (WithBearer (ConnectionId addr) Trace)
- nstHandshakeTracer :: Tracer IO (WithBearer (ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
- nstErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace)
- nstAcceptPolicyTracer :: Tracer IO AcceptConnectionsPolicyTrace
- nullNetworkServerTracers :: NetworkServerTracers addr vNumber
- data NetworkMutableState addr = NetworkMutableState {
- nmsConnectionTable :: ConnectionTable IO addr
- nmsPeerStates :: StrictTVar IO (PeerStates IO addr)
- data AcceptedConnectionsLimit = AcceptedConnectionsLimit {}
- newNetworkMutableState :: IO (NetworkMutableState addr)
- newNetworkMutableStateSTM :: STM (NetworkMutableState addr)
- cleanNetworkMutableState :: NetworkMutableState addr -> IO ()
- withServer :: SocketSnocket -> NetworkServerTracers SockAddr NodeToNodeVersion -> NetworkMutableState SockAddr -> AcceptedConnectionsLimit -> Socket -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx 'ResponderMode SockAddr ByteString IO a b) -> ErrorPolicies -> IO Void
- data PeerAdvertise
- data PeerSelectionTargets = PeerSelectionTargets {}
- data IPSubscriptionTarget = IPSubscriptionTarget {
- ispIps :: ![SockAddr]
- ispValency :: !Int
- type NetworkIPSubscriptionTracers addr vNumber = NetworkSubscriptionTracers WithIPList addr vNumber
- data NetworkSubscriptionTracers (withIPList :: Type -> Type) addr vNumber = NetworkSubscriptionTracers {
- nsMuxTracer :: Tracer IO (WithBearer (ConnectionId addr) Trace)
- nsHandshakeTracer :: Tracer IO (WithBearer (ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
- nsErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace)
- nsSubscriptionTracer :: Tracer IO (withIPList (SubscriptionTrace addr))
- nullNetworkSubscriptionTracers :: forall (withIPList :: Type -> Type) addr vNumber. NetworkSubscriptionTracers withIPList addr vNumber
- data SubscriptionParams a target = SubscriptionParams {}
- type IPSubscriptionParams a = SubscriptionParams a IPSubscriptionTarget
- ipSubscriptionWorker :: forall (mode :: Mode) x y. HasInitiator mode ~ 'True => SocketSnocket -> NetworkIPSubscriptionTracers SockAddr NodeToNodeVersion -> NetworkMutableState SockAddr -> IPSubscriptionParams () -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx mode SockAddr ByteString IO x y) -> IO Void
- data DnsSubscriptionTarget = DnsSubscriptionTarget {
- dstDomain :: !Domain
- dstPort :: !PortNumber
- dstValency :: !Int
- type DnsSubscriptionParams a = SubscriptionParams a DnsSubscriptionTarget
- data NetworkDNSSubscriptionTracers vNumber addr = NetworkDNSSubscriptionTracers {
- ndstMuxTracer :: Tracer IO (WithBearer (ConnectionId addr) Trace)
- ndstHandshakeTracer :: Tracer IO (WithBearer (ConnectionId addr) (TraceSendRecv (Handshake vNumber Term)))
- ndstErrorPolicyTracer :: Tracer IO (WithAddr addr ErrorPolicyTrace)
- ndstSubscriptionTracer :: Tracer IO (WithDomainName (SubscriptionTrace addr))
- ndstDnsTracer :: Tracer IO (WithDomainName DnsTrace)
- nullNetworkDNSSubscriptionTracers :: NetworkDNSSubscriptionTracers vNumber peerid
- dnsSubscriptionWorker :: forall (mode :: Mode) x y. HasInitiator mode ~ 'True => SocketSnocket -> NetworkDNSSubscriptionTracers NodeToNodeVersion SockAddr -> NetworkMutableState SockAddr -> DnsSubscriptionParams () -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx mode SockAddr ByteString IO x y) -> IO Void
- newtype Versions vNum vData r = Versions {
- getVersions :: Map vNum (Version vData r)
- data DiffusionMode
- simpleSingletonVersions :: vNum -> vData -> r -> Versions vNum vData r
- foldMapVersions :: (Ord vNum, Foldable f, HasCallStack) => (x -> Versions vNum extra r) -> f x -> Versions vNum extra r
- combineVersions :: (Ord vNum, Foldable f, HasCallStack) => f (Versions vNum extra r) -> Versions vNum extra r
- nodeToNodeHandshakeCodec :: forall (m :: Type -> Type). MonadST m => Codec (Handshake NodeToNodeVersion Term) DeserialiseFailure m ByteString
- nodeToNodeVersionCodec :: CodecCBORTerm (Text, Maybe Int) NodeToNodeVersion
- nodeToNodeCodecCBORTerm :: NodeToNodeVersion -> CodecCBORTerm Text NodeToNodeVersionData
- data ExpandedInitiatorContext addr (m :: Type -> Type) = ExpandedInitiatorContext {
- eicConnectionId :: !(ConnectionId addr)
- eicControlMessage :: !(ControlMessageSTM m)
- eicIsBigLedgerPeer :: !IsBigLedgerPeer
- newtype MinimalInitiatorContext addr = MinimalInitiatorContext {
- micConnectionId :: ConnectionId addr
- newtype ResponderContext addr = ResponderContext {
- rcConnectionId :: ConnectionId addr
- data ConnectionId addr = ConnectionId {
- localAddress :: !addr
- remoteAddress :: !addr
- data ControlMessage
- type ControlMessageSTM (m :: Type -> Type) = STM m ControlMessage
- type RemoteAddress = SockAddr
- type RemoteConnectionId = ConnectionId RemoteAddress
- data IsBigLedgerPeer
- newtype NumTxIdsToAck = NumTxIdsToAck {}
- data ProtocolLimitFailure
- data Handshake (vNumber :: k) (vParams :: k1)
- data LocalAddresses addr = LocalAddresses {}
- data Socket
- data ExceptionInHandler where
- ExceptionInHandler :: forall peerAddr. (Typeable peerAddr, Show peerAddr) => !peerAddr -> !SomeException -> ExceptionInHandler
- data ErrorPolicies = ErrorPolicies {}
- remoteNetworkErrorPolicy :: ErrorPolicies
- localNetworkErrorPolicy :: ErrorPolicies
- nullErrorPolicies :: ErrorPolicies
- data ErrorPolicy where
- ErrorPolicy :: forall e. Exception e => (e -> Maybe (SuspendDecision DiffTime)) -> ErrorPolicy
- data SuspendDecision t
- = SuspendPeer !t !t
- | SuspendConsumer !t
- | Throw
- data AcceptConnectionsPolicyTrace
- data TraceSendRecv ps where
- TraceSendMsg :: forall ps. AnyMessage ps -> TraceSendRecv ps
- TraceRecvMsg :: forall ps. AnyMessage ps -> TraceSendRecv ps
- data SubscriptionTrace addr
- = SubscriptionTraceConnectStart addr
- | SubscriptionTraceConnectEnd addr ConnectResult
- | Exception e => SubscriptionTraceSocketAllocationException addr e
- | Exception e => SubscriptionTraceConnectException addr e
- | Exception e => SubscriptionTraceApplicationException addr e
- | SubscriptionTraceTryConnectToPeer addr
- | SubscriptionTraceSkippingPeer addr
- | SubscriptionTraceSubscriptionRunning
- | SubscriptionTraceSubscriptionWaiting Int
- | SubscriptionTraceSubscriptionFailed
- | SubscriptionTraceSubscriptionWaitingNewConnection DiffTime
- | SubscriptionTraceStart Int
- | SubscriptionTraceRestart DiffTime Int Int
- | SubscriptionTraceConnectionExist addr
- | SubscriptionTraceUnsupportedRemoteAddr addr
- | SubscriptionTraceMissingLocalAddress
- | SubscriptionTraceAllocateSocket addr
- | SubscriptionTraceCloseSocket addr
- data DnsTrace
- data ErrorPolicyTrace
- = ErrorPolicySuspendPeer (Maybe (ConnectionOrApplicationExceptionTrace SomeException)) DiffTime DiffTime
- | ErrorPolicySuspendConsumer (Maybe (ConnectionOrApplicationExceptionTrace SomeException)) DiffTime
- | ErrorPolicyLocalNodeError (ConnectionOrApplicationExceptionTrace SomeException)
- | ErrorPolicyResumePeer
- | ErrorPolicyKeepSuspended
- | ErrorPolicyResumeConsumer
- | ErrorPolicyResumeProducer
- | ErrorPolicyUnhandledApplicationException SomeException
- | ErrorPolicyUnhandledConnectionException SomeException
- | ErrorPolicyAcceptException IOException
- data WithIPList a = WithIPList {}
- data WithDomainName a = WithDomainName {}
- data WithAddr addr a = WithAddr {}
- type HandshakeTr ntnAddr ntnVersion = WithBearer (ConnectionId ntnAddr) (TraceSendRecv (Handshake ntnVersion Term))
- chainSyncMiniProtocolNum :: MiniProtocolNum
- blockFetchMiniProtocolNum :: MiniProtocolNum
- txSubmissionMiniProtocolNum :: MiniProtocolNum
- keepAliveMiniProtocolNum :: MiniProtocolNum
- peerSharingMiniProtocolNum :: MiniProtocolNum
Documentation
:: forall (muxMode :: Mode) initiatorCtx responderCtx bytes (m :: Type -> Type) a b. MiniProtocolParameters | |
-> NodeToNodeProtocols muxMode initiatorCtx responderCtx bytes m a b | |
-> NodeToNodeVersion | |
-> PeerSharing | Node's own PeerSharing value |
-> OuroborosBundle muxMode initiatorCtx responderCtx bytes m a b |
Make an OuroborosApplication
for the bundle of mini-protocols that
make up the overall node-to-node protocol.
This function specifies the wire format protocol numbers.
The application specific protocol numbers start from 2. The
is reserved for the MiniProtocolNum
0Handshake
protocol, while
is reserved for DeltaQ messages.
MiniProtocolNum
1Handshake
protocol is not included in NodeToNodeProtocols
as it runs
before mux is started but it reusing MuxBearer
to send and receive
messages. Only when the handshake protocol succeeds, we will know which
protocols to run / multiplex.
These are chosen to not overlap with the node to client protocol numbers (and the handshake protocol number). This is not essential for correctness, but is helpful to allow a single shared implementation of tools that can analyse both protocols, e.g. wireshark plugins.
data NodeToNodeProtocols (appType :: Mode) initiatorCtx responderCtx bytes (m :: Type -> Type) a b Source #
NodeToNodeProtocols | |
|
type NodeToNodeProtocolsWithExpandedCtx (appType :: Mode) ntnAddr bytes (m :: Type -> Type) a b = NodeToNodeProtocols appType (ExpandedInitiatorContext ntnAddr m) (ResponderContext ntnAddr) bytes m a b Source #
type NodeToNodeProtocolsWithMinimalCtx (appType :: Mode) ntnAddr bytes (m :: Type -> Type) a b = NodeToNodeProtocols appType (MinimalInitiatorContext ntnAddr) (ResponderContext ntnAddr) bytes m a b Source #
data MiniProtocolParameters Source #
MiniProtocolParameters | |
|
data NodeToNodeVersion #
Enumeration of node to node protocol versions.
NodeToNodeV_13 | NodeToNodeV_8
-- ^ Changes:
--
-- * Enable block diffusion pipelining in ChainSync and BlockFetch logic.
| NodeToNodeV_9
-- ^ Changes:
--
-- * Enable |
NodeToNodeV_14 | Chang+1 HF |
Instances
data NodeToNodeVersionData #
Version data for NodeToNode protocol
NodeToNodeVersionData | |
|
Instances
Show NodeToNodeVersionData | |
Defined in Ouroboros.Network.NodeToNode.Version showsPrec :: Int -> NodeToNodeVersionData -> ShowS # show :: NodeToNodeVersionData -> String # showList :: [NodeToNodeVersionData] -> ShowS # | |
Eq NodeToNodeVersionData | |
Defined in Ouroboros.Network.NodeToNode.Version (==) :: NodeToNodeVersionData -> NodeToNodeVersionData -> Bool # (/=) :: NodeToNodeVersionData -> NodeToNodeVersionData -> Bool # | |
Acceptable NodeToNodeVersionData | |
Queryable NodeToNodeVersionData | |
Defined in Ouroboros.Network.NodeToNode.Version |
data NetworkConnectTracers addr vNumber #
Tracer used by connectToNode
(and derivatives, like
connectTo
or
'Ouroboros.Network.NodeToClient.connectTo).
NetworkConnectTracers | |
|
nullNetworkConnectTracers :: NetworkConnectTracers addr vNumber #
connectTo :: Snocket IO Socket SockAddr -> NetworkConnectTracers SockAddr NodeToNodeVersion -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx 'InitiatorMode SockAddr ByteString IO a b) -> Maybe SockAddr -> SockAddr -> IO (Either SomeException (Either a b)) Source #
A specialised version of
.connectToNode
data NetworkServerTracers addr vNumber #
Tracers required by a server which handles inbound connections.
NetworkServerTracers | |
|
nullNetworkServerTracers :: NetworkServerTracers addr vNumber #
data NetworkMutableState addr #
Mutable state maintained by the network component.
NetworkMutableState | |
|
data AcceptedConnectionsLimit #
Policy which governs how to limit the number of accepted connections.
AcceptedConnectionsLimit | |
|
Instances
Show AcceptedConnectionsLimit | |
Defined in Ouroboros.Network.Server.RateLimiting showsPrec :: Int -> AcceptedConnectionsLimit -> ShowS # show :: AcceptedConnectionsLimit -> String # showList :: [AcceptedConnectionsLimit] -> ShowS # | |
Eq AcceptedConnectionsLimit | |
Defined in Ouroboros.Network.Server.RateLimiting | |
Ord AcceptedConnectionsLimit | |
Defined in Ouroboros.Network.Server.RateLimiting compare :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> Ordering # (<) :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> Bool # (<=) :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> Bool # (>) :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> Bool # (>=) :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> Bool # max :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> AcceptedConnectionsLimit # min :: AcceptedConnectionsLimit -> AcceptedConnectionsLimit -> AcceptedConnectionsLimit # |
newNetworkMutableState :: IO (NetworkMutableState addr) #
newNetworkMutableStateSTM :: STM (NetworkMutableState addr) #
cleanNetworkMutableState :: NetworkMutableState addr -> IO () #
Clean PeerStates
within NetworkMutableState
every 200s
:: SocketSnocket | |
-> NetworkServerTracers SockAddr NodeToNodeVersion | |
-> NetworkMutableState SockAddr | |
-> AcceptedConnectionsLimit | |
-> Socket | a configured socket to be used be the server. The server will call
|
-> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx 'ResponderMode SockAddr ByteString IO a b) | |
-> ErrorPolicies | |
-> IO Void |
A specialised version of
.
It forks a thread which runs an accept loop (server thread):withServerNode
- when the server thread throws an exception the main thread rethrows
it (by
wait
) - when an async exception is thrown to kill the main thread the server thread
will be cancelled as well (by
withAsync
)
P2P Governor
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
FromJSON PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise parseJSON :: Value -> Parser PeerAdvertise # parseJSONList :: Value -> Parser [PeerAdvertise] # | |||||
ToJSON PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise toJSON :: PeerAdvertise -> Value # toEncoding :: PeerAdvertise -> Encoding # toJSONList :: [PeerAdvertise] -> Value # toEncodingList :: [PeerAdvertise] -> Encoding # omitField :: PeerAdvertise -> Bool # | |||||
Generic PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise
from :: PeerAdvertise -> Rep PeerAdvertise x # to :: Rep PeerAdvertise x -> PeerAdvertise # | |||||
Show PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise showsPrec :: Int -> PeerAdvertise -> ShowS # show :: PeerAdvertise -> String # showList :: [PeerAdvertise] -> ShowS # | |||||
Eq PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise (==) :: PeerAdvertise -> PeerAdvertise -> Bool # (/=) :: PeerAdvertise -> PeerAdvertise -> Bool # | |||||
Ord PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise compare :: PeerAdvertise -> PeerAdvertise -> Ordering # (<) :: PeerAdvertise -> PeerAdvertise -> Bool # (<=) :: PeerAdvertise -> PeerAdvertise -> Bool # (>) :: PeerAdvertise -> PeerAdvertise -> Bool # (>=) :: PeerAdvertise -> PeerAdvertise -> Bool # max :: PeerAdvertise -> PeerAdvertise -> PeerAdvertise # min :: PeerAdvertise -> PeerAdvertise -> PeerAdvertise # | |||||
type Rep PeerAdvertise | |||||
Defined in Ouroboros.Network.PeerSelection.PeerAdvertise type Rep PeerAdvertise = D1 ('MetaData "PeerAdvertise" "Ouroboros.Network.PeerSelection.PeerAdvertise" "ouroboros-network-api-0.11.0.0-inplace" 'False) (C1 ('MetaCons "DoNotAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DoAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type)) |
data PeerSelectionTargets Source #
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
Show PeerSelectionTargets Source # | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types showsPrec :: Int -> PeerSelectionTargets -> ShowS # show :: PeerSelectionTargets -> String # showList :: [PeerSelectionTargets] -> ShowS # | |
Eq PeerSelectionTargets Source # | |
Defined in Ouroboros.Network.PeerSelection.Governor.Types (==) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool # (/=) :: PeerSelectionTargets -> PeerSelectionTargets -> Bool # |
Subscription Workers
IP subscription worker
data IPSubscriptionTarget #
IPSubscriptionTarget | |
|
Instances
Show IPSubscriptionTarget | |
Defined in Ouroboros.Network.Subscription.Ip showsPrec :: Int -> IPSubscriptionTarget -> ShowS # show :: IPSubscriptionTarget -> String # showList :: [IPSubscriptionTarget] -> ShowS # | |
Eq IPSubscriptionTarget | |
Defined in Ouroboros.Network.Subscription.Ip (==) :: IPSubscriptionTarget -> IPSubscriptionTarget -> Bool # (/=) :: IPSubscriptionTarget -> IPSubscriptionTarget -> Bool # |
type NetworkIPSubscriptionTracers addr vNumber = NetworkSubscriptionTracers WithIPList addr vNumber Source #
data NetworkSubscriptionTracers (withIPList :: Type -> Type) addr vNumber Source #
IP subscription tracers.
NetworkSubscriptionTracers | |
|
nullNetworkSubscriptionTracers :: forall (withIPList :: Type -> Type) addr vNumber. NetworkSubscriptionTracers withIPList addr vNumber Source #
data SubscriptionParams a target #
ipSubscriptionWorker
and dnsSubscriptionWorker
parameters
SubscriptionParams | |
|
ipSubscriptionWorker :: forall (mode :: Mode) x y. HasInitiator mode ~ 'True => SocketSnocket -> NetworkIPSubscriptionTracers SockAddr NodeToNodeVersion -> NetworkMutableState SockAddr -> IPSubscriptionParams () -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx mode SockAddr ByteString IO x y) -> IO Void Source #
ipSubscriptionWorker
which starts given application versions on each
established connection.
DNS subscription worker
data DnsSubscriptionTarget #
DnsSubscriptionTarget | |
|
Instances
Show DnsSubscriptionTarget | |
Defined in Ouroboros.Network.Subscription.Dns showsPrec :: Int -> DnsSubscriptionTarget -> ShowS # show :: DnsSubscriptionTarget -> String # showList :: [DnsSubscriptionTarget] -> ShowS # | |
Eq DnsSubscriptionTarget | |
Defined in Ouroboros.Network.Subscription.Dns (==) :: DnsSubscriptionTarget -> DnsSubscriptionTarget -> Bool # (/=) :: DnsSubscriptionTarget -> DnsSubscriptionTarget -> Bool # |
data NetworkDNSSubscriptionTracers vNumber addr Source #
DNS subscription tracers.
NetworkDNSSubscriptionTracers | |
|
nullNetworkDNSSubscriptionTracers :: NetworkDNSSubscriptionTracers vNumber peerid Source #
dnsSubscriptionWorker :: forall (mode :: Mode) x y. HasInitiator mode ~ 'True => SocketSnocket -> NetworkDNSSubscriptionTracers NodeToNodeVersion SockAddr -> NetworkMutableState SockAddr -> DnsSubscriptionParams () -> Versions NodeToNodeVersion NodeToNodeVersionData (OuroborosApplicationWithMinimalCtx mode SockAddr ByteString IO x y) -> IO Void Source #
dnsSubscriptionWorker
which starts given application versions on each
established connection.
Versions
newtype Versions vNum vData r #
The version map supported by the local agent keyed on the version identifier.
Each Version
contains a function which takes negotiated version data and
returns negotiated application (the r
type variable).
If one needs to combine multiple versions the simplest way is to use one of
the combinators: foldMapVersions
, combineVersions
or the Semigroup
instance directly:
fold $ (simpleSingletonVersions ...) :| [ (simpleSingletonVersions ...) , (simpleSingletonVersions ...) , ... ]
Versions | |
|
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 # |
simpleSingletonVersions :: vNum -> vData -> r -> Versions vNum vData r #
Singleton smart constructor for Versions
.
foldMapVersions :: (Ord vNum, Foldable f, HasCallStack) => (x -> Versions vNum extra r) -> f x -> Versions vNum extra r #
combineVersions :: (Ord vNum, Foldable f, HasCallStack) => f (Versions vNum extra r) -> Versions vNum extra r #
Codecs
nodeToNodeHandshakeCodec :: forall (m :: Type -> Type). MonadST m => Codec (Handshake NodeToNodeVersion Term) DeserialiseFailure m ByteString #
Handshake
codec for the node-to-node
protocol suite.
Re-exports
data ExpandedInitiatorContext addr (m :: Type -> Type) #
Context passed to initiator mini-protocol execution.
newtype MinimalInitiatorContext addr #
A context passed to initiator mini-protocol execution for non-p2p applications.
Instances
Functor MinimalInitiatorContext | |
Defined in Ouroboros.Network.Context fmap :: (a -> b) -> MinimalInitiatorContext a -> MinimalInitiatorContext b # (<$) :: a -> MinimalInitiatorContext b -> MinimalInitiatorContext a # |
newtype ResponderContext addr #
Context passed to each responder mini-protocol execution.
Instances
Functor ResponderContext | |
Defined in Ouroboros.Network.Context fmap :: (a -> b) -> ResponderContext a -> ResponderContext b # (<$) :: a -> ResponderContext b -> ResponderContext a # |
data ConnectionId addr #
Connection is identified by local and remote address.
TODO: the type variable which this data type fills in is called peerid
. We
should renamed to connectionId
.
ConnectionId | |
|
Instances
Functor ConnectionId | |||||
Defined in Ouroboros.Network.ConnectionId fmap :: (a -> b) -> ConnectionId a -> ConnectionId b # (<$) :: a -> ConnectionId b -> ConnectionId a # | |||||
ShowProxy addr => ShowProxy (ConnectionId addr :: Type) | |||||
Defined in Ouroboros.Network.ConnectionId showProxy :: Proxy (ConnectionId addr) -> String # | |||||
Generic (ConnectionId addr) | |||||
Defined in Ouroboros.Network.ConnectionId
from :: ConnectionId addr -> Rep (ConnectionId addr) x # to :: Rep (ConnectionId addr) x -> ConnectionId addr # | |||||
Show addr => Show (ConnectionId addr) | |||||
Defined in Ouroboros.Network.ConnectionId showsPrec :: Int -> ConnectionId addr -> ShowS # show :: ConnectionId addr -> String # showList :: [ConnectionId addr] -> ShowS # | |||||
Eq addr => Eq (ConnectionId addr) | |||||
Defined in Ouroboros.Network.ConnectionId (==) :: ConnectionId addr -> ConnectionId addr -> Bool # (/=) :: ConnectionId addr -> ConnectionId addr -> Bool # | |||||
Ord addr => Ord (ConnectionId addr) | Order first by Note: we relay on the fact that | ||||
Defined in Ouroboros.Network.ConnectionId compare :: ConnectionId addr -> ConnectionId addr -> Ordering # (<) :: ConnectionId addr -> ConnectionId addr -> Bool # (<=) :: ConnectionId addr -> ConnectionId addr -> Bool # (>) :: ConnectionId addr -> ConnectionId addr -> Bool # (>=) :: ConnectionId addr -> ConnectionId addr -> Bool # max :: ConnectionId addr -> ConnectionId addr -> ConnectionId addr # min :: ConnectionId addr -> ConnectionId addr -> ConnectionId addr # | |||||
Hashable a => Hashable (ConnectionId a) | |||||
Defined in Ouroboros.Network.ConnectionId hashWithSalt :: Int -> ConnectionId a -> Int # hash :: ConnectionId a -> Int # | |||||
Typeable addr => NoThunks (ConnectionId addr) | |||||
Defined in Ouroboros.Network.ConnectionId noThunks :: Context -> ConnectionId addr -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> ConnectionId addr -> IO (Maybe ThunkInfo) # showTypeOf :: Proxy (ConnectionId addr) -> String # | |||||
type Rep (ConnectionId addr) | |||||
Defined in Ouroboros.Network.ConnectionId type Rep (ConnectionId addr) = D1 ('MetaData "ConnectionId" "Ouroboros.Network.ConnectionId" "ouroboros-network-framework-0.14.0.0-inplace" 'False) (C1 ('MetaCons "ConnectionId" 'PrefixI 'True) (S1 ('MetaSel ('Just "localAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 addr) :*: S1 ('MetaSel ('Just "remoteAddress") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 addr))) |
data ControlMessage #
Control signal sent to a mini-protocol. Expected to exit, on Continue
it
should continue its operation
Continue | Continue operation. |
Quiesce | Hold on, e.g. do not sent messages until resumed. This is not used for any hot protocol. |
Terminate | The client is expected to terminate as soon as possible. |
Instances
Show ControlMessage | |
Defined in Ouroboros.Network.ControlMessage showsPrec :: Int -> ControlMessage -> ShowS # show :: ControlMessage -> String # showList :: [ControlMessage] -> ShowS # | |
Eq ControlMessage | |
Defined in Ouroboros.Network.ControlMessage (==) :: ControlMessage -> ControlMessage -> Bool # (/=) :: ControlMessage -> ControlMessage -> Bool # |
type ControlMessageSTM (m :: Type -> Type) = STM m ControlMessage #
ControlMessageSTM
should depend on muxMode
(we only need to schedule
stop for initiator side). This is not done only because this would break
tests, but once the old api is removed it should be possible.
type RemoteAddress = SockAddr Source #
data IsBigLedgerPeer #
A boolean like type. Big ledger peers are the largest SPOs which control 90% of staked stake.
Note that IsBigLedgerPeer
indicates a role that peer plays in the eclipse
evasion, e.g. that a peer was explicitly selected as a big ledger peer, e.g.
IsNotBigLedgerPeer
does not necessarily mean that the peer isn't a big
ledger peer. This is because we select root peers from all ledger peers
(including big ones).
Instances
Eq IsBigLedgerPeer | |
Defined in Ouroboros.Network.PeerSelection.LedgerPeers.Type (==) :: IsBigLedgerPeer -> IsBigLedgerPeer -> Bool # (/=) :: IsBigLedgerPeer -> IsBigLedgerPeer -> Bool # |
newtype NumTxIdsToAck #
Instances
NFData NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type rnf :: NumTxIdsToAck -> () # | |||||
Monoid NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type mempty :: NumTxIdsToAck # mappend :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # mconcat :: [NumTxIdsToAck] -> NumTxIdsToAck # | |||||
Semigroup NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type (<>) :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # sconcat :: NonEmpty NumTxIdsToAck -> NumTxIdsToAck # stimes :: Integral b => b -> NumTxIdsToAck -> NumTxIdsToAck # | |||||
Bounded NumTxIdsToAck | |||||
Enum NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type succ :: NumTxIdsToAck -> NumTxIdsToAck # pred :: NumTxIdsToAck -> NumTxIdsToAck # toEnum :: Int -> NumTxIdsToAck # fromEnum :: NumTxIdsToAck -> Int # enumFrom :: NumTxIdsToAck -> [NumTxIdsToAck] # enumFromThen :: NumTxIdsToAck -> NumTxIdsToAck -> [NumTxIdsToAck] # enumFromTo :: NumTxIdsToAck -> NumTxIdsToAck -> [NumTxIdsToAck] # enumFromThenTo :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck -> [NumTxIdsToAck] # | |||||
Generic NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type
from :: NumTxIdsToAck -> Rep NumTxIdsToAck x # to :: Rep NumTxIdsToAck x -> NumTxIdsToAck # | |||||
Num NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type (+) :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # (-) :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # (*) :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # negate :: NumTxIdsToAck -> NumTxIdsToAck # abs :: NumTxIdsToAck -> NumTxIdsToAck # signum :: NumTxIdsToAck -> NumTxIdsToAck # fromInteger :: Integer -> NumTxIdsToAck # | |||||
Integral NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type quot :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # rem :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # div :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # mod :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # quotRem :: NumTxIdsToAck -> NumTxIdsToAck -> (NumTxIdsToAck, NumTxIdsToAck) # divMod :: NumTxIdsToAck -> NumTxIdsToAck -> (NumTxIdsToAck, NumTxIdsToAck) # toInteger :: NumTxIdsToAck -> Integer # | |||||
Real NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type toRational :: NumTxIdsToAck -> Rational # | |||||
Show NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type showsPrec :: Int -> NumTxIdsToAck -> ShowS # show :: NumTxIdsToAck -> String # showList :: [NumTxIdsToAck] -> ShowS # | |||||
Eq NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type (==) :: NumTxIdsToAck -> NumTxIdsToAck -> Bool # (/=) :: NumTxIdsToAck -> NumTxIdsToAck -> Bool # | |||||
Ord NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type compare :: NumTxIdsToAck -> NumTxIdsToAck -> Ordering # (<) :: NumTxIdsToAck -> NumTxIdsToAck -> Bool # (<=) :: NumTxIdsToAck -> NumTxIdsToAck -> Bool # (>) :: NumTxIdsToAck -> NumTxIdsToAck -> Bool # (>=) :: NumTxIdsToAck -> NumTxIdsToAck -> Bool # max :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # min :: NumTxIdsToAck -> NumTxIdsToAck -> NumTxIdsToAck # | |||||
NoThunks NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type noThunks :: Context -> NumTxIdsToAck -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> NumTxIdsToAck -> IO (Maybe ThunkInfo) # showTypeOf :: Proxy NumTxIdsToAck -> String # | |||||
type Rep NumTxIdsToAck | |||||
Defined in Ouroboros.Network.Protocol.TxSubmission2.Type type Rep NumTxIdsToAck = D1 ('MetaData "NumTxIdsToAck" "Ouroboros.Network.Protocol.TxSubmission2.Type" "ouroboros-network-protocols-0.12.0.0-inplace" 'True) (C1 ('MetaCons "NumTxIdsToAck" 'PrefixI 'True) (S1 ('MetaSel ('Just "getNumTxIdsToAck") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))) |
data ProtocolLimitFailure #
Instances
Exception ProtocolLimitFailure | |
Show ProtocolLimitFailure | |
Defined in Ouroboros.Network.Protocol.Limits showsPrec :: Int -> ProtocolLimitFailure -> ShowS # show :: ProtocolLimitFailure -> String # showList :: [ProtocolLimitFailure] -> ShowS # |
data Handshake (vNumber :: k) (vParams :: k1) #
The handshake mini-protocol is used initially to agree the version and associated parameters of the protocol to use for all subsequent communication.
Instances
ShowProxy (Handshake vNumber vParams :: Type) | |||||
(NFData vNumber, NFData vParams) => NFData (Message (Handshake vNumber vParams) from to) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type | |||||
(Show vNumber, Show vParams) => Show (Message (Handshake vNumber vParams) from to) | |||||
Protocol (Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type
| |||||
StateTokenI ('StConfirm :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type stateToken :: StateToken ('StConfirm :: Handshake vNumber vParams) # | |||||
StateTokenI ('StDone :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type stateToken :: StateToken ('StDone :: Handshake vNumber vParams) # | |||||
StateTokenI ('StPropose :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type stateToken :: StateToken ('StPropose :: Handshake vNumber vParams) # | |||||
data Message (Handshake vNumber vParams) (from :: Handshake vNumber vParams) (to :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type data Message (Handshake vNumber vParams) (from :: Handshake vNumber vParams) (to :: Handshake vNumber vParams) where
| |||||
type StateToken | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type | |||||
type StateAgency ('StConfirm :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type | |||||
type StateAgency ('StDone :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type | |||||
type StateAgency ('StPropose :: Handshake vNumber vParams) | |||||
Defined in Ouroboros.Network.Protocol.Handshake.Type |
data LocalAddresses addr #
Instances
Semigroup (LocalAddresses addr) | |
Defined in Ouroboros.Network.Subscription.Worker (<>) :: LocalAddresses addr -> LocalAddresses addr -> LocalAddresses addr # sconcat :: NonEmpty (LocalAddresses addr) -> LocalAddresses addr # stimes :: Integral b => b -> LocalAddresses addr -> LocalAddresses addr # | |
Show addr => Show (LocalAddresses addr) | |
Defined in Ouroboros.Network.Subscription.Worker showsPrec :: Int -> LocalAddresses addr -> ShowS # show :: LocalAddresses addr -> String # showList :: [LocalAddresses addr] -> ShowS # | |
Eq addr => Eq (LocalAddresses addr) | |
Defined in Ouroboros.Network.Subscription.Worker (==) :: LocalAddresses addr -> LocalAddresses addr -> Bool # (/=) :: LocalAddresses addr -> LocalAddresses addr -> Bool # |
Basic type for a socket.
Exceptions
data ExceptionInHandler where #
Exception which where caught in the connection thread and were re-thrown in
the main thread by the rethrowPolicy
.
ExceptionInHandler :: forall peerAddr. (Typeable peerAddr, Show peerAddr) => !peerAddr -> !SomeException -> ExceptionInHandler |
Instances
Exception ExceptionInHandler | |
Show ExceptionInHandler | |
Defined in Ouroboros.Network.ConnectionManager.Types showsPrec :: Int -> ExceptionInHandler -> ShowS # show :: ExceptionInHandler -> String # showList :: [ExceptionInHandler] -> ShowS # |
Error Policies and Peer state
data ErrorPolicies #
List of error policies for exception handling and a policy for handing application return values.
ErrorPolicies | |
|
Instances
Semigroup ErrorPolicies | |
Defined in Ouroboros.Network.ErrorPolicy (<>) :: ErrorPolicies -> ErrorPolicies -> ErrorPolicies # sconcat :: NonEmpty ErrorPolicies -> ErrorPolicies # stimes :: Integral b => b -> ErrorPolicies -> ErrorPolicies # |
remoteNetworkErrorPolicy :: ErrorPolicies Source #
A minimal error policy for remote peers, which only handles exceptions raised by `ouroboros-network`.
localNetworkErrorPolicy :: ErrorPolicies Source #
Error policy for local clients. This is equivalent to
nullErrorPolicies
, but explicit in the errors which can be caught.
We are very permissive here, and very strict in the
networkErrorPolicy
. After any failure the client will be
killed and not penalised by this policy. This allows to restart the local
client without a delay.
data ErrorPolicy where #
ErrorPolicy | |
|
Instances
Show ErrorPolicy | |
Defined in Ouroboros.Network.ErrorPolicy showsPrec :: Int -> ErrorPolicy -> ShowS # show :: ErrorPolicy -> String # showList :: [ErrorPolicy] -> ShowS # |
data SuspendDecision t #
Semigroup of commands which acts on PeerState
. The t
variable might
be initiated to DiffTime
or Time m
.
This semigroup allows to either suspend both consumer and producer or just the consumer part.
SuspendPeer !t !t | peer is suspend; The first |
SuspendConsumer !t | suspend local consumer / initiator side until |
Throw | throw an error from the main thread. |
Instances
Functor SuspendDecision | |
Defined in Ouroboros.Network.Subscription.PeerState fmap :: (a -> b) -> SuspendDecision a -> SuspendDecision b # (<$) :: a -> SuspendDecision b -> SuspendDecision a # | |
Ord t => Semigroup (SuspendDecision t) | The semigroup instance. Note that composing |
Defined in Ouroboros.Network.Subscription.PeerState (<>) :: SuspendDecision t -> SuspendDecision t -> SuspendDecision t # sconcat :: NonEmpty (SuspendDecision t) -> SuspendDecision t # stimes :: Integral b => b -> SuspendDecision t -> SuspendDecision t # | |
Show t => Show (SuspendDecision t) | |
Defined in Ouroboros.Network.Subscription.PeerState showsPrec :: Int -> SuspendDecision t -> ShowS # show :: SuspendDecision t -> String # showList :: [SuspendDecision t] -> ShowS # | |
Eq t => Eq (SuspendDecision t) | |
Defined in Ouroboros.Network.Subscription.PeerState (==) :: SuspendDecision t -> SuspendDecision t -> Bool # (/=) :: SuspendDecision t -> SuspendDecision t -> Bool # | |
Ord t => Ord (SuspendDecision t) | |
Defined in Ouroboros.Network.Subscription.PeerState compare :: SuspendDecision t -> SuspendDecision t -> Ordering # (<) :: SuspendDecision t -> SuspendDecision t -> Bool # (<=) :: SuspendDecision t -> SuspendDecision t -> Bool # (>) :: SuspendDecision t -> SuspendDecision t -> Bool # (>=) :: SuspendDecision t -> SuspendDecision t -> Bool # max :: SuspendDecision t -> SuspendDecision t -> SuspendDecision t # min :: SuspendDecision t -> SuspendDecision t -> SuspendDecision t # | |
SAct (SuspendDecision Time) (Maybe (PeerState m)) | Action of Note: |
Defined in Ouroboros.Network.Subscription.PeerState |
Traces
data AcceptConnectionsPolicyTrace #
Trace for the AcceptConnectionsLimit
policy.
ServerTraceAcceptConnectionRateLimiting DiffTime Int | |
ServerTraceAcceptConnectionHardLimit Word32 | |
ServerTraceAcceptConnectionResume Int |
Instances
Show AcceptConnectionsPolicyTrace | |
Defined in Ouroboros.Network.Server.RateLimiting showsPrec :: Int -> AcceptConnectionsPolicyTrace -> ShowS # show :: AcceptConnectionsPolicyTrace -> String # showList :: [AcceptConnectionsPolicyTrace] -> ShowS # | |
Eq AcceptConnectionsPolicyTrace | |
Ord AcceptConnectionsPolicyTrace | |
Defined in Ouroboros.Network.Server.RateLimiting compare :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> Ordering # (<) :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> Bool # (<=) :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> Bool # (>) :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> Bool # (>=) :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> Bool # max :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace # min :: AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace -> AcceptConnectionsPolicyTrace # |
data TraceSendRecv ps where #
TraceSendMsg :: forall ps. AnyMessage ps -> TraceSendRecv ps | |
TraceRecvMsg :: forall ps. AnyMessage ps -> TraceSendRecv ps |
Instances
Show (AnyMessage ps) => Show (TraceSendRecv ps) | |
Defined in Ouroboros.Network.Driver.Simple showsPrec :: Int -> TraceSendRecv ps -> ShowS # show :: TraceSendRecv ps -> String # showList :: [TraceSendRecv ps] -> ShowS # |
data SubscriptionTrace addr #
SubscriptionTraceConnectStart addr | |
SubscriptionTraceConnectEnd addr ConnectResult | |
Exception e => SubscriptionTraceSocketAllocationException addr e | |
Exception e => SubscriptionTraceConnectException addr e | |
Exception e => SubscriptionTraceApplicationException addr e | |
SubscriptionTraceTryConnectToPeer addr | |
SubscriptionTraceSkippingPeer addr | |
SubscriptionTraceSubscriptionRunning | |
SubscriptionTraceSubscriptionWaiting Int | |
SubscriptionTraceSubscriptionFailed | |
SubscriptionTraceSubscriptionWaitingNewConnection DiffTime | |
SubscriptionTraceStart Int | |
SubscriptionTraceRestart DiffTime Int Int | |
SubscriptionTraceConnectionExist addr | |
SubscriptionTraceUnsupportedRemoteAddr addr | |
SubscriptionTraceMissingLocalAddress | |
SubscriptionTraceAllocateSocket addr | |
SubscriptionTraceCloseSocket addr |
Instances
Show addr => Show (SubscriptionTrace addr) | |
Defined in Ouroboros.Network.Subscription.Worker showsPrec :: Int -> SubscriptionTrace addr -> ShowS # show :: SubscriptionTrace addr -> String # showList :: [SubscriptionTrace addr] -> ShowS # |
data ErrorPolicyTrace #
Trace data for error policies
ErrorPolicySuspendPeer (Maybe (ConnectionOrApplicationExceptionTrace SomeException)) DiffTime DiffTime | suspending peer with a given exception until |
ErrorPolicySuspendConsumer (Maybe (ConnectionOrApplicationExceptionTrace SomeException)) DiffTime | suspending consumer until |
ErrorPolicyLocalNodeError (ConnectionOrApplicationExceptionTrace SomeException) | caught a local exception |
ErrorPolicyResumePeer | resume a peer (both consumer and producer) |
ErrorPolicyKeepSuspended | consumer was suspended until producer will resume |
ErrorPolicyResumeConsumer | resume consumer |
ErrorPolicyResumeProducer | resume producer |
ErrorPolicyUnhandledApplicationException SomeException | an application throwed an exception, which was not handled by any
|
ErrorPolicyUnhandledConnectionException SomeException |
|
ErrorPolicyAcceptException IOException |
|
Instances
Show ErrorPolicyTrace | |
Defined in Ouroboros.Network.ErrorPolicy showsPrec :: Int -> ErrorPolicyTrace -> ShowS # show :: ErrorPolicyTrace -> String # showList :: [ErrorPolicyTrace] -> ShowS # |
data WithIPList a #
Instances
Show a => Show (WithIPList a) | |
Defined in Ouroboros.Network.Subscription.Ip showsPrec :: Int -> WithIPList a -> ShowS # show :: WithIPList a -> String # showList :: [WithIPList a] -> ShowS # |
data WithDomainName a #
Instances
Show a => Show (WithDomainName a) | |
Defined in Ouroboros.Network.Subscription.Dns showsPrec :: Int -> WithDomainName a -> ShowS # show :: WithDomainName a -> String # showList :: [WithDomainName a] -> ShowS # |
type HandshakeTr ntnAddr ntnVersion = WithBearer (ConnectionId ntnAddr) (TraceSendRecv (Handshake ntnVersion Term)) Source #