orbitdb-archive / ipfs-log

Append-only log CRDT on IPFS
https://orbitdb.github.io/ipfs-log/
MIT License
398 stars 55 forks source link

Store identities as ipld links #273

Open oed opened 5 years ago

oed commented 5 years ago

Right now identity objects are stored within each entry. This results in a lot of duplicated data when there is a lot of entries created by the same identity. One way to mitigate this is to store the identity as an ipfs object and in the entry just put an ipld link to this object.

It could looks something like this: (pseudo code)

const identityCID = await ipfs.dag.put(identity)

entry.key = `${identityCID}/publickey`
entry.identity = identityCID
aphelionz commented 5 years ago

This seems like a pretty solid idea IMO. IPLD has matured a lot since we last looked at it and I believe it's "ready" enough to give us optimizations like this one.