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

Detect Gossiping Capabilities Automatically #729

Open
flikites opened this issue May 26, 2022 · 5 comments
Open

Detect Gossiping Capabilities Automatically #729

flikites opened this issue May 26, 2022 · 5 comments

Comments

@flikites
Copy link

flikites commented May 26, 2022

Currently the handshake network is at risk due to the fact that full nodes do not gossip (listen) their availability automatically, but rather require the node operaters to specifically configure the node to provide resources to the network.

In my opinion, we need to remove the current band-aid and provide a real fix.

The node should check to see if it can gossip (listen) and be accessible on the default ports automatically, if it can not, then it should gracefully turn off the gossiping feature.

@pinheadmz
Copy link
Member

Currently the handshake network is at risk due to the fact that full nodes do not listen automatically,

In my opinion, the risk is that there are simply not enough full nodes, period. Remember in this context Bob Wallet doesn't count. We need nodes running on servers with maximum uptime, AND listening. I'm not sure how many full nodes there are out there that could accept inbound connections, but just aren't. My guess is that right now, that's not a big problem.

The real issue is gossiping your own reachable IP address to the network. It actually doesn't even matter if you ARE listening if no one out there knows they can connect to you. And this is the issue we ran in to last year: the network was being flooded with addr packets from unreachable nodes, bob wallet users were broadcasting their home IPs but of course those nodes were not reachable.

The current behavior of requiring --public-host was added by @chjj here in a bit of an emergency network update.

I'm not totally sure when it will be safe to remove this behavior -- probably actually will require a majority of full nodes to BE correctly reachable and listening so that if we set listen:true by default the network won't fall apart from all the unreachable bob wallet addrs.

The node should check to see if it can listen on the default ports automatically,

How do we do this?

@flikites
Copy link
Author

flikites commented May 26, 2022

Apologies I may have used the wrong verbiage here. I think the goal should be to automatically gossip a full node to the network that has a public IP that is reachable from the default port.

I believe @rithvikvibhu proposed a solution in the discord regarding a better way to do this.

He put together this docker image which allowed me to get my nodes gossiping their IPs to the network: https://hub.docker.com/r/rithvikvibhu/hsd-with-ip

To answer your question though, I think the easiest way to do this is to run a script to see if the node can be accessed via its public host/port combo, and automatically gossip if the node is reachable, if the node is not reachable keep the default config that HSD uses now.

Light clients running out of peers is kinda a problem because the community uses that as a crutch in their advertising.

We can't have light clients become unaccessible at this point in the game.

@flikites
Copy link
Author

Either that or incentive running a full gossiping node. Because from the votes I got today, I highly doubt this thing will scale based on humans taking these extra steps to add resources to the network.

@flikites flikites changed the title Detect Listening Capabilities Automatically Detect Gossiping Capabilities Automatically May 26, 2022
@flikites
Copy link
Author

Is their anyway to detect how many gossiping nodes are active on the network?

@pinheadmz
Copy link
Member

Is their anyway to detect how many gossiping nodes are active on the network?

Befranz and Rithvik have done some work in this area. The most effective process would be a network crawler. A customized hsd node that connects to peers, requests addr messages then dicsonnects gracefully and tries to conenct to as many nodes as possible, but over time (not all at once).

Bitcoin dns seeder uses this: https://github.com/sipa/bitcoin-seeder

and HNS has dns seeders too for example oyu can try dig seed.easyhandshake.com to get a list (max 50) of rechable hosts

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