Skip to content

Remove the gateway's RelayNode RPC

Christopher Schinnerl requested to merge relaynode-fix into v061

Created by: VoidingWarranties

The RelayNode RPC allowed any node to add an arbitrary address to the node list of any other node. Even worse, nodes would re-broadcast this new node and so it would quickly propagate across the network. This could be abused by an attacker to maliciously pollute the node lists of all nodes on the network (an eclipse attack).

Now nodes share their port on connect so that the receiving node can add the connecting node to its node list and connect back to them later.

A notable feature necessitated by this change is that inbound connections now store the peer's dialback address instead of the actual conn.RemoteAddr(), and therefore siac gateway list will show the dialable address of inbound peers.

Also some miscellaneous cleanup.

Merge request reports