non-default ports for automatic connections in Bitcoin P2P network



Summary:

ISPs can block the default port 8333 used by Bitcoin nodes, which poses a problem for those in countries that use basic methods to block connections, such as blocking domains and ports. To address this issue, a pull request was merged in October 2021 for Bitcoin Core that allows for non-default ports to be used for automatic connections. This was followed by another pull request in November 2021 that makes most of the changes required for non-default ports to work with automatic connections. While there were no major issues found during the review process, one reviewer did have some nits, including a discussion on the mailing list.The option to change the default port was added in May 2011 by Gavin Andresen after a user posted about issues with default port 8333 on bitcointalk in July 2010. In addition to this, the PowerShell script was written and tested on v22.0 and PR branch to ban all peers every 100 seconds using the default port and was found to work as expected. The default ports used in Bitcoin Core are 8333 (mainnet), 18333 (testnet), 18444 (regtest), and 38333 (signet).It is uncertain whether Satoshi considered the fact that 8333 in leet becomes 'beee' in plaintext when hardcoding the default port for Bitcoin. However, the bad ports list added in PR #23542 is still not clear.


Updated on: 2023-06-15T16:19:13.932908+00:00