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

go-libp2p-kad-dht version 2 #864

Closed
wants to merge 65 commits into from
Closed

go-libp2p-kad-dht version 2 #864

wants to merge 65 commits into from

Commits on Aug 14, 2023

  1. Configuration menu
    Copy the full SHA
    7d18e89 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5bec109 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    311f0d3 View commit details
    Browse the repository at this point in the history
  4. go mod tidy

    dennis-tra committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    dfe3a81 View commit details
    Browse the repository at this point in the history
  5. use slog for logging

    dennis-tra committed Aug 14, 2023
    Configuration menu
    Copy the full SHA
    57c4988 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    984f28e View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Configuration menu
    Copy the full SHA
    35a977f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e8e5be2 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

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

Commits on Aug 18, 2023

  1. add handlers and tests

    dennis-tra committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    3171894 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f8f4a7 View commit details
    Browse the repository at this point in the history
  3. test put value handler

    dennis-tra committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    3cdfb34 View commit details
    Browse the repository at this point in the history
  4. add get value tests

    dennis-tra committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    c584b02 View commit details
    Browse the repository at this point in the history
  5. remove unused methods

    dennis-tra committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    4dfcd8b View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2023

  1. update handlers

    dennis-tra committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    0af762c View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2023

  1. introduce backend concept

    dennis-tra committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    741843b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e09e95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    619429c View commit details
    Browse the repository at this point in the history
  4. simplify key handling

    dennis-tra committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    3648184 View commit details
    Browse the repository at this point in the history
  5. improve documentation

    dennis-tra committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    015617e View commit details
    Browse the repository at this point in the history
  6. add add providers tests

    dennis-tra committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    38c2d32 View commit details
    Browse the repository at this point in the history
  7. improve telemetry

    dennis-tra committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    7a0e26c View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Add AddressFilter feature

    dennis-tra committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    a8a222b View commit details
    Browse the repository at this point in the history
  2. WIP

    dennis-tra committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    6bdd7ec View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    14c478c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2643b72 View commit details
    Browse the repository at this point in the history
  5. add stream tests

    dennis-tra committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    890d4ec View commit details
    Browse the repository at this point in the history
  6. add logErr helper method

    dennis-tra committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    bdac291 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    50f8d00 View commit details
    Browse the repository at this point in the history
  8. update deps

    dennis-tra committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    5a30d89 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Configuration menu
    Copy the full SHA
    4660bbc View commit details
    Browse the repository at this point in the history
  2. add comments

    dennis-tra committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    9f88f20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9559064 View commit details
    Browse the repository at this point in the history
  4. add notifee test

    dennis-tra committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    4418cfb View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2023

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

Commits on Aug 30, 2023

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

Commits on Sep 1, 2023

  1. Add backend tracing

    dennis-tra committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    99dbdc6 View commit details
    Browse the repository at this point in the history
  2. improve kadt package doc

    dennis-tra committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    f16d79e View commit details
    Browse the repository at this point in the history
  3. document tracedBackend

    dennis-tra committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    2610f89 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Integrate Zikade/go-kademlia in v2 (#880)

    * WIP
    
    * revise protobuf
    
    * remove gogo protobuf dependency
    
    * WIP
    
    * add kadt package
    
    * Add routing test
    
    * add custom zikade dependency
    
    * Import zikade code
    
    * Remove generics from zikade imported code
    
    * Update to latest go-kademlia
    
    * Cleanup naming of events
    
    * Minor naming cleanup
    
    * Change maintainers for v2 while being developed
    
    * remove Zikade dependency
    
    * Consolidate type parameters
    
    * Change config test structure
    
    * use opentelemetry
    
    * use convenience attribute methods
    
    * let coord package use tele
    
    * fix golint warnings
    
    * use clock.Clock
    
    * add telemetry context tests
    
    * Improve telemetry documentation
    
    * fix test race
    
    * fix garbage collection race
    
    * Add AddAddresses method to DHT (#879)
    
    * Add AddAddresses method to DHT
    
    * Add AddAddresses method to DHT
    
    * go mod tidy
    
    * Rename Query Skip errors
    
    * go fmt coordinator.go
    
    * Fix test flakes
    
    * Fix lint errors
    
    ---------
    
    Co-authored-by: Ian Davis <18375+iand@users.noreply.github.com>
    dennis-tra and iand committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    54f20b5 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Configuration menu
    Copy the full SHA
    722e958 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #885 from libp2p/v2-ctx-short

    Simplify usage of kadtest.CtxShort
    iand committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    add1d60 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2023

  1. Give dht and coordinator their own telemetry instances (#891)

    * Give dht and coordinator their own telemetry instances
    
    * Fix some references to old code
    iand committed Sep 11, 2023
    Configuration menu
    Copy the full SHA
    7d838c5 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2023

  1. Migrate go-kademlia state machines (#893)

    * Migrate go-kademlia state machines
    
    * Clean up naming of events
    
    * Add Node generic parameter
    
    * Remove unused helpers
    
    * Remove unused fields
    
    * Add peer addresses to peerstore
    
    * go fmt
    
    * Remove some more usages of NodeID fields and args
    
    * Replace usage of key.Key256 by kadt.Key
    
    * Use kadt.PeerID rather than peer.ID in many places
    
    * Remove CloserNodeIDs
    iand committed Sep 13, 2023
    Configuration menu
    Copy the full SHA
    77dbff0 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2023

  1. v2: upgrade build to include go1.21 (#890)

    * v2: upgrade to go1.21
    
    * Add uci config
    
    * Use newer uci actions
    
    * Use v2 working directory in actions
    
    * Set go-version input in actions
    
    * Set go-version input in actions
    
    * Use go 1.20.8 in actions
    
    * Use go 1.21.1 and relative working directory
    
    * Try default working directory on job
    
    * Remove uci.yaml which is not supported yet
    
    * Try default working directory on job
    
    * Try default working directory as input
    
    * Restore uci.yaml
    
    * Restore uci.yaml
    
    * Use modified go-check
    
    * Use modified go-test
    
    * Fix go-test
    
    * Fix go-test
    
    * Fix go-test
    
    * Restore libp2p 0.30.0
    
    * go mod tidy
    
    * Remove nil error return from DefaultConfig
    
    * use mock clock for IPNS record generation (#894)
    
    * Use MapDatastore for provider backend tests instead of leveldb (#896)
    
    * revert some merge residuals
    
    * style: minor coding clean up (#898)
    
    * remove superfluous type conversion
    
    * add tiny example test
    
    * unexport type conversion helpers
    
    * Target go language version 1.20 and add 1.20.8 to build matrix
    
    * Target go language version 1.20 and add 1.20.8 to build matrix
    
    * WIP
    
    ---------
    
    Co-authored-by: Dennis Trautwein <git@dtrautwein.eu>
    iand and dennis-tra committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    97e4e02 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. Test query interactions with routing table (#887)

    * Test query interactions with routing table
    
    * v2: upgrade to go1.21
    
    * Add uci config
    
    * Use newer uci actions
    
    * Pass clock to coordinator
    
    * Use v2 working directory in actions
    
    * Set go-version input in actions
    
    * Set go-version input in actions
    
    * Use go 1.20.8 in actions
    
    * Use go 1.21.1 and relative working directory
    
    * Try default working directory on job
    
    * Remove uci.yaml which is not supported yet
    
    * Try default working directory on job
    
    * Try default working directory as input
    
    * Restore uci.yaml
    
    * Restore uci.yaml
    
    * Use modified go-check
    
    * Use modified go-test
    
    * Fix go-test
    
    * Fix go-test
    
    * Fix go-test
    
    * Update go-kademlia
    
    * Add more tracing
    
    * Use go-kademlia trie fix
    iand committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    1d35505 View commit details
    Browse the repository at this point in the history
  2. remove jaeger dependency (#900)

    This PR changes tracing to use the OpenTelemetry protocol which is also recommended by Jaeger.
    
    [`go.opentelemetry.io/otel/exporters/jaeger`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/jaeger):
    
    > Deprecated: This module is no longer supported. OpenTelemetry dropped support for Jaeger exporter in July 2023. Jaeger officially accepts and recommends using OTLP. Use [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp) or [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc) instead.
    
    Works with the following docker command:
    
    ```go
    docker run --rm --name jaeger -p 16686:16686 -p 4317:4317 jaegertracing/all-in-one:1.49
    ```
    
    Note that `jaegertracing/all-in-one` version `1.49` is **newer** than version `1.6` which we often used in the past (5 years old).
    dennis-tra committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    3723b8a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    156aab2 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2023

  1. Decouple coord package from addressing (#903)

    * Decouple coord package from addressing
    
    * Go fmt
    
    * fix: garbage collection test race condition (#904)
    
    Moved ticker initialization outside the garbage collection goroutine. There was a race condition between advancing the mocked time in TestProvidersBackend_GarbageCollection and the initialization of the ticker that triggers the garbage collection runs. It happened that we were advancing the time without the ticker being initialized. Hence, advancing the time hasn't had any effect.
    
    In this PR, I moved the ticker initialization outside the garbage collection goroutine. This means the ticker will be registered with the MockClock object after StartGarbageCollection returns. Calls to mockClock.Add will therefore trigger the ticker.
    
    * Fix test flakes that wait for routing events (#905)
    
    * Increase test iterations to trigger flake
    
    * Add failfast
    
    * Replace routing notification channel with a RoutingNotifier type
    
    * Remove unused code
    
    * Remove test count
    
    ---------
    
    Co-authored-by: Dennis Trautwein <git@dtrautwein.eu>
    iand and dennis-tra committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    1220ddd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e86381e View commit details
    Browse the repository at this point in the history
  3. Clean up DHT test helpers (#928)

    * Implement GetValue
    
    * Add failing TestGetValueOnePeer test
    
    * Unexport methods
    iand committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    83329a4 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Improve query capabilities (#932)

    * Improve query capabilities
    
    * go mod tidy
    
    * Review feedback
    
    * go mod tidy
    
    * Move coord packages to internal (#933)
    
    * Move coord and kadt packages to internal
    
    * go mod tidy
    
    * go fmt
    
    * Move kadt out of internal and add RoutingTable interface
    iand committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    2da54ab View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. Add broadcast state machine for storing records in the DHT (#930)

    Co-authored-by: Ian Davis <18375+iand@users.noreply.github.com>
    dennis-tra and iand committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    74ffa67 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. Add explore state machine to expand population of routing table (#934)

    * Improve query capabilities
    
    * go mod tidy
    
    * Review feedback
    
    * go mod tidy
    
    * Move coord packages to internal (#933)
    
    * Move coord and kadt packages to internal
    
    * go mod tidy
    
    * go fmt
    
    * Move kadt out of internal and add RoutingTable interface
    
    * Add explore state machine to expand population of routing table
    
    * Refactor schedule into separate type
    
    * Add generation of random peer id for a given cpl
    
    * go mod tidy
    
    * Add prefixmap generator
    
    * Use constants for various query ids
    
    * go mod tidy
    
    * Wire explore state machine into routing behaviour
    
    * Remove some unnecessary conversions
    
    * PR review updates
    iand committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    ae5a094 View commit details
    Browse the repository at this point in the history
  2. Expose behaviour and state machine configs (#937)

    * Expose behaviour and state machine configs
    
    * Adjust test
    
    * Revert adjust test
    iand committed Sep 25, 2023
    Configuration menu
    Copy the full SHA
    09dd7b0 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. feat: findProvidersAsync (#938)

    * feat: findProvidersAsync
    
    * add: find providers tests
    
    * add config tests
    dennis-tra committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    dd5e537 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. Add metrics to routing state machines (#939)

    * Add metrics to routing state machines
    
    * Simplify use of gauges with atomics
    iand committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    dedca86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e4b1034 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4fa560f View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Logging improvements (#941)

    * Loggiing improvements
    
    * Add more debug logging
    
    * Add more debug logging
    
    * Use logging helpers
    iand committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    6a4249c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    03adce6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90d748b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e628c0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    509eee4 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Use go-libdht (#952)

    iand committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    1d1fe93 View commit details
    Browse the repository at this point in the history