Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of p2p layer in Tendermint v0.34 #9348

Merged
merged 57 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3797a3a
spec: overview of p2p in v0.34 (#9120)
jmalicevic Aug 10, 2022
2ba7545
spec: overview of the p2p implementation in v0.34 (#9126)
cason Aug 28, 2022
39adacf
spec:p2p v0.34 introduction (#9319)
jmalicevic Aug 29, 2022
4a7b2f3
spec: overview of p2p in v0.34 (#9120)
jmalicevic Aug 10, 2022
ae8c008
spec: overview of the p2p implementation in v0.34 (#9126)
cason Aug 28, 2022
0324de6
spec:p2p v0.34 introduction (#9319)
jmalicevic Aug 29, 2022
1bfaaad
Merge branch 'spec/p2p-v0.34' of github.com:tendermint/tendermint int…
cason Aug 29, 2022
ee33316
spec: p2p v0.34, addressbook review
cason Aug 30, 2022
71ffabb
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
7736717
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
4be7dca
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
2ae331f
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
68a9555
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
59e5355
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
bd36866
spec: p2p v0.34, peer manager review
cason Aug 30, 2022
9fb64f1
Filled config description
jmalicevic Aug 30, 2022
5328ab5
spec: p2p v0.34, transport review
cason Aug 30, 2022
b8472a9
Merge branch 'spec/p2p-v0.34' of github.com:tendermint/tendermint int…
cason Aug 30, 2022
ed87d2d
spec: p2p v0.34, switch review
cason Aug 30, 2022
6f9d5e2
spec: p2p v0.34, overview, first version
cason Aug 30, 2022
33b0d1f
Merge branch 'spec/p2p-v0.34' of github.com:tendermint/tendermint int…
cason Aug 30, 2022
87677ea
spec: p2p v0.34, peer manager review
cason Aug 31, 2022
404f6c4
spec: p2p v0.34, shorter readme
cason Aug 31, 2022
4fa0ec1
Configuration update
jmalicevic Aug 31, 2022
0f770e2
Configuration update
jmalicevic Aug 31, 2022
49ff274
Shortened README
jmalicevic Aug 31, 2022
e5ecf66
Merge branch 'spec/p2p-v0.34' of github.com:tendermint/tendermint int…
cason Aug 31, 2022
5931bdd
spec: p2p v0.34, readme intro
cason Aug 31, 2022
5b2aa7e
spec: p2p v0.34, readme contents
cason Aug 31, 2022
6b5dce8
spec: p2p v0.34, readme references
cason Aug 31, 2022
a1a1304
spec: p2p readme points to v0.34
cason Aug 31, 2022
4b307f9
Merge branch 'main' into spec/p2p-v0.34
cason Aug 31, 2022
8df096c
Merge branch 'main' into spec/p2p-v0.34
cason Aug 31, 2022
c449876
spec: p2p, v0.34, fixing brokend markdown links
cason Sep 1, 2022
68f0a68
Makrdown fix
jmalicevic Sep 1, 2022
fecd647
Merge branch 'main' into spec/p2p-v0.34
cason Sep 1, 2022
96eb0d1
Apply suggestions from code review
cason Oct 24, 2022
fa701a9
spec: p2p v0.34, address book new intro
cason Oct 24, 2022
4045706
spec: p2p v0.34, address book buckets summary
cason Oct 24, 2022
85c714c
spec: p2p v0.34, peer manager, issue link
cason Oct 24, 2022
960a6f3
spec: p2p v0.34, fixing links
cason Oct 24, 2022
2a99a03
Merge branch 'main' into spec/p2p-v0.34
cason Oct 25, 2022
68b5890
Merge branch 'main' into spec/p2p-v0.34
cason Oct 25, 2022
2e24675
spec: p2p v0.34, addressing comments from reviews
cason Nov 1, 2022
7746da0
spec: p2p v0.34, addressing comments from reviews
cason Nov 1, 2022
31a4c1a
Apply suggestions from Jasmina's code review
cason Nov 1, 2022
2e8aa24
Merge branch 'main' into spec/p2p-v0.34
cason Nov 1, 2022
64ac975
spec: p2p v0.34, addressing comments from reviews
cason Nov 1, 2022
815fc79
Merge branch 'spec/p2p-v0.34' of github.com:tendermint/tendermint int…
cason Nov 1, 2022
3bd1f01
Apply suggestions from code review
jmalicevic Nov 2, 2022
7c09567
Apply suggestions from code review
cason Nov 2, 2022
b867be8
spec: p2p, v0.34, address book section reorganized
cason Nov 2, 2022
e897461
spec: p2p, v0.34, addressing review comments
cason Nov 2, 2022
3dc8f1d
Typos
jmalicevic Nov 2, 2022
e132fbb
Typo
jmalicevic Nov 2, 2022
1f8bff7
spec: p2p, v0.34, address book markbad
cason Nov 3, 2022
7dac9dc
Merge branch 'main' into spec/p2p-v0.34
cason Nov 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions spec/p2p/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ parent:
title: P2P
order: 6
---

# Peer-to-Peer Communication

The operation of the p2p adopted in production Tendermint networks is [HERE](./v0.34/).

> This is part of an ongoing [effort](https://github.com/tendermint/tendermint/issues/9089)
> to produce a high-level specification of the operation of the p2p layer.
72 changes: 72 additions & 0 deletions spec/p2p/v0.34/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Peer-to-Peer Communication

This document describes the implementation of the peer-to-peer (p2p)
communication layer in Tendermint.

It is part of an [effort](https://github.com/tendermint/tendermint/issues/9089)
to produce a high-level specification of the operation of the p2p layer adopted
in production Tendermint networks.

This documentation, therefore, considers the releases `0.34.*` of Tendermint, more
specifically, the branch [`v0.34.x`](https://github.com/tendermint/tendermint/tree/v0.34.x)
of this repository.

## Overview

A Tendermint network is composed of multiple Tendermint instances, hereafter
called **nodes**, that interact by exchanging messages.

Tendermint assumes a partially-connected network model.
This means that a node is not assumed to be directly connected to every other
node in the network.
Instead, each node is directly connected to a subset of other nodes in the
network, hereafter called its **peers**.

The peer-to-peer (p2p) communication layer is responsible for establishing
connections between nodes in a Tendermint network,
for managing the communication between a node and its peers,
and for intermediating the exchange of messages between peers in Tendermint protocols.

## Contents

The documentation follows the organization of the `p2p` package of Tendermint,
which implements the following abstractions:

- [Transport](./transport.md): establishes secure and authenticated
connections with peers;
- [Switch](./switch.md): responsible for dialing peers and accepting
connections from peers, for managing established connections, and for
routing messages between the reactors and peers,
that is, between local and remote instances of the Tendermint protocols;
- [Peer Exchange protocol](./pex-protocol.md): enables nodes to exchange
peer addresses, thus implementing a peer discovery service;
- [Address Book](./addressbook.md): stores discovered peer addresses and
quality metrics associated to peer with which the node has interacted;
- [Peer Manager](./peer_manager.md): defines when and to which peers a node
should dial, in order to establish outbound connections;
- [PEX Reactor](./pex.md): a reactor is the implementation of a protocol which
exchanges messages through the p2p layer. The PEX reactor manages the Address
Book and implements both the PEX protocol and the Peer Manager role.
cason marked this conversation as resolved.
Show resolved Hide resolved
- Finally, [Types](./types.md) and [Configuration](./configuration.md) provide
a list of existing types and configuration parameters used by the p2p layer implementation.

## Further References
cason marked this conversation as resolved.
Show resolved Hide resolved

Existing documentation referring to the p2p layer:

- https://github.com/tendermint/tendermint/tree/main/spec/p2p: p2p-related
configuration flags; overview of connections, peer instances, and reactors;
overview of peer discovery and node types; peer identity, secure connections
and peer authentication handshake.
- https://github.com/tendermint/tendermint/tree/main/spec/p2p/messages: message
types and channel IDs of Block Sync, Mempool, Evidence, State Sync, PEX, and
Consensus reactors.
- https://docs.tendermint.com/v0.34/tendermint-core: the p2p layer
configuration and operation is documented in several pages.
This content is not necessarily up-to-date, some settings and concepts may
refer to the release `v0.35`, that was [discontinued][v35postmorten].
- https://github.com/tendermint/tendermint/tree/master/docs/tendermint-core/pex:
peer types, peer discovery, peer management overview, address book and peer
ranking. This documentation refers to the release `v0.35`, that was [discontinued][v35postmorten].

[v35postmorten]: https://interchain-io.medium.com/discontinuing-tendermint-v0-35-a-postmortem-on-the-new-networking-layer-3696c811dabc