-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Enforce BIP 68 from genesis #24567
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
Enforce BIP 68 from genesis #24567
The head ref may contain hidden characters: "2203-lessCode-\u{1F696}"
Conversation
|
Please review #24565 first, while this stays in draft. |
|
Doesn't seem to save much code, and requires revalidating years worth of blocks to ensure it doesn't break consensus. Not really seeing the point of this? Concept -1 from me. |
Apologies, the motivation isn't to save code. I've added some text to OP. |
|
Unlike #23536 I don't think this has much (any?) possible effect on wallet behaviour; bip68 only allows time locks up to ~15 months, and bip68 was ~68 months ago (slightly more than "a few months of POW"...), and unlike with taproot/segwit/p2sh any transaction that is invalid right now due to bip68, will eventually become valid. Also, any static analysis tool that can't cope with conditional consensus logic just doesn't seem suitable for use on the bitcoin codebase in the first place to me. So still -1 from me; these sorts of unnecessary changes around consensus code seem far more likely to introduce bugs (as #24421 has) than prevent them. |
|
If a BIP 68 violating tx makes it into the mempool in current |
|
If you're relying on someone giving you a bip68-invalid tx to avoid building blocks with a tip that's over 5 years out of date, I think you've already lost... |
24421 doesn't change consensus code, so I don't think it's a relevant comparison here. The bug introduced in that PR was a functional test simulating an impossible scenario. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
|
🐙 This pull request conflicts with the target branch and needs rebase. Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft". |
|
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
|
I'll pick this up later |
Now that BIP 68 is active, it makes sense to enforce its rules on all blocks, even historic ones, regardless of the deployment status.
Benefits:
nMinimumChainWorkmakes this attack practically expensive. Also, this attack is currently theoretically impossible because no vector is known to inject a consensus-invalid transaction into the mempool (or even have it mined).For reference, previously something similar was done for the script verification flags P2SH and WITNESS in commit 0a8b7b4. (And is being done for TAPROOT in #23536).
Considerations
Obviously this change can lead to consensus splits on the network in light of massive reorgs. Currently the last block before BIP 68 activation, that is the last block without the BIP 68 rules applied, is buried by a few months of POW. BIP90 considerations apply when looking at reorgs this large.