Skip to content

[P2P] Replace addressing via ServiceUrl/GenericParam with P2P routing #426

@deblasis

Description

@deblasis

Objective

Offload the business logic of message routing entirely to the P2P module

We currently connect nodes using the endpoint (host & port) captured in an actor's ServiceUrl, which is retrieved/set using the GenericParam field in the proto. See #313 for the source of this naming and grep for generic_param in the codebase to find its uses. By default, we configure nodes to list on port 8080.

Hosts, ports and endpoint logic/complexity should be encapsulated inside the P2P module. No other modules, or configurations files (e.g. geneis et al) should have any understanding of network routing other than cryptographic identities.

Origin Document

If you are taking on this task, make sure to read this discussion first: #403 (comment)

Goals

  • Encapsulate network routing business logic to the P2P module
  • Use cryptographic identities only for messaging, communication and configuration outside the P2P module
  • Set up the codebase for integration with libp2p

Deliverable

  • Address TODO (#426): in the codebase
  • Refactor related code accordingly. Including but not limited to:
    • Removing exposed P2P business logic (eg: ActorToNetworkPeer)

Non-goals / Non-deliverables

General issue deliverables

  • Update the appropriate CHANGELOG(s)
  • Update any relevant local/global README(s)
  • Update relevant source code tree explanations
  • Add or update any relevant or supporting mermaid diagrams

Testing Methodology

  • Task specific tests or benchmarks: make ...
  • New tests or benchmarks: make ...
  • All tests: make test_all
  • LocalNet: verify a LocalNet is still functioning correctly by following the instructions at docs/development/README.md

Creator: @deblasis
Co-Owners: @Olshansk

Metadata

Metadata

Labels

p2pP2P specific changes

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions