Hey everyone,
So for my desktop app I will be implementing a decentralized file metadata system.
I had previously planned to allow the user to specify tracker servers in the application, to which they would upload metadata during the file upload process. On reflection I decided to instead have the users upload this metadata as another file to the autonomi network, and link them via a smart contract.
This ensures the information stays decentralized and accessible to everyone. Indexers can still index this data from the blockchain if they wish to perform specific private computation or search algorithms.
The main selling point of this method is that client applications can query the blockchain via ethers.js or web3js and get the metadata without the need for any servers. The smart contract simply ties two files together, the file itself, and the metadata file. The cost for storing both these xornames depends on the blockchain chosen, but for a L2 it should be low. Each xorname is 32 bytes.
By storing all the metadata in a file it saves from the cost of having it in the smart contract itself.
This is all optional so applications can decide to use it or not, or just to upload the metadata to their own servers.
Here is the smart contract below:
As for the metadata files, it would be good for applications that use this method to agree on a standard so the creation and usage of this metadata would work for all applications.
My proposal would be something along the lines of a json object:
name: string
description: string
extension: string
size (bytes): int
hash: string
additional: array of key/value pairs
Would love some feedback.