From a73a5689b09d662b53b2d56af9e425227fde0c50 Mon Sep 17 00:00:00 2001 From: Hodlinator <172445034+hodlinator@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:31:43 +0100 Subject: [PATCH] Replace lingering Testnet 3 references with Testnet 4 --- devguide/p2p_network.rst | 2 +- examples/intro.rst | 2 +- examples/testing.rst | 6 +++--- reference/p2p_networking.rst | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/devguide/p2p_network.rst b/devguide/p2p_network.rst index 66896cd..0547039 100644 --- a/devguide/p2p_network.rst +++ b/devguide/p2p_network.rst @@ -28,7 +28,7 @@ When started for the first time, programs don’t know the IP addresses of any a seed.bitcoin.sipa.be. 60 IN A 203.0.113.183 [...] -The DNS seeds are maintained by Bitcoin community members: some of them provide dynamic DNS seed servers which automatically get IP addresses of active nodes by scanning the `network <../devguide/p2p_network.html>`__; others provide static DNS seeds that are updated manually and are more likely to provide IP addresses for inactive nodes. In either case, nodes are added to the DNS seed if they run on the default Bitcoin ports of 8333 for mainnet or 18333 for testnet. +The DNS seeds are maintained by Bitcoin community members: some of them provide dynamic DNS seed servers which automatically get IP addresses of active nodes by scanning the `network <../devguide/p2p_network.html>`__; others provide static DNS seeds that are updated manually and are more likely to provide IP addresses for inactive nodes. In either case, nodes are added to the DNS seed if they run on the default Bitcoin ports of 8333 for mainnet or 48333 for testnet4. DNS seed results are not authenticated and a malicious seed operator or `network <../devguide/p2p_network.html>`__ `man-in-the-middle `__ attacker can return only IP addresses of nodes controlled by the attacker, isolating a program on the attacker’s own `network <../devguide/p2p_network.html>`__ and allowing the attacker to feed it bogus transactions and blocks. For this reason, programs should not rely on DNS seeds exclusively. diff --git a/examples/intro.rst b/examples/intro.rst index 0e7c8ba..91217db 100644 --- a/examples/intro.rst +++ b/examples/intro.rst @@ -7,7 +7,7 @@ Once installed, you’ll have access to three programs: ``bitcoind``, ``bitcoin- - ``bitcoin-qt`` provides a combination full Bitcoin peer and wallet frontend. From the Help menu, you can access a console where you can enter the `RPC <../reference/rpc/index.html>`__ commands used throughout this document. -- ``bitcoind`` is more useful for programming: it provides a full peer which you can interact with through `RPCs <../reference/rpc/index.html>`__ to port 8332 (or 18332 for testnet). +- ``bitcoind`` is more useful for programming: it provides a full peer which you can interact with through `RPCs <../reference/rpc/index.html>`__ to port 8332 (48332 for testnet4, 18443 for regtest, 38332 for signet). - ``bitcoin-cli`` allows you to send `RPC <../reference/rpc/index.html>`__ commands to ``bitcoind`` from the command line. For example, ``bitcoin-cli help`` diff --git a/examples/testing.rst b/examples/testing.rst index a02076c..119e9ef 100644 --- a/examples/testing.rst +++ b/examples/testing.rst @@ -6,14 +6,14 @@ Bitcoin Core provides testing tools designed to let developers test their applic Testnet ~~~~~~~ -When run with no arguments, all Bitcoin Core programs default to Bitcoin’s main `network <../devguide/p2p_network.html>`__ (:term:`mainnet `). However, for development, it’s safer and cheaper to use Bitcoin’s test `network <../devguide/p2p_network.html>`__ (testnet) where the satoshis spent have no real-world value. Testnet also relaxes some restrictions (such as standard transaction checks) so you can test functions which might currently be disabled by default on mainnet. +When run with no arguments, all Bitcoin Core programs default to Bitcoin’s main `network <../devguide/p2p_network.html>`__ (:term:`mainnet `). However, for development, it’s safer and cheaper to use Bitcoin’s test `network <../devguide/p2p_network.html>`__ (testnet4) where the satoshis spent have no real-world value. Testnet also relaxes some restrictions (such as standard transaction checks) so you can test functions which might currently be disabled by default on mainnet. -To use testnet, use the argument ``-testnet`` with ``bitcoin-cli``, ``bitcoind`` or ``bitcoin-qt`` or add ``testnet=1`` to your ``bitcoin.conf`` file as `described earlier <../examples/index.html>`__. To get free satoshis for testing, use `Piotr Piasecki’s testnet faucet `__. Testnet is a public resource provided for free by members of the community, so please don’t abuse it. +To use testnet, use the argument ``-testnet4`` with ``bitcoin-cli``, ``bitcoind`` or ``bitcoin-qt`` or add ``testnet4=1`` to your ``bitcoin.conf`` file as `described earlier <../examples/index.html>`__. To get free satoshis for testing, use `Piotr Piasecki’s testnet faucet `__. Testnet4 is a public resource provided for free by members of the community, so please don’t abuse it. Regtest Mode ~~~~~~~~~~~~ -For situations where interaction with random peers and blocks is unnecessary or unwanted, Bitcoin Core’s regression test mode (regtest mode) lets you instantly create a brand-new private block chain with the same basic rules as testnet—but one major difference: you choose when to create new blocks, so you have complete control over the environment. +For situations where interaction with random peers and blocks is unnecessary or unwanted, Bitcoin Core’s regression test mode (regtest mode) lets you instantly create a brand-new private block chain with the same basic rules as testnet4—but one major difference: you choose when to create new blocks, so you have complete control over the environment. Many developers consider regtest mode the preferred way to develop new applications. The following example will let you create a regtest environment after you first `configure bitcoind <../examples/index.html>`__. diff --git a/reference/p2p_networking.rst b/reference/p2p_networking.rst index 488ba3a..af9b856 100644 --- a/reference/p2p_networking.rst +++ b/reference/p2p_networking.rst @@ -10,19 +10,19 @@ All `peer-to-peer <../devguide/p2p_network.html>`__ communication occurs entirel Constants And Defaults ~~~~~~~~~~~~~~~~~~~~~~ -The following constants and defaults are taken from Bitcoin Core’s `chainparams.cpp `__ source code file. +The following constants and defaults are taken from Bitcoin Core’s `chainparams.cpp `__ source code file. +--------------------------------------------+--------------+------------------------------------------+------------+ | `Network <../devguide/p2p_network.html>`__ | Default Port | :term:`Start String ` | Max nBits | +============================================+==============+==========================================+============+ | Mainnet | 8333 | 0xf9beb4d9 | 0x1d00ffff | +--------------------------------------------+--------------+------------------------------------------+------------+ -| Testnet | 18333 | 0x0b110907 | 0x1d00ffff | +| Testnet | 48333 | 0x1c163f28 | 0x1d00ffff | +--------------------------------------------+--------------+------------------------------------------+------------+ | Regtest | 18444 | 0xfabfb5da | 0x207fffff | +--------------------------------------------+--------------+------------------------------------------+------------+ -Note: the testnet start string and nBits above are for testnet3; the original testnet used a different string and higher (less difficult) nBits. +Note: the testnet start string and nBits above are for testnet4; the original testnet used a different string and higher (less difficult) nBits. Command line parameters can change what port a node listens on (see ``-help``). Start strings are hardcoded constants that appear at the start of all messages sent on the Bitcoin `network <../devguide/p2p_network.html>`__; they may also appear in data files such as Bitcoin Core’s block database. The nBits displayed above are in big-endian order; they’re sent over the `network <../devguide/p2p_network.html>`__ in little-endian order.