Skip to content

Commit b71a077

Browse files
committed
Merge bitcoin/bitcoin#24417: net: Update hardcoded seeds for 23.x
d80dc12 net: Update hardcoded seeds for 23.x (laanwj) 9f27157 contrib: make-seeds updates for 23.x (laanwj) Pull request description: Update hardcoded P2P network seeds for 23.x, and update the generation script and documentation as necessary Tool output: ``` IPv4 IPv6 Onion Pass 469910 72944 0 Initial 469910 72944 0 Skip entries with invalid address 469910 72944 0 After removing duplicates 469909 72944 0 Skip entries from suspicious hosts 165760 65113 0 Enforce minimal number of blocks 160668 63183 0 Require service bit 1 4951 1376 0 Require minimum uptime 4406 1051 0 Require a known and recent user agent 4307 1031 0 Filter out hosts with multiple bitcoin ports ERR: Could not resolve ASN for "2001:678:7dc:8::2": The DNS query name does not exist: 8.0.0.0.c.d.7.0.8.7.6.0.1.0.0.2.origin6.asn.cymru.com. 512 134 0 Look up ASNs and limit results per ASN and per net ```. ACKs for top commit: achow101: ACK d80dc12 jonatack: ACK d80dc12 reviewed the changes and ran the README steps Tree-SHA512: c651b0501cc28d397cc0778eff6aed4273669082d6ef207ce58ce198b443be66532bf1e8d618ccae3ba671ae4cccfd9b4dd2dfebacc97f3c3bd4e9fa58a3d7a3
2 parents 40ab879 + d80dc12 commit b71a077

File tree

5 files changed

+1105
-1071
lines changed

5 files changed

+1105
-1071
lines changed

contrib/seeds/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ to addrman with).
1010

1111
The seeds compiled into the release are created from sipa's DNS seed data, like this:
1212

13-
curl -s http://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
13+
curl https://bitcoin.sipa.be/seeds.txt.gz | gzip -dc > seeds_main.txt
1414
python3 makeseeds.py < seeds_main.txt > nodes_main.txt
15+
cat nodes_main_manual.txt >> nodes_main.txt
1516
python3 generate-seeds.py . > ../../src/chainparamsseeds.h
1617

1718
## Dependencies

contrib/seeds/makeseeds.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@
2525

2626
PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
2727
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
28-
PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$")
28+
PATTERN_ONION = re.compile(r"^([a-z2-7]{56}\.onion):(\d+)$")
2929
PATTERN_AGENT = re.compile(
3030
r"^/Satoshi:("
3131
r"0.14.(0|1|2|3|99)|"
3232
r"0.15.(0|1|2|99)|"
3333
r"0.16.(0|1|2|3|99)|"
3434
r"0.17.(0|0.1|1|2|99)|"
3535
r"0.18.(0|1|99)|"
36-
r"0.19.(0|1|99)|"
37-
r"0.20.(0|1|99)|"
38-
r"0.21.99"
36+
r"0.19.(0|1|2|99)|"
37+
r"0.20.(0|1|2|99)|"
38+
r"0.21.(0|1|2|99)|"
39+
r"22.(0|99)|"
40+
r"23.99"
3941
r")")
4042

4143
def parseline(line):
@@ -140,8 +142,8 @@ def lookup_asn(net, ip):
140142
reversed(ipaddr.split('.'))) + prefix + '.asn.cymru.com',
141143
'TXT').response.answer][0].split('\"')[1].split(' ')[0])
142144
return asn
143-
except Exception:
144-
sys.stderr.write('ERR: Could not resolve ASN for "' + ip + '"\n')
145+
except Exception as e:
146+
sys.stderr.write(f'ERR: Could not resolve ASN for "{ip}": {e}\n')
145147
return None
146148

147149
# Based on Greg Maxwell's seed_filter.py

0 commit comments

Comments
 (0)