fairDataSociety / fdp-storage

Serverless Web3 filesystem for organizing users' personal data implemented in Typescript.

Home Page:https://www.npmjs.com/package/@fairdatasociety/fdp-storage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feed topic is not calculated by design

nugaon opened this issue · comments

The feed topic construction for arbitrary strings according to the documentation only using keccak256 hashing function such as
https://github.com/fairDataSociety/FIPs/blob/master/text/0061-personal-storage.md?plain=1#L170

In FDP Storage (and thereby in FairOS), the topic is calculated every time as
https://github.com/fairDataSociety/fdp-storage/blob/master/src/feed/api.ts#L26

which takes the BMT Hash of the arbitrary string for every topic.
The BMT hashing algorithm is a more heavier task without any yield, but with additional complexity.

Additionally, POD_TOPIC constant has value Pods in the library which is also not identical with the FIP version PODs.