Remove Taproot BIP 9 deployment #26201

pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:2022/09/taproot-demarcation-height changing 8 files +23 −63
  1. Sjors commented at 11:16 am on September 29, 2022: member

    Drop DEPLOYMENT_TAPROOT from consensus.vDeployments.

    Now that the commit (https://github.com/bitcoin/bitcoin/commit/7c08d81e119570792648fe95bbacddbb1d5f9ae2) which changes taproot to be enforced for all blocks is included in v24.0, it seems a good time to remove no longer needed non-consensus code.

    Clarify what is considered a BuriedDeployment.

    We drop taproot from getdeploymentinfo RPC, rather than mark it as buried, because this is not a buried deployment in the sense of BIP 90. This is because the activation height has been completely removed from the code, unlike the hardcoded DEPLOYMENT_SEGWIT height which is still relied on.1

    See discussion in #24737 and #26162.


    1. DEPLOYMENT_SEGWIT is used in IsBlockMutated to determine if witness data is allowed, it’s used for BIP147, to trigger NeedsRedownload() for users who upgraded after a decade, and for a few other things. ↩︎

  2. DrahtBot commented at 2:34 pm on September 30, 2022: 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/26201.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK ajtowns, sedited
    Concept ACK l0rinc, darosior
    Approach ACK jonatack

    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:

    • #34677 (kernel: Chainparams and headerssync updates pre-31.0 by achow101)
    • #34049 (rpc: Disallow captures in RPCMethodImpl by ajtowns)

    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. luke-jr commented at 2:04 pm on October 2, 2022: member
    Concept ~0, but I object the claim in general that commits “sufficiently buried by other commits, and thus less likely to be reverted”. Git isn’t PoW, and “burying” commits does not make them less likely to be reverted.
  4. Sjors commented at 9:22 am on October 3, 2022: member
    @luke-jr changed the wording to “is (probably) included in v24.0”.
  5. ajtowns commented at 3:47 am on October 8, 2022: contributor
    This should be updating MinBIP9WarningHeight above the taproot activation height (otherwise you should see "warnings": "Unknown new rules activated (versionbit 2)" due to miner signalling)
  6. Sjors force-pushed on Nov 1, 2022
  7. Sjors commented at 9:41 am on November 1, 2022: member
    @ajtowns done
  8. in src/consensus/params.h:99 in 8f96e52405 outdated
     95@@ -94,7 +96,7 @@ struct Params {
     96      * BIP 16 exception blocks. */
     97     int SegwitHeight;
     98     /** Don't warn about unknown BIP 9 activations below this height.
     99-     * This prevents us from warning about the CSV and segwit activations. */
    100+     * This prevents us from warning about the CSV,segwit and taproot activations. */
    


    maflcko commented at 9:48 am on November 1, 2022:
    0     * This prevents us from warning about the CSV, segwit and taproot activations. */
    

    nit

  9. in doc/release-notes-26201.md:4 in 8f96e52405 outdated
    0@@ -0,0 +1,5 @@
    1+RPC
    2+---
    3+
    4+- 'taproot' has been removed from 'getdeploymentinfo', rather than marked as buried,
    


    maflcko commented at 9:49 am on November 1, 2022:
    0- 'taproot' has been removed from 'getdeploymentinfo',
    

    nit: I think release notes should describe changes, not provide extended discussion about alternatives

  10. Sjors force-pushed on Nov 1, 2022
  11. Sjors force-pushed on Nov 1, 2022
  12. DrahtBot added the label Needs rebase on Mar 16, 2023
  13. achow101 commented at 3:23 pm on April 25, 2023: member
    Are you still working on this?
  14. Sjors commented at 2:12 pm on May 8, 2023: member
    I’ll rebase soon(tm).
  15. in src/deploymentinfo.cpp:19 in 20ef70f750 outdated
    10@@ -11,10 +11,6 @@ const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_B
    11         /*.name =*/ "testdummy",
    12         /*.gbt_force =*/ true,
    13     },
    14-    {
    15-        /*.name =*/ "taproot",
    16-        /*.gbt_force =*/ true,
    17-    },
    


    luke-jr commented at 0:54 am on July 27, 2023:
    This will need aRules in rpc/mining.cpp updated
  16. luke-jr changes_requested
  17. Sjors force-pushed on Aug 18, 2023
  18. Sjors force-pushed on Aug 18, 2023
  19. in src/rpc/mining.cpp:866 in 7fb3287fd1 outdated
    860@@ -861,7 +861,10 @@ static RPCHelpMan getblocktemplate()
    861 
    862     UniValue aRules(UniValue::VARR);
    863     aRules.push_back("csv");
    864-    if (!fPreSegWit) aRules.push_back("!segwit");
    865+    if (!fPreSegWit) {
    866+        aRules.push_back("!segwit");
    867+        aRules.push_back("!taproot");
    


    Sjors commented at 10:30 am on August 18, 2023:

    @luke-jr like this?

    This will need aRules in rpc/mining.cpp updated


    Sjors commented at 10:50 am on August 18, 2023:

    Oh wait, without !

    I’ll push a fix and add a test…

    Before and after this change it should be:

    0bitcoin-cli getblocktemplate '{"rules": ["segwit"]}' | jq '.rules'
    1[
    2  "csv",
    3  "!segwit",
    4  "taproot"
    5]
    
  20. DrahtBot removed the label Needs rebase on Aug 18, 2023
  21. Sjors force-pushed on Aug 18, 2023
  22. Sjors commented at 11:12 am on August 18, 2023: member
    Rebased after kernel changes. Fixed a regression in getblocktemplate’s rules result, and added a test for tit.
  23. in src/rpc/mining.cpp:951 in b5d8ddbcb9 outdated
    859@@ -860,8 +860,14 @@ static RPCHelpMan getblocktemplate()
    860     result.pushKV("capabilities", aCaps);
    861 
    862     UniValue aRules(UniValue::VARR);
    863+    // See getblocktemplate changes in BIP 9:
    864+    // ! indicates a more subtle change to the block structure or generation transaction
    865+    // Otherwise clients may assume the rule will not impact usage of the template as-is.
    866     aRules.push_back("csv");
    867-    if (!fPreSegWit) aRules.push_back("!segwit");
    868+    if (!fPreSegWit) {
    


    Sjors commented at 11:16 am on August 18, 2023:
    In #27433 I propose getting rid of fPreSegWit.

    maflcko commented at 8:17 am on June 19, 2025:
    this was #31625, but then closed

    Sjors commented at 9:12 am on June 19, 2025:
    Indeed it was split out from #27433 into its own PR #31625, which after some discussion I marked up for grabs.
  24. DrahtBot added the label CI failed on Sep 12, 2023
  25. DrahtBot removed the label CI failed on Sep 13, 2023
  26. DrahtBot added the label Needs rebase on Oct 9, 2023
  27. Sjors commented at 2:41 pm on October 9, 2023: member
    Rebased after #28591.
  28. Sjors force-pushed on Oct 9, 2023
  29. DrahtBot removed the label Needs rebase on Oct 9, 2023
  30. in src/consensus/params.h:35 in db4344fa9c outdated
    32 };
    33 constexpr bool ValidDeployment(BuriedDeployment dep) { return dep <= DEPLOYMENT_SEGWIT; }
    34 
    35 enum DeploymentPos : uint16_t {
    36     DEPLOYMENT_TESTDUMMY,
    37-    DEPLOYMENT_TAPROOT, // Deployment of Schnorr/Taproot (BIPs 340-342)
    


    maflcko commented at 2:43 pm on October 20, 2023:
    Maybe add a note here that removing an entry may require bumping MinBIP9WarningHeight?

    Sjors commented at 7:38 am on October 23, 2023:
    Added. IIUC the WarningBitsConditionChecker uses ComputeBlockVersion (also used by the miner), which in turn uses VersionBitsConditionChecker, which uses vDeployments to determine if a softfork is STARTED or LOCKED_IN. If so it won’t issue the warning. This logic is rather convoluted…
  31. Sjors force-pushed on Oct 23, 2023
  32. DrahtBot added the label CI failed on Oct 23, 2023
  33. DrahtBot removed the label CI failed on Oct 26, 2023
  34. barrystyle referenced this in commit 6eb671c734 on Dec 16, 2023
  35. Sjors force-pushed on Jan 9, 2024
  36. Sjors commented at 9:06 am on January 9, 2024: member
    Rebased because #27433 needed it.
  37. DrahtBot added the label CI failed on Jan 14, 2024
  38. Sjors force-pushed on Feb 13, 2024
  39. DrahtBot removed the label CI failed on Feb 13, 2024
  40. DrahtBot added the label Needs rebase on Mar 5, 2024
  41. Sjors force-pushed on Mar 7, 2024
  42. Sjors commented at 10:36 am on March 7, 2024: member

    Rebased due to (trivial) merge conflict after #29547.

    I should also point out that Silent Payments makes use of the Taproot activation height (e.g. for a more efficient indexer), but I don’t think that’s a good reason to keep these consensus params around.

  43. DrahtBot removed the label Needs rebase on Mar 7, 2024
  44. Sjors force-pushed on May 30, 2024
  45. DrahtBot added the label CI failed on May 30, 2024
  46. DrahtBot removed the label CI failed on May 30, 2024
  47. DrahtBot added the label CI failed on Jul 15, 2024
  48. DrahtBot removed the label CI failed on Jul 20, 2024
  49. DrahtBot added the label Needs rebase on Aug 5, 2024
  50. Sjors force-pushed on Aug 12, 2024
  51. Sjors commented at 8:38 am on August 12, 2024: member
    Rebased after #30560 and #29775.
  52. DrahtBot removed the label Needs rebase on Aug 12, 2024
  53. DrahtBot added the label Needs rebase on Aug 22, 2024
  54. Sjors force-pushed on Aug 26, 2024
  55. Sjors commented at 8:42 am on August 26, 2024: member
    Rebased after #30658.
  56. DrahtBot removed the label Needs rebase on Aug 26, 2024
  57. DrahtBot added the label CI failed on Sep 12, 2024
  58. DrahtBot removed the label CI failed on Sep 15, 2024
  59. Sjors force-pushed on Sep 17, 2024
  60. Sjors commented at 7:42 am on September 17, 2024: member
    #27433 needed the rebase here
  61. Sjors commented at 8:10 am on September 18, 2024: member
    Removed ~ from the description (wasn’t relevant anymore anyway), since @jonatack pointed out in #28358 that these don’t get rendered nicely in merges.
  62. DrahtBot added the label CI failed on Oct 25, 2024
  63. DrahtBot removed the label CI failed on Oct 25, 2024
  64. l0rinc approved
  65. l0rinc commented at 11:16 pm on March 4, 2025: contributor
    Concept ACK
  66. DrahtBot added the label Needs rebase on Mar 6, 2025
  67. Sjors force-pushed on Mar 6, 2025
  68. Sjors commented at 1:26 pm on March 6, 2025: member
    Rebased after #31978.
  69. DrahtBot removed the label Needs rebase on Mar 6, 2025
  70. jonatack commented at 3:36 am on March 7, 2025: member
    Light approach ACK 301e41985ef8cc8e3098d1d737864a5ae1f5108e
  71. DrahtBot requested review from l0rinc on Mar 7, 2025
  72. in src/consensus/params.h:21 in 301e41985e outdated
    17@@ -18,21 +18,24 @@ namespace Consensus {
    18 /**
    19  * A buried deployment is one where the height of the activation has been hardcoded into
    20  * the client implementation long after the consensus change has activated. See BIP 90.
    21+ * Consensus changes for which the new rules enforced from genesis are not listed here.
    


    jonatack commented at 3:37 am on March 7, 2025:

    Should this be like https://github.com/bitcoin/bitcoin/pull/26201/files#diff-decae4be02fb8a47ab4557fe74a9cb853bdfa3ec0fa1b515c0a1e5de91f4ad0bR1418?

    0 * Consensus changes for which the new rules are enforced from genesis are not listed here.
    

    Sjors commented at 9:19 am on March 7, 2025:
    Done
  73. Sjors force-pushed on Mar 7, 2025
  74. DrahtBot added the label Needs rebase on Apr 29, 2025
  75. Sjors force-pushed on Apr 30, 2025
  76. Sjors commented at 1:09 pm on April 30, 2025: member
    Rebased after #29039.
  77. DrahtBot removed the label Needs rebase on Apr 30, 2025
  78. DrahtBot added the label Needs rebase on May 13, 2025
  79. Sjors force-pushed on May 14, 2025
  80. Sjors commented at 7:01 am on May 14, 2025: member
    Trivial rebase after #32386.
  81. DrahtBot removed the label Needs rebase on May 14, 2025
  82. DrahtBot added the label Needs rebase on Jun 19, 2025
  83. Sjors force-pushed on Jun 19, 2025
  84. Sjors commented at 8:09 am on June 19, 2025: member
    Rebased after #31981 for minor conflict in mining_basic.py.
  85. in doc/bips.md:62 in f08e573a87 outdated
    57@@ -58,7 +58,8 @@ BIPs that are implemented by Bitcoin Core:
    58   Validation rules for Taproot (including Schnorr signatures and Tapscript
    59   leaves) are implemented as of **v0.21.0** ([PR 19953](https://github.com/bitcoin/bitcoin/pull/19953)),
    60   with mainnet activation as of **v0.21.1** ([PR 21377](https://github.com/bitcoin/bitcoin/pull/21377),
    61-  [PR 21686](https://github.com/bitcoin/bitcoin/pull/21686)).
    62+  [PR 21686](https://github.com/bitcoin/bitcoin/pull/21686)),
    63+  always active as of **v24.0** ([PR 23536](https://github.com/bitcoin/bitcoin/pull/23536)).
    


    maflcko commented at 8:18 am on June 19, 2025:
    could split up this doc-only update?

    Sjors commented at 9:16 am on June 19, 2025:
    Done in #32776

    maflcko commented at 2:54 pm on June 19, 2025:
    needs rebase
  86. DrahtBot removed the label Needs rebase on Jun 19, 2025
  87. fanquake referenced this in commit 79afe6b7c0 on Jun 19, 2025
  88. Sjors force-pushed on Jun 19, 2025
  89. Sjors commented at 3:02 pm on June 19, 2025: member
    Rebased after splitting the doc/bips.md changes off into #32776.
  90. DrahtBot added the label Needs rebase on Sep 3, 2025
  91. Remove Taproot activation height
    Drop DEPLOYMENT_TAPROOT from consensus.vDeployments.
    
    Bump MinBIP9WarningHeight.
    
    Clarify what is considered a BuriedDeployment and
    drop taproot from getdeploymentinfo RPC.
    
    Add a test to getblocktemplate to ensure the taproot
    rule is still set.
    
    Co-Authored-By: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
    ec17c82846
  92. Sjors force-pushed on Sep 3, 2025
  93. Sjors commented at 11:32 am on September 3, 2025: member
    Rebased after #33274.
  94. DrahtBot removed the label Needs rebase on Sep 3, 2025
  95. sedited commented at 5:03 pm on December 28, 2025: contributor

    Concept ACK

    Seems reasonable given that we say “Consensus changes for which the new rules are enforced from genesis are not listed here.”

  96. sedited commented at 9:07 am on February 24, 2026: contributor

    We drop taproot from getdeploymentinfo RPC, rather than mark it as buried, because this is not a buried deployment in the sense of BIP 90. This is because the activation height has been completely removed from the code, rather than hard coded.

    Looking at this a bit more, how is the taproot deployment different here from the segwit deployment? AFAICT the segwit height is only used for checking the NeedsRedownload condition, and the purpose of that functionality has been questioned recently too. Can you elaborate on this in the motivation?

  97. Sjors commented at 9:26 am on February 24, 2026: member
    @sedited Consensus::DEPLOYMENT_SEGWIT is also used to determine whether a block is allowed to have witness data (IsBlockMutated) and for BIP147. I expanded the PR description.
  98. darosior commented at 8:08 pm on February 27, 2026: member

    Concept ACK.

    I find it confusing that we don’t simply make it a buried deployment like we did for the past 5 soft forks. But since we always enforce it from genesis, it would probably be even more confusing (for instance setting -testactivationheight=taproot@42 wouldn’t have the intended effect).

    Could you update the PR title? There is no Taproot activation height. Maybe “Remove Taproot BIP 9 deployment”?

  99. darosior commented at 8:14 pm on February 27, 2026: member

    But since we always enforce it from genesis, it would probably be even more confusing (for instance setting -testactivationheight=taproot@42 wouldn’t have the intended effect).

    I guess it’s already equally confusing for -testactivationheight=segwit@42. Oh well..

  100. Sjors renamed this:
    Remove Taproot activation height
    Remove Taproot BIP 9 deployment
    on Feb 28, 2026
  101. in src/consensus/params.h:31 in ec17c82846
    26     DEPLOYMENT_HEIGHTINCB = std::numeric_limits<int16_t>::min(),
    27     DEPLOYMENT_CLTV,
    28     DEPLOYMENT_DERSIG,
    29     DEPLOYMENT_CSV,
    30+    // SCRIPT_VERIFY_WITNESS is enforced from genesis, but the check for downloading
    31+    // missing witness data is not. BIP 147 also relies on hardcoded activation height.
    


    ajtowns commented at 5:20 pm on February 28, 2026:
    I think it might be good (not necessarily in this PR) to change VBDeploymentInfo in deploymentinfo.h/cpp to perhaps specify the SCRIPT_VERIFY flags related to a deployment, or to add a std::string with some info about the deployment (EDIT: and to report this information via getdeploymentinfo).

    Sjors commented at 1:28 pm on March 2, 2026:
    I indeed prefer to leave this for a followup (and as you mention, maybe not needed).
  102. in src/rpc/blockchain.cpp:1448 in ec17c82846
    1445 RPCHelpMan getdeploymentinfo()
    1446 {
    1447     return RPCHelpMan{"getdeploymentinfo",
    1448-        "Returns an object containing various state info regarding deployments of consensus changes.",
    1449+        "Returns an object containing various state info regarding deployments of consensus changes.\n"
    1450+        "Consensus changes for which the new rules are enforced from genesis are not listed here.",
    


    ajtowns commented at 5:24 pm on February 28, 2026:
    Since #32998 we report "script_flags": [ .., "TAPROOT", .. ] via getdeploymentinfo for all blocks except the hardcoded exceptions. I think that’s sufficient indication that the soft-fork is still enforced even if it’s not listed in the “deployments” section anymore. Maybe this comment would be better phrased as ‘are not listed here in “deployments”.’ ?

    Sjors commented at 5:31 pm on March 2, 2026:
    Changed the wording locally, will push later.
  103. ajtowns commented at 5:38 pm on February 28, 2026: contributor
    ACK ec17c82846686cb56da0535051bb701b3c84cfea
  104. DrahtBot requested review from darosior on Feb 28, 2026
  105. DrahtBot requested review from jonatack on Feb 28, 2026
  106. DrahtBot requested review from sedited on Feb 28, 2026
  107. sedited approved
  108. sedited commented at 12:37 pm on March 1, 2026: contributor
    ACK ec17c82846686cb56da0535051bb701b3c84cfea
  109. fanquake added this to the milestone 32.0 on Mar 2, 2026

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: 2026-03-03 06:13 UTC

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