Skip to content

Remove Taproot BIP 9 deployment#26201

Merged
achow101 merged 1 commit intobitcoin:masterfrom
Sjors:2022/09/taproot-demarcation-height
Mar 20, 2026
Merged

Remove Taproot BIP 9 deployment#26201
achow101 merged 1 commit intobitcoin:masterfrom
Sjors:2022/09/taproot-demarcation-height

Conversation

@Sjors
Copy link
Member

@Sjors Sjors commented Sep 29, 2022

Drop DEPLOYMENT_TAPROOT from consensus.vDeployments.

Now that the commit (7c08d81) 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.

Footnotes

  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.

@DrahtBot
Copy link
Contributor

DrahtBot commented Sep 30, 2022

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 sedited, darosior, ajtowns, achow101
Concept ACK l0rinc
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:

  • #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.

@luke-jr
Copy link
Member

luke-jr commented Oct 2, 2022

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.

@Sjors
Copy link
Member Author

Sjors commented Oct 3, 2022

@luke-jr changed the wording to "is (probably) included in v24.0".

@ajtowns
Copy link
Contributor

ajtowns commented Oct 8, 2022

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)

@Sjors Sjors force-pushed the 2022/09/taproot-demarcation-height branch from b0f4391 to 8f96e52 Compare November 1, 2022 09:41
@Sjors
Copy link
Member Author

Sjors commented Nov 1, 2022

@ajtowns done

@Sjors Sjors force-pushed the 2022/09/taproot-demarcation-height branch 2 times, most recently from b8c2cc1 to 20ef70f Compare November 1, 2022 09:51
@DrahtBot DrahtBot mentioned this pull request Jan 27, 2023
@achow101
Copy link
Member

Are you still working on this?

@Sjors
Copy link
Member Author

Sjors commented May 8, 2023

I'll rebase soon(tm).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need aRules in rpc/mining.cpp updated

@Sjors Sjors force-pushed the 2022/09/taproot-demarcation-height branch 2 times, most recently from 20687de to 7fb3287 Compare August 18, 2023 10:28
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luke-jr like this?

This will need aRules in rpc/mining.cpp updated

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, without !

I'll push a fix and add a test...

Before and after this change it should be:

bitcoin-cli getblocktemplate '{"rules": ["segwit"]}' | jq '.rules'
[
  "csv",
  "!segwit",
  "taproot"
]

@Sjors Sjors force-pushed the 2022/09/taproot-demarcation-height branch from 7fb3287 to b5d8ddb Compare August 18, 2023 11:11
@Sjors
Copy link
Member Author

Sjors commented Aug 18, 2023

Rebased after kernel changes. Fixed a regression in getblocktemplate's rules result, and added a test for tit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In #27433 I propose getting rid of fPreSegWit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was #31625, but then closed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed it was split out from #27433 into its own PR #31625, which after some discussion I marked up for grabs.

@sedited
Copy link
Contributor

sedited commented Dec 28, 2025

Concept ACK

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

@sedited
Copy link
Contributor

sedited commented Feb 24, 2026

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?

@Sjors
Copy link
Member Author

Sjors commented Feb 24, 2026

@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.

Copy link
Member

@darosior darosior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"?

@darosior
Copy link
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..

@Sjors Sjors changed the title Remove Taproot activation height Remove Taproot BIP 9 deployment Feb 28, 2026
Copy link
Contributor

@ajtowns ajtowns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ec17c82

DEPLOYMENT_DERSIG,
DEPLOYMENT_CSV,
// SCRIPT_VERIFY_WITNESS is enforced from genesis, but the check for downloading
// missing witness data is not. BIP 147 also relies on hardcoded activation height.
Copy link
Contributor

@ajtowns ajtowns Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Member Author

@Sjors Sjors Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I indeed prefer to leave this for a followup (and as you mention, maybe not needed).

Copy link
Contributor

@sedited sedited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ec17c82

@fanquake fanquake added this to the 32.0 milestone Mar 2, 2026
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 <*~=`'#}+{/-|&$^[email protected]>
@Sjors Sjors force-pushed the 2022/09/taproot-demarcation-height branch from ec17c82 to 74f71c5 Compare March 10, 2026 15:17
@Sjors
Copy link
Member Author

Sjors commented Mar 10, 2026

Rebased after #34677 v31 chainparams update.

Copy link
Contributor

@sedited sedited left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-ACK 74f71c5

@DrahtBot DrahtBot requested a review from ajtowns March 11, 2026 08:09
@sedited
Copy link
Contributor

sedited commented Mar 19, 2026

Ping @ajtowns and @darosior to take another look.

Copy link
Member

@darosior darosior left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 74f71c5

@fanquake
Copy link
Member

cc @instagibbs

@ajtowns
Copy link
Contributor

ajtowns commented Mar 20, 2026

reACK 74f71c5

@achow101
Copy link
Member

ACK 74f71c5

@achow101 achow101 merged commit 483769c into bitcoin:master Mar 20, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.