yesoer / peersdb

A distributed p2p database, based on orbitdb and intended for the sharing of datasets for model training
GNU General Public License v3.0
0 stars 0 forks source link

Duplicate contribution blocks #24

Closed yesoer closed 1 year ago

yesoer commented 1 year ago

This might be an issue with orbitdb

yesoer commented 1 year ago

The BA milestone can be removed if our security aspects still work out but that needs to be checked

yesoer commented 1 year ago

It's not an issue with orbitdb. The eventlog is built on ipfs-log which indeed uses Merkle DAGs. This means each block gets a CID and no two CIDs can be the same. IPFS-log also is a CRDT structure which means it needs to be mergeable. For this purpose each block is also added a lamport clock value. The hashing function also hashes based on this clock value, hence CIDs for blocks will rarely be the same. (the cid is essentially computed by func Sum(data []byte, code uint64, length int) (Multihash, error) from multihash )

With the chosen approach in #26 this will not pose a problem. Hence the PR will reference this issue as resolves