Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented Nov 13, 2021

Now that the decision to activate taproot at block height 709632 has been buried under more than 5 months of POW, the deployment should be buried in a future release (see benefits below). If this patch is first included in version 23.0, the decision will be buried by ~10 months of POW at release time.

Benefits:

  • All deployments will use the same code paths. Thus, in the extremely unlikely case of bugs being introduced in the future in the versionbits activation code, it won't have any effect on previous deployments.
  • Less code and complexity of the activation, because the versionbits params can be removed.
  • Features can be developed assuming that taproot absolutely does activate at a specific block height. Thus, code to handle non-activation of taproot does not need to be maintained.
  • Easier testing, because on regtest the newly introduced -testactivationheight=name@height (introduced in test: Activate all regtest softforks at height 1, unless overridden #22818) can be used.

For reference, previous buried versionbits deployments were:

Unlike previous buried deployments, this one is not a non-backwards compatible change, as explained in BIP90 (section considerations): https://github.com/bitcoin/bips/blob/master/bip-0090.mediawiki#considerations . Due to the use of a minimum activation height, there can not exist an alternative chain where the activation occurred at a lower block height than that.
Obviously this patch can still result in a theoretical consensus split (though a "backwards compatible" one) if there were a massive reorg that activated taproot at a higher (or no) block height. In this case the BIP90 considerations on large reorgs apply.

This changes the output of the getblockchaininfo RPC. I will add release notes when and if this patch is merged.

@maflcko maflcko changed the title 🥕 Bury taproot deployment Nov 13, 2021
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 14, 2021

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #23508 (Add getdeploymentinfo RPC 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.

@JeremyRubin
Copy link
Contributor

Is there an earlier block height we can use?

@achow101
Copy link
Member

ACK 88884ae

@achow101
Copy link
Member

Is there an earlier block height we can use?

It seems that 692262 is the earliest block height.

@JeremyRubin
Copy link
Contributor

if it's just that block with an invalid spend we could do BIP340Exception for that block hash and always on since genesis?

@maflcko
Copy link
Member Author

maflcko commented Nov 17, 2021

if it's just that block with an invalid spend we could do BIP340Exception for that block hash and always on since genesis?

Proposed in #23536

@Sjors
Copy link
Member

Sjors commented Nov 18, 2021

if it's just that block with an invalid spend we could do BIP340Exception for that block hash and always on since genesis?

This would also have my preference.

@maflcko
Copy link
Member Author

maflcko commented Nov 18, 2021

This would also have my preference.

I wouldn't call it "preference". #23536 and this pull request are doing two different things. One is setting the script verification flags starting from genesis, regardless of the activation status. This one is turning the activation into a height based one. If #23536 is merged first, this one will be an RPC-only change.

Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

Concept and code-review ACK 88884ae

It is impossible to hit those lines of code unless there is hardware or
software corruption. Thus, make sure to abort the node in case they are
hit to avoid further corruption.

See also the previous discussions:

* https://github.com/bitcoin/bitcoin/pull/19438/files#r661202215
* https://github.com/bitcoin/bitcoin/pull/19438/files#r662494456

Also, remove whitespace for better readability and grep-ability. (Can be
reviewed with --word-diff-regex=. option)
@gruve-p
Copy link
Contributor

gruve-p commented Nov 30, 2021

ACK 88884ae

@maflcko maflcko force-pushed the 2111-versionbitsNoTaproot branch from 88884ae to fa73540 Compare November 30, 2021 16:05
@maflcko
Copy link
Member Author

maflcko commented Nov 30, 2021

Force pushed with two changes:

  • Rebased to get rid of already removed references to DEPLOYMENT_TAPROOT in master (makes review easier, as the effects are smaller).
  • Added the block hash of the activation height in a comment, as the chain has passed the activation height since this pull was opened.

Should be easy to re-review.

Copy link
Contributor

@theStack theStack 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 fa73540

Trivial re-review via git range-diff 88884ae9...fa735401 plus verified that the block hash of height 709632 matches on my node.

@luke-jr
Copy link
Member

luke-jr commented Nov 30, 2021

the decision will be buried by ~10 months of POW at release time.

POW/miners do not decide protocol rules. It would be nice to see more nodes enforcing Taproot first. OTOH, this software will activate Taproot based on the POW regardless of user enforcement, so maybe a separate issue. shrug

@maflcko
Copy link
Member Author

maflcko commented Nov 30, 2021

OTOH, this software will activate Taproot based on the POW regardless of user enforcement, so maybe a separate issue. shrug

Indeed, this is a separate discussion.

@maflcko
Copy link
Member Author

maflcko commented Dec 7, 2021

I don't think this will be needed, since taproot activated at the genesis block after #23536

@maflcko maflcko closed this Dec 7, 2021
@maflcko maflcko deleted the 2111-versionbitsNoTaproot branch December 7, 2021 09:50
@maflcko
Copy link
Member Author

maflcko commented Dec 7, 2021

I'll likely open a follow-up after #23536 as an alternative to this pull.

@bitcoin bitcoin locked and limited conversation to collaborators Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants