veramolabs / did-eth

evolution of did:ethr
Apache License 2.0
14 stars 8 forks source link

[proposal] users should be able to decide if they want some attributes also in contract storage #51

Open mirceanis opened 1 year ago

mirceanis commented 1 year ago

Contract methods that update the DID document should also have a flag (or a variant) that also stores the attributes in contract storage, besides emitting the event.

This would be useful for partial on-chain resolution.

We also need to be mindful of revocation of attributes as these would have to also revoke the potentially stored data, regardless of the flag.

jac18281828 commented 1 year ago

I support this idea as a variant function. I believe XMTP would use this api.

We can support revocation by overwriting and deleting the element from the storage map. A simple key value map is probably sufficient for this.

Does it make sense to implement an eternal storage contract for this purpose so that the storage element is separated from the registry logic? That would be a very simple contract but it could make sense from a design perspective.