Skip to content
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

Rotate Boss/Mod/ConnectFinderByHardcode.cpp #182

Open
ksedgwic opened this issue Sep 20, 2023 · 2 comments
Open

Rotate Boss/Mod/ConnectFinderByHardcode.cpp #182

ksedgwic opened this issue Sep 20, 2023 · 2 comments

Comments

@ksedgwic
Copy link
Collaborator

From ZmnSCPxj:

Hi all,

Please periodically refresh the list of nodes in Boss/Mod/ConnectFinderByHardcode.cpp.

As you know, the network is always in flux, and nodes that used to be online may drop offline, or may change their IP address.

The last time the list was updated was more than a year ago.
Mea culpa.

Please attempt to check every node in Boss/Mod/ConnectFinderByHardcode.cpp by trying to do a "spot check" to connect to each listed node.
Also, check that the address you are able to connect to is the same as the one in the hardcoded list.

If a "spot check" connection attempt to a listed node fails, please remove it, then replace with some other node that you spot-checked to be online.
And if possible, please add 1 or 2 more on top of the removed nodes.

What I usually do when looking for new nodes is:

  • Open a tab for https://en.wikipedia.org/wiki/List_of_sovereign_states
  • Hold down Page Down for a random amount of time and look at whatever country I first set my eyes on.
  • Search for nodes with that country in 1ml.com or whatever LN node explorer.
  • Attempt to connect to them.
    If it succeeds, add them to the list.

The goal is to kinda have a nice geographic distribution.

Note that I do not ask permission from anyone to add them on the list or not.
For the most part, even if you have 100 new CLBOSS users everyday (highly unlikely!) there are currently 33 nodes in that list, so approximately 3 new connections per day, which should be tiny.

The hardcoded list is also a fallback.
For the most part, for new nodes, it should use the BOLT10 DNS, from the DNS resolvers of cdecker and darosior, though you should also periodically test them every now and them as well to see if they are still working.
However, there are some cases where a new node is unable to use a BOLT10 DNS:

  • The dig program is not installed and the user ignores the helpful warning log message about it.
  • The dig program is installed but the user has set the node to always connect out via Tor, but torify dig +tcp does not work for some reason.
  • cdecker and darosior have stopped running their DNS resolvers.

Thus the fallback should be kept up-to-date if possible.

Regards,
ZmnSCPxj

@tsjk
Copy link

tsjk commented Oct 5, 2023

Here we go:

WARNING: Node "BitKassa LN34961 [LND]" with id #0231eccc6510eb2e1c97c8a190d6ea096784aa7c358355442055aac8b20654f932 has new ipv4 address 82.165.119.236:9735.
OK: Successfully connected to "BitKassa LN34961 [LND]" with id #0231eccc6510eb2e1c97c8a190d6ea096784aa7c358355442055aac8b20654f932 via 82.165.119.236:9735 (direction=out).
OK: Successfully connected to "rompert.hashposition.com🔵" with id #02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b via 167.99.50.31:9735 (direction=out).
OK: Successfully connected to "1ML.com node ALPHA" with id #0217890e3aad8d35bc054f43acc00084b25229ecff0ab68debd82883ad65ee8266 via 23.237.77.11:9735 (direction=out).
OK: Successfully connected to "Pinky" with id #03a5886df676f3b3216a4520156157b8d653e262b520281d8d325c24fd8b456b9c via 188.165.2.4:9737 (direction=out).
ERROR: "02b686ccf655ece9aec77d4d80f19bb9193f7ce224ab7c8bbe72feb3cdd7187e01" does not exist in list of nodes.
ERROR: "0284a249ee165723f01ae08dc340f9f60bcbce8dda2140401f1bd7548ef11dd5e6" does not exist in list of nodes.
OK: Successfully connected to "ln2me.com / LightningTo.Me" with id #03bb88ccc444534da7b5b64b4f7b15e1eccb18e102db0e400d4b9cfe93763aa26d via 138.68.14.104:9735 (direction=out).
WARNING: Node "LNBiG Hub-2" with id #033e9ce4e8f0e68f7db49ffb6b9eecc10605f3f3fcb3c630545887749ab515b9c7 has new ipv4 address 46.229.165.154:9735.
OK: Successfully connected to "LNBiG Hub-2" with id #033e9ce4e8f0e68f7db49ffb6b9eecc10605f3f3fcb3c630545887749ab515b9c7 via 46.229.165.154:9735 (direction=out).
OK: Successfully connected to "citadel21" with id #03005b000a0ed2b172e7608b062bfe2be18df54769a246941b2cebb5ff2658bb83 via 170.75.164.184:9735 (direction=out).
OK: Successfully connected to "KIWILAMB" with id #03094b63a5ece2c363ab859952017f95bec7bd9e6975f0c8152f9eff83d0b045c2 via 203.118.186.226:9735 (direction=out).
OK: Successfully connected to "014-lnd-gar-nodl-it" with id #03456853c17774d597493875deebf8b7b6a781ca7a0d0b83bfaf862070f1ba7322 via 195.95.224.2:4014 (direction=out).
ERROR: "02d3db7c13440cf6b4d636208acceb0d07c60e4e14aacd2aa87c0e91ee827422e3" does not exist in list of nodes.
WARNING: Node "BCash_Is_Trash" with id #0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f has new ipv4 address 174.169.193.33:9735.
OK: Successfully connected to "BCash_Is_Trash" with id #0298f6074a454a1f5345cb2a7c6f9fce206cd0bf675d177cdbf0ca7508dd28852f via 174.169.193.33:9735 (direction=out).
OK: Successfully connected to "FreeMoon" with id #03e30da473716d39c09356d5372cf839d8ee3a1cdbd993ee853c23ab9bdfbce6f8 via 211.23.128.57:9735 (direction=out).
OK: Successfully connected to "satellite-api-mainnet" with id #03f21fc2e8ab0540eeb74dd715b5b66638ec1cd392db00009b320b3ed8c409bd57 via 35.197.62.113:9735 (direction=out).
ERROR: Connection to "Ang Sinah" with id #03a9b9b4d5bff67fb90d7deaf7db842e3aa5e3abea58fa488a8af3d163679107d7 failed with code 401 and message "All addresses failed: 118.163.74.161:9735: Connection establishment: Connection refused. [2001:b030:2422::208d]:9735: Connection establishment: Cannot assign requested address. Error connecting to gxogu2cjtp24wiaclk5p2cr5utjmrmg5f4raw33hb5cct3a3xxlwzaid.onion: Tor server reply: general SOCKS server failure. gxogu2cjtp24wiaclk5p2cr5utjmrmg5f4raw33hb5cct3a3xxlwzaid.onion:9735: Connection establishment: Connection refused. ".
ERROR: Connection to "[Paywall.Link] [LNPAY.co]" with id #033868c219bdb51a33560d854d500fe7d3898a1ad9e05dd89d0007e11313588500 failed with code 401 and message "All addresses failed: 52.204.16.4:9735: Connection establishment: Connection timed out. ".
ERROR: "028919036e106a4d58d35d2ca59dc05159e57baee651f9634e0639f00613a4cd3f" does not exist in list of nodes.
WARNING: Node "🇲🇾" with id #02c911ba09b21441200e0424279720ec13290b36cd51f4ab1a80cbb40b3baf0fe1 has new ipv4 address 202.184.116.119:9735.
OK: Successfully connected to "🇲🇾" with id #02c911ba09b21441200e0424279720ec13290b36cd51f4ab1a80cbb40b3baf0fe1 via 202.184.116.119:9735 (direction=out).
WARNING: Node "Sagittarius A*" with id #032434517e28f7b51665a525d5e11fa493bd4e30a59883b8156c2be4085f4aaf70 has new ipv4 address 121.127.33.90:9735.
OK: Successfully connected to "Sagittarius A*" with id #032434517e28f7b51665a525d5e11fa493bd4e30a59883b8156c2be4085f4aaf70 via 121.127.33.90:9735 (direction=out).
ERROR: "029dd81c32e3ea839b4b2f8edcc9bea227c40fa2c6509878034401a8ce2a8bac05" does not exist in list of nodes.
OK: Successfully connected to "Webempresario.com" with id #0215e9649c6a14ca64109418a5b17b0ddefd446e8256486a0c692e1fd8ec72e316 via 200.75.4.254:9735 (direction=out).
WARNING: Node "⚡G-Spot-21_69_420⚡" with id #03c5528c628681aa17ab9e117aa3ee6f06c750dfb17df758ecabcd68f1567ad8c1 has new ipv4 address 82.16.4.160:9735.
OK: Successfully connected to "⚡G-Spot-21_69_420⚡" with id #03c5528c628681aa17ab9e117aa3ee6f06c750dfb17df758ecabcd68f1567ad8c1 via 82.16.4.160:9735 (direction=out).
WARNING: Node "allyourbankarebelongtous" with id #035fed4182fbd0725264f8a0018cabb6b25514dd231291162ac8dd63afb278e9e8 has new ipv4 address 68.183.118.179:9735.
OK: Successfully connected to "allyourbankarebelongtous" with id #035fed4182fbd0725264f8a0018cabb6b25514dd231291162ac8dd63afb278e9e8 via 68.183.118.179:9735 (direction=out).
ERROR: "03b323009613777edc4e8024c6726758396bc026da99545971164a6baad31dfc69" does not exist in list of nodes.
OK: Successfully connected to "Cow" with id #028c8c9b0b588d00afabe905799aee0225a9315cdb63d7646b7ff7cf02fe4bf643 via 197.155.6.43:9735 (direction=out).
WARNING: Node "lnd.ignios.net" with id #0326f1d06748f019ecd98484eb23ba7367b1361e0ee6e38234d73afcc976dfdb3d has new ipv4 address 186.154.207.227:9735.
ERROR: Connection to "lnd.ignios.net" with id #0326f1d06748f019ecd98484eb23ba7367b1361e0ee6e38234d73afcc976dfdb3d failed with code 401 and message "All addresses failed: 186.154.207.227:9735: Connection establishment: Connection refused. [2001:470:1f05:4e5::2000]:9735: Connection establishment: Cannot assign requested address. Error connecting to cdemgrus74rrxomtfnxsz6qgwwz2rnpiv2xio6lhgfecmyjnefljz3yd.onion: Tor server reply: host unreachable. cdemgrus74rrxomtfnxsz6qgwwz2rnpiv2xio6lhgfecmyjnefljz3yd.onion:9735: Connection establishment: Connection refused. ".
WARNING: Node "sion" with id #03f3f3f9ea1e6e3df8108a3f11031f0fba8e494535c5a45fb83bdc95a89fbe18b7 has new ipv4 address 127.0.0.1:9735.
ERROR: Connection to "sion" with id #03f3f3f9ea1e6e3df8108a3f11031f0fba8e494535c5a45fb83bdc95a89fbe18b7 failed with code 401 and message "All addresses failed: 127.0.0.1:9735: Cryptographic handshake: peer closed connection (wrong key?). ".
ERROR: "035e3aa81503b67d61589270c043bcf6dcf083e40bc8630eeeeb08f85570be0fc9" does not exist in list of nodes.
OK: Successfully connected to "zerobps" with id #02309f3556d51e9d855594762dcf68cb283fbfd7e48618b6cecb8cd90e2e34d8ad via 79.62.233.36:9735 (direction=out).
ERROR: "0321e0fedfda0722c3eaa866cea8a23540dae4dfbaf247785f7fe111b0ea7a53ec" does not exist in list of nodes.
ERROR: "027e70d8859e090ed975b11cfa02109221482954a254dff185e4142188eb66518b" does not exist in list of nodes.
ERROR: Connection to "1.ln.aantonop.com" with id #0237fefbe8626bf888de0cad8c73630e32746a22a2c4faa91c1d9877a3826e1174 failed with code 401 and message "All addresses failed: 13.48.89.186:9735: Connection establishment: Connection refused. Error connecting to jkvrs7tabsafmznjdce2ldmhml5y5cqr62pz55tgidzrncdqxh3lefid.onion: Tor server reply: host unreachable. jkvrs7tabsafmznjdce2ldmhml5y5cqr62pz55tgidzrncdqxh3lefid.onion:9735: Connection establishment: Connection refused. ".

Just something I threw together. When it says that it can't find the node, it means that the id isn't in my gossiped list of nodes. Although I've carried out some maintenance on my node, and it therefore doesn't have weeks of uptime, it does have 12hrs. So, even if the node is still around, if it isn't in my gossip then it's probably not very dependable at the moment anyway and thus may not be suitable for this list anyway.

About the gathering if new participants for that list, we could like think of something. I think that at 1ml one can actually sort out the oldest active nodes with a public ip per country, parse that, and try to connect. Might look at it.

@tsjk
Copy link

tsjk commented Oct 6, 2023

It is possible too send an ?order=oldest to 1ml, but it doesn't seem to reply with what I thought. But, to find old nodes that are presumably stable we can get all active channels from gossip and sort them by short channel id, and then look them up. That's just one idea for programmatically finding seed nodes.
Another can be to just query the 1ml location endpoints and choose from ones with at least some connections, perhaps. Like

curl -s "https://1ml.com/location/it?order=channelcount" | html2text -nobs | \
    perl -0pe 's/\s\*\sInactive\sPublic\sNode.*?\s\*\s/ \*/gms' | \
    grep -P '\*{5}_.+_\*{5}|o (Capacity|Channel Count|[0-9a-f]{66})' | \
    perl -0pe 's/^\s*\*{5}_//gms' | perl -0pe 's/_\*{5}\n\s*o/ \t/gms' | perl -0pe 's/\n\s*o/ \t/gms' | \
    column -t | \
    awk '($(NF - 1) > 9) { print }'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants