-
Notifications
You must be signed in to change notification settings - Fork 231
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
Self-maintaining IPNS Record Replication #268
Comments
@aschmahmann Any chance you're available for feedback on this? Sorry if you're the wrong person to ping (or if I'm not meant to ping people for spec issues), I'm going off of the other open issues. |
Unfortunately, I haven't had much time to look at this and probably won't for the next week or so. I am trying to write up some common FAQs around IPNS and the various issues people have with it soon to make it easier for folks like you to find good places to push forward. I'll post back here once it's up as it'll probably speed up conversation. If I don't post back in the next two weeks feel free to ping me 😄. A few clarification points that I'll make though just in case you weren't aware:
|
Thanks for the feedback!
Some things I need to investigate (help is appreciated, especially since some of these things are outside of what I can do) is to:
EDIT: I've now updated the issue with Self-maintaining Record Replication V2.
|
@aschmahmann Just pinging as you said to do |
@LynHyper thanks for the ping (and apologies for the delay). Here (https://pl-strflt.notion.site/IPNS-Overview-and-FAQ-071b9b14f12045ea842a7d51cfb47dff) are some general thoughts and FAQs on IPNS tackling some of the questions I've heard most frequently. If you have more general IPNS questions happy to discuss on that link, on discuss.ipfs.io, or Discord/Matrix. If more interesting conversation comes out of it we can just add it into the doc for the next group of people to benefit from 😄. Of course if you want to talk more about this proposal we can do that here. |
@aschmahmann Thanks for the link! I think I want to talk more about my proposal here, I want some feedback on the updates I made to the proposal (especially if you think you have a better mechanism for the threshold trigger and such). It seems my proposal tackles "Increase Flexibility Around Freshness Guarantees". (Also, I just created #274, the "Default performance" section in the link gave me the idea for it) |
@aschmahmann Pinging for feedback |
I've now converted this proposal into an IPIP: #309 |
Self-maintaining Record Replication V2
See edit history for Self-maintaining Record Replication V1.
The Problem
IPFS has some challenging attributes which makes storing content for long periods of time without maintenance difficult:
So, if we have an IPNS record, which we want to remain accessible to anyone even after the publisher has stopped republishing records under it's key, how do we achieve this?
Related Issues: ipfs/kubo#8542 ipfs/kubo#4435 ipfs/kubo#3117 ipfs/kubo#1958
The Aim
The goal of this proposal is to achieve the following:
So, let's outline the scenario:
k51key
.12D3KooWkay
,12D3KooWkez
, and12D3KooWbey
who are willing to add the IPNS record to their DHT. These nodes are now record holders.k51key
, however, the IPNS record should still be around for as long as possible.Record Holder Behaviour
Each IPNS record holder needs to consider the following two questions:
Let's look at question 1...
For record holders which have not opted in to maintaining the peer set above the threshold, their lower threshold is
0
meaning they don't check the threshold and they don't maintain the peer set, this is analogous toRouting: dhtclient
.For record holders which have opted in to maintaining the peer set above the threshold, their lower threshold is configurable per a config option. The lower the threshold, the more likely another record holder's threshold has already been passed, this means that only the select few record holders with high threshold values need to update the peer set.
Let's say nodes
12D3KooWkay
,12D3KooWkez
, and12D3KooWbey
have threshold values of0
,1
, and2
respectively...12D3KooWkay
no longer resolvesk51key
.12D3KooWkez
checks the DHT or the PubSub topic to see that two record holders now remain, it's lower threshold is1
however, so it won't respond.12D3KooWbey
checks the DHT or the PubSub topic to see that two record holders now remain, it's lower threshold is2
so it will start looking for a record holder to replace12D3KooWkay
...Going back to our second question, who should
12D3KooWbey
find to replace12D3KooWkay
? Or in other words, who should ideally be in the dynamic peer set fork51key
?When node A wanted to publish a CID under
k51key
, it searched towardskey
to find the original three record holders. So,12D3KooWbey
should also search towardskey
to find new record holders in order to maintain IPFS's searching properties. Now, let's continue...12D3KooWbey
searches towardskey
and eventually finds node12D3KooWkab
(in reality, multiple record holders will likely be found),12D3KooWkab
is willing to hold the IPNS record fork51key
and so it becomes a new record holder, the number of record holders is now above the lower threshold of node12D3KooWbey
.The optional 5th step stated in https://github.com/ipfs/specs/blob/main/naming/pubsub.md#protocol should prevent old IPNS records from being replicated instead of newer records, this makes replay attacks more difficult as genuine IPFS nodes will actively attempt to keep the newest IPNS records alive.
To prevent a node from setting
threshold: 10,000
and over-replicating the record, IPFS nodes that agree to hold an IPNS record must search towards the IPNS address and find the number of providers, if the number of record holders is more than double the node's own threshold value then it must not continue to fetch the record.Summary
IPFS nodes (IPNS record holders) will have a lower threshold value they can configure, the threshold value defines the minimum number of record holders that need to exist before they search for new record holders.
Advantages
Disadvantages
Possible names
"Self-maintaining IPNS Record Replication" isn't the greatest name, it certainly won't work in a code context, so here's some proposals for possible names:
Lagrange Replication - Space themed, idea of orbiting a point in space, doesn't strictly tie itself to IPNS.
InterPlanetary Name System Replication (IPNSR) - Keeps to IPFS and IPNS name scheme, clearly defines itself as an extension of IPNS, IPNS and IPNSR may be too similar in appearance.
The text was updated successfully, but these errors were encountered: