bee
bee copied to clipboard
Better peer connection status
A node operator is currently unaware that there might be a problem with a peer connection if he is only seeing a partial status of that connection to the peer. If the incoming connection is blocked via NAT or UFW then the connection becomes inconsistent and problematic. As an additional proposal we should enhance libp2p and Hornet/Bee to detect the four states of connection:
- No connection
- Incoming Only
- Outgoing Only
- Full Bi-directional connection
We could then represent on the dashboard via icons a better state of the connection with the peer. Below I have provided a crude example that can be refined. The example also shows the synced status as a separate icon which I believe is necessary to avoid confusion. Also the main dashboard could have only one icon to summarize the peer state and the peer detail card could have more detailed connection state and synced state.
This issue also corresponds to Hornet issue: https://github.com/gohornet/hornet/issues/841
Example
I wonder what you mean with the states 2 and 3. A fully(!!) negotiated connection is always bi-directional (4). Before the last major bee-network update, there was an issue with Bee not understanding Hornets Identify
protocol during the negotiation phase, hence Bee didn't answer correctly, and Hornet would abort the connection attempt. The other direction however worked, because Bee didn't require Hornet to identify itself, and Hornet doesn't enforce being asked to identify itself. But again - when and if the negotiation phase succeeds - data can always be shipped both ways.
okay, I thought about it more....I guess I understand what you mean. You want to symbolify (that's not a word, is it?), whether both peers can successfully dial each other? Sometimes only one direction works because of NAT/firewall, but I think many people would falsely assume that the arrows would mean data flow. Wdyt?
I would represent it in the way that is clear to the node owner and dev's that it's a partially working connection and what side the error is on. My example is just my best guess at a way. Perhaps arrows are not the best symbology (that's not a word either) for this.