1. 06 May, 2020 3 commits
  2. 06 Apr, 2020 1 commit
    • Steven Allen's avatar
      feat: add a v1 compatibility mode · 9bab9694
      Steven Allen authored
      When this option is passed, the DHT node will listen on and query _only_ using
      the old DHT protocol. Importantly, the node won't even pretend to be a new DHT
      node because it's routing table includes V1 peers.
      9bab9694
  3. 03 Apr, 2020 9 commits
    • Steven Allen's avatar
      fix(test): don't panic on read/write error · d520a1e9
      Steven Allen authored
      The querying node _is_ allowed to reset and go away.
      
      fixes https://github.com/libp2p/go-libp2p-kad-dht/issues/431
      d520a1e9
    • Steven Allen's avatar
      chore: fix lints · 5aad9549
      Steven Allen authored
      Except deprecated warn calls
      5aad9549
    • Aarsh Shah's avatar
      New RT management policy (#520) · 8fa04389
      Aarsh Shah authored
      * new RT management policy
      8fa04389
    • Aarsh Shah's avatar
      RT connectivity changes · c17965fa
      Aarsh Shah authored
      c17965fa
    • Adin Schmahmann's avatar
      Upgrade DHT version (#479) · 07dff1f5
      Adin Schmahmann authored
      * upgraded the protocol id to version 2 (i.e. /kad/2.0.0) and made it so v2 peers running in server mode respond to queries from v1 peers. Note: v2 peers will only send queries using the v2 protocol, will only add v2 peers to their routing tables, and will only tell v1 peers about v2 peers.
      * to run a forked network we now use network specific protocol prefixes instead of manually setting protocol IDs. Use the ProtocolPrefix option instead of the Protocols option.
      * emit errors during initialization if the user misuses the default protocol prefix by setting parameters inconsistent with the default protocol's network specification
      * since the Client option has been deprecated it's been removed from the dht's options. While deprecated it is still available in the dht options package. Setting `Client(false)` now puts the node into ModeAuto.
      07dff1f5
    • Steven Allen's avatar
      feat: move options to main package and make internals private (#486) · 30fa0861
      Steven Allen authored
      * feat: move options to main package and make internals private
      
      Rationale:
      
      1. This allows us to make private options for testing.
      2. This removes an import for DHT users.
      3. This makes options much easier to discover.
      4. This makes it possible to make the config/options internals private.
      
      We originally put them in a sub-package to avoid poluting the root namespace,
      but that isn't really necessary.
      
      This keeps the old package (for now) to avoid breaking too much.
      30fa0861
    • Adin Schmahmann's avatar
      Enable switching DHT between client and server modes (#469) · d4134a46
      Adin Schmahmann authored
      * created Mode(ModeOpt) option for choosing between auto/client/server modes
      * Auto mode internally switches the DHT between client and server modes based on the EvtLocalReachabilityChanged event emitted on the event bus (e.g. by AutoNAT)
      * routing table management of peers that switch between client and server mode while we are connected to them (i.e. are in auto mode)
      * removed Client(bool) option, becoming a DHT client is specified using Mode(ModeClient) instead
      d4134a46
    • Steven Allen's avatar
      fix: improve context deadline handling · 1de9b905
      Steven Allen authored
      1. Continue to best-effort provide, but still return an error when we fail to
      send provider records to the _best_ peers.
      2. Continue returning the best peer's we've found in GetClosestPeers, but also
      return an error to indicate that we didn't find the closest ones.
      
      And fix the hang test.
      1de9b905
    • Adin Schmahmann's avatar
      Utilize identify events to add peers to the routing table (#472) · 509c0bce
      Adin Schmahmann authored
      * feat: consume identify events to evaluate routing table addition
      * fix: routing table no longer gets an update just because new messages have arrived or been sent
      * fix: add already connected peers into the routing table before listening to events
      Co-authored-by: default avatarRaúl Kripalani <raul.kripalani@gmail.com>
      Co-authored-by: default avatarAarsh Shah <aarshkshah1992@gmail.com>
      509c0bce
  4. 22 Feb, 2020 1 commit
    • Steven Allen's avatar
      fix: obey the context when sending messages to peers · 0b029388
      Steven Allen authored
      Related to #453 but not a fix. This will cause us to actually return early when
      we start blocking on sending to some peers, but it won't really _unblock_ those
      peers. For that, we need to write with a context.
      0b029388
  5. 05 Nov, 2019 1 commit
    • Steven Allen's avatar
      chore: rename bootstrap to refresh · ef319676
      Steven Allen authored
      As pointed out by raul, bootstrapping and refreshing are not the same thing.
      Bootstrapping is the initial setup (i.e., connect to some initial nodes to get
      started). Refreshing is the process of refreshing the routing table.
      ef319676
  6. 01 Nov, 2019 1 commit
  7. 26 May, 2019 1 commit
  8. 12 Feb, 2019 2 commits
  9. 03 Feb, 2019 1 commit
  10. 10 Aug, 2018 3 commits
  11. 08 Aug, 2018 1 commit
  12. 01 Jun, 2018 3 commits
  13. 07 Feb, 2018 1 commit
  14. 14 Sep, 2017 1 commit
    • Steven Allen's avatar
      Retry queries if a write to the stream fails. · d3d572b7
      Steven Allen authored
      Previously, we'd only retry when a write failed (in case the peer was using
      single-use streams). However, in the new world of half-open streams, writes
      still succeed on remote-closed streams so this isn't sufficient. Instead, we
      need to retry on read failure as well.
      
      Note: this was technically broken before because a peer could write on a stream
      before receiving the close message causing the write to succeed but the
      subsequent read to fail.
      d3d572b7
  15. 05 Oct, 2016 1 commit
  16. 30 Sep, 2016 3 commits
  17. 03 Sep, 2016 1 commit
  18. 02 Sep, 2016 1 commit
  19. 21 Aug, 2016 1 commit
  20. 26 Jul, 2016 1 commit
  21. 04 Jul, 2016 1 commit
  22. 02 Jul, 2016 1 commit
  23. 01 Jul, 2016 1 commit