Hi!
More than a year ago I worked on a distributed app for archiving and sharing research data between dynamically changing number of peers. The project used IPFS for file sharing and communication (via pubsub), and utilized CRDT-based distributed index for storing a set of CIDs corresponding to the items in a particular archive (which is, I guess, an equivalent of a particular cluster in IPFS-cluster terms). My version of the CRDT-based index was very similar to what IPFS-cluster uses now for dynamic consensus, with few notable differences:
- In IPFS-cluster, as far as I can understand, CRDTs are used to hold a distributed event log, with each entry corresponding to a pin/unpin action or changing the replication factor of a particular item. My index acted like a grow-only set of CIDs for users to replicate (depending on the settings of a particular archive, each file from an index is either downloaded and pinned by everyone automatically, or downloaded and pinned manually at will).
- In IPFS-cluster, only trusted peers can modify the set of pinned items (by adding new entries to a distributed event log I presume). In my case, everyone could connect to a particular archive and add new CIDs to the index, thus sharing their files with others. As a basic spam prevention measure, peer must solve a proof-of-work for each update they push to the index, otherwise the update won’t be accepted by other peers.
- In my case, the index itself is grow-only, there’s no way to remove a particular CID from the index. While the CRDTs used in IPFS-cluster are also grow-only, the pinset is not (again, if I understood correctly). Any particular pin can be removed from the pinset by a trusted peer.
Otherwise, both CRDT-based consensus and my distributed index are conceptually very similar, and my prototype utilized very similar update and replication methods that are now used in IPFS-cluster. Therefore, when I’ve decided to move back and continue my work on this project, and learned that IPFS-cluster can handle dynamic consensus now, I started to wonder whether I could use IPFS-cluster as a new backend, replacing my own index implementation. The main questions are, obviously, if it’s possible to configure cluster so that all the peers are trusted to add new pins to the pinset (and no one have the permission to remove the pins), and whether it’s possible to reject the CRDT updates based on certain condition (e.g. no PoW result was supplied in the metadata section of the pin being added to the pinset). What would you suggest?
Thanks!