doc, chainparams: 29775 release notes and follow-ups #30604

pull fjahr wants to merge 4 commits into bitcoin:master from fjahr:2024-08-t4-follow-up changing 4 files +28 −3
  1. fjahr commented at 7:40 pm on August 7, 2024: contributor

    This completes follow-ups left open in #29775.

    • Adds release notes
    • Addresses the misalignment in deprecation warnings and hints at the intention to remove support for Testnet3.
    • Adds initial minimum chainwork for Testnet4.
    • Use the MAX_TIMEWARP constant as the timewarp defense delta, equal to MAX_FUTURE_BLOCK_TIME.
  2. chainparams: Add initial minimum chain work for Testnet4
    This chainwork was observed at height 38487.
    1163b08378
  3. DrahtBot commented at 7:41 pm on August 7, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK tdb3, Sjors, achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label CI failed on Aug 7, 2024
  5. in src/chainparamsbase.cpp:20 in aebb571fe4 outdated
    16@@ -17,7 +17,7 @@ void SetupChainParamsBaseOptions(ArgsManager& argsman)
    17     argsman.AddArg("-regtest", "Enter regression test mode, which uses a special chain in which blocks can be solved instantly. "
    18                  "This is intended for regression testing tools and app development. Equivalent to -chain=regtest.", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::CHAINPARAMS);
    19     argsman.AddArg("-testactivationheight=name@height.", "Set the activation height of 'name' (segwit, bip34, dersig, cltv, csv). (regtest-only)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
    20-    argsman.AddArg("-testnet", "Use the testnet3 chain. Equivalent to -chain=test. Support for testnet3 is deprecated and will be removed with the next release. Consider moving to testnet4 now by using -testnet4.", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
    21+    argsman.AddArg("-testnet", "Use the testnet3 chain. Equivalent to -chain=test. Support for testnet3 is deprecated and will be removed in an upcoming release (current target v30). Consider moving to testnet4 now by using -testnet4.", ArgsManager::ALLOW_ANY, OptionsCategory::CHAINPARAMS);
    


    tdb3 commented at 3:29 pm on August 8, 2024:
    I’m partial to omitting a specific release number (e.g. and maybe including it just in release notes instead), but It’s not something I feel super strongly about.

    fjahr commented at 8:19 pm on August 8, 2024:
    Sigh, I guess several people feel this way, so I have removed it now.
  6. in src/init.cpp:920 in d9e486a2a0 outdated
    916@@ -917,7 +917,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
    917 
    918     // Testnet3 deprecation warning
    919     if (chain == ChainType::TESTNET) {
    920-        LogInfo("Warning: Support for testnet3 is deprecated and will be removed in an upcoming release. Consider switching to testnet4.\n");
    921+        LogInfo("Warning: Support for testnet3 is deprecated and will be removed in an upcoming release (current target v30). Consider switching to testnet4.\n");
    


    tdb3 commented at 3:38 pm on August 8, 2024:

    Looks like feature_config_args.py needs to be updated to reflect the updated log. Something like:

     0diff --git a/test/functional/feature_config_args.py b/test/functional/feature_config_args.py
     1index bb20e2baa85..201112ba0d5 100755
     2--- a/test/functional/feature_config_args.py
     3+++ b/test/functional/feature_config_args.py
     4@@ -378,7 +378,7 @@ class ConfArgsTest(BitcoinTestFramework):
     5 
     6     def test_testnet3_deprecation_msg(self):
     7         self.log.info("Test testnet3 deprecation warning")
     8-        t3_warning_log = "Warning: Support for testnet3 is deprecated and will be removed in an upcoming release. Consider switching to testnet4."
     9+        t3_warning_log = "Warning: Support for testnet3 is deprecated and will be removed in an upcoming release (current target v30). Consider switching to testnet4."
    10 
    11         def warning_msg(node, approx_size):
    12             return f'Warning: Disk space for "{node.datadir_path / node.chain / "blocks" }" may not accommodate the block files. Approximately {approx_size} GB of data will be stored in this directory.'
    

    fjahr commented at 8:19 pm on August 8, 2024:
    Automatically fixed since I have removed the version reference.
  7. tdb3 commented at 3:38 pm on August 8, 2024: contributor
    Concept ACK
  8. fjahr renamed this:
    doc, chainparams: 29775 follow-ups
    doc, chainparams: 29775 release notes and follow-ups
    on Aug 8, 2024
  9. fjahr force-pushed on Aug 8, 2024
  10. fjahr commented at 8:21 pm on August 8, 2024: contributor
    Removed reference to a specific version in the deprecation warning and addressed @Sjors comment by using the MAX_FUTURE_BLOCK_TIME explicitly as the timewarp defense delta.
  11. DrahtBot removed the label CI failed on Aug 8, 2024
  12. tdb3 commented at 10:05 pm on August 8, 2024: contributor
    Approach ACK The commit message of f2f3d802c9dbc096808dca8924501ca90081d813 can be updated to remove “and mention v30 target”
  13. doc: Align deprecation warnings f7cc97313b
  14. doc: Add release notes for 29775 4b2fad502e
  15. fjahr force-pushed on Aug 8, 2024
  16. fjahr commented at 10:09 pm on August 8, 2024: contributor

    The commit message of f2f3d80 can be updated to remove “and mention v30 target”

    Fixed

  17. tdb3 approved
  18. tdb3 commented at 10:10 pm on August 8, 2024: contributor
    ACK 35ad61a6bde14a74cc07dc8ecf3bb1cd49590e46
  19. in src/validation.cpp:4191 in 35ad61a6bd outdated
    4187@@ -4188,7 +4188,7 @@ static bool ContextualCheckBlockHeader(const CBlockHeader& block, BlockValidatio
    4188         // Check timestamp for the first block of each difficulty adjustment
    4189         // interval, except the genesis block.
    4190         if (nHeight % consensusParams.DifficultyAdjustmentInterval() == 0) {
    4191-            if (block.GetBlockTime() < pindexPrev->GetBlockTime() - 60 * 60 * 2) {
    4192+            if (block.GetBlockTime() < pindexPrev->GetBlockTime() - MAX_FUTURE_BLOCK_TIME) {
    


    Sjors commented at 7:06 am on August 9, 2024:

    35ad61a6bde14a74cc07dc8ecf3bb1cd49590e46: let’s define a separate constant and make it clear these are different but related:

     0/**
     1 * Maximum number of seconds that the timestamp of the first
     2 * block of a difficulty adjustment period is allowed to
     3 * be earlier than the last block of the previous period (BIP94).
     4 */
     5static constexpr int64_t MAX_TIMEWARP{MAX_FUTURE_BLOCK_TIME};
     6
     7/**
     8 * If the timestamp of the last block in a difficulty period is set
     9 * MAX_FUTURE_BLOCK_TIME seconds in the future, an honest miner should
    10 * be able to mine the first block using the current time. This is not
    11 * a consensus rule, but changing MAX_TIMEWARP should be done with caution.
    12 */
    13static_assert(MAX_FUTURE_BLOCK_TIME <= MAX_TIMEWARP);
    

    (I’m less sure about having the static_assert and its documentation in our codebase)

    See ongoing discussion in https://github.com/bitcoin/bips/pull/1658


    Sjors commented at 7:16 am on August 9, 2024:
    And see #30614, but that should probably be its own followup.

    fjahr commented at 12:37 pm on August 9, 2024:

    let’s define a separate constant

    done


    fjahr commented at 12:42 pm on August 9, 2024:

    And see #30614, but that should probably be its own followup.

    Agree, it seems that we currently have the safer option given we don’t really know what other mining software is doing (at least that’s my feeling). If we do still get consensus on tightening the limit we can do that in another follow-up in the next two weeks but it shouldn’t hold up this PR here.

  20. in src/kernel/chainparams.cpp:337 in 1163b08378 outdated
    333@@ -334,7 +334,7 @@ class CTestNet4Params : public CChainParams {
    334         consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].nTimeout = Consensus::BIP9Deployment::NO_TIMEOUT;
    335         consensus.vDeployments[Consensus::DEPLOYMENT_TAPROOT].min_activation_height = 0; // No activation delay
    336 
    337-        consensus.nMinimumChainWork = uint256{};
    338+        consensus.nMinimumChainWork = uint256{"000000000000000000000000000000000000000000000056faca98a0cd9bdf5f"};
    


    Sjors commented at 7:31 am on August 9, 2024:
    1163b08378a50a9be00ced434d55f1b04bc9dea6: I get the same value
  21. Sjors commented at 7:31 am on August 9, 2024: member
    ACK 35ad61a6bde14a74cc07dc8ecf3bb1cd49590e46 modulo the above comment
  22. validation: Use MAX_TIMEWARP constant as testnet4 timewarp defense delta
    The value is equal to MAX_FUTURE_BLOCK_TIME.
    92c1d7d1f8
  23. fjahr force-pushed on Aug 9, 2024
  24. fjahr commented at 12:38 pm on August 9, 2024: contributor
    Addressed @Sjors feedback and introduced a separate constant MAX_TIMEWARP.
  25. tdb3 approved
  26. tdb3 commented at 1:52 pm on August 9, 2024: contributor
    re ACK 92c1d7d1f8664fe2d259cc609c87f603609b2b60 The new constant adds clarity.
  27. DrahtBot requested review from Sjors on Aug 9, 2024
  28. Sjors commented at 2:11 pm on August 9, 2024: member
    ACK 92c1d7d1f8664fe2d259cc609c87f603609b2b60
  29. achow101 added this to the milestone 28.0 on Aug 9, 2024
  30. achow101 commented at 4:45 pm on August 9, 2024: member
    ACK 92c1d7d1f8664fe2d259cc609c87f603609b2b60
  31. achow101 merged this on Aug 9, 2024
  32. achow101 closed this on Aug 9, 2024


fjahr DrahtBot tdb3 Sjors achow101


Sjors

Milestone
28.0


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: 2024-10-30 00:12 UTC

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