bitcoin/test/functional/test_framework
Andrew Chow e25de33e7b
Merge bitcoin/bitcoin#26341: test: add BIP158 false-positive element check in rpc_scanblocks.py
fa54d3011e test: check for false-positives in rpc_scanblocks.py (Sebastian Falbesoner)
3bca6cd61a test: add compact block filter (BIP158) helper routines (Sebastian Falbesoner)
25ee74dd11 test: add SipHash implementation for generic data in Python (Sebastian Falbesoner)

Pull request description:

  This PR adds a fixed false-positive element check to the functional test rpc_scanblocks.py by using a pre-calculated scriptPubKey that collides with the regtest genesis block's coinbase output. Note that determining a BIP158 false-positive at runtime would also be possible, but take too long (we'd need to create and check ~800k output scripts on average, which took at least 2 minutes on average on my machine).

  The introduced check is related to issue #26322 and more concretely inspired by PR #26325 which introduces an "accurate" mode that filters out these false-positives. The introduced cryptography routines (siphash for generic data) and helpers (BIP158 ranged hash calculation, relevant scriptPubKey per block determination) could potentially also be useful for more tests in the future that involve compact block filters.

ACKs for top commit:
  achow101:
    ACK fa54d3011e

Tree-SHA512: c6af50864146028228d197fb022ba2ff24d1ef48dc7d171bccfb21e62dd50ac80db5fae0c53f5d205edabd48b3493c7aa2040f628a223e68df086ec2243e5a93
2022-10-26 11:46:20 -04:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py test: add helpers for creating P2TR scripts/addresses from output key 2022-06-14 13:32:57 +02:00
authproxy.py test: Remove Windows workaround in authproxy 2021-09-25 09:33:16 +02:00
bdb.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blockfilter.py test: add compact block filter (BIP158) helper routines 2022-10-20 01:33:17 +02:00
blocktools.py remove unused functions 2022-06-24 18:04:48 +05:30
coverage.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
key.py test: Test signing psbts without explicitly having scripts 2022-06-27 16:48:04 -04:00
messages.py test: Add functional tests for sendtxrcncl from inbound 2022-10-17 12:36:13 +03:00
muhash.py test: Change MuHash Python implementation to match cpp version again 2020-12-22 01:48:34 +01:00
netutil.py test: remove import socket in test_ipv6_local 2022-02-14 19:27:33 -03:00
p2p.py Merge bitcoin/bitcoin#26248: net: Set relay in version msg to peers with relay permission in -blocksonly mode 2022-10-21 11:18:48 +02:00
psbt.py tests: Test that PSBT_OUT_TAP_TREE is combined correctly 2022-10-06 15:32:45 -04:00
ripemd160.py Add pure Python RIPEMD-160 2021-12-08 14:29:34 -05:00
script.py Simplify wallet_taproot.py functional test 2022-01-12 11:09:41 -05:00
script_util.py test: add helpers for creating P2TR scripts/addresses from output key 2022-06-14 13:32:57 +02:00
segwit_addr.py Use Bech32m encoding for v1+ segwit addresses 2021-03-16 10:48:36 -07:00
siphash.py test: add SipHash implementation for generic data in Python 2022-10-20 01:32:48 +02:00
socks5.py scripted-diff: Update copyright in ./test 2019-03-02 10:58:35 -05:00
test_framework.py test: Avoid race in disconnect_nodes helper 2022-09-20 15:48:05 +02:00
test_node.py test: Add functional tests for sendtxrcncl message from outbound 2022-10-17 12:36:14 +03:00
test_shell.py TestShell: Return self from setup() 2019-11-05 12:55:52 +01:00
util.py test: add support for Decimal to assert_approx 2022-08-02 10:11:12 +09:00
wallet.py test: Target exact weight in MiniWallet _bulk_tx 2022-08-03 12:02:20 +02:00
wallet_util.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00