-
Notifications
You must be signed in to change notification settings - Fork 867
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
Ask user if he want's to enable dht (instead of just running a client) #1859
Comments
@aschmahmann iirc we no longer need to force If so, we should remove |
I retested this with 0.16.0 and that's true, This might not be ideal... it only makes sense to enable this on non-mobile devices. So if you use a laptop very much mobile all the time you don't want the traffic and the reduction of battery lifetime. As long as we cannot react to "metered" connection detection and battery/ac power and also determine how long the device is usually online at a time, it makes sense to have Btw: Pre-0.16.0 it was |
@lidel so I propose we change that back to |
Do we have any metrics on battery consumption? |
I mean, when we're mobile it's best to do only the absolutely necessary work to avoid having the Wifi/4G module active sending packages. I think this will consume most of the power. I'll try to run my notebook until its empty with both settings and post some numbers :) |
@AlexxNica So I ran the test. Battery consumption is pretty low on a idling desktop on my laptop so I had to plan two days without having to use the laptop to run it - sorry for the delay. Test procedure:
The first test was with dhtserver which ran 12:50 h and used 891 MB traffic. The second test was with dhtclient which ran 13:55 h and used 661 MB traffic. In theory there's a Samsung specific setting to conserve a bit more power, but I haven't used it to make the test less hardware depended. |
Thanks! I believe MVP here is to add opt-in that changes from |
Yeah that's a nice temporary solution until go-ipfs can switch on the fly :) |
I just came across this after trying to figure out why IPFS-desktop isn't putting the DHT to server mode. I discovered that we have the ipfs-desktop/src/common/store.js Lines 4 to 17 in bc321a6
I'd be interested in taking this one on. @lidel |
My vote is to decrease code surface of ipfs-desktop that we need to maintain, and not add more dialogs, asks, and questions. When left alone, go-ipfs is already deciding if it should be a server or not. being smarter about defaults, adjusting them based on network conditions (e.g: v0.13 it will have automatic hole punching). Removing hardcoded @2color If you open a PR that removes |
Makes sense. I'll give this a go. |
* chore: remove hard-coded dht client mode * chore: migration to remove hard-coded dht client Fixes #1859, user can modify the default via Routing.Type in the config. Co-authored-by: Daniel N <[email protected]>
Is your feature request related to a problem? Please describe.
Currently, the default config is using
Routing.Type = 'dhtclient'
. This isn't really scaling if we onboard more and more desktop clients.Describe the solution you'd like
We should ask the user if he/she if she likes to contribute more to the network and has a stable non-metered internet connection + runs the computer usually for several hours.
Something along these lines.
This would help the network in the long run, as the desktop users get aware of the fact that they do run an ipfs node, but only using network resources.
If a node isn't properly accessible autonat should disable the dht server functionality anyway, right?
The text was updated successfully, but these errors were encountered: