Open
Conversation
…ect, defer extraction of the wrapped PHT node to the PHT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Today, HyperDHT powers Hyperswarm. Tomorrow, it will also power Hypersearch. This PR implements primitives for Hypersearch.
More specifically:
This PR implements a put/get interface for prefix hash tree nodes. The PHT nodes are authenticated in two ways: cryptographically, in that the DHT target for a PHT node is derived from the publisher's public key -- and structurally, in that a PHT node must conform to the expected schema.
A useful prefix hash tree is a linked data structure consisting of a set of PHT nodes. Thus, the intention of the put/get interface implemented in this PR is to enable any DHT participant to define and publish static PHT topologies which cannot be tampered with by other participants. By "static," we mean immutable tries which cannot add or delete keys. (This sort of trie is useful if you know all your keys ahead of time, as is the case with a static keyword vocabulary.)
Note that "authenticated" does not mean "immutable." Bob can publish a trie consisting of a set of PHT nodes -- and then later, there's nothing stopping him from overwriting it by publishing new nodes using the same public key and tree ID. But this would be a case of user error, and Bob should not do this.