From ab53d7dcfa67d338bab818d78a87b23a165dc974 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Mon, 27 Aug 2018 21:32:22 -0700 Subject: BIP 158: Fix broken link to test vectors. --- bip-0158.mediawiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bip-0158.mediawiki') diff --git a/bip-0158.mediawiki b/bip-0158.mediawiki index 2062c6e..2a6d14a 100644 --- a/bip-0158.mediawiki +++ b/bip-0158.mediawiki @@ -433,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 == -- cgit v1.2.3 From fc511f11c61b967c7a807132282a80cb28d50e90 Mon Sep 17 00:00:00 2001 From: Jim Posen Date: Mon, 27 Aug 2018 21:41:24 -0700 Subject: BIP 158: Specify endianness of block hash to k conversion. --- bip-0158.mediawiki | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'bip-0158.mediawiki') 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 OP_RETURN 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 OP_RETURN 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 M=1.497137 * 2^P 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 k 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 k 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 N is required to decode a GCS, a serialized GCS includes it as a prefix, written as a CompactSize. Thus, the -- cgit v1.2.3