Releases: libp2p/go-libp2p-kad-dht
Releases · libp2p/go-libp2p-kad-dht
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.
v0.2.1
v0.2.0
v0.1.0
🎉 This release applies the core refactor to this module; migrating to the consolidated types under go-libp2p-core. See libp2p/go-libp2p#602 for more context.
v0.0.14
Release v0.0.11
Bug Fixes:
- Fix a rare goroutine leak.
Performance Improvements:
- Reduce memory consumption of by freeing write buffers for idle peers.
Dependency Updates:
- Update go-libp2p and goprocess for significant performance improvements and bug fixes.