-
Notifications
You must be signed in to change notification settings - Fork 238
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
Max Record LifeTime Set To 36 Hours, Bug? #397
Comments
Good question, I'm not sure what the reason is behind the different durations. However, it's worth noting that provider records are different than regular DHT records and so it's not implausible that they would have different max record times. For example, a DHT server node may have many provider records for a given entry, but only a single regular record for a given entry. |
Good point, one of the things that confused me was the comment in With IPNS, records are published with a default eol of 24 hours. However as per the comment linked above, if the IPNS record is around in local storage, it wont be removed from the dht storage until 36 hours after. This also means that if we publish an IPNS record with an eol of 72 hours, it will be removed from dht storage after 36 hours, not 72 hours. |
@postables Just some background into this. We use Kad-Dht to store two "types" of records:
|
This is correct. Basically, there are two concepts here:
Note: There are currently two supported record types. The other is the "public key" record type. Public keys:
|
@postables can you think of a good way to document this? I agree it's a confusing distinction. |
@Stebalien Not sure to be honest, I think maybe just documenting the two different record types in th readme, and then in the code comments telling people to look at the readme? |
How does it affect the query of a file on IPFS? My plan is to use a private IPFS network to share files. However, I need the files to be available for download anytime. Does it mean that with this lifetime limit, after 24 hours, the files will not be referenced anymore by the DHT, and that nobody can retrieve them? Is there a solution that can be used on the node side to gurarantee the availability of the data? |
While working on a
go-libp2p-kad-dht
fork I noticed this line of code within therecords.go
file that says the max record age is 36 hours.Throughout other parts of the codebase, such as the the providers.go file, provide validity is set to 24 hours. Additionally from conversations over irc and discord, I was under the assumption that the max record age is 24 hours.
For example in handlers.go we perform a check against
MaxRecordAge
to determine whether or not we should delete old records. With the current MaxRecordAge, instead of invalidating records after 24 hours, we will do it after 36 hours.Is this a bug, or an undocumented edge-case?
The text was updated successfully, but these errors were encountered: