Skip to content

Add PHT node put/get for search stack#241

Open
noahlevenson wants to merge 24 commits intomainfrom
noah/pht-keyword-search
Open

Add PHT node put/get for search stack#241
noahlevenson wants to merge 24 commits intomainfrom
noah/pht-keyword-search

Conversation

@noahlevenson
Copy link
Copy Markdown

@noahlevenson noahlevenson commented Mar 17, 2026

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.

@noahlevenson noahlevenson changed the title Add PHT node put/get for keyword inverted index search Add PHT node put/get for search stack Apr 7, 2026
@noahlevenson noahlevenson marked this pull request as ready for review April 7, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant