ipfs / ipfs/kubo

Published name lifetime inconsistent with DHT and default values

Open
#7,534 6 comments 0 reactions 0 assignees View on GitHub
kind/enhancement need/triage topic/docs-ipfs
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:
go-ipfs version: 0.6.0
Repo version: 10
System version: amd64/windows
Golang version: go1.14.4

#### Description:
I was making some changes to [ipfs-watch-and-publish](https://github.com/BubuAnabelas/ipfs-watch-and-publish) and noticed that `ipfs name publish --lifetime` accepts huge arguments (i.e. 1 year = 8760h) and still publish it successfuly. The [default record lifetime](https://github.com/ipfs/go-ipfs/blob/1a32379c998f706c1bc7751fc8326f4f4a63f778/namesys/republisher/repub.go#L36) is 24 hours and libp2p-kad-dht's [default max record age is 36 hours](https://github.com/libp2p/go-libp2p-kad-dht/blob/c245d836ab82922314dcbc364b3763d114938aad/dht_options.go#L118) so, I guess even if I pass "48h" as the lifetime parameter it would expire after 36 hours anyway.

It's kinda confusing, given that the DHT options are different across the nodes, maybe it could be useful to check that the lifetime parameter is lower than the local DHT's max record.

This can be related to https://github.com/libp2p/go-libp2p-kad-dht/issues/397

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.