Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signed address records in the DHT #516

Closed
wants to merge 40 commits into from

Commits on Mar 5, 2020

  1. upgrade deprecated query events

    aschmahmann authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    c013668 View commit details
    Browse the repository at this point in the history
  2. first pass at proper kad

    aschmahmann authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    c4e94ce View commit details
    Browse the repository at this point in the history
  3. fix Search/GetValue to be Kad compliant. Default quorum is now 0 whic…

    …h means do not abort the query early
    aschmahmann authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    68b1169 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5cabdf6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a9e21d2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    719a16f View commit details
    Browse the repository at this point in the history
  7. query switches from alpha mode to k mode if no peers closer than one …

    …we have heard about (in a given path) has been found
    aschmahmann authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    6469073 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c79bac3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1984feb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    79648b8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0ef814a View commit details
    Browse the repository at this point in the history
  12. options: KValue and AlphaValue global variables no longer used intern…

    …ally. Concurrency option now sets alpha. DisjointPaths option now sets d. Default number of disjoint paths is now bucketSize/2.
    aschmahmann authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    f94a3f2 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    6b25a6c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b4f7fda View commit details
    Browse the repository at this point in the history
  15. cleanup unused code

    aschmahmann authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    8ef9d77 View commit details
    Browse the repository at this point in the history
  16. Utilize identify events to add peers to the routing table (#472)

    * 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: Raúl Kripalani <raul.kripalani@gmail.com>
    Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
    3 people authored and Stebalien committed Mar 5, 2020
    Configuration menu
    Copy the full SHA
    5d313b1 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2020

  1. fix: improve context deadline handling

    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.
    Stebalien committed Mar 6, 2020
    Configuration menu
    Copy the full SHA
    e505723 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    376300a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf4986e View commit details
    Browse the repository at this point in the history
  4. Enable switching DHT between client and server modes (#469)

    * 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
    aschmahmann committed Mar 6, 2020
    Configuration menu
    Copy the full SHA
    c24a52f View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2020

  1. feat: move options to main package and make internals private (#486)

    * 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.
    Stebalien authored and aschmahmann committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    d440bbf View commit details
    Browse the repository at this point in the history
  2. Upgrade DHT version (#479)

    * 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.
    aschmahmann committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    7ada018 View commit details
    Browse the repository at this point in the history
  3. RT connectivity changes

    aarshkshah1992 authored and Stebalien committed Mar 10, 2020
    Configuration menu
    Copy the full SHA
    fbb1b36 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2020

  1. Cypress Disjoint Query & Query Termination code cleanup (#489)

    * kpeerset refactoring
    * query code cleanup
    aarshkshah1992 authored and Stebalien committed Mar 13, 2020
    Configuration menu
    Copy the full SHA
    e42ee94 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2020

  1. change tests

    aarshkshah1992 committed Mar 16, 2020
    Configuration menu
    Copy the full SHA
    f4e0b0d View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2020

  1. document test failure

    aarshkshah1992 committed Mar 17, 2020
    Configuration menu
    Copy the full SHA
    45c403c View commit details
    Browse the repository at this point in the history
  2. Merge pull request #495 from libp2p/feat/fix-tests

    Fix test logging & document timing issue on Windows
    aschmahmann committed Mar 17, 2020
    Configuration menu
    Copy the full SHA
    7c27400 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2020

  1. Configuration menu
    Copy the full SHA
    d7b6b1b View commit details
    Browse the repository at this point in the history
  2. fix validation

    aarshkshah1992 committed Mar 19, 2020
    Configuration menu
    Copy the full SHA
    a4a6e82 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2020

  1. Configuration menu
    Copy the full SHA
    c8909e9 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2020

  1. Configuration menu
    Copy the full SHA
    42addc4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    075afe8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    147dc12 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8eade90 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2020

  1. Merge pull request #497 from libp2p/feat/change-rt-validation

    RT peer validation should also include support for the DHT protocol
    aarshkshah1992 committed Mar 24, 2020
    Configuration menu
    Copy the full SHA
    e56c237 View commit details
    Browse the repository at this point in the history
  2. Asynchronous lookups (#498)

    * feat(query): fully async implementation of Kademlia lookup. peers returned from the lookup are not guaranteed to be alive (i.e. we're only guaranteed to have dialed the closest beta peers to the target), but given stable and correct routing tables the expectation that most of the peers returned are alive is high.
    * feat(query): add wrapper lookup followup function to followup after the lookup is completed and ensure that the closest k returned peers from a lookup have been queried even for beta < k
    * refactor(query) modified the structure returned from lookups to be a useful subset of the full query state instead of the entire query state
    * feat(options): beta parameter exposed as the Resiliency parameter
    * feat(routing): do not mark the routing table as updated after a FindPeer query
    * feat(routing): FindPeer can return addresses even if not Connected as long as it was either recently connected (CanConnect) or was discovered during the lookup
    * feat(bootstrap): bootstrap logic now uses GetClosestPeers instead of FindPeer
    * refactor(dht): stopFn no longer takes any state
    * fix(test): changed GetClosestPeers test to only assume beta instead of k peers since that is now more appropriate given the query logic changes and that the routing tables in that test are bad, i.e. a ring network with arbitrary peerIDs
    
    Co-authored-by: Petar Maymounkov <petarm@gmail.com>
    Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
    3 people committed Mar 24, 2020
    Configuration menu
    Copy the full SHA
    fcbc5f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    99716d1 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2020

  1. signed peer recs

    aarshkshah1992 committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    e09d7fe View commit details
    Browse the repository at this point in the history
  2. bump peerstore

    aarshkshah1992 committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    6d1dcd2 View commit details
    Browse the repository at this point in the history
  3. remove replace

    aarshkshah1992 committed Mar 27, 2020
    Configuration menu
    Copy the full SHA
    b5f8c63 View commit details
    Browse the repository at this point in the history