status-im/status-node-manager

Implement Waku Pairing Command

Closed this issue · 0 comments

Summary

The GUI app connects to the Status Node Manager through the Waku protocol. On the GUI side the user clicks on a "Connect to Node Manager" button in the GUI which generates a command that can be executed on the host where the SNM is installed. This will initiate the noise pairing process.

Pairing process

Out-of-band, a string representation of the QR code is passed to the SNM. When the user runs status-node-manager pair <QR>, the pairing procedure is initiated.

A CLI tool needs to be developed with the following functionality:

Decoding the QR

The initial step involves decoding the QR message, providing essential details such as the content topic for publishing handshake messages and other relevant information crucial for the handshake initiation.

Running a nwaku instance

To send and receive messages in the Waku network, we need to initiate a Waku instance. It should handle publishing and subscribing to the content topic extracted from the QR code.

Handshake

Once a node is started and successfully connected to peers, we are prepared to initiate the handshake procedure. This involves a sequence of steps, including sending and receiving messages from both sides. The protocol flow is detailed here.

Handshake finalization

Ultimately, a HandshakeResult becomes available, which is utilized for reading and writing Waku Noise messages during the noise session. Both sides should save representation of it in its local storage, so on every consecutive start-up, both sides immediately try to establish noise sessions with all of their persisted counterparties.

Sub-tasks