Skip to content
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

kad: Update republish and expiration interval to new spec #3229

Closed
mxinden opened this issue Dec 12, 2022 · 0 comments · Fixed by #3230
Closed

kad: Update republish and expiration interval to new spec #3229

mxinden opened this issue Dec 12, 2022 · 0 comments · Fixed by #3230
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted priority:nicetohave

Comments

@mxinden
Copy link
Member

mxinden commented Dec 12, 2022

Update the libp2p-kad default values to the Kademlia specification revision 2 libp2p/specs#451, namely the republish interval and the expiration interval.

impl Default for KademliaConfig {
fn default() -> Self {
KademliaConfig {
kbucket_pending_timeout: Duration::from_secs(60),
query_config: QueryConfig::default(),
protocol_config: Default::default(),
record_ttl: Some(Duration::from_secs(36 * 60 * 60)),
record_replication_interval: Some(Duration::from_secs(60 * 60)),
record_publication_interval: Some(Duration::from_secs(24 * 60 * 60)),
record_filtering: KademliaStoreInserts::Unfiltered,
provider_publication_interval: Some(Duration::from_secs(12 * 60 * 60)),
provider_record_ttl: Some(Duration::from_secs(24 * 60 * 60)),
connection_idle_timeout: Duration::from_secs(10),
kbucket_inserts: KademliaBucketInserts::OnConnected,
caching: KademliaCaching::Enabled { max_peers: 1 },

@mxinden mxinden added priority:nicetohave difficulty:easy help wanted getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels Dec 12, 2022
lidel added a commit that referenced this issue Dec 12, 2022
Applies changes from libp2p/specs#451

New defaults are:
Record Expiration: 48h
Record Republish Interval: 22h

Closes #3229
@mergify mergify bot closed this as completed in #3230 Mar 29, 2024
@mergify mergify bot closed this as completed in 9805339 Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted priority:nicetohave
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant