Always start as DHT Client and switch to DHT Server after 48 hours
#9 045 ouverte le 17 juin 2022
Métriques du dépôt
- Stars
- (13 906 stars)
- Métriques de merge PR
- (Merge moyen 4j 2h) (28 PRs mergées en 30 j)
Description
Checklist
- My issue is specific & actionable.
- I am not suggesting a protocol enhancement.
- I have searched on the issue tracker for my issue.
Description
Currently, all newly started nodes do advertise as DHT Server if they can handle incoming connections.
A lot of computers are used just for a couple of hours and then restarted, put into standby or have longer outages of their internet connection.
I think go-ipfs should start a timer on startup and if there's a connection outage for more than 10 minutes, a standby event etc. the timer will be reset.
Once 48 hours are reached, the node switches to the current 'dht' setting which will decide if the node can handle incoming connections etc. and then may switch to the server profile.
This will eliminate the efforts to push data to nodes which are not capable of holding data for longer periods of time available on their network, but recover them after two days, if there's for example a connection outage.