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

Initial import from go-libp2p-kad-dht #1

Merged
merged 65 commits into from
Oct 2, 2023
Merged

Initial import from go-libp2p-kad-dht #1

merged 65 commits into from
Oct 2, 2023

Conversation

iand
Copy link
Contributor

@iand iand commented Sep 29, 2023

Part of libp2p/go-libp2p-kad-dht#954

Remember to use "rebase and merge" for this pr

iand and others added 19 commits September 29, 2023 15:05
* 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
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).
* 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>
* Implement GetValue

* Add failing TestGetValueOnePeer test

* Unexport methods
* 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
Co-authored-by: Ian Davis <18375+iand@users.noreply.github.com>
* 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
* Expose behaviour and state machine configs

* Adjust test

* Revert adjust test
* feat: findProvidersAsync

* add: find providers tests

* add config tests
* Add metrics to routing state machines

* Simplify use of gauges with atomics
* Loggiing improvements

* Add more debug logging

* Add more debug logging

* Use logging helpers
@@ -0,0 +1 @@
github.com
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just curious where this comes from - As a gitignore basis I tend to use https://www.toptal.com/developers/gitignore/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this particular value is there. It came from this commit libp2p/go-libp2p-kad-dht@54f20b5

@iand iand merged commit e978d1e into main Oct 2, 2023
7 checks passed
@iand iand deleted the initial-import branch October 2, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants