New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: add I2P hardcoded seeds #21825
net: add I2P hardcoded seeds #21825
Conversation
ed0df54
to
58a5a35
Compare
58a5a35
to
142e2da
Compare
Tested several times running a node with no peers.dat, dnsseed=0, noonion, onlynet=i2p, and only these new I2P seeds in chainparamsseeds, and it connects to all of the I2P seeds that are online right now. -addrinfo and getnodeaddresses
$ bitcoin-cli -addrinfo
{
"addresses_known": {
"ipv4": 0,
"ipv6": 0,
"torv2": 0,
"torv3": 0,
"i2p": 8,
"total": 8
}
}
$ bitcoin-cli getnodeaddresses 0
[
{
"time": 1619267336,
"services": 9,
"address": "wwbw7nqr3ahkqv62cuqfwgtneekvvpnuc4i4f6yo7tpoqjswvcwa.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1619331060,
"services": 9,
"address": "hnbbyjpxx54623l555sta7pocy3se4sdgmuebi5k6reesz5rjp6q.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1618857028,
"services": 9,
"address": "72l3ucjkuscrbiiepoehuwqgknyzgo7zuix5ty4puwrkyhtmnsga.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1619232946,
"services": 9,
"address": "zsxwyo6qcn3chqzwxnseusqgsnuw3maqnztkiypyfxtya4snkoka.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1619240850,
"services": 9,
"address": "pjs7or2ctvteeo5tu4bwyrtydeuhqhvdprtujn4daxr75jpebjxa.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1618776457,
"services": 9,
"address": "c4gfnttsuwqomiygupdqqqyy5y5emnk5c73hrfvatri67prd7vyq.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1619959105,
"services": 1033,
"address": "h3r6bkn46qxftwja53pxiykntegfyfjqtnzbm6iv6r5mungmqgmq.b32.i2p",
"port": 8333,
"network": "i2p"
},
{
"time": 1619108616,
"services": 9,
"address": "gehtac45oaghz54ypyopim64mql7oad2bqclla74l6tfeolzmodq.b32.i2p",
"port": 8333,
"network": "i2p"
}
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 142e2da
I verified that the additions to src/chainparamsseeds.h
are generated from the extended contrib/seeds/nodes_main.txt
. The I2P peers in my node's list of peers are a subset of the added ones.
The command from the PR description did not work for me because the getnodeaddresses
RPC does not return a JSON with network
field. I used this instead:
bitcoin-cli getnodeaddresses 0 |jq -r '.[] | (select(.address |test("\\.i2p$"; "i"))) | .address' | sort
ACK |
Indeed, it was added only very recently to master in #21594 (thanks!) Updated the PR description to work before that merge. |
Collecting ways to do this with ./src/bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.address | contains(".b32.i2p"))) | .address' | sort
./src/bitcoin-cli getnodeaddresses 0 | jq -r '.[] | (select(.address | test("\\.i2p$"; "i"))) | .address' | sort
./src/bitcoin-cli getnodeaddresses 0 | jq '.[] | (select(.network == "i2p")) | .address' | sort |
or #21843... |
I have |
ACK 142e2da
|
Same, am connected to all but one. Pinged the person on IRC and they are checking. |
Ok, that node is back online and expected to be stable. We're good 🚀 |
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.
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 rpcgetnodeaddresses 0
that initially returns only the new I2P addresses.