-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Remove taproot chain param #24737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove taproot chain param #24737
The head ref may contain hidden characters: "2204-rem-code-\u{1F94A}"
Conversation
faea171
to
fa47617
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
@@ -213,19 +213,6 @@ def check_signalling_deploymentinfo_result(self, gdi_result, height, blockhash, | |||
}, | |||
'active': False | |||
}, | |||
'taproot': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other soft forks are marked as burried, rather than completely omitted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this is a reason to remove them as well. Once they are buried, their activation height is a constant. So there is no need to report it dynamically over RPC. Apart from being overkill, I don't see a use case either.
If someone wants to know if the wallet supports $feature, they can use a wallet RPC or the GUI. (This RPC won't help them)
If someone wants to know if the mempool supports $feature, this RPC won't help them either. I think the best they can do is read the release notes to figure out if the mempool supports $feature regardless of blockchain height. Alternatively they can just test if their use case is supported.
If someone read the release notes, but wants to know over RPC which version of Bitcoin Core they are running, they can use the appropriate call.
As mentioned in OP, returning a result for taproot
here (buried or vb) is neither right or wrong. While the result may reflect the height at which the BIP activated on the network (as mentioned in the BIP as well), it does not reflect the height at which this software enforces the rules. The rules are theoretically enforced since genesis, practically only after witness is allowed in blocks. This is not something that can/should be explained by returning a JSON.
If you insist on returning a JSON, my preference would be to return 'taproot': True
. Until then, my preference is to remove it, since it is unknown if there is a use case for this (and if there is one) what the use case is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think this is a reason to remove them as well.
I'm not opposed to that, but the inconsistency doesn't help review. Why not set it to burried
now and make another PR to drop all buried soft forks from the RPC, using the above reasoning. Such a followup would be an RPC-only change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, my suggestion to remove the others as well was a bit over eager. They are still used and the activation height actually affects code paths. In fact the tests use -testactivationheight
to mock the activation height. Though, this isn't true for taproot
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I already tried to bury taproot in #23505. Though there wasn't much/enough appetite to get it in before the 23.0 feature freeze. As burying is a breaking RPC change and we already had one (getdeploymentinfo) in 23.0, it could have been bundled with that. However, now that 23.0 is out, it would be a breaking change in 24.0 to bury it. Then, if it is decided to remove, it will be another breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it a breaking change? A correct parser should look for taproot
and then check the type
field. It should be able to handle buried
. If an implementation can't handle that, it might also break when taproot
is missing entirely.
28cb18e
to
fa1cf13
Compare
I don't think I quite agree with this -- it seems better to me to have the program document its own behaviour, rather than expecting you to look up documentation that might not even be in sync with the code (our behaviour since #23536 isn't documented in a BIP, is it?). So, better to keep the report, but have it match what the code is doing. For example, it might be better to report something like:
(and perhaps likewise for bip16/p2sh, though going overboard with reporting ancient changes that no block violates doesn't seem particularly useful). |
I like the exception block listing. Maybe a little less verbose: {
"type": "buried",
"active": true,
"exception_blocks": [
"00000000000002dc756eebf4f49723ed8d30cc28a5f108eb94b1ba88ac4f9c22",
"0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad",
]
} Here |
Should have a consistent meaning across deployment types, though I could see doing a breaking change for all deployment types to make it less confusing...
Elsewhere, we put any extra info that's specific to a deployment method in a sub-object, named after the type (ie |
Ah ok, then
|
fae6864
to
faf3b41
Compare
It is documented in
Agree. I've added a second commit, though let me know if I should drop it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the new exception blocks field. I still prefer to mark taproot
as buried
rather than dropping it.
@@ -213,19 +213,6 @@ def check_signalling_deploymentinfo_result(self, gdi_result, height, blockhash, | |||
}, | |||
'active': False | |||
}, | |||
'taproot': { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it a breaking change? A correct parser should look for taproot
and then check the type
field. It should be able to handle buried
. If an implementation can't handle that, it might also break when taproot
is missing entirely.
faf3b41
to
fa3d09a
Compare
fa3d09a
to
fa7b5ca
Compare
Don't really like the idea of reporting the exceptions without reporting what's "normal". I was thinking more along the lines of: ajtowns@809a545 (possibly reporting bip16 support/exceptions as well) which gives output like: {
"hash": "00000000000000000007e4449a4d61ba2d2a3f0bbc0bbf355d2fcc8deecdb864",
"height": 753789,
"deployments": {
...
"bip16": {
"type": "buried",
"buried": {
"exceptions": [
"00000000000002dc756eebf4f49723ed8d30cc28a5f108eb94b1ba88ac4f9c22"
]
},
"active": true,
"height": 0
},
...
"segwit": {
"type": "buried",
"active": true,
"height": 481824
},
"taproot": {
"type": "buried",
"buried": {
"exceptions": [
"00000000000002dc756eebf4f49723ed8d30cc28a5f108eb94b1ba88ac4f9c22",
"0000000000000000000f14c35b2d841e986ab5441de8c585d5ffe55ea1e395ad"
]
},
"active": true,
"height": 0
}
}
} |
Ok, leaving up for grabs for now |
Now that the commit (7c08d81) which changes taproot to be enforced for all blocks is sufficiently buried by other commits, and thus less likely to be reverted, it seems a good time to remove no longer needed non-consensus code.
In particular, the taproot deployment status will be reported on RPC. However, the result is neither wrong nor correct. While it can tell the block height at which taproot activated, it doesn't reflect that the rules are enforced since genesis. Since it is possible to determine the taproot activation height by running a previous release or simply looking it up in the BIP, there is no need to report it in a field.