github.com/aakash4dev/cometbft@v0.38.2/spec/p2p/implementation/README.md (about)

     1  # Implementation of the p2p layer
     2  
     3  This section documents the implementation of the peer-to-peer (p2p)
     4  communication layer in CometBFT.
     5  
     6  The documentation was [produced](https://github.com/tendermint/tendermint/pull/9348)
     7  using the `v0.34.*` releases
     8  and the branch [`v0.34.x`](https://github.com/aakash4dev/cometbft/tree/v0.34.x)
     9  of this repository as reference.
    10  As there were no substancial changes in the p2p implementation, the
    11  documentation also applies to the releases `v0.37.*` and `v0.38.*` [^v35].
    12  
    13  [^v35]: The releases `v0.35.*` and `v0.36.*`, which included a major
    14    refactoring of the p2p layer implementation, were [discontinued][v35postmorten].
    15  
    16  [v35postmorten]: https://interchain-io.medium.com/discontinuing-tendermint-v0-35-a-postmortem-on-the-new-networking-layer-3696c811dabc
    17  
    18  ## Contents
    19  
    20  The documentation follows the organization of the
    21  [`p2p` package](https://github.com/aakash4dev/cometbft/tree/v0.34.x/p2p),
    22  which implements the following abstractions:
    23  
    24  - [Transport](./transport.md): establishes secure and authenticated
    25     connections with peers;
    26  - [Switch](./switch.md): responsible for dialing peers and accepting
    27     connections from peers, for managing established connections, and for
    28     routing messages between the reactors and peers,
    29     that is, between local and remote instances of the CometBFT protocols;
    30  - [PEX Reactor](./pex.md): due to the several roles of this component, the
    31    documentation is split in several parts:
    32      - [Peer Exchange protocol](./pex-protocol.md): enables nodes to exchange peer addresses, thus implementing a peer discovery service;
    33      - [Address Book](./addressbook.md): stores discovered peer addresses and
    34    quality metrics associated to peers with which the node has interacted;
    35      - [Peer Manager](./peer_manager.md): defines when and to which peers a node
    36    should dial, in order to establish outbound connections;
    37  - [Types](./types.md) and [Configuration](./configuration.md) provide a list of
    38    existing types and configuration parameters used by the p2p package.