Releases: libp2p/go-libp2p-kad-dht
v0.5.1
- Reduce inbound stream idle timeout (time before we kill idle streams) from 10 to 1 minute. This should reduce memory consumption.
- Update dependencies.
- Make the routing table's latency tolerance (max latency of peers in the routing table) configurable.
- Obey context when blocking on sending messages to peers.
- Fix a timer leak.
- Improve metrics.
- Name metric views.
- Count message and request attempts so the message count is always greater than the error count.
- Don't count stream resets as message errors (unless we receive a partial message).
- Make sure to cleanup all goroutines when canceling a query.
v0.5.0
Switch to using multihashes in provider records. When providing a CID, we now strip the codec/version and provide the raw multihash. When searching for a CID, we do the same.
- For CIDv0, this changes nothing. CIDv0 CIDs are just raw multihashes.
- For CIDv1, new nodes and old nodes will not find each other. Given the current state of content routing and the fact that most files use CIDv0, this shouldn't cause too many issues (and it's better to do this before we fix the DHT).
This release also updates the bootstrap list to remove the bootstrappers with 1024 bit keys.
Finally, this improves the bucket refreshing logic to ensure we better connect to nodes close to us in the DHT.
v0.4.1
- Prioritize closer peers in the connection manager. Otherwise, the connection manager can partition the network.
- Add a feature for disabling storing providers/values (only usable in a forked network).
- Correctly close the channel returned by RefreshRoutingTable.
v0.4.0
- Updates go-libp2p-kbucket to fix a bug where we might have peers in our routing table but not use them.
- Fixes a bug where we might run out of peers in our routing table, have connected peers, and not use them. We now try to re-fill our routing table from connected peers whenever we run out of peers in the DHT.
- Updates go-multiaddr to switch to /p2p multiaddrs by default (hence the 0.4.0 version bump).
v0.3.2
v0.3.1
v0.3.0
This release introduces some significant improvements (and a few breaking changes) to the logic around refreshing the routing tables (previously known as "bootstrapping").
This was previously called "bootstrapping" but bootstrapping and refreshing the routing tables are two separate operations:
- Bootstrapping is the process of connecting to a set of initial nodes to join the DHT. The DHT doesn't currently perform any bootstrapping internally.
- Refreshing is the process of filling out the routing table.
Behavior Changes:
- The DHT now automatically starts refreshing the routing table as soon as it's started so there's no need to call
Bootstrap
. - The DHT will now refresh the routing table as soon as it sees a new peer as long as we have less than 4 peers in the routing table. This helps us quickly re-build the routing table if we disconnect then reconnect to the network.
- The DHT now implements the refreshing algorithm described in the Kademlia paper. This should ensure that the routing table remains full.
Breaking API Changes:
- The global NumBootstrapQueries has been removed. The official
- The
BootstrapWithConfig
function has been removed as bootstrapping is now started immediately after constructing the DHT. - The global
BootstrapConfig
type has been removed along withBootstrapWithConfig
:- The config options changed as the old ones didn't make sense given the new algorithm.
- The config options can now be passed in via the constructor using functional arguments.
BootstrapSelf
has been removed. This was not an effective way to bootstrap the DHT and all users should just callRefresh()
.BootstrapRandom
has been removed in favor ofRefresh()
.BootstrapOnce
has been removed in favor ofRefresh()
.- The global
DefaultBootstrapConfig
has been removed along with theBootstrapConfig
type.
Upgrade Notes:
- You no longer need to call any of the
Bootstrap
methods. If you want force the DHT to fill out its routing table, callRefresh()
. - You can now configure routing table refreshing using the following options when constructing the DHT:
- DisableAutoRefresh - Never automatically refresh the routing tables. If you pass this, you'll need to manually invoke
Refresh()
as needed. - RoutingTableRefreshPeriod - How frequently we should refresh the routing table.
- RoutingTableRefreshQueryTimeout - how long to run each query during the refresh process before timing it out.
- DisableAutoRefresh - Never automatically refresh the routing tables. If you pass this, you'll need to manually invoke
Thanks: I want to give a huge shout-out to a new contributor, @aarshkshah1992, for making all these changes happen.
v0.2.2
- Introduces the
opts.BucketSize()
option to make the bucket size configurable.