Relay nodes for Android full node in clearnet mode #15
HenrikJannsen
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Any Bisq node which has enabled clearnet next to Tor can be used as a relay node for messages from clearnet to Tor or the other way round. By that we ensure that messages posted from the Android full-node mobile app which has is using clearnet reach all the normal Bisq apps running on Tor. For mobile apps using Tor that is not needed.
Background
The clearnet mobile app cannot be reached from outside as it does not accept inbound connections. Though it can connect to other clearnet nodes and that outbound connection is used to send gossip messages to the mobile node.
For private messages we usually send it end to end without using the gossip network. Only if the peer is not reachable (offline) we encrypt the message into a mailbox message and distribute it to the network. Once the peer receives the mailbox message they decrypt it, process it and remove it from the network. This mechanism designed for handling the off-line case works also as a relay mechanism if a message cannot be sent from one transport layer to another (e.g. clearnet <-> tor, or i2p <-> tor) of if one peer is not reachable via inbound connections.
Relay
Any Bisq 2 node can be a relay be setting the network config
supportedTransportTypes = ["TOR"]
tosupportedTransportTypes = ["CLEAR","TOR"]
, thus it use both transport layers and data received will be forwarded to both networks.We need a well known address for joining the network. This is done by the seed nodes, which are at least for the first start essential (user could pass custom known addresses as alternative). Currently the seed nodes (3 nodes atm) are Tor only, but as we need them anyway as introduction points we can enable clearnet on them, thus they can serve the mobile nodes.
It would be though better to have more relay nodes to improve resilience. There are several options:
Oracle nodes and seed nodes are bonded roles, thus they provide some protection against abuse of the meta data the relay learns (IP address of mobile user, mapping public messages, time correlation for mailbox messages).
Adding a new relay (only) node would raise the question if we should apply the requirement for a bond as well, and if so we need to integrate it as a new bonded role. I think it is easier and better to increase instead the number of seed nodes and potentially the oracle nodes (though those have higher op costs as they also run a bitcoin node and Bisq 1). Thus we would benefit from more resilience in those areas as well and it will not require extra dev efforts to add a new bonded role.
Of course any user can run a relay node as well thus increasing the clearnet network size and its resilience. Though those nodes a not well known addresses and not subject to bonding requirements.
Any such node can learn as well on the above mentioned data, thus the bon requirement for relay nodes need to be seen in that light as well. Thus it would justify to offer relay nodes operated by Bisq contributors without bond requirements.
We could mix those approaches and add more seed nodes and oracle nodes (maybe by the existing bond owners, thus it does not increase bond requirements) and add dedicated relay nodes from contributors and put all those addresses as well-known addresses for usage of the mobile app.
Beta Was this translation helpful? Give feedback.
All reactions