test: add further BIP37 size limit checks to p2p_filter.py
Summary:
This is a follow-up PR to PR18628 (D8929). In addition to the hash-functions limit test introduced with commit fa4c29b, it adds checks for the following size limits as defined in BIP37:
ad message type filterload:
The filter itself is simply a bit field of arbitrary byte-aligned size. The maximum size is 36,000 bytes.
ad message type filteradd:
The data field must be smaller than or equal to 520 bytes in size (the maximum size of any potentially matched object).
Also introduces new constants for the limits (or reuses the max script size constant in case for the filteradd limit).
This is a backport of Core PR18672
Depends on D8949
Test Plan: ninja && test/functional/test_runner.py p2p_filter
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8950