Skip to content

Commit 4077def

Browse files
committed
BIP158: include the direct pkScript rather than its data pushes
In this commit, we modify regular filter construction slightly. Rather than including each pushed data in the script, we instead just include the script directly, which will eventually be hashed. The rationale for doing this is two-fold: * Most scripts today and in the foreseeable future will just be a commitment. * Including only the script itself and not the hash of the script reduces the worst case filter size. Otherwise, an attacker could include a bunch of 2 byte push datas and blow up the filter size for all nodes.
1 parent 032a5f6 commit 4077def

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bip-0158.mediawiki

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ The basic filter is designed to contain everything that a light client needs to
268268
sync a regular Bitcoin wallet. A basic filter MUST contain exactly the following
269269
items for each transaction in a block:
270270
* The outpoint of each input, except for the coinbase transaction
271-
* Each data push in the scriptPubKey of each output, ''only if'' the scriptPubKey is parseable
271+
* The scriptPubKey of each output
272272
* The <code>txid</code> of the transaction itself
273273
274274
The extended filter contains extra data that is meant to enable applications

0 commit comments

Comments
 (0)