-
Notifications
You must be signed in to change notification settings - Fork 108
Spec refining: Mutable links in IPLD #9
Comments
P2 would make the selector/path traversal have to handle the caching, while the implicit/namespaced would defer that to the subsystems that handle that resolution. Caching is hard, both in making the hard decision and on letting users do it, if it makes sense, we might do both. |
|
|
Thanks @jbenet. This is my actual problem: Given an IPLD graph, I want to prove a few things according to the graph shape. To do this, I need to make sure that the links that appear are all immutable (it is fine to have mutable links, as long as I can distinguish them). How can I distinguish immutable with mutable links?
I kind of prefer that we make sure our parsers know the table of the immutable namespaces and leave it as it is (see my very last point) |
Yes, use mutable namespaces. Remember that doing things like putting the distinguisher in the link key
|
IPLD parsers need only to understand /ipld.
|
Thanks @jbenet. Ok, we agree that we will use the name space as distinguisher. 🎉
(maybe bikeshedding here) I don't think that the namespaces are descriptive of their mutability properties the way you describe "in-band". To understand if a path is going to be immutable or not you will need a table of namespaces saying which one is immutable, which one is not (which to me sounds out of band). An in-band solution, imho would be something like prefixing a bit to a path to describe mutability.
Not when we have something like:
How does IPLD resolve this Also, in this case:
|
Yeah I hear you. You also need a table of some sort to know that bit means mutability. It's May be that mutable bit would be a better way. I'm just not are atm. Trying
|
Namespaces seem to no longer be used in links at all... have we given up on mutable links? |
Closing due to staleness as per team agreement to clean up the issue tracker a bit (ipld/team-mgmt#28). This doesn't mean this issue is off the table entirely, it's just not on the current active stack but may be revisited in the near future. If you feel there is something pertinent here, please speak up, reopen, or open a new issue. [/boilerplate] |
As soon as we allow mutable links in IPLD we lose some of the functional authenticated data structure properties. In other words, we cannot any more do reasoning that assume immutable datasets.
Proposal 1: assumption on the name spaces
However, we could allow mutable links, as long as mutable link can be differentiate from an immutable one, say "/ipns/HASH", we are able to specify in the IPLD parser that IPNS is mutable (which add complexity to the parser as soon as we are going to have other addresses)
Proposal 2: explicit mutable links
Being explicit, say that
/
is immutable,~
is mutable. However developers can run in a lot of errors by putting immutable links in~
(which is safe) and viceversa (that is not safe)cc @diasdavid, @dignifiedquire, @jbenet, @mildred
The text was updated successfully, but these errors were encountered: