BIP158: include the direct pkScript rather than its data pushes #667

pull Roasbeef wants to merge 1 commits into bitcoin:master from Roasbeef:bip-158-minor-updates changing 1 files +1 −1
  1. Roasbeef commented at 12:49 AM on April 1, 2018: contributor

    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.

  2. 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.
    4077defdbc
  3. jimpo commented at 12:50 AM on April 1, 2018: contributor

    +1

  4. Roasbeef cross-referenced this on Apr 1, 2018 from issue gcs: only use hash of pkscript to insert into filter by Roasbeef
  5. tuxcanfly commented at 2:45 AM on April 1, 2018: none

    +1 this will simplify the implementation as well.

  6. luke-jr merged this on Apr 1, 2018
  7. luke-jr closed this on Apr 1, 2018


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bips. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 07:10 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me