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

add option to run DHT without providers #274

Closed
whyrusleeping opened this issue Feb 22, 2019 · 10 comments · Fixed by #400
Closed

add option to run DHT without providers #274

whyrusleeping opened this issue Feb 22, 2019 · 10 comments · Fixed by #400
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature topic/filecoin Topic filecoin

Comments

@whyrusleeping
Copy link
Contributor

Some systems (like filecoin) don't need providers, and having the providers subsystem running is a moderate annoyance (its currently causing an absurd amount of bandwidth usage :/). Can we get an option to run the dht without providers?

@whyrusleeping whyrusleeping added kind/enhancement A net-new feature or improvement to an existing feature help wanted Seeking public contribution on this issue exp/novice Someone with a little familiarity can pick up topic/filecoin Topic filecoin labels Feb 22, 2019
@vyzo
Copy link
Contributor

vyzo commented Feb 22, 2019

But filecoin does need providers for autorelay.

@whyrusleeping
Copy link
Contributor Author

@vyzo well thats a great point...

Advice? It hurts to run a node right now because of dht traffic

@raulk
Copy link
Member

raulk commented Feb 22, 2019

IMO the solution is to allow for client-mode switches for each functionality:

  • Peer routing: client mode allows you to find peers, but it doesn't keep a routing table.
  • Provider system: client mode allows you to resolve providers, but you ignore requests to store provider records.
  • Content routing: client mode allows you to lookup content, but you don't store any.

@raulk
Copy link
Member

raulk commented Feb 22, 2019

^^ in that manner, Filecoin nodes would run the provider subsystem in client-mode, peer routing in full mode, and no content routing.

@whyrusleeping
Copy link
Contributor Author

@raulk the problem with that though is that there would be no nodes left to store the provider records for autorelay rendezvous :/

@anacrolix
Copy link
Contributor

I'd like to know how this issue might affect choices in #265. If anyone would like to comment there on how they might envisage how this issue might affect the projected API around modes and such, or whether these will be disjoint parts of the API, thanks.

@Stebalien
Copy link
Member

@whyrusleeping are you worried about sending or storing provider records? You can pass a custom router wrapper to bitswap that turns Provide calls into no-ops (I've done this while testing go-ipfs performance in the past).

@raulk
Copy link
Member

raulk commented Feb 26, 2019

@anacrolix done:
#265 (comment)

@Stebalien apparently Filecoin was seeing an issue with nodes receiving a lot of provider record traffic, even though they don’t use this feature. However, they can’t disable it altogether because autorelay uses it. There’s something at play here. I started investigating but the proofs parameter generation took ages and I context switched. On my plate for tomorrow.

@tobowers
Copy link

Was there any outcome from this PR... I think we're seeing something similar - our CPU getting eaten up by provide.

@whyrusleeping
Copy link
Contributor Author

@tobowers i don't think its made progress, as a workaround, try passing a completely unrelated datastore to the dht (don't use the same datastore that backs your blockstore)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature topic/filecoin Topic filecoin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants