From 1dcf7e5dac6fadfb46b4590c2d1dd8bdb1a72b14 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Sun, 15 Jan 2023 15:20:10 -0500 Subject: [PATCH 1/2] add host doc --- .../introduction/core-abstractions/_index.md | 2 +- content/concepts/introduction/host.md | 23 +++++++++++++++++++ .../concepts/introduction/protocols/_index.md | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 content/concepts/introduction/host.md diff --git a/content/concepts/introduction/core-abstractions/_index.md b/content/concepts/introduction/core-abstractions/_index.md index 0cc56ac8..0756195f 100644 --- a/content/concepts/introduction/core-abstractions/_index.md +++ b/content/concepts/introduction/core-abstractions/_index.md @@ -1,5 +1,5 @@ --- title : "Core Abstractions" description: "Learn about the core pillars that compose each libp2p peer and a libp2p network." -weight: 4 +weight: 5 --- diff --git a/content/concepts/introduction/host.md b/content/concepts/introduction/host.md new file mode 100644 index 00000000..b3c8a105 --- /dev/null +++ b/content/concepts/introduction/host.md @@ -0,0 +1,23 @@ +--- +title: "libp2p Host" +description: "A libp2p host is a program or process that runs on a peer and allows it to participate in a libp2p network." +weight: 4 +--- + +A libp2p host is a program or process that allows a peer to participate +in the libp2p network and defines the peer's properties. In the context of +libp2p, a host is a specific implementation of a node that has been configured +to use the libp2p stack. + +A libp2p host can provide more control over a node's +configuration through the use of options such as customizing the +[host's identity](core-abstractions/peers.md#peer-id), +[listen to addresses](core-abstractions/addressing.md), +[transport protocols](../transports/overview.md) to use a transport +like [QUIC](../transports/quic.md), +[security protocols](../secure-comm/overview.md) to use +[Noise](../secure-comm/noise.md) or [TLS](../secure-comm/tls.md), +[connection manager](core-abstractions/connections.md##connection-and-stream-management), +[NAT port mapping](../nat/overview.md##automatic-router-configuration), +and [routing](../discovery-routing/overview.md) to use a routing protocol +like [DHT](../discovery-and-routing/kaddht.md). diff --git a/content/concepts/introduction/protocols/_index.md b/content/concepts/introduction/protocols/_index.md index 7516c6f4..2734b640 100644 --- a/content/concepts/introduction/protocols/_index.md +++ b/content/concepts/introduction/protocols/_index.md @@ -1,5 +1,5 @@ --- title : "Protocol Basics" description: "Learn about the core pillars that compose each libp2p peer and a libp2p network." -weight: 4 +weight: 6 --- From d377be8b221e860c99cc398a56485ef5ff1287f0 Mon Sep 17 00:00:00 2001 From: Danny Salman Date: Wed, 1 Feb 2023 08:32:33 -0500 Subject: [PATCH 2/2] incorporate PR feedback and update host --- content/concepts/introduction/host.md | 31 ++++++++++++++------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/content/concepts/introduction/host.md b/content/concepts/introduction/host.md index b3c8a105..fca0de26 100644 --- a/content/concepts/introduction/host.md +++ b/content/concepts/introduction/host.md @@ -5,19 +5,20 @@ weight: 4 --- A libp2p host is a program or process that allows a peer to participate -in the libp2p network and defines the peer's properties. In the context of -libp2p, a host is a specific implementation of a node that has been configured -to use the libp2p stack. +in the libp2p network. -A libp2p host can provide more control over a node's -configuration through the use of options such as customizing the -[host's identity](core-abstractions/peers.md#peer-id), -[listen to addresses](core-abstractions/addressing.md), -[transport protocols](../transports/overview.md) to use a transport -like [QUIC](../transports/quic.md), -[security protocols](../secure-comm/overview.md) to use -[Noise](../secure-comm/noise.md) or [TLS](../secure-comm/tls.md), -[connection manager](core-abstractions/connections.md##connection-and-stream-management), -[NAT port mapping](../nat/overview.md##automatic-router-configuration), -and [routing](../discovery-routing/overview.md) to use a routing protocol -like [DHT](../discovery-and-routing/kaddht.md). +{{< alert icon="" context="note">}} +There are [several implementations](https://libp2p.io/implementations/) of the +libp2p host, and not all of the implementations support the features mentioned below. +{{< /alert >}} + +A libp2p host has a +[unique identity](/concepts/introduction/core-abstractions/peers#peer-id) +and can listen on different [transport protocols](/concepts/transports/overview), +[dial connections to other hosts](/concepts/transports/listen-and-dial), and detect +if it's a publicly reachable node or if it's behind a NAT/firewall with +[AutoNAT](../nat/overview.md##automatic-router-configuration). +The host can apply [hole punching techniques](/concepts/nat/hole-punching) to overcome +NATs, find peers through a routing protocol like +[DHT](/concepts/introduction/protocols/dht), and send messages across the network +using [Gossipsub](/concepts/pubsub/gossipsub).