From 3571e1a52d63b5207731bd210c4447b5516d6063 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 3 Apr 2018 12:07:37 -0600 Subject: BIP158: add test vectors and generation code In this commit, we add test vectors for filter and header construction and the code to generate them. The included test vectors are for testnet with a value of 20 for P. The code generates filters and headers for values of 1 through 32 for P using testnet blocks. Currently, to run the code, the `Roasbeef` fork of `btcd` (at https://github.com/roasbeef/btcd) is required to be running locally in testnet mode; this will be changed in a future commit after the code is merged into the `btcsuite` mainline. --- 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 e7075be..15caa68 100644 --- a/bip-0158.mediawiki +++ b/bip-0158.mediawiki @@ -420,7 +420,7 @@ gcs_match_any(key: [16]byte, compressed_set: []byte, targets: [][]byte, P: uint, == Appendix C: Test Vectors == -TODO: To be generated. +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]]. == References == -- cgit v1.2.3