libp2p / go-libp2p-kad-dht

A Kademlia DHT implementation on go-libp2p
https://github.com/libp2p/specs/tree/master/kad-dht
MIT License
524 stars 224 forks source link

feat: increase the max record age to 48h (PUT_VALUE, RFM17) #794

Closed cortze closed 1 year ago

cortze commented 1 year ago

Description

This PR aims to increase the default value for the IPNS records stored through the PUT_VALUE method from 36h to 48h based on RFM17 as discussed in libp2p/specs#451.

Motivation

The measurements from RFM17 were promising and have led to modifying the current republish-interval (ipfs/kubo#9326) and record's expiration time (libp2p/go-libp2p-kad-dht#793). This PR aims to homogenize the expiration of the records to 48h.

Modifications

lidel commented 1 year ago

Unifying this with value from https://github.com/libp2p/go-libp2p-kad-dht/pull/793 is a good idea, and raising the ceiling of expiration in itself makes things like publishing IPNS records more resilient for use cases there publisher can't be online every day under exact 24h window. 48h make a better real world default ("publish every day, no matter when, and it will be ok").

I rebased this PR to reuse variable from https://github.com/libp2p/go-libp2p-kad-dht/pull/793, which protects us from diverging defaults in the future.

Pinged various stakeholders but no concerns were raised here and in https://github.com/libp2p/specs/pull/451 I am merging this and will release as go-libp2p-kad-dht v0.20.0

cortze commented 1 year ago

Thanks @lidel !