Skip to content

spec/p2p: Document the methods offered by the p2p layer to reactors #758

Closed

Description

@cason

Reactor is the generic name for a component that interacts with the p2p communication layer.

This issue aims to complement the documentation of the interaction between p2p layer and reactors introduced by #714, by focusing on the interface (methods) the p2p layer offers to a Reactor.

Once a Reactor registers with the p2p layer, it receives back from it a reference to the Switch, which is the main component of the p2p layer, with a vast interface. Some of the Switch methods can/should be used by reactors in order to control the operation of the p2p layer.

In addition, once a peer connects to the node, the p2p layer passes to all the registered reactors a Peer handle. This handler offers a number of methods with which the reactor can interact or configure the peer. The most important are the two sending methods, partially documented in the code and here.

Definition of done:

  • The documentation of the methods is more detailed and updated
  • The old documentation points to the new version of the documentation
  • Part of the operation of the documented methods, in particular the methods offered by Peer, are modeled using Quint

Activity

  1. changed the title [-]Document the methods offered by the P2P layer to reactors[/-] [+]spec/p2p: Document the methods offered by the p2p layer to reactors[/+] on Apr 25, 2023
  2. added
    spec
    on May 5, 2023
  3. added this to the 2023-Q2 milestone on May 5, 2023
  4. self-assigned this
    on May 5, 2023
  5. moved this from Todo to In Progress in CometBFT 2023on May 9, 2023
  6. linked a pull request that will close this issuespec/p2p: document the p2p API used by Reactors #851on May 17, 2023
  7. moved this from In Progress to Ready for Review in CometBFT 2023on May 30, 2023
  8. moved this from Ready for Review to Done in CometBFT 2023on Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

p2pspec

Type

No type

Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions