Drop testnet3 #31974

pull Sjors wants to merge 11 commits into bitcoin:master from Sjors:2025/03/testnet3 changing 37 files +63 −404
  1. Sjors commented at 4:22 pm on March 3, 2025: member

    Testnet3 was deprecated in v28 with the introduction of testnet4. It will be dropped in v30 or later, please discuss in #31975.

    There is no more [test] network section. The user is expected to set testnet4 explicitly, which should make future rotation of testnets easier.

    If a [test] or [testnet3] section is present in bitcoin.conf a warning is issued:

    0Warning: .../bitcoin.conf:18 Section [test] is not recognized.
    

    Starting with -testnet3 will be greeted with an error message:

    0Error: Testnet3 was dropped in version 30.0. Consider using '-testnet4' instead.
    

    This also prevents a fallback to mainnet.

    Starting with -test was already not possible with testnet3.

    Review hints:

    • make a (Windows) Guix build and test the (un)installer

    Guix hashes:

    0(todo)
    
  2. DrahtBot commented at 4:22 pm on March 3, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31974.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept ACK fjahr

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #34004 (Implementation of SwiftSync by rustaceanrob)
    • #33861 (build: Bump VS minimum supported version to 18.0 by hebasto)
    • #32966 (Silent Payments: Receiving by Eunovo)
    • #32427 ((RFC) kernel: Replace leveldb-based BlockTreeDB with flat-file based store by sedited)
    • #32317 (kernel: Separate UTXO set access from validation functions by sedited)
    • #29678 (Bugfix: Correct first-run free space checks by luke-jr)
    • #27260 (Enhanced error messages for invalid network prefix during address parsing. by portlandhodl)
    • #26201 (Remove Taproot activation height by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. instagibbs commented at 4:27 pm on March 3, 2025: member

    I’ve said it elsewhere, but I think it deserves a quite long deprecation cycle, along with some data gathering.

    We don’t want services not upgrading for fixes because their test environment would break.

    e.g., what exchanges with testnet environments have adopted testnet4 (or signet), much less would be ok with removing testnet3?

    Does btcd support it? LND? Eclaire? CLN? etc.

    Lots of work to be done here imo.

  4. Sjors commented at 4:30 pm on March 3, 2025: member

    I opened a separate RFC to discuss when to drop testnet3: #31975

    I can rebase this for a while if we decide v30 is too early.

  5. glozow added the label Tests on Mar 3, 2025
  6. fjahr commented at 8:04 pm on March 3, 2025: contributor
    Concept ACK
  7. Sjors force-pushed on Mar 3, 2025
  8. Sjors commented at 9:30 pm on March 3, 2025: member
    I split 5d6aa13cf047e31005afca919ca9cf181e30905b into smaller commits. If we decide to punt this until after v30 then I’ll PR some of these separately. E.g. there’s some tests that can use testnet4 instead of testnet3 and perhaps we can drop GUI support earlier.
  9. Sjors force-pushed on Mar 3, 2025
  10. DrahtBot added the label Needs rebase on Mar 4, 2025
  11. Sjors commented at 9:35 am on March 4, 2025: member
    Will rebase after #31649 is rebased.
  12. Sjors force-pushed on Mar 13, 2025
  13. DrahtBot removed the label Needs rebase on Mar 13, 2025
  14. Sjors force-pushed on Mar 14, 2025
  15. Sjors commented at 8:25 am on March 14, 2025: member
    Rebased after #31649.
  16. in test/functional/wallet_crosschain.py:23 in 795876cfc2 outdated
    19@@ -20,10 +20,7 @@ def skip_test_if_missing_module(self):
    20     def setup_network(self):
    21         self.add_nodes(self.num_nodes)
    22 
    23-        # Switch node 1 to testnet before starting it.
    24-        self.nodes[1].chain = 'testnet3'
    25-        self.nodes[1].extra_args = ['-maxconnections=0', '-prune=550'] # disable testnet sync
    26-        self.nodes[1].replace_in_config([('regtest=', 'testnet='), ('[regtest]', '[test]')])
    27+        # Node 1 is omitted, it was previously used with testnet3.
    


    maflcko commented at 8:47 am on March 14, 2025:

    This whole test seems a bit confusing, especially with this comment. The goal of the test is to check that a wallet doesn’t load cross-chain silently. It seems confusing to mention testnet3 and testnet4 here, but no other networks. Either, all test networks are tested, or only a single one. I’d argue that a single one should be sufficient.

    Thus, a clean revert of git show 74a04f9e7ad6a16988149cc3438b9ce13c91cdb9 ./test/functional/wallet_crosschain.py seems more appropriate. Then, a follow-up to use the most stable test chain (signet?) and add a comment that only one test chain needs to be checked. Possibly, even better would be to just use the main chain, but I am not sure if the diff is trivial.

    In any case, this change can probably be peeled off into a fresh/separate pull, because it makes sense on its own.


    Sjors commented at 9:15 am on March 14, 2025:
    I made a note to split this off, unless someone else gets to it first.

    Sjors commented at 8:31 am on March 18, 2025:
  17. in contrib/zmq/zmq_sub.py:37 in 795876cfc2 outdated
    33@@ -34,7 +34,7 @@
    34     print("This example only works with Python 3.5 and greater")
    35     sys.exit(1)
    36 
    37-port = 28332
    38+port = 48332
    


    yancyribbens commented at 6:31 pm on March 14, 2025:
    The wiki says the default port is 48333. Is this a typo?

    Sjors commented at 6:36 pm on March 14, 2025:

    48333 is the default p2p port

    48332 is used for RPC, which is not defined in the BIP because it’s specific to Bitcoin Core (as is ZMQ).

  18. Sjors force-pushed on Mar 19, 2025
  19. Sjors commented at 9:08 am on March 19, 2025: member

    Rebased after #32088 and #32057, which both simplify this PR.

    I split the first five commits off into #32096.

  20. in doc/bitcoin-conf.md:44 in 4e6e73a3b2 outdated
    40@@ -41,7 +41,7 @@ Comments may appear in two ways:
    41 ### Network specific options
    42 
    43 Network specific options can be:
    44-- placed into sections with headers `[main]` (not `[mainnet]`), `[test]` (not `[testnet]`, for testnet3), `[testnet4]`, `[signet]` or `[regtest]`;
    45+- placed into sections with headers `[main]` (not `[mainnet]`), `[testnet4]`, `[signet]` or `[regtest]`;
    


    hodlinator commented at 9:10 pm on March 24, 2025:

    Could this be part of #32096?

    Another part is probably better to change at least as early: https://github.com/bitcoin/bitcoin/blob/b3162d10ea93cdec8e04150289ff61d6fed9a8e9/doc/bitcoin-conf.md?plain=1#L27

    Probably better to use “regtest=1” or “signet=1”.


    Sjors commented at 8:22 am on March 25, 2025:

    This lists all the options available to the user, so I think it belongs here.

    I’ll look into your suggestion on the next rebase.


    Sjors commented at 8:17 am on April 2, 2025:
    Changed to signet=1, guess that could have gone into #32096.
  21. in contrib/linearize/example-linearize.cfg:12 in 4e6e73a3b2 outdated
     6@@ -7,9 +7,6 @@ host=127.0.0.1
     7 #mainnet default
     8 port=8332
     9 
    10-#testnet default
    11-#port=18332
    12-
    


    hodlinator commented at 9:12 pm on March 24, 2025:

    Noticed while looking at #32096 that this file was untouched there.

    Testnet3 has rpcport=18332 according to how chainparamsbase.cpp sets CBaseChainParams(..., rpc_port)… This config is setting the P2P ports for all networks so that they will collide with the default RPC ports and prevent successful startup (verified with the mainnet config line). Might as well just remove all ports IMO.


    Sjors commented at 8:08 am on April 2, 2025:
    I don’t really understand what this file is doing. Can you open a fresh PR to fix it?

    hodlinator commented at 2:59 pm on June 16, 2025:
    I was mistaken, this config file is meant to be consumed by the linearize-(hashes|data).py scripts, not bitcoind. Using port in this context is referring to which port the RPC interface is expected to be running on when one connects as a client. Please resolve this thread.
  22. in test/functional/feature_assumeutxo.py:106 in 4e6e73a3b2 outdated
    102@@ -103,7 +103,6 @@ def expected_error(msg):
    103         invalid_magics = [
    104             # magic, name, real
    105             [0xf9beb4d9, "main", True],
    106-            [0x0b110907, "test", True],
    


    hodlinator commented at 10:03 pm on March 24, 2025:

    Why not move this to #32096? (23607f605c3156ca904f704666f7cbe4808cf76b there touches the entry from the vaguely related MAGIC_BYTES).

    Why not have a “testnet4” entry?


    Sjors commented at 8:23 am on March 25, 2025:

    Indeed this should move.

    (it’s handy if you mention the commit when making a comment)

    We’ve only recently added a testnet4 snapshot, so maybe that’s why it wasn’t covered. I’ll add it in #32096.

  23. in src/kernel/chainparams.cpp:237 in 4e6e73a3b2 outdated
    220-        consensus.nMinerConfirmationWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing
    221-        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].bit = 28;
    222-        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nStartTime = Consensus::BIP9Deployment::NEVER_ACTIVE;
    223-        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
    224-        consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].min_activation_height = 0; // No activation delay
    225-
    


    hodlinator commented at 11:07 pm on March 24, 2025:

    (Inline thread in random position)

    nit: src/external_signer.h references “test” and never “testnet4” which seems to be the argument the code would be sending in.


    Sjors commented at 8:28 am on March 25, 2025:
    I assume you’re talking about the chain argument? This is passed directly to HWI (or equivalent software). I’ll update the comment on the next rebase to swap “test” for “testnet4” which was missed when testnet4 was launched.

    hodlinator commented at 9:31 am on March 25, 2025:
    Exactly, from what I could see it would be set from ArgsManager::GetChainTypeString() in one case and CChainParams::GetChainTypeString() in another.

    Sjors commented at 8:17 am on April 2, 2025:
    I changed it to say “test network”
  24. in src/kernel/chainparams.cpp:205 in 4e6e73a3b2 outdated
    190@@ -191,101 +191,6 @@ class CMainParams : public CChainParams {
    191     }
    192 };
    193 
    


    hodlinator commented at 10:11 am on March 25, 2025:

    (Inline comment at random position):

    Noticed doc/REST-interface.md still mentions testnet3 port: https://github.com/bitcoin/bitcoin/blob/4e6e73a3b2c5c3a4a07683bc3a6b59f8e27b78f3/doc/REST-interface.md?plain=1#L6-L7


    Sjors commented at 10:15 am on March 25, 2025:
    Speaking of things I’d like to delete entirely :-) (but won’t)

    Sjors commented at 8:17 am on April 2, 2025:
    Fixed
  25. ryanofsky referenced this in commit 80e47b1920 on Apr 1, 2025
  26. DrahtBot added the label Needs rebase on Apr 1, 2025
  27. Sjors force-pushed on Apr 2, 2025
  28. Sjors commented at 8:17 am on April 2, 2025: member
    Rebased after #32096.
  29. DrahtBot removed the label Needs rebase on Apr 2, 2025
  30. DrahtBot added the label Needs rebase on Apr 29, 2025
  31. Sjors force-pushed on Apr 30, 2025
  32. Sjors commented at 9:17 am on April 30, 2025: member

    Rebased after #29039.

    (moved conceptual question to #31975)

  33. DrahtBot removed the label Needs rebase on Apr 30, 2025
  34. DrahtBot added the label Needs rebase on Jun 10, 2025
  35. Sjors force-pushed on Jun 11, 2025
  36. Sjors commented at 8:13 am on June 11, 2025: member
    Trivial rebase after #24450.
  37. DrahtBot removed the label Needs rebase on Jun 11, 2025
  38. DrahtBot added the label CI failed on Jun 15, 2025
  39. DrahtBot removed the label CI failed on Jun 22, 2025
  40. Sjors force-pushed on Sep 3, 2025
  41. Sjors commented at 10:49 am on September 3, 2025: member
    Rebased after #33274.
  42. DrahtBot added the label Needs rebase on Sep 8, 2025
  43. Sjors force-pushed on Sep 8, 2025
  44. Sjors commented at 12:51 pm on September 8, 2025: member
    Rebased after #33283.
  45. DrahtBot removed the label Needs rebase on Sep 8, 2025
  46. DrahtBot added the label Needs rebase on Oct 23, 2025
  47. Sjors force-pushed on Oct 24, 2025
  48. Sjors commented at 10:36 am on October 24, 2025: member
    Trivial rebase after #32579 (touching chainparams.cpp).
  49. DrahtBot removed the label Needs rebase on Oct 24, 2025
  50. DrahtBot added the label Needs rebase on Nov 25, 2025
  51. doc: use "test nework" in external_signer.h d9894644a0
  52. doc: use signet=1 in bitcoin-conf.md example 836313fa38
  53. gui: drop testnet3 572997cbb1
  54. test: drop testnet3 coverage
    Except for the deprecation warning in feature_config_args.py.
    This test now writes its own config file, which was previously done by
    test_acceptstalefeeestimates_arg_support.
    
    The deprecation warning test will be removed in a later commit.
    5761dfe40f
  55. Disallow -testnet3
    Abort node startup and inform user they should use -testnet4.
    Modify the deprecation message test to cover this.
    
    Remove testnet3 references from bitcoin-cli documentation
    and bash helper.
    4ab8a8ca54
  56. Drop testnet3 seed nodes 8c2d62b1f9
  57. Drop testnet3 from docs and dev tools
    Also use "test network" instead of "testnet" where appropriate (e.g.
    because it also applies to signet).
    efb1031185
  58. Sjors force-pushed on Dec 9, 2025
  59. kernel: drop testnet3 027f3cf628
  60. consensus: drop testnet3
    This drops the chain parameters and ChainType::TESTNET.
    f4d968a002
  61. validation: drop testnet3 comment about BIP34 ef58db17f9
  62. doc: add release note 32297529b3
  63. Sjors force-pushed on Dec 9, 2025
  64. DrahtBot added the label CI failed on Dec 9, 2025
  65. DrahtBot commented at 10:21 am on December 9, 2025: contributor

    🚧 At least one of the CI tasks failed. Task Windows-cross to x86_64, ucrt: https://github.com/bitcoin/bitcoin/actions/runs/20059296558/job/57531948130 LLM reason (✨ experimental): Compilation failed: TestNet is not a member of CChainParams in bitcoinkernel.cpp.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  66. Sjors commented at 10:22 am on December 9, 2025: member
    Rebased after #30595 and #33702.
  67. DrahtBot removed the label Needs rebase on Dec 9, 2025
  68. DrahtBot removed the label CI failed on Dec 9, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-12 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me