Drop testnet3 #31974

pull Sjors wants to merge 10 commits into bitcoin:master from Sjors:2025/03/testnet3 changing 34 files +62 −430
  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 react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32080 (OP_CHECKCONTRACTVERIFY by bigspider)
    • #29678 (Bugfix: Correct first-run free space checks by luke-jr)
    • #29039 (versionbits refactoring by ajtowns)
    • #28676 ([WIP] Cluster mempool implementation by sdaftuar)
    • #28201 (Silent Payments: sending by josibake)
    • #28122 (Silent Payments: Implement BIP352 by josibake)
    • #27260 (Enhanced error messages for invalid network prefix during address parsing. by russeree)
    • #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?
  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:225 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:193 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. doc: use "test nework" in external_signer.h 834f8372dc
  28. doc: use signet=1 in bitcoin-conf.md example 9abe0d4abb
  29. gui: drop testnet3 7536be28ba
  30. 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.
    5cb1738951
  31. 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.
    902f6af2be
  32. Drop testnet3 seed nodes 6125f46e14
  33. Drop testnet3 from docs and dev tools
    Also use "test network" instead of "testnet" where appropriate (e.g.
    because it also applies to signet).
    78a53c79ed
  34. consensus: drop testnet3
    This drops the chain parameters and ChainType::TESTNET.
    b038fa4493
  35. validation: drop testnet3 comment about BIP34 0f6e77b713
  36. doc: add release note e402cf241a
  37. Sjors force-pushed on Apr 2, 2025
  38. Sjors commented at 8:17 am on April 2, 2025: member
    Rebased after #32096.
  39. DrahtBot removed the label Needs rebase on Apr 2, 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-04-16 18:12 UTC

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