Skip to content

spec/p2p: Document execution flows for establishing connections #601

Open

Description

@cason

The primary goal of the P2P layer is to establish connection with peers in order to exchange messages with them. This issue should individuate and document every possible execution flow that results in an established connection.

Most of the steps associated to connection establishment are documented as part of tendermint/tendermint#9089. The produced documentation, however, fails to provide an easy-to-follow overview of how these steps are combined, i.e. the execution flows that result in a new connection being established with a peer, or in an error to be logged by the node. A factor that complicates this description is the dispersion of individual steps across multiple components: Switch, Transport, PEX reactor, Node, etc.

This documentation could thus enable:

  • Improvements in the P2P logging
  • Some low-risk P2P refactoring efforts

Definition of Done

The following execution flows should be covered:

  • Accepting a connection and adding an inbound peer
  • Dialing a peer address and adding an outbound peer (regular and expedite mode)
  • Dialing the configured seed nodes and retrieving peer addresses via PEX protocol
  • Establishing connections to configured persistent peers, plus reconnecting procedure
  • (Optional) Manually dialing and configuring peer addresses via unsafe RPC calls
  • (Optional) Connection establishment and management in nodes operating in seed mode

Activity

  1. changed the title [-]spe/p2p: Document execution flows for establishing connections[/-] [+]spec/p2p: Document execution flows for establishing connections[/+] on Mar 28, 2023
  2. self-assigned this
    on Mar 28, 2023
  3. added
    spec
    on Mar 28, 2023
  4. added this to the 2023-Q2 milestone on Apr 12, 2023
  5. removed this from the 2023-Q2 milestone on May 5, 2023
  6. cason commented on Jun 1, 2023

    @cason
    Author

    Link here the knowledge-base spec in Quint.

  7. removed their assignment
    on Jun 1, 2023
  8. cason commented on Jun 16, 2023

    @cason
    Author

    Link here the knowledge-base spec in Quint.

    Added: cometbft/knowledge-base@443dafc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p2pspec

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions