Skip to content

Releases: libp2p/go-libp2p-kad-dht

v0.5.2

13 Mar 23:42
dffa2f8
Compare
Choose a tag to compare
  • ProviderManager is now exposed through the IpfsDht
  • ProvidersKeyPrefix is now exposed through ProviderManager
  • No other public API changes
  • Update dependencies

v0.5.1

05 Mar 18:04
dbb3d2c
Compare
Choose a tag to compare
  • 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

07 Jan 17:42
95964c0
Compare
Choose a tag to compare

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

14 Dec 17:47
dd3d8fb
Compare
Choose a tag to compare
  • 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

11 Dec 18:47
a7093c7
Compare
Choose a tag to compare
  • 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

11 Dec 10:54
6028925
Compare
Choose a tag to compare
  • Update several dependencies.
  • Return a signal channel from RefreshRoutingTable() that can be waited on to wait for the routing table refresh to complete.

v0.3.1

02 Dec 18:16
a530368
Compare
Choose a tag to compare

This is a small patch release to bubble up some updates in dependencies and re-generate the protobuf decoding code.

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.