This PR attempts to address some of the areas of improvement raised in #17020 . Concretely, my proposed change is fairly minor but addresses the following changes to makeseeds.py
:
- Increase max seeds per ASN for IPv6 to 10 as recommended here, while keeping max seeds per ASN for IPv4 at 2.
- Bump
MIN_BLOCKS
to 730000. - Improved script clarity: added function types and more docs to functions, added progress indicator when performing ASN lookup, and change string formatting to better align with bitcoin python style guidelines
With the different ASN limits for IPv4 and IPv6, and the new minimum block requirement, the current stats look look like:
0 IPv4 IPv6 Onion Pass
1470689 73238 0 Initial
2470689 73238 0 Skip entries with invalid address
3470689 73238 0 After removing duplicates
4470688 73238 0 Skip entries from suspicious hosts
5 6098 1676 0 Enforce minimal number of blocks
6 5252 1443 0 Require service bit 1
7 3812 898 0 Require minimum uptime
8 3738 877 0 Require a known and recent user agent
9 3715 869 0 Filter out hosts with multiple bitcoin ports
10 512 512 0 Look up ASNs and limit results per ASN and per net
The new ASN max seeds of 10 allows for 512 IPv6 addresses to be included, up from the ~150 that was filtered by the previous version.
While there is more to do for #17020 , these changes I think are fairly isolated from the rest and should make it a bit easier for others to get up to speed with what the functions in the script do.