contrib: Remove suspicious hosts list from makeseeds

I have some qualms with maintaining a suspicious hosts list as part as
the repository. But also, it's stale and irrelevant. I've checked the
entire list and none of them is connectable. Only one still appars in
`nodes_main.txt` but with low uptime and an old subversion string so it
wouldn't be picked in the first place.
24.x
laanwj 3 years ago
parent f3e0ace8ec
commit 2f629f8089

@ -21,12 +21,6 @@ MAX_SEEDS_PER_ASN = {
MIN_BLOCKS = 730000 MIN_BLOCKS = 730000
# These are hosts that have been observed to be behaving strangely (e.g.
# aggressively connecting to every node).
with open("suspicious_hosts.txt", mode="r", encoding="utf-8") as f:
SUSPICIOUS_HOSTS = {s.strip() for s in f if s.strip()}
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$") PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$") PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
PATTERN_ONION = re.compile(r"^([a-z2-7]{56}\.onion):(\d+)$") PATTERN_ONION = re.compile(r"^([a-z2-7]{56}\.onion):(\d+)$")
@ -213,9 +207,6 @@ def main():
# Skip duplicates (in case multiple seeds files were concatenated) # Skip duplicates (in case multiple seeds files were concatenated)
ips = dedup(ips) ips = dedup(ips)
print(f'{ip_stats(ips):s} After removing duplicates', file=sys.stderr) print(f'{ip_stats(ips):s} After removing duplicates', file=sys.stderr)
# Skip entries from suspicious hosts.
ips = [ip for ip in ips if ip['ip'] not in SUSPICIOUS_HOSTS]
print(f'{ip_stats(ips):s} Skip entries from suspicious hosts', file=sys.stderr)
# Enforce minimal number of blocks. # Enforce minimal number of blocks.
ips = [ip for ip in ips if ip['blocks'] >= MIN_BLOCKS] ips = [ip for ip in ips if ip['blocks'] >= MIN_BLOCKS]
print(f'{ip_stats(ips):s} Enforce minimal number of blocks', file=sys.stderr) print(f'{ip_stats(ips):s} Enforce minimal number of blocks', file=sys.stderr)

@ -1,16 +0,0 @@
130.211.129.106
148.251.238.178
176.9.46.6
178.63.107.226
54.173.72.127
54.174.10.182
54.183.64.54
54.194.231.211
54.66.214.167
54.66.220.137
54.67.33.14
54.77.251.214
54.94.195.96
54.94.200.247
83.81.130.26
88.198.17.7
Loading…
Cancel
Save