ipfs-log icon indicating copy to clipboard operation
ipfs-log copied to clipboard

Store identities as ipld links

Open oed opened this issue 4 years ago • 1 comments

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

oed avatar Oct 28 '19 13:10 oed

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.

aphelionz avatar Oct 28 '19 14:10 aphelionz