noosphere icon indicating copy to clipboard operation
noosphere copied to clipboard

Verify proof chain for name record adoption candidates

Open cdata opened this issue 2 years ago • 1 comments

As of #253 , we will have end-to-end name publishing and resolving. However, only the name resolvers currently do any validation of name records. Name records must also be validated at the time that they are adopted by a sphere (this includes user spheres and Geist spheres), because although most names may be coming from the name system, many may come from other sources such as other users, digital or physical links (like QR codes) or even manual entry. So, proof chains must be verified at adoption time to ensure their correctness.

cdata avatar Mar 09 '23 00:03 cdata

Plan:

  • Gateway NS worker: when querying for latest LinkRecord, also fetch the Sphere's delegations/revocations (see noosphere_sphere::replication) in order to validate record before adopting.
  • In noosphere_sphere::replication, for each link record, also fetch the sphere's deleg/revs.
  • adopt_petname() should validate records. on client, must have deleg/rev at this point.

We may also change the fetch handler to do streaming CarStreams, like replicate, though replicate gets everything you need for a sphere, though fetch only has delta ("changes since X").

Will need https://github.com/subconsciousnetwork/noosphere/issues/395 in order to validate records within noosphere-sphere

jsantell avatar May 17 '23 21:05 jsantell