forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1
I2P ports doc
Vasil Dimov edited this page Jul 2, 2021
·
4 revisions
Bitcoin Core uses the SAM v3.1 protocol. One particularity of SAM 3.1 is that it does not support ports, unlike newer versions of SAM (3.2 and up) that do support them and default the port numbers to 0. From the point of view of peers that use newer versions of SAM or other protocols that support ports, a SAM 3.1 peer is connecting to them on port 0, from source port 0.
To allow future upgrades to newer versions of SAM, Bitcoin Core sets its listening port to 0 when listening for incoming I2P connections and advertises its own I2P address with port 0. Furthermore, it will not attempt to connect to I2P addresses with a non-zero port number because it knows that, under the hood, it can only connect to I2P services on port 0.