libp2p / specs

Technical specifications for the libp2p networking stack
https://libp2p.io
1.58k stars 275 forks source link

New values for DHT Provider Record Republish and Expiration (22h/48h, RFM17) #451

Closed yiannisbot closed 1 year ago

yiannisbot commented 2 years ago

This PR updates the description of the Provider Record settings and most importantly proposes new values for both the republish interval and the expiration interval. The new proposed values are:

and they are based on the comprehensive study published here: https://github.com/protocol/network-measurements/blob/master/results/rfm17-provider-record-liveness.md

yiannisbot commented 2 years ago

@lidel @mxinden @aschmahmann I've addressed all comments, apart from the one suggesting to have the PR on IPFS before merge this. Can you have another look to see if everything is ready? In the meantime, we'll work to get the PR ready on the IPFS side of things - feel free to do so as well if you wish :)

yiannisbot commented 2 years ago

Here is the PR to change the republish interval in kubo: https://github.com/ipfs/kubo/pull/9326 The expiration interval change is coming soon.

cortze commented 2 years ago

Here is the second PR libp2p/go-libp2p-kad-dht#793 to increase the expiration time of the PRs from 24h to 48h.

Stebalien commented 1 year ago

Heil Hydra, I guess. If the records are staying around that long, we should do this.

lidel commented 1 year ago

There is also a general DX/UX improvement that comes with raising the ceiling of expiration.

Trying to keep IPNS website alive with spotty internet access is tricky. It is not hard to imagine a situation when the publisher of an IPNS record can't be online exactly every 24h (living on a boat, or having to visit a library/school to access internet). Expiration set to 48h makes a more “humane” default (“publish once a day, exact hour does not matter”).


In effort to include this in Kubo 0.18.0-rc1 before holidays, I've released go-libp2p-kad-dht v0.20.0 with 48h expiration. Kubo 0.18 will also have the default Republish Interval set to 22h (https://github.com/ipfs/kubo/issues/9389), being fully compliant with the spec from this PR.

@mxinden

  1. should I open PR to adjust defaults in rust-libp2p/protocols/kad/src/behaviour.rs, or are there other places?
  2. ok to merge this PR?
p-shahi commented 1 year ago

Should we go ahead and update js-libp2p-kad-dht (and js-ipfs' reprovide interval)? cc: @achingbrain

mxinden commented 1 year ago

@mxinden

1. should I open PR to adjust defaults in [rust-libp2p/protocols/kad/src/behaviour.rs](https://github.com/libp2p/rust-libp2p/blob/4fe518de86ecb0805421cca6e291db168c10eac1/protocols/kad/src/behaviour.rs#L182-L196), or are there other places?

2. ok to merge this PR?

Tracked here https://github.com/libp2p/rust-libp2p/issues/3229. Contributions are always welcome. That said, not a requirement to move forward here. Thanks for stewarding this @lidel.