Skip to content

Commit

Permalink
feat(dht): updated republish and expiration
Browse files Browse the repository at this point in the history
Applies changes from libp2p/specs#451

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

Closes #3229
  • Loading branch information
lidel committed Dec 12, 2022
1 parent f8f19ba commit 1ef309e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protocols/kad/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ impl Default for 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_ttl: Some(Duration::from_secs(48 * 60 * 60)),
record_replication_interval: Some(Duration::from_secs(60 * 60)),
record_publication_interval: Some(Duration::from_secs(24 * 60 * 60)),
record_publication_interval: Some(Duration::from_secs(22 * 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)),
provider_publication_interval: Some(Duration::from_secs(22 * 60 * 60)),
provider_record_ttl: Some(Duration::from_secs(48 * 60 * 60)),
connection_idle_timeout: Duration::from_secs(10),
kbucket_inserts: KademliaBucketInserts::OnConnected,
caching: KademliaCaching::Enabled { max_peers: 1 },
Expand Down

0 comments on commit 1ef309e

Please sign in to comment.