ChluNetwork / chlu-ipfs-support

Support libs to talk to IPFS
MIT License
1 stars 1 forks source link

Use DIDs #92

Closed fazo96 closed 6 years ago

fazo96 commented 6 years ago

Big changes to the whole implementation to drop keypairs in favor of a Distributed IDentity system for identifying Vendors, Marketplaces and Customers.

The Vendor-Marketplace cosigned key is still a key using the old system and not a DID.

Most impacted internal modules:

Impact in other projects:

Other projects will need to be updated for these changes

What's missing

kulpreet commented 6 years ago

@fazo96 about

IPFS Utils module: has new functions to put/get objects as JSON in IPFS. This is because the DIDs are stored in IPFS using the dag-pb format with a string with json inside. Instead, the other data structures are stored with dag-pb and our protobuf encoded binaries inside

Should we not try to align these?

fazo96 commented 6 years ago

IPFS Utils module: has new functions to put/get objects as JSON in IPFS. This is because the DIDs are stored in IPFS using the dag-pb format with a string with json inside. Instead, the other data structures are stored with dag-pb and our protobuf encoded binaries inside

Should we not try to align these?

@kulpreet good point, here's how it works now

Verified Reviews

object --> protobuf binary buffer (using our protobufs) --> (we enter IPFS logic here) dag-pb binary buffer --> IPFS

Unverified Reviews

Let's not focus on unverified reviews in this PR, but I'm including this to be thorough

object --> String (using JSON.stringify) --> utf-8 encoded binary buffer --> (we enter IPFS logic here) dag-pb binary buffer --> IPFS

DIDs

object --> String (using JSON.stringify) --> utf-8 encoded binary buffer --> (we enter IPFS logic here) dag-pb binary buffer --> IPFS

@kulpreet We can either use JSON for Verified Reviews or we write/use protobufs for DIDs and Unverified Reviews. I'd go for JSON but I trust your judgement more on these kind of things, so it's up to you and I think you said on slack we'll go with protobufs

About Unverified Reviews, I'd leave that out of this PR and just focus on DIDs for now