Created at 2pm, Apr 11
madmanArtificial Intelligence
0
Dria: The Decentralized Knowledge Layer for Humans and AI
jutDpd8WFoRAh7cG0oK41cPJ2rMxKVl0gZD05cCZvZo
File Type
PDF
Entry Count
151
Embed. Model
jina_embeddings_v2_base_en
Index Type
hnsw

Batuhan Akta¸sbatuhan@firstbatch.xyzOmer Demirta¸s ¨omerdemirtas@firstbatch.xyzKerim Kayakerim@firstbatch.xyzOmer Kaya ¨omer@firstbatch.xyzErhan Tezcanerhan@firstbatch.xyzApril 11, 2024

In a perfect world, we only have the single Dria node that connects Dria itself to the Waku network, along with honest nodes that serve their compute power and do honest computations; and all messages are sent in clear. In the real world though, we must consider several types of dishonest behavior for such a scenario. All the node types are described as follows, respecting figure 4: Dria: This node is owned by Dria and handles the broadcast of compute requests and the aggregation of the responses. 4A content topic is message metadata that allows filtering, as described by Waku https:
id: 38e4f4a216d43376007c9aaa7c68228c - page: 24
//docs.waku.org/learn/concepts/content-topics/ 24 4 2 0 2 , 1 1 l i r p A 4 v t f a r D Honest: These nodes follow the protocol as described and compute the requested computation as defined within the broadcasted message. Passive: A passive node does not use any computational resources; instead, it curiously listens to the network for the first compute result and simply copies it, making it seem like it has computed the same result. Semi-Honest: Semi-honest nodes are a group of nodes, such that one node within the group computes the result and immediately shares it with the others within its group. By doing this, all of them will be recognized as participants, while only one actually did computational work. Note that their internal communication may use another channel outside of Waku. Malicious: This node is our classical adversarial; it may diverge from the protocol altogether or follow it while using some other computation that is not requested.
id: edfd136797aba74e1fd4145a10c453be - page: 24
Each dishonest party requires a different mechanism to counter-act. For semi-honest nodes, we require a unique solution that makes it costly to join & stay within the network with multiple nodes. For passive nodes, the messages within the network must be encrypted until the Dria node aggregates them and reveals the solution; however, that solution also makes the Dria node a single point of trust, which is not optimal. Finally, malicious nodes are countered by simply having enough honest nodes, as is the case in any decentralized & trustless setting. Within Dria Knowledge Network, we solve all of these problems with the help of a combination of cryptographic and crypto-economic security mechanisms. The overall solution is realized using three algorithms: (1) compute, (2) aggregate, and (3) verify. 5.1 Dria Computation
id: a629f3b032ca35a3881a3b6a11d2f233 - page: 25
Algorithm 2 Dria Computation Require: x broadcasted by Dria node with Drias content topic Require: (kpriv, kpub) as a secp256k1 key-pair that belongs to the node Require: dpub Dria public-key of a secp256k1 key-pair y f (x) s Sign(kpriv, y) e Encrypt(dpub, s||y) h Hash(s||y) return h||s||e f is a public function We first describe our compute methodology in algorithm 2. In the naive solution, a node would simply compute y f (x) and publish y, but as we discussed above, that comes with problems. Instead, compute nodes within the network return their results to the network in a way that only Dria can read (with 25 4 2 0 2 , 1 1 l i r p A 4 v t f a r D encryption) while also providing authenticity of the result (with signature) and a commitment to their result (with hashing).
id: 104b1962df3d9a66ca40f4c59b692cc4 - page: 25
How to Retrieve?
# Search

curl -X POST "https://search.dria.co/hnsw/search" \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"rerank": true, "top_n": 10, "contract_id": "jutDpd8WFoRAh7cG0oK41cPJ2rMxKVl0gZD05cCZvZo", "query": "What is alexanDRIA library?"}'
        
# Query

curl -X POST "https://search.dria.co/hnsw/query" \
-H "x-api-key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{"vector": [0.123, 0.5236], "top_n": 10, "contract_id": "jutDpd8WFoRAh7cG0oK41cPJ2rMxKVl0gZD05cCZvZo", "level": 2}'