Skip to content

[P2P] Implement KISS peer discovery for LocalNet #416

@deblasis

Description

@deblasis

Objective

Ensure that the debug client is capable of broadcasting / sending messages to the LocalNet nodes even after the ValidatorMap (which contained the addresses of the nodes, sourced from the genesis) has been sunset.

Origin Document

Since #203 and #331 replace ValidatorMap with dynamic actor fetching from the persistence layer based on the Node's current height, the debug client needs a mechanism to discover the entire local set of peers regardless of the address book each individual node has.

This leads us to the first real use-case for peer-discovery.

Goals

  • Design and implement a way for gathering the current (i.e. at the current height) validator set of addresses from the point of view of the debug client or another node that intends to join the network.

Deliverable

  • Functioning LocalNet without a hardcoded set of validatorAddresses
  • Updated RPC to exposes a new endpoint that returns the addresses of the staked validators known to the node the client is connected to
  • Bonus: allow a graphical and/or CLI based way for inspecting the addressBook for development and debugging purposes

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

  • New tests: Documentation (e.g. video) showing the usage & functionality of the new RPC in action
  • 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

Assignees

Labels

p2pP2P specific changes

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions