Skip to content

Commit fc511f1

Browse files
committed
BIP 158: Specify endianness of block hash to k conversion.
1 parent ab53d7d commit fc511f1

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

bip-0158.mediawiki

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ following items for each transaction in a block:
280280
* The scriptPubKey of each output, aside from all <code>OP_RETURN</code> output
281281
scripts.
282282
283-
Any "nil" items MUST NOT be included into the final set of filter elements.
283+
Any "nil" items MUST NOT be included into the final set of filter elements.
284284

285285
We exclude all <code>OP_RETURN</code> outputs in order to allow filters to
286286
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
303303

304304
Empirical analysis also shows that was chosen as these parameters minimize the
305305
bandwidth utilized, considering both the expected number of blocks downloaded
306-
due to false positives and the size of the filters themselves.
306+
due to false positives and the size of the filters themselves.
307307

308-
The parameter <code>k</code> MUST be set to the first 16 bytes of the hash of
309-
the block for which the filter is constructed. This ensures the key is
310-
deterministic while still varying from block to block.
308+
The parameter <code>k</code> MUST be set to the first 16 bytes of the hash
309+
(in standard little-endian representation) of the block for which the filter is
310+
constructed. This ensures the key is deterministic while still varying from
311+
block to block.
311312

312313
Since the value <code>N</code> is required to decode a GCS, a serialized GCS
313314
includes it as a prefix, written as a <code>CompactSize</code>. Thus, the

0 commit comments

Comments
 (0)