## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

- Auto
- Light
- Dark

# Algorand Specifications

> The Hybrid Network is currently in experimental mode, as it includes Peer-to-Peer
> Network functionalities.

Let’s define NHNH as an object that models a working Hybrid Network HYBHYB.

The Hybrid Network NH=NWS∪NPNH=NWS∪NP is the _network layer_
that unifies the Relay Network WSWS and the Peer-to-Peer Network P2PP2P.

Nodes in the NHNH act as gateways, running simultaneously WSWS
and P2PP2P for the interoperability of both network layers.

Conceptually, all functions and implementations of HYBHYB act as a switch
statement to select the appropriate network layer according to the parameters of
the sender PeerPeer of the incoming message.

A Hybrid Network maintains both the [Relay Network definition](https://specs.algorand.co/network/non-normative/network-nn-definitions-ws)
and the [Peer-to-Peer Network definition](https://specs.algorand.co/network/non-normative/network-nn-definitions-p2p).

> See also the HYBHYB [identity challenge](https://specs.algorand.co/network/non-normative/network-nn-identity#hybrid-network-identity-vhallenge)
> for details on how peer deduplication works in both subnetworks.

The following sketch represents a typical topology of a Hybrid Network NHNH,
where:

- RR represents a _relay node_,
- PP represents a _peer node_,
- HH represents a _hybrid node_,
- PrPr represents a _peer node_ connected to RR,
- PpPp represents a _peer node_ connected to PP,
- HH represents a _hybrid node_, connected both to RR and PP,
- A PrPr is connected on average to 4R4R,
- A PrPr is not connected to other PP,
- A PpPp is connected on average to 4P4P,
- A HH is connected on average to 4R4R,
- A HH is connected on average to 4P4P,
- A RR is connected to multiple RR.
