Skip to content

Releases: libp2p/go-libp2p-kad-dht

v0.3.0

06 Nov 09:46
v0.3.0
8ecf938
Compare
Choose a tag to compare

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 with BootstrapWithConfig:
    • 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 call Refresh().
  • BootstrapRandom has been removed in favor of Refresh().
  • BootstrapOnce has been removed in favor of Refresh().
  • The global DefaultBootstrapConfig has been removed along with the BootstrapConfig 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, call Refresh().
  • 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.

Thanks: I want to give a huge shout-out to a new contributor, @aarshkshah1992, for making all these changes happen.

v0.2.2

05 Nov 11:10
fed99af
Compare
Choose a tag to compare

v0.2.1

07 Sep 17:40
e216d3c
Compare
Choose a tag to compare

This fixes a memory leak and upgrades dependencies.

v0.2.0

02 Aug 23:55
a12e621
Compare
Choose a tag to compare
  • Propagates a subtle bug fix in go-libp2p-record where small public keys would not correctly validate.
  • Bumps go-libp2p-core (and downstream libraries) to v0.2.0, which raises the minimum strength requirement of RSA keys to 2048 bits.

v0.1.0

26 May 22:33
3176535
Compare
Choose a tag to compare

🎉 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

24 May 15:14
2d6dde4
Compare
Choose a tag to compare

This is a go mod maintenance release, as we are eliminating all traces of the deprecated sums package.

Release v0.0.11

17 May 18:34
v0.0.11
4d2bccf
Compare
Choose a tag to compare

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.

v0.0.1

27 Feb 05:10
Compare
Choose a tag to compare
Fix gomod after tag rewrite