EarthProgram / did-earth

Apache License 2.0
0 stars 1 forks source link

Need version # in did syntax #5

Open jandrieu opened 2 years ago

jandrieu commented 2 years ago

We need a version mark in the DID. Something like

did:earth:1:ixo:nft:[unique-id]

That version will let us upgrade from a repo-based version 0 (resolvers must get the repo chain registry on their own) to some later version where the chain registry might be interactive.

wip-abramson commented 2 years ago

Do we actually need 3 different versions?

Not sure exactly how versioning happens in cosmos. May only be one module identified by namespace per chainspace.

jandrieu commented 2 years ago

@wip-abramson :

Do we actually need 3 different versions?

That's a great question. If needed we could do it with a dash (and save a character)

did:earth-0:cosmos-1:nft-3

However, the chain-name is meant to be a permanent name which always maps to the current chain-id. I suppose more generically it maybe should be a key value that always has a definitive mapping to a compatible chain-id.

There's a fundamental tension that I don't think we've figured out. How do we version the system that points to a long-lived identifier.

Maybe the hyphen is our friend for sub-terms. Unfortunately, we can't use it in place of the method name, which must be terminated by a ' and can only have lower case characters and numeric digits.

jandrieu commented 2 years ago

so, i think we might be stuck with did:earth:1:cosmos-1:nft-2:abc123 or did:earth:cosmos-1:nft-2:1:abc123

jandrieu commented 2 years ago

My concern is that the version captures algorithmic compliance at a point in time. I doubt we need to enable algorithmic flexibility at each layer.

jandrieu commented 2 years ago

I believe we can get by with just the one version for the version of the specification.

That's the real issue. The spec has a really long tail: current capabilities need backwards compatibility even as we manage new features. And, perhaps most importantly, it's the method spec that is the most visible and "permanent" feature of the method. The ability to have a DID method that works for an arbitrary number of application chains is awesome. Versioning those variations is, imo, vital.

In contrast, the chainspace and the namespace should be handle-able by adjusting the chain registry and name server to use different names when there are breaking changes, without changing the specification.

That is did:earth:ixo:nft:1:123 and did:earth:ixo:nft:2:123 are going to require understanding potential breaking changes to the spec.

While did:earth:ixo:nft:1:123, did:earth:ixo2:nft:1:123, and did:earth:ixo:nft2:1:123 all use the same version of the method spec, but point to different instances of either the chain or the asset module.

did:earth:ixo:nft:1:123 and did:earth:ixo2:nft:1:123 just needs a new entry in the cosmos name registry.

did:earth:ixo:nft:1:123, did:earth:ixo:nft2:1:123 just needs a new entry in the ixo name server.

In short, I think it's easy to rename chain-spaces and name-spaces. It's just the method name that we want to live long term, with variability for breaking changes.