← Back to Bitcoin Improvement Proposals
BIPinformationalscript

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 dat

No reviews
Roasbeef·Updated Apr 1, 2018·0 reviews·0 attestations·View source
Collections:BIPs — Merged

Specification

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.

Discussion (0 threads)

Loading discussions...