1. 14 May, 2021 1 commit
    • Adin Schmahmann's avatar
      Crawler based DHT client (#709) · eac1b5e1
      Adin Schmahmann authored
      * fullrt: add experimental FullRT DHT client
      
      The FullRT client periodically crawls the network to fill its local routing table and uses that to perform queries. It supports performing many provides or puts together taking advantage of efficiencies of grouping the DHT operations by where they will occur in the Kademlia space. Additionally, it has a more tunable function for determining when a query is complete that does not require waiting on any individual peer (which could be offline) to respond. This client is experimental and its exposed interfaces should be expected to change and break over time.
      
      * crawler: starting peers with addresses and peers found during a crawl have their addresses extended. logging improved
      
      * dht: move IpfsDHT options to the internal package. Make a breaking change to the filter interfaces to support more DHT implementations
      
      * dht: GetClosestPeers now returns a slice of peers instead of a channel of peers since we have to wait for the query to complete to return the closest peers anyway
      
      * dht: the subscriberNotifiee has been refactored to work more independently of the underlying message sender implementation
      eac1b5e1
  2. 04 Jan, 2021 5 commits
  3. 12 Nov, 2020 1 commit
  4. 30 Jul, 2020 1 commit
  5. 28 Apr, 2020 1 commit
  6. 20 Apr, 2020 1 commit
  7. 09 Apr, 2020 2 commits
  8. 03 Apr, 2020 8 commits
    • Steven Allen's avatar
      feat: better logging · 445472b1
      Steven Allen authored
      * Remove deprecated events.
      * Fix warning -> warn.
      * Use structured logging (some places).
      445472b1
    • 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
    • Steven Allen's avatar
      feat: reduce request read timeout (#527) · fad6c8ac
      Steven Allen authored
      This should stop us from waiting on unresponsive peers. This only kicks in when
      we've already _sent_ a request so this:
      
      * Shouldn't be blocked on other requests we're planning on making.
      * Shouldn't be blocked on dialing.
      fad6c8ac
    • 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
    • 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
    • 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
  9. 02 Mar, 2020 1 commit
  10. 27 Feb, 2020 2 commits
  11. 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
  12. 23 Jan, 2020 1 commit
    • Steven Allen's avatar
      feat: reduce stream idle timeout to 1m · 3f8b2195
      Steven Allen authored
      It's currently 10 minutes. This change will kill all inbound DHT streams that
      haven't been used in 1 minute.
      
      We keep streams around to avoid the cost of setting up new streams (the
      multistream overhead, mostly). However, each one of these takes at least one
      goroutine and some other state.
      
      Ideally, this will let us run multiple DHTs side-by-side without keeping one
      stream per peer per DHT open.
      3f8b2195
  13. 04 Sep, 2019 1 commit
  14. 18 Jun, 2019 1 commit
    • Cole Brown's avatar
      Address review comments · 855b46d3
      Cole Brown authored
      Update msgio to latest version
      Use max size in msgio readers
      Fix error handling in reads
      855b46d3
  15. 17 Jun, 2019 2 commits
  16. 26 May, 2019 1 commit
  17. 24 May, 2019 2 commits
    • Steven Allen's avatar
      kill idle streams after 10 minutes · b55fad15
      Steven Allen authored
      b55fad15
    • Steven Allen's avatar
      drop the go-context dependency · 5bf9cf5e
      Steven Allen authored
      This was causing us to build up a bunch of background goroutines. Technically,
      we should be resetting all these streams when the DHT stops. However, we don't
      actually unregister stream handlers from the host so, really, nothing will
      actually stop till the host stops. When it does, it'll kill all the streams
      anyways.
      5bf9cf5e
  18. 08 May, 2019 1 commit
  19. 15 Apr, 2019 1 commit
  20. 07 Mar, 2019 1 commit
    • Steven Allen's avatar
      thread context to prep (#286) · 6eafd65b
      Steven Allen authored
      We usually _explicitly_ call connect before calling `prep` but we may disconnect
      somewhere in-between. We _don't_ want to get stuck here dialing if the context
      has been canceled.
      6eafd65b
  21. 19 Feb, 2019 1 commit
  22. 12 Feb, 2019 2 commits
  23. 03 Feb, 2019 1 commit
  24. 05 Aug, 2018 1 commit