| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Node.Network
Description
Concrete Network stack used in a hydra-node.
This module provides a withNetwork function which is the composition of several layers in order to provide various capabilities:
withAuthenticationhandles messages' authentication and signature verificationwithEtcdNetworkuses anetcdcluster to implement reliable broadcast
The following diagram details the various types of messages each layer is exchanging with its predecessors and successors.
▲
│ │
Authenticated msg msg
│ │
│ │
┌─────────┼────────────────────────▼──────┐
│ │
│ Authenticate │
│ │
└─────────▲────────────────────────┼──────┘
│ │
│ │
msg msg
│ │
┌─────────┼────────────────────────▼──────┐
│ │
│ Etcd │
│ │
└─────────▲────────────────────────┼──────┘
│ │
│ (bytes) │
│ ▼
Synopsis
- data NetworkConfiguration = NetworkConfiguration {
- persistenceDir :: FilePath
- signingKey :: SigningKey HydraKey
- otherParties :: [Party]
- listen :: Host
- advertise :: Host
- peers :: [Host]
- nodeId :: NodeId
- withNetwork :: forall tx. IsTx tx => Tracer IO NetworkLog -> NetworkConfiguration -> NetworkComponent IO (Authenticated (Message tx)) (Message tx) ()
- data NetworkLog
Documentation
data NetworkConfiguration Source #
Configuration for a Node network layer.
Constructors
| NetworkConfiguration | |
Fields
| |
Arguments
| :: forall tx. IsTx tx | |
| => Tracer IO NetworkLog | Tracer to use for logging messages. |
| -> NetworkConfiguration | The network configuration |
| -> NetworkComponent IO (Authenticated (Message tx)) (Message tx) () | Produces a |
Starts the network layer of a node, passing configured Network to its continuation.
data NetworkLog Source #