summaryrefslogtreecommitdiff
path: root/bip-0158.mediawiki
diff options
context:
space:
mode:
authorJim Posen <jim.posen@gmail.com>2018-08-27 21:41:24 -0700
committerJim Posen <jim.posen@gmail.com>2018-08-27 21:41:24 -0700
commitfc511f11c61b967c7a807132282a80cb28d50e90 (patch)
tree461200f82c39dd32199e0cff07d944105b607cb8 /bip-0158.mediawiki
parentab53d7dcfa67d338bab818d78a87b23a165dc974 (diff)
BIP 158: Specify endianness of block hash to k conversion.
Diffstat (limited to 'bip-0158.mediawiki')
-rw-r--r--bip-0158.mediawiki11
1 files changed, 6 insertions, 5 deletions
diff --git a/bip-0158.mediawiki b/bip-0158.mediawiki
index 2a6d14a..63cf5be 100644
--- a/bip-0158.mediawiki
+++ b/bip-0158.mediawiki
@@ -280,7 +280,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
@@ -303,11 +303,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