Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Reliable Mutability Primitive #19
base: main
Are you sure you want to change the base?
Proposal: Reliable Mutability Primitive #19
Changes from 1 commit
f7e4291
d87bd83
059bc29
e7d2542
68055dd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carsonfarmer: This is still correct, IPNS is too unreliable for anything with essentially sub-minute temporal resolution. So for data updates, it is not useful. However, we are finding it quite useful for buckets, and have used it to great effect recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should also mention something else to provide further context: We're currently managing 1000s (yes, that's right) of IPNS updates for buckets. This currently takes an extremely long time to republish. We are actively conducting tests to determine exactly how long this takes, and how often it fails to complete. In some cases, it is taking hours per day.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a closely related issue ipfs/kubo#4435
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carsonfarmer: Yeh, this one shouldn't be ignored... maybe the existing solution is just not going to cut it in the end, and a fresh start is required. How likely is it that we could see "two" official methods, and have one of them win out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(New person comment): is this essential for unblock the core use-case of enabling customers to do ipns updates instead of DNS updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes if those updates were to made from browser. It is also however useful on it's own merit as it enables apps to pull updated content even if such content has no human readable name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Textile threads utilize pubsub which means that any issues with enabling pubsub by default are things that would be experienced by Textile threads users. They also utilize IPNS over PubSub for buckets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I'm not sure this is really required as we can give IPNS the same guarantees as IPFS. However, since the amount of data is smaller this idea of a public IPNS pinning service seems pretty cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sort of doable already "for free" if we have some way to pin/follow IPNS updates. I can just share the private key with my multiple devices via
ipfs key export/import
.There are alternative approaches too, but figured I'd point this one out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I meant getting it to a state where we can comfortably tell users this is how you go about it. I do have some reservations towards key sharing, but that's probably discussion worth having when we get there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the very least because updating DNS is such a pain we see people using DNSLink and pointing it at IPNS records instead of IPFS because its so much easier to work with IPNS updates than DNS updates. Similarly, we may see people storing IPNS addresses in ENS to save on not wanting to publish many blockchain transactions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we get more data on this? Is this a question to PM's?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's well know fact, evidence been that teams have tried and ultimately end up going with DNSLink solution. I'm pretty sure PL did that too, but someone with longer history here might know better.
We could also get specific collabs to comment here to either validate the claim or dispute it. I have invited folks from textile & fission to validate. We could reach out to more teams.
@olizilla do you by a chance know if we used to have IPNS in DNSLink past or am I making wrong assumptions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BigLep good pulse check in this issue (2017–today): ipfs/kubo#3860
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we been presented any usecases where ipns (once it has a reliable mutability primitive) isn't sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that despite all this usable IPNS will address enough use cases to be worth it. That said we might find that a higher level primitive that address more use cases out of the box will provide a better market fit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carsonfarmer: Obviously I like this idea. But it would end up being something threads-like I think. A benefit here is that threads supports multi-writer updates, which I think its a feature lacking in IPNS right now. The downside is that threads "as is" won't scale. Additionally, the encryption layer in threads is too heavy handed right now for a general solution like this. Having said all that, these things are all fixable implementation details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this even possible? Doesn't it depend on each DNS' API for mutating actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hypothetically speaking we can start a standardization effort form a committee and get enough big players onboard to get it done. I imagine there might be some value for DNS providers to make their products more accessible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carsonfarmer: This would be an interesting shorter term solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(new person coming up to speed): what would this look like? I think I'll be able to grok it with a tiny sketch or a mock sample code example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have recently created pinning service API that allows you to add pinning services like pinata to your IPFS node and then remote pin things. Kind of like adding git remote and pushing changes to it.
Idea here is to extend that API in a way that you could update DNSLink provided by the pinning service to the new CID through extended API. Kind of like when you push to remote it updates corresponding branch to new commit. In our case branch names would be DNSLinks, that you could update to point to new CID.
@BigLep does this answer your question ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gozala : thanks - this helps. The only open area for me then is where is this DNSLink stored? Is this a DNSLink in a DNS record on a (sub)domain that the Pinning Service owns?
Basically would the chain be
My domain (e.g., mywebsite.com) has DNS record that points to a domain the Pinning service controls (e.g., mywebsite.somepinningservice.com) which has the DNSLink to the latest CID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BigLep This is great question – it makes us think about all implications.
Depends on: if you (A) publish to your own domain, or (B) use a subdomain provided by pinning service for free.
To give you a real life example, let's say we want to host https://cid.ipfs.io on some pinning service (pin + take care of updating dnslink + TLS).
(B) is easy. Pinning service simply give you a name on some domain they own. Fleek does that already, they give https://cid-utils-website.on.fleek.co/ for free + they set up DNSLink for those names (because they own the top domain).
(A) means we want to delegate updates of DNS TXT record on
_dnslink.cid.ipfs.io
to some pinning service.This can be done either by:
_dnslink.cid.ipfs.io
to a DNS server controlled by pinning service. That way they have full control over DNSLink without having any control over other records (because we delegated only_dnslink
subdomain)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: likely includes an up-to-date IPNS over PubSub implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aschmahmann do you mean something like
Or a separate item ? I
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well IPNS over PubSub has a few tweaks over just PubSub itself to give some reliability. It's specced here.
@hugomrdias would probably know more about other work required to get IPNS functioning in a browser I just know that without the IPNS over PubSub changes in the spec that it won't be fast enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the basic question, but I'm still confused by what is meant by "functioning IPNS in browsers". What isn't working browsers today?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should probably capture this in the document. Currently pubsub is disabled in go-ipfs so all the IPNS records are published and resolved from DHT. Nodes in browsers do not have necessary capabilities to query/publish DHT. Instead they do publish and resolve IPNS records over pubsub. Result is fragmented network where go and js nodes see each others records.
Furthermore because because there is not enough nodes on the network with pubsub enabled published records from browser don't always make to nodes subscribed to them.
P.S.: Some of this may not be completely accurate, @hugomrdias @aschmahmann could you please confirm I'm not misrepresenting current state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, more advanced mutability systems could be built (e.g. where instead of a single public key, we can have M of N signers required on records). But it all starts from having the UX and process around pinning mutable names and having a performant and efficient mutability system (e.g. Persistent PubSub, like what IPNS over PubSub uses)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, although just getting things stable + performant in go-ipfs and web browsers would likely go along way while collabs conversations are underway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gozala : can we put some high-level estimates (in terms of dev weeks) around each item in the "Brief plan of attack" above? I think that will help give a bit more clarity on the size of this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I'm not well qualified to do this. I've mostly put this proposal together from prior discussions I had with @aschmahmann and @hugomrdias (still in outsider capacity) in an attempt to rally folks who have much better understanding of internal details.
Help trying to scope it out further, would be greatly appreciated.
P.S: Me & @hugomrdias plan no going over this proposal tomorrow to flush it out further.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be slow, but why is it required to get pinning services onboard? I'm not saying we should skip doing this, I just want to make sure I understand the inter-dependency. For example, in my head right now I understand that Pinning Services are critical for persistence but I'm less clear on their role in mutability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a valid point and calling out pinning services specifically might be projecting too far of how things would work.
This was partially influenced by the fact that IPNS (at least in its current form) requires records to be republished otherwise they'll become unsolvable. Implicit assumption here, is that, unless there are motivated nodes to do this, system will end up impractical. Pinning services just seem well positions to do this given that they are motivated nodes keep content that IPNS will point to available (insert git branch analogy here).
That said we could and probably should consider different strategies to meet reliability goals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words I think we still need someone to help coordinate efforts beyond just leading implementation efforts, to ensure that we do not end up with a system that is directly tied to PL infrastructure. I am assuming this involves getting other teams onboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on at least thinking about pinning services in the context of IPNS:
(would there be special handling for a CID with libp2p-key codec etc)