0.20: Add txids with non-standard inputs to reject filter#19680
Merged
fanquake merged 2 commits intobitcoin:0.20from Sep 4, 2020
Merged
0.20: Add txids with non-standard inputs to reject filter#19680fanquake merged 2 commits intobitcoin:0.20from
fanquake merged 2 commits intobitcoin:0.20from
Conversation
Our policy checks for non-standard inputs depend only on the non-witness portion of a transaction: we look up the scriptPubKey of the input being spent from our UTXO set (which is covered by the input txid), and the p2sh checks only rely on the scriptSig portion of the input. Consequently it's safe to add txids of transactions that fail these checks to the reject filter, as the witness is irrelevant to the failure. This is helpful for any situation where we might request the transaction again via txid (either from txid-relay peers, or if we might fetch the transaction via txid due to parent-fetching of orphans). Further, in preparation for future witness versions being deployed on the network, ensure that WITNESS_UNKNOWN transactions are rejected in AreInputsStandard(), so that transactions spending v1 (or greater) witness outputs will fall into this category of having their txid added to the reject filter. Github-Pull: bitcoin#19620 Rebased-From: 7989901
Github-Pull: bitcoin#19620 Rebased-From: 9f88ded
650cad9 to
107cf15
Compare
Contributor
|
utACK 107cf15 |
Member
|
should this be added to 0.20.2 milestone? |
Member
|
utACK 107cf15 |
Contributor
|
utACK 107cf15 Didn't do full testing but briefly verified that the test fails if the behavior changes are undone. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #19620 to 0.20.