summaryrefslogtreecommitdiff
path: root/bip-0158.mediawiki
diff options
context:
space:
mode:
authorLuke Dashjr <luke_github1@dashjr.org>2018-09-07 04:52:09 +0000
committerGitHub <noreply@github.com>2018-09-07 04:52:09 +0000
commit7e1dee5151195a89d5c084b2326b193538073a44 (patch)
tree405a8bf9f3090de8118abbf0a8c0640bc2be9c29 /bip-0158.mediawiki
parente0b5b3ab4864f5d60515e33a285a91b15d6c9fe0 (diff)
parentfc511f11c61b967c7a807132282a80cb28d50e90 (diff)
downloadbips-7e1dee5151195a89d5c084b2326b193538073a44.tar.xz
Merge pull request #718 from jimpo/bip-0158-updates
Bip 158 updates
Diffstat (limited to 'bip-0158.mediawiki')
-rw-r--r--bip-0158.mediawiki13
1 files changed, 7 insertions, 6 deletions
diff --git a/bip-0158.mediawiki b/bip-0158.mediawiki
index 08e542a..535ffd9 100644
--- a/bip-0158.mediawiki
+++ b/bip-0158.mediawiki
@@ -279,7 +279,7 @@ following items for each transaction in a block:
* The scriptPubKey of each output, aside from all <code>OP_RETURN</code> output
scripts.
-Any "nil" items MUST NOT be included into the final set of filter elements.
+Any "nil" items MUST NOT be included into the final set of filter elements.
We exclude all <code>OP_RETURN</code> outputs in order to allow filters to
easily be committed to in the future via a soft-fork. A likely area for future
@@ -302,11 +302,12 @@ setting <code>M=1.497137 * 2^P</code> is close to optimal
Empirical analysis also shows that was chosen as these parameters minimize the
bandwidth utilized, considering both the expected number of blocks downloaded
-due to false positives and the size of the filters themselves.
+due to false positives and the size of the filters themselves.
-The parameter <code>k</code> MUST be set to the first 16 bytes of the hash of
-the block for which the filter is constructed. This ensures the key is
-deterministic while still varying from block to block.
+The parameter <code>k</code> MUST be set to the first 16 bytes of the hash
+(in standard little-endian representation) of the block for which the filter is
+constructed. This ensures the key is deterministic while still varying from
+block to block.
Since the value <code>N</code> is required to decode a GCS, a serialized GCS
includes it as a prefix, written as a <code>CompactSize</code>. Thus, the
@@ -432,7 +433,7 @@ gcs_match_any(key: [16]byte, compressed_set: []byte, targets: [][]byte, P: uint,
== Appendix C: Test Vectors ==
-Test vectors for a P value of 20 on five testnet blocks, including the filters and filter headers, can be found [[bip-0158/testnet-20.csv|here]]. The code to generate these vectors for P values of 1 through 32 can be found [[bip-0158/gentestvectors.go|here]].
+Test vectors for basic block filters on five testnet blocks, including the filters and filter headers, can be found [[bip-0158/testnet-19.json|here]]. The code to generate them can be found [[bip-0158/gentestvectors.go|here]].
== References ==