This PR adds a Python script to test the addrman bucketing logic using asmap. You should run this test using your own asmap file (./contrib/asmap/test_bucketing.py --asmap=path/to/asmap --num_asns=1000
).
How it works?
- Read the asmap file
- From
--num_asns=N
: GetN
unique ASNs and their respective ranges. - For 1/3 of the ASNs: it will try to add
1000 addresses
from each ASN into the “new” table. - For 2/3 of the ASNs: it will try to add 1 address from each ASN into the “new” table.
I’m first opening it as a draft to seek concept acks and perhaps more ideas to include here.