tiki-archive / pool-kgraph

TIKI's Anonymous Contextual Knowledge Graph
MIT License
0 stars 1 forks source link

Determine algorithm for pushing data to kgraph from mobile app #16

Closed sfaria27 closed 2 years ago

sfaria27 commented 2 years ago

When do we push data to the kgraph; how do we know which data to push to kgraph; what happens if that data is not >epsilon

Acceptance criteria:

  1. Answer the questions
mike-audi commented 2 years ago

We need to add the following:

  1. email subject sanitizer
  2. a function that turns user data into in edges based on supported vertices
  3. a local data push table that maintains the "push" state for each edge
  4. on startup, if there are any edges that need to be pushed, push them
  5. on new edge, if there are any edges that need to be pushed, push them
  6. each edge can be in the following states (not pushed, pushing, pushed, retry later)
  7. if an edge comes back from the service marked as in quarantine, it needs to be scheduled to be pushed at a later date. We can just use a simple timestamp threshold, no need for a timer, since users are generating so much data, it won't sit too long waiting to be pushed
  8. we need to generate a unique proof key per edge, a simple way is sha256(uuid, secure random salt)
  9. we need to generate a unique fingerprint per edge with a sha256(edge byte value, proof key)
  10. mint an NFT for each data point, and keep the corresponding NFT hash id in the local data push table for local lookups (needed for UI)