aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-05-04 09:44:34 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-05-04 09:44:46 +0200
commitab9a566ab33333cf8a770d778bdfb7610734fed2 (patch)
treeeb84fa1a55a89db0720d2052fa591027d429bd5c /contrib
parente2d4e67a8fccfaebad5accced629711bb6402d3f (diff)
parent142e2da4401aa8c0643f7fc473ffaceafbbf90c3 (diff)
downloadbitcoin-ab9a566ab33333cf8a770d778bdfb7610734fed2.tar.xz
Merge bitcoin/bitcoin#21825: net: add I2P hardcoded seeds
142e2da4401aa8c0643f7fc473ffaceafbbf90c3 net: add I2P seeds to chainparamsseeds (Jon Atack) e01f173fb9b9d35729c700199ba6cf1c028fcaaf contrib: add a few I2P seed nodes (Jon Atack) ea269c7ef1a65960d680f405de21708ba477ecce contrib: parse I2P addresses in generate-seeds.py (Jon Atack) Pull request description: Follow-up to #21560 that updated the fixed seeds infra for BIP155 addresses and then added Tor v3 ones: - Update contrib/generate-seeds.py to parse I2P addresses - Add a few I2P nodes to contrib/seeds/nodes_main.txt - Run generate-seeds.py and add the I2P seeds to chainparamsseeds.h Reviewers, see contrib/seeds/README.md for more info and feel free to use the following CLI one-liner to check for and propose additional seeds for contrib/seeds/nodes_main.txt. You can also see how many I2P peers your node knows with cli -addrinfo. ```rake bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.address | contains(".b32.i2p"))) | .address' | sort ``` I verified the I2P addresses are correctly BIP155-serialized/deserialized by building with all seeds removed from chainparamsseeds.h except those added here, restarting with `-datadir=newdir -dnsseed=0` and running rpc ` getnodeaddresses 0` that initially returns only the new I2P addresses. ACKs for top commit: laanwj: ACK 142e2da4401aa8c0643f7fc473ffaceafbbf90c3 vasild: ACK 142e2da4401aa8c0643f7fc473ffaceafbbf90c3 Tree-SHA512: 040576012d5f1f034e2bd566ad654a6fdfd8ff7f6b12fa40c9fda1e948ebf8417fcea64cfc14938a41439370aa4669bab3e97274f9d4f9a6906fa9520afa9cf8
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/seeds/generate-seeds.py7
-rw-r--r--contrib/seeds/nodes_main.txt10
2 files changed, 17 insertions, 0 deletions
diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py
index d95069277d..9560b586ec 100755
--- a/contrib/seeds/generate-seeds.py
+++ b/contrib/seeds/generate-seeds.py
@@ -16,6 +16,7 @@ These files must consist of lines in the format
<ip>:<port>
[<ipv6>]:<port>
<onion>.onion:<port>
+ <i2p>.b32.i2p:<port>
The output will be two data structures with the peers in binary format:
@@ -52,6 +53,12 @@ def name_to_bip155(addr):
return (BIP155Network.TORV3, vchAddr[:32])
else:
raise ValueError('Invalid onion %s' % vchAddr)
+ elif addr.endswith('.b32.i2p'):
+ vchAddr = b32decode(addr[0:-8] + '====', True)
+ if len(vchAddr) == 32:
+ return (BIP155Network.I2P, vchAddr)
+ else:
+ raise ValueError(f'Invalid I2P {vchAddr}')
elif '.' in addr: # IPv4
return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.'))))
elif ':' in addr: # IPv6
diff --git a/contrib/seeds/nodes_main.txt b/contrib/seeds/nodes_main.txt
index c43caa73eb..7300e3043d 100644
--- a/contrib/seeds/nodes_main.txt
+++ b/contrib/seeds/nodes_main.txt
@@ -1188,3 +1188,13 @@ sys54sv4xv3hn3sdiv3oadmzqpgyhd4u4xphv4xqk64ckvaxzm57a7yd.onion:8333
tddeij4qigtjr6jfnrmq6btnirmq5msgwcsdpcdjr7atftm7cxlqztid.onion:8333
vi5bnbxkleeqi6hfccjochnn65lcxlfqs4uwgmhudph554zibiusqnad.onion:8333
xqt25cobm5zqucac3634zfght72he6u3eagfyej5ellbhcdgos7t2had.onion:8333
+
+# manually added 2021-05 for minimal i2p bootstrap support
+72l3ucjkuscrbiiepoehuwqgknyzgo7zuix5ty4puwrkyhtmnsga.b32.i2p:8333
+c4gfnttsuwqomiygupdqqqyy5y5emnk5c73hrfvatri67prd7vyq.b32.i2p:8333
+gehtac45oaghz54ypyopim64mql7oad2bqclla74l6tfeolzmodq.b32.i2p:8333
+h3r6bkn46qxftwja53pxiykntegfyfjqtnzbm6iv6r5mungmqgmq.b32.i2p:8333
+hnbbyjpxx54623l555sta7pocy3se4sdgmuebi5k6reesz5rjp6q.b32.i2p:8333
+pjs7or2ctvteeo5tu4bwyrtydeuhqhvdprtujn4daxr75jpebjxa.b32.i2p:8333
+wwbw7nqr3ahkqv62cuqfwgtneekvvpnuc4i4f6yo7tpoqjswvcwa.b32.i2p:8333
+zsxwyo6qcn3chqzwxnseusqgsnuw3maqnztkiypyfxtya4snkoka.b32.i2p:8333