You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When users do AddAddrs(..., TTL) they want the TTL to count after the peer disconnects, not immediately after setting the TTL.
What happens instead is that the TTL is almost always discarded because identify has set a much higher TTL for the same addresses. This TTL ofcourse is just a marker value which means remove these on disconnection. So the addresses are actually removed well before TTL if the peer disconnects soon after the call to AddAddrs.
The suggested solution for users is to use their own address book and not share the libp2p host's address book. This helps in most of the cases, but the majority of the users would still prefer expiring addresses TTL after disconnection not from the time of calling.
Note: This is similar to what @MarcoPolo suggested here: #2355 (comment)
I'm proposing that we do this for addresses as well, not just protocols.
When users do AddAddrs(..., TTL) they want the TTL to count after the peer disconnects, not immediately after setting the TTL.
What happens instead is that the TTL is almost always discarded because identify has set a much higher TTL for the same addresses. This TTL ofcourse is just a marker value which means remove these on disconnection. So the addresses are actually removed well before TTL if the peer disconnects soon after the call to AddAddrs.
The suggested solution for users is to use their own address book and not share the libp2p host's address book. This helps in most of the cases, but the majority of the users would still prefer expiring addresses TTL after disconnection not from the time of calling.
Note: This is similar to what @MarcoPolo suggested here: #2355 (comment)
I'm proposing that we do this for addresses as well, not just protocols.
For the most recent misuse of the API: libp2p/go-libp2p-kad-dht#1053 (comment)
The text was updated successfully, but these errors were encountered: