Safe Haskell | None |
---|---|
Language | Haskell2010 |
Initiator and responder execution context.
Synopsis
- 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
- type ControlMessageSTM (m :: Type -> Type) = STM m ControlMessage
- data IsBigLedgerPeer
Documentation
data ExpandedInitiatorContext addr (m :: Type -> Type) Source #
Context passed to initiator mini-protocol execution.
newtype MinimalInitiatorContext addr Source #
A context passed to initiator mini-protocol execution for non-p2p applications.
Instances
Functor MinimalInitiatorContext Source # | |
Defined in Ouroboros.Network.Context fmap :: (a -> b) -> MinimalInitiatorContext a -> MinimalInitiatorContext b # (<$) :: a -> MinimalInitiatorContext b -> MinimalInitiatorContext a # |
newtype ResponderContext addr Source #
Context passed to each responder mini-protocol execution.
Instances
Functor ResponderContext Source # | |
Defined in Ouroboros.Network.Context fmap :: (a -> b) -> ResponderContext a -> ResponderContext b # (<$) :: a -> ResponderContext b -> ResponderContext a # |
Re-exports
data ConnectionId addr Source #
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
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.
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 # |