feat: support delegated value store in content-routing module #1008
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for delegated
put
/get
operations in thecontent-routing
module instead of always using the DHT. It depends on some in-progress PRs, so CI is currently failing.Dependencies:
To run the tests locally, you can checkout the PR branch of
js-libp2p-interfaces
andnpm link
it into js-libp2p. For now, I'm depending on a commit hash for the delegated-content-routing PR, but that doesn't work for libp2p-interfaces since it's a multi-module repo.This adds a new entry to the config
modules
object calledvalueStorage
which can containValueStore
implementations. Currently the only non-DHT implementation is in the delegated-content-routing PR above.I don't think the config change is technically a breaking API change since it's additive - if you don't add the new valueStorage module in your config you just won't get delegated put/get operations, but the DHT will still work if you've enabled it.