ouroboros-network:sim-tests-lib
Safe HaskellNone
LanguageHaskell2010

Test.Ouroboros.Network.Diffusion.Node

Synopsis

run a node

data BlockGeneratorArgs block s Source #

Constructors

BlockGeneratorArgs 

Fields

node types

type NtNFD (m :: Type -> Type) = FD m NtNAddr Source #

type NtCFD (m :: Type -> Type) = FD m NtCAddr Source #

extra types used by the node

data AcceptedConnectionsLimit #

Policy which governs how to limit the number of accepted connections.

Constructors

AcceptedConnectionsLimit 

Fields

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 send InitiatorOnlyDiffusionMode, 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 in InitiatorAndResponderDiffusionMode).

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

Instances details
Arbitrary PeerAdvertise Source # 
Instance details

Defined in Test.Ouroboros.Network.PeerSelection.Instances

FromJSON PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

ToJSON PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Generic PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Associated Types

type Rep PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

type Rep PeerAdvertise = D1 ('MetaData "PeerAdvertise" "Ouroboros.Network.PeerSelection.PeerAdvertise" "ouroboros-network-api-0.9.0.1-inplace" 'False) (C1 ('MetaCons "DoNotAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DoAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type))
Show PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Eq PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

Ord PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

type Rep PeerAdvertise 
Instance details

Defined in Ouroboros.Network.PeerSelection.PeerAdvertise

type Rep PeerAdvertise = D1 ('MetaData "PeerAdvertise" "Ouroboros.Network.PeerSelection.PeerAdvertise" "ouroboros-network-api-0.9.0.1-inplace" 'False) (C1 ('MetaCons "DoNotAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DoAdvertisePeer" 'PrefixI 'False) (U1 :: Type -> Type))

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.

Constructors

PeerSelectionTargets 

Fields

configuration constants