From 16d8d972b669ce6658c30719396e38905852a9fb Mon Sep 17 00:00:00 2001 From: galargh Date: Fri, 7 Apr 2023 07:12:08 +0000 Subject: [PATCH 01/19] chore: update version --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 992f4a9885b..850332654b5 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.20.0-dev" +const CurrentVersionNumber = "0.20.0-rc1" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint From acb622fb1162bb53f43e9c82b636aa9cb02d5fec Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 25 Apr 2023 11:44:53 +0000 Subject: [PATCH 02/19] chore: update version --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 850332654b5..7c1681bf0eb 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.20.0-rc1" +const CurrentVersionNumber = "0.20.0-rc2" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint From e4fa9cb7ac7f8cc71144d21be476d5f9830578ef Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 12 Apr 2023 01:51:02 +0200 Subject: [PATCH 03/19] feat: boxo tracing and traceparent support (#9811) https://www.w3.org/TR/trace-context/ https://github.com/ipfs/bifrost-gateway/issues/68 --- docs/environment-variables.md | 71 +-------------------- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 +- go.mod | 12 ++-- go.sum | 4 +- tracing/file_exporter.go | 45 ------------- tracing/tracing.go | 88 +------------------------- 7 files changed, 14 insertions(+), 212 deletions(-) delete mode 100644 tracing/file_exporter.go diff --git a/docs/environment-variables.md b/docs/environment-variables.md index b3d03d1bdc0..4113be09b82 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -164,74 +164,5 @@ and outputs it to `rcmgr.json.gz` Default: disabled (not set) # Tracing -For advanced configuration (e.g. ratio-based sampling), see also: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md -## `OTEL_TRACES_EXPORTER` -Specifies the exporters to use as a comma-separated string. Each exporter has a set of additional environment variables used to configure it. The following values are supported: - -- `otlp` -- `jaeger` -- `zipkin` -- `file` -- appends traces to a JSON file on the filesystem - -Setting this enables OpenTelemetry tracing. - -**NOTE** Tracing support is experimental: releases may contain tracing-related breaking changes. - -Default: "" (no exporters) - -## `OTLP Exporter` -Unless specified in this section, the OTLP exporter uses the environment variables documented here: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md - -### `OTEL_EXPORTER_OTLP_PROTOCOL` -Specifies the OTLP protocol to use, which is one of: - -- `grpc` -- `http/protobuf` - -Default: "grpc" - -## `Jaeger Exporter` - -See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#jaeger-exporter - -## `Zipkin Exporter` -See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#zipkin-exporter - -## `File Exporter` -### `OTEL_EXPORTER_FILE_PATH` -Specifies the filesystem path for the JSON file. - -Default: "$PWD/traces.json" - -### How to use Jaeger UI - -One can use the `jaegertracing/all-in-one` Docker image to run a full Jaeger -stack and configure Kubo to publish traces to it (here, in an ephemeral -container): - -```console -$ docker run --rm -it --name jaeger \ - -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ - -p 5775:5775/udp \ - -p 6831:6831/udp \ - -p 6832:6832/udp \ - -p 5778:5778 \ - -p 16686:16686 \ - -p 14268:14268 \ - -p 14269:14269 \ - -p 14250:14250 \ - -p 9411:9411 \ - jaegertracing/all-in-one -``` - -Then, in other terminal, start Kubo with Jaeger tracing enabled: -``` -$ OTEL_TRACES_EXPORTER=jaeger ipfs daemon -``` - -Finally, the [Jaeger UI](https://github.com/jaegertracing/jaeger-ui#readme) is available at http://localhost:16686 - -## `OTEL_PROPAGATORS` - -See https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#general-sdk-configuration +For tracing configuration, please check: https://github.com/ipfs/boxo/blob/main/docs/tracing.md diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 1c2af115453..345f97f3fdd 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -7,7 +7,7 @@ go 1.18 replace github.com/ipfs/kubo => ./../../.. require ( - github.com/ipfs/boxo v0.8.0 + github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 github.com/libp2p/go-libp2p v0.27.0 github.com/multiformats/go-multiaddr v0.9.0 diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 802f84be6a1..755f9aceb05 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -321,8 +321,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.8.0 h1:UdjAJmHzQHo/j3g3b1bAcAXCj/GM6iTwvSlBDvPBNBs= -github.com/ipfs/boxo v0.8.0/go.mod h1:RIsi4CnTyQ7AUsNn5gXljJYZlQrHBMnJp94p73liFiA= +github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e h1:8wmBhjwJk2drWZjNwoN7uc+IkG+N93laIhjY69rjMqw= +github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= diff --git a/go.mod b/go.mod index 58d943ac576..115bd5749aa 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 - github.com/ipfs/boxo v0.8.0 + github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e github.com/ipfs/go-block-format v0.1.2 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-cidutil v0.1.0 @@ -75,11 +75,6 @@ require ( go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 go.opentelemetry.io/contrib/propagators/autoprop v0.40.0 go.opentelemetry.io/otel v1.14.0 - go.opentelemetry.io/otel/exporters/jaeger v1.14.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 - go.opentelemetry.io/otel/exporters/zipkin v1.14.0 go.opentelemetry.io/otel/sdk v1.14.0 go.opentelemetry.io/otel/trace v1.14.0 go.uber.org/dig v1.16.1 @@ -208,8 +203,13 @@ require ( go.opentelemetry.io/contrib/propagators/b3 v1.15.0 // indirect go.opentelemetry.io/contrib/propagators/jaeger v1.15.0 // indirect go.opentelemetry.io/contrib/propagators/ot v1.15.0 // indirect + go.opentelemetry.io/otel/exporters/jaeger v1.14.0 // indirect go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.14.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect + go.opentelemetry.io/otel/exporters/zipkin v1.14.0 // indirect go.opentelemetry.io/otel/metric v0.37.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/atomic v1.10.0 // indirect diff --git a/go.sum b/go.sum index c623a9d4d12..90cd6eb79db 100644 --- a/go.sum +++ b/go.sum @@ -356,8 +356,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.8.0 h1:UdjAJmHzQHo/j3g3b1bAcAXCj/GM6iTwvSlBDvPBNBs= -github.com/ipfs/boxo v0.8.0/go.mod h1:RIsi4CnTyQ7AUsNn5gXljJYZlQrHBMnJp94p73liFiA= +github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e h1:8wmBhjwJk2drWZjNwoN7uc+IkG+N93laIhjY69rjMqw= +github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= diff --git a/tracing/file_exporter.go b/tracing/file_exporter.go deleted file mode 100644 index 32ca20ee274..00000000000 --- a/tracing/file_exporter.go +++ /dev/null @@ -1,45 +0,0 @@ -package tracing - -import ( - "context" - "fmt" - "os" - - "go.opentelemetry.io/otel/exporters/stdout/stdouttrace" - "go.opentelemetry.io/otel/sdk/trace" -) - -// fileExporter wraps a file-writing exporter and closes the file when the exporter is shutdown. -type fileExporter struct { - file *os.File - writerExporter *stdouttrace.Exporter -} - -func newFileExporter(file string) (*fileExporter, error) { - f, err := os.OpenFile(file, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) - if err != nil { - return nil, fmt.Errorf("opening '%s' for OpenTelemetry file exporter: %w", file, err) - } - stdoutExporter, err := stdouttrace.New(stdouttrace.WithWriter(f)) - if err != nil { - return nil, err - } - return &fileExporter{ - writerExporter: stdoutExporter, - file: f, - }, nil -} - -func (e *fileExporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { - return e.writerExporter.ExportSpans(ctx, spans) -} - -func (e *fileExporter) Shutdown(ctx context.Context) error { - if err := e.writerExporter.Shutdown(ctx); err != nil { - return err - } - if err := e.file.Close(); err != nil { - return fmt.Errorf("closing trace file: %w", err) - } - return nil -} diff --git a/tracing/tracing.go b/tracing/tracing.go index b22930a6f26..8fd898d7b05 100644 --- a/tracing/tracing.go +++ b/tracing/tracing.go @@ -3,16 +3,10 @@ package tracing import ( "context" "fmt" - "os" - "path" - "strings" + "github.com/ipfs/boxo/tracing" version "github.com/ipfs/kubo" "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/exporters/jaeger" - "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" - "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" - "go.opentelemetry.io/otel/exporters/zipkin" "go.opentelemetry.io/otel/sdk/resource" "go.opentelemetry.io/otel/sdk/trace" semconv "go.opentelemetry.io/otel/semconv/v1.4.0" @@ -33,87 +27,9 @@ type noopShutdownTracerProvider struct{ traceapi.TracerProvider } func (n *noopShutdownTracerProvider) Shutdown(ctx context.Context) error { return nil } -func buildExporters(ctx context.Context) ([]trace.SpanExporter, error) { - // These env vars are standardized but not yet supported by opentelemetry-go. - // Once supported, we can remove most of this code. - // - // Specs: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#exporter-selection - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md - var exporters []trace.SpanExporter - for _, exporterStr := range strings.Split(os.Getenv("OTEL_TRACES_EXPORTER"), ",") { - switch exporterStr { - case "otlp": - protocol := "http/protobuf" - if v := os.Getenv("OTEL_EXPORTER_OTLP_PROTOCOL"); v != "" { - protocol = v - } - if v := os.Getenv("OTEL_EXPORTER_OTLP_TRACES_PROTOCOL"); v != "" { - protocol = v - } - - switch protocol { - case "http/protobuf": - exporter, err := otlptracehttp.New(ctx) - if err != nil { - return nil, fmt.Errorf("building OTLP HTTP exporter: %w", err) - } - exporters = append(exporters, exporter) - case "grpc": - exporter, err := otlptracegrpc.New(ctx) - if err != nil { - return nil, fmt.Errorf("building OTLP gRPC exporter: %w", err) - } - exporters = append(exporters, exporter) - default: - return nil, fmt.Errorf("unknown or unsupported OTLP exporter '%s'", exporterStr) - } - case "jaeger": - exporter, err := jaeger.New(jaeger.WithCollectorEndpoint()) - if err != nil { - return nil, fmt.Errorf("building Jaeger exporter: %w", err) - } - exporters = append(exporters, exporter) - case "zipkin": - exporter, err := zipkin.New("") - if err != nil { - return nil, fmt.Errorf("building Zipkin exporter: %w", err) - } - exporters = append(exporters, exporter) - case "file": - // This is not part of the spec, but provided for convenience - // so that you don't have to setup a collector, - // and because we don't support the stdout exporter. - filePath := os.Getenv("OTEL_EXPORTER_FILE_PATH") - if filePath == "" { - cwd, err := os.Getwd() - if err != nil { - return nil, fmt.Errorf("finding working directory for the OpenTelemetry file exporter: %w", err) - } - filePath = path.Join(cwd, "traces.json") - } - exporter, err := newFileExporter(filePath) - if err != nil { - return nil, err - } - exporters = append(exporters, exporter) - case "none": - continue - case "": - continue - case "stdout": - // stdout is already used for certain kinds of logging, so we don't support this - fallthrough - default: - return nil, fmt.Errorf("unknown or unsupported exporter '%s'", exporterStr) - } - } - return exporters, nil -} - // NewTracerProvider creates and configures a TracerProvider. func NewTracerProvider(ctx context.Context) (shutdownTracerProvider, error) { - exporters, err := buildExporters(ctx) + exporters, err := tracing.NewSpanExporters(ctx) if err != nil { return nil, err } From b706d644875108786ab44d76833a902daab3b5e2 Mon Sep 17 00:00:00 2001 From: Steve Loeppky Date: Thu, 13 Apr 2023 06:59:08 -0700 Subject: [PATCH 04/19] docs: preparing 0.20 changelog for release (#9799) Co-authored-by: Gus Eggert Co-authored-by: Marcin Rataj Co-authored-by: Henrique Dias --- docs/changelogs/v0.20.md | 98 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/docs/changelogs/v0.20.md b/docs/changelogs/v0.20.md index c1c3e9639d0..9809d4703b2 100644 --- a/docs/changelogs/v0.20.md +++ b/docs/changelogs/v0.20.md @@ -6,6 +6,13 @@ - [Overview](#overview) - [πŸ”¦ Highlights](#-highlights) + - [Boxo under the covers](#boxo-under-the-covers) + - [HTTP Gateway](#http-gateway) + - [Switch to `boxo/gateway` library](#switch-to-boxogateway-library) + - [Improved testing](#improved-testing) + - [Trace Context support](#trace-context-support) + - [Removed legacy features](#removed-legacy-features) + - [`--empty-repo` is now the default](#--empty-repo-is-now-the-default) - [πŸ“ Changelog](#-changelog) - [πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Contributors](#-contributors) @@ -13,6 +20,97 @@ ### πŸ”¦ Highlights +#### Boxo under the covers +We have consolidated many IPFS repos into [Boxo](https://github.com/ipfs/boxo), and this release switches Kubo over to use Boxo instead of those repos, resulting in the removal of 27 dependencies from Kubo: + +- github.com/ipfs/go-bitswap +- github.com/ipfs/go-ipfs-files +- github.com/ipfs/tar-utils +- gihtub.com/ipfs/go-block-format +- github.com/ipfs/interface-go-ipfs-core +- github.com/ipfs/go-unixfs +- github.com/ipfs/go-pinning-service-http-client +- github.com/ipfs/go-path +- github.com/ipfs/go-namesys +- github.com/ipfs/go-mfs +- github.com/ipfs/go-ipfs-provider +- github.com/ipfs/go-ipfs-pinner +- github.com/ipfs/go-ipfs-keystore +- github.com/ipfs/go-filestore +- github.com/ipfs/go-ipns +- github.com/ipfs/go-blockservice +- github.com/ipfs/go-ipfs-chunker +- github.com/ipfs/go-fetcher +- github.com/ipfs/go-ipfs-blockstore +- github.com/ipfs/go-ipfs-posinfo +- github.com/ipfs/go-ipfs-util +- github.com/ipfs/go-ipfs-ds-help +- github.com/ipfs/go-verifcid +- github.com/ipfs/go-ipfs-exchange-offline +- github.com/ipfs/go-ipfs-routing +- github.com/ipfs/go-ipfs-exchange-interface +- github.com/ipfs/go-libipfs + +Note: if you consume these in your own code, we recommend migrating to Boxo. To ease this process, there's a [tool which will help migrate your code to Boxo](https://github.com/ipfs/boxo#migrating-to-box). + +You can learn more about the [Boxo 0.8 release](https://github.com/ipfs/boxo/releases/tag/v0.8.0) that Kubo now depends and the general effort to get Boxo to be a stable foundation [here](https://github.com/ipfs/boxo/issues/196). + +#### HTTP Gateway + +##### Switch to `boxo/gateway` library + +Gateway code was extracted and refactored into a standalone library that now +lives in [boxo/gateway](https://github.com/ipfs/boxo/tree/main/gateway). This +enabled us to clean up some legacy code and remove dependency on Kubo +internals. + +The GO API is still being refined, but now operates on higher level abstraction +defined by `gateway.IPFSBackend` interface. It is now possible to embed +gateway functionality without the rest of Kubo. + +See the [car](https://github.com/ipfs/boxo/tree/main/examples/gateway/car) +and [proxy](https://github.com/ipfs/boxo/tree/main/examples/gateway/proxy) +examples, or more advanced +[bifrost-gateway](https://github.com/ipfs/bifrost-gateway). + +##### Improved testing + +We are also in the progress of moving away from gateway testing being based on +Kubo sharness tests, and are working on +[ipfs/gateway-conformance](https://github.com/ipfs/gateway-conformance) test +suite that is vendor agnostic and can be run against arbitrary HTTP endpoint to +test specific subset of [HTTP Gateways specifications](https://specs.ipfs.tech/http-gateways/). + +##### Trace Context support + +We've introduced initial support for `traceparent` header from [W3C's Trace +Context spec](https://w3c.github.io/trace-context/). + +If `traceparent` header is +present in the gateway request, one can use its `trace-id` part to inspect +trace spans via selected exporter such as Jaeger UI +([docs](https://github.com/ipfs/boxo/blob/main/docs/tracing.md#using-jaeger-ui), +[demo](https://user-images.githubusercontent.com/157609/231312374-bafc2035-1fc6-4d6b-901b-9e4af039807c.png)). + +To learn more, see [tracing docs](https://github.com/ipfs/boxo/blob/main/docs/tracing.md). + +##### Removed legacy features + +- Some Kubo-specific prometheus metrics are no longer available. + - An up-to-date list of gateway metrics can be found in [boxo/gateway/metrics.go](https://github.com/ipfs/boxo/blob/main/gateway/metrics.go). +- The legacy opt-in `Gateway.Writable` is no longer available as of Kubo 0.20. + - We are working on developing a modern replacement. + To support our efforts, please leave a comment describing your use case in + [ipfs/specs#375](https://github.com/ipfs/specs/issues/375). + +#### `--empty-repo` is now the default + +When creating a repository with `ipfs init`, `--empty-repo=true` is now the default. This means +that your repository will be empty by default instead of containing the introduction files. +You can read more about the rationale behind this decision on the [tracking issue](https://github.com/ipfs/kubo/issues/9757). + ### πŸ“ Changelog ### πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Contributors + + From 4f438e6d4efb06f8b956b9d32736cdf0d4f70e0c Mon Sep 17 00:00:00 2001 From: Marco Munizaga Date: Fri, 14 Apr 2023 02:09:51 -0700 Subject: [PATCH 05/19] deps: bump go-libp2p to v0.27.1 (#9816) Co-authored-by: Jorropo --- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 345f97f3fdd..e61559247cc 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -9,7 +9,7 @@ replace github.com/ipfs/kubo => ./../../.. require ( github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 - github.com/libp2p/go-libp2p v0.27.0 + github.com/libp2p/go-libp2p v0.27.1 github.com/multiformats/go-multiaddr v0.9.0 ) diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 755f9aceb05..643c6ace007 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -489,8 +489,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.0 h1:QbhrTuB0ln9j9op6yAOR0o+cx/qa9NyNZ5ov0Tql8ZU= -github.com/libp2p/go-libp2p v0.27.0/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= +github.com/libp2p/go-libp2p v0.27.1 h1:k1u6RHsX3hqKnslDjsSgLNURxJ3O1atIZCY4gpMbbus= +github.com/libp2p/go-libp2p v0.27.1/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= diff --git a/go.mod b/go.mod index 115bd5749aa..a7737edef2f 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/jbenet/goprocess v0.1.4 github.com/julienschmidt/httprouter v1.3.0 github.com/libp2p/go-doh-resolver v0.4.0 - github.com/libp2p/go-libp2p v0.27.0 + github.com/libp2p/go-libp2p v0.27.1 github.com/libp2p/go-libp2p-http v0.5.0 github.com/libp2p/go-libp2p-kad-dht v0.23.0 github.com/libp2p/go-libp2p-kbucket v0.5.0 diff --git a/go.sum b/go.sum index 90cd6eb79db..e060b4e2569 100644 --- a/go.sum +++ b/go.sum @@ -540,8 +540,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.0 h1:QbhrTuB0ln9j9op6yAOR0o+cx/qa9NyNZ5ov0Tql8ZU= -github.com/libp2p/go-libp2p v0.27.0/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= +github.com/libp2p/go-libp2p v0.27.1 h1:k1u6RHsX3hqKnslDjsSgLNURxJ3O1atIZCY4gpMbbus= +github.com/libp2p/go-libp2p v0.27.1/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= From 656867b81c7ecdc47e835714d5073937ecfb6fd6 Mon Sep 17 00:00:00 2001 From: Piotr Galar Date: Mon, 24 Apr 2023 09:44:27 +0200 Subject: [PATCH 06/19] ci: update apt before installing deps (#9831) --- .github/workflows/build.yml | 1 - .github/workflows/sharness.yml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50889613bea..1f16d9bf399 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -148,7 +148,6 @@ jobs: with: repository: ipfs/go-ipfs-http-client path: go-ipfs-http-client - ref: bump-for-rcmgr-last-push - uses: protocol/cache-go-action@v1 with: name: ${{ github.job }} diff --git a/.github/workflows/sharness.yml b/.github/workflows/sharness.yml index 012a6a9826e..2d9dfb41da2 100644 --- a/.github/workflows/sharness.yml +++ b/.github/workflows/sharness.yml @@ -32,7 +32,7 @@ jobs: with: path: kubo - name: Install missing tools - run: sudo apt install -y socat net-tools fish libxml2-utils + run: sudo apt update && sudo apt install -y socat net-tools fish libxml2-utils - name: Restore Go Cache uses: protocol/cache-go-action@v1 with: From 7ea0b0703816473460614d1705b9c8cc9f12e052 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 25 Apr 2023 09:55:40 +0200 Subject: [PATCH 07/19] docs: add `ipfs pubsub` deprecation reminder to changelog (#9827) --- docs/changelogs/v0.20.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelogs/v0.20.md b/docs/changelogs/v0.20.md index 9809d4703b2..590ef5453a5 100644 --- a/docs/changelogs/v0.20.md +++ b/docs/changelogs/v0.20.md @@ -13,6 +13,7 @@ - [Trace Context support](#trace-context-support) - [Removed legacy features](#removed-legacy-features) - [`--empty-repo` is now the default](#--empty-repo-is-now-the-default) + - [Reminder: `ipfs pubsub` commands and matching HTTP endpoints are deprecated and will be removed](#reminder-ipfs-pubsub-commands-and-matching-http-endpoints-are-deprecated-and-will-be-removed) - [πŸ“ Changelog](#-changelog) - [πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Contributors](#-contributors) @@ -109,6 +110,10 @@ When creating a repository with `ipfs init`, `--empty-repo=true` is now the defa that your repository will be empty by default instead of containing the introduction files. You can read more about the rationale behind this decision on the [tracking issue](https://github.com/ipfs/kubo/issues/9757). +#### Reminder: `ipfs pubsub` commands and matching HTTP endpoints are deprecated and will be removed + +`ipfs pubsub` commands and all `/api/v0/pubsub/` RPC endpoints and will be removed in the next release. For more information and rational see [#9717](https://github.com/ipfs/kubo/issues/9717). + ### πŸ“ Changelog ### πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Contributors From 8418b083d8fa0db0f8a2ad0fb99a45eed9f38406 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 25 Apr 2023 10:47:28 +0200 Subject: [PATCH 08/19] chore: bump to boxo 0.8.1 (#9836) --- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index e61559247cc..6eb1bcb5eb5 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -7,7 +7,7 @@ go 1.18 replace github.com/ipfs/kubo => ./../../.. require ( - github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e + github.com/ipfs/boxo v0.8.1 github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 github.com/libp2p/go-libp2p v0.27.1 github.com/multiformats/go-multiaddr v0.9.0 diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 643c6ace007..2302548a970 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -321,8 +321,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e h1:8wmBhjwJk2drWZjNwoN7uc+IkG+N93laIhjY69rjMqw= -github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= +github.com/ipfs/boxo v0.8.1 h1:3DkKBCK+3rdEB5t77WDShUXXhktYwH99mkAsgajsKrU= +github.com/ipfs/boxo v0.8.1/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= diff --git a/go.mod b/go.mod index a7737edef2f..b83143f9bb1 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 - github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e + github.com/ipfs/boxo v0.8.1 github.com/ipfs/go-block-format v0.1.2 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-cidutil v0.1.0 diff --git a/go.sum b/go.sum index e060b4e2569..b00e5aed63f 100644 --- a/go.sum +++ b/go.sum @@ -356,8 +356,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e h1:8wmBhjwJk2drWZjNwoN7uc+IkG+N93laIhjY69rjMqw= -github.com/ipfs/boxo v0.8.1-0.20230411232920-5d6c73c8e35e/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= +github.com/ipfs/boxo v0.8.1 h1:3DkKBCK+3rdEB5t77WDShUXXhktYwH99mkAsgajsKrU= +github.com/ipfs/boxo v0.8.1/go.mod h1:xJ2hVb4La5WyD7GvKYE0lq2g1rmQZoCD2K4WNrV6aZI= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= From 45b31600d841d69e5129a37c1f2f7e5599b508bf Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 9 May 2023 09:12:56 +0000 Subject: [PATCH 09/19] chore: update version --- version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.go b/version.go index 7c1681bf0eb..86ac8dbf4a3 100644 --- a/version.go +++ b/version.go @@ -11,7 +11,7 @@ import ( var CurrentCommit string // CurrentVersionNumber is the current application's version literal -const CurrentVersionNumber = "0.20.0-rc2" +const CurrentVersionNumber = "0.20.0" const ApiVersion = "/kubo/" + CurrentVersionNumber + "/" //nolint From 9482d7529233ff8942601a875c705fac55376c06 Mon Sep 17 00:00:00 2001 From: Gus Eggert Date: Mon, 1 May 2023 15:29:34 -0400 Subject: [PATCH 10/19] fix: use default HTTP routers when FullRT DHT client is used (#9841) --- cmd/ipfs/daemon.go | 14 ++------- core/node/groups.go | 2 +- core/node/libp2p/routing.go | 47 ++++++++++++++++++----------- core/node/libp2p/routingopt.go | 55 ++++++++++++++++++++-------------- 4 files changed, 65 insertions(+), 53 deletions(-) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index ffcb30a34e9..1e03a8264a8 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -413,19 +413,9 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment case routingOptionSupernodeKwd: return errors.New("supernode routing was never fully implemented and has been removed") case routingOptionDefaultKwd, routingOptionAutoKwd: - ncfg.Routing = libp2p.ConstructDefaultRouting( - cfg.Identity.PeerID, - cfg.Addresses.Swarm, - cfg.Identity.PrivKey, - libp2p.DHTOption, - ) + ncfg.Routing = libp2p.ConstructDefaultRouting(cfg, libp2p.DHTOption) case routingOptionAutoClientKwd: - ncfg.Routing = libp2p.ConstructDefaultRouting( - cfg.Identity.PeerID, - cfg.Addresses.Swarm, - cfg.Identity.PrivKey, - libp2p.DHTClientOption, - ) + ncfg.Routing = libp2p.ConstructDefaultRouting(cfg, libp2p.DHTClientOption) case routingOptionDHTClientKwd: ncfg.Routing = libp2p.DHTClientOption case routingOptionDHTKwd: diff --git a/core/node/groups.go b/core/node/groups.go index 0b166026596..ae8ce85399a 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -165,7 +165,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config, userResourceOverrides rcmgr.Part fx.Provide(libp2p.Routing), fx.Provide(libp2p.ContentRouting), - fx.Provide(libp2p.BaseRouting(cfg.Experimental.AcceleratedDHTClient)), + fx.Provide(libp2p.BaseRouting(cfg)), maybeProvide(libp2p.PubsubRouter, bcfg.getOpt("ipnsps")), maybeProvide(libp2p.BandwidthCounter, !cfg.Swarm.DisableBandwidthMetrics), diff --git a/core/node/libp2p/routing.go b/core/node/libp2p/routing.go index f96f772e133..2e356e447f5 100644 --- a/core/node/libp2p/routing.go +++ b/core/node/libp2p/routing.go @@ -63,35 +63,34 @@ type processInitialRoutingOut struct { type AddrInfoChan chan peer.AddrInfo -func BaseRouting(experimentalDHTClient bool) interface{} { +func BaseRouting(cfg *config.Config) interface{} { return func(lc fx.Lifecycle, in processInitialRoutingIn) (out processInitialRoutingOut, err error) { - var dr *ddht.DHT + var dualDHT *ddht.DHT if dht, ok := in.Router.(*ddht.DHT); ok { - dr = dht + dualDHT = dht lc.Append(fx.Hook{ OnStop: func(ctx context.Context) error { - return dr.Close() + return dualDHT.Close() }, }) } - if pr, ok := in.Router.(routinghelpers.ComposableRouter); ok { - for _, r := range pr.Routers() { + if cr, ok := in.Router.(routinghelpers.ComposableRouter); ok { + for _, r := range cr.Routers() { if dht, ok := r.(*ddht.DHT); ok { - dr = dht + dualDHT = dht lc.Append(fx.Hook{ OnStop: func(ctx context.Context) error { - return dr.Close() + return dualDHT.Close() }, }) - break } } } - if dr != nil && experimentalDHTClient { + if dualDHT != nil && cfg.Experimental.AcceleratedDHTClient { cfg, err := in.Repo.Config() if err != nil { return out, err @@ -101,7 +100,7 @@ func BaseRouting(experimentalDHTClient bool) interface{} { return out, err } - expClient, err := fullrt.NewFullRT(in.Host, + fullRTClient, err := fullrt.NewFullRT(in.Host, dht.DefaultPrefix, fullrt.DHTOption( dht.Validator(in.Validator), @@ -116,18 +115,30 @@ func BaseRouting(experimentalDHTClient bool) interface{} { lc.Append(fx.Hook{ OnStop: func(ctx context.Context) error { - return expClient.Close() + return fullRTClient.Close() }, }) + // we want to also use the default HTTP routers, so wrap the FullRT client + // in a parallel router that calls them in parallel + httpRouters, err := constructDefaultHTTPRouters(cfg) + if err != nil { + return out, err + } + routers := []*routinghelpers.ParallelRouter{ + {Router: fullRTClient}, + } + routers = append(routers, httpRouters...) + router := routinghelpers.NewComposableParallel(routers) + return processInitialRoutingOut{ Router: Router{ - Routing: expClient, Priority: 1000, + Routing: router, }, - DHT: dr, - DHTClient: expClient, - ContentRouter: expClient, + DHT: dualDHT, + DHTClient: fullRTClient, + ContentRouter: fullRTClient, }, nil } @@ -136,8 +147,8 @@ func BaseRouting(experimentalDHTClient bool) interface{} { Priority: 1000, Routing: in.Router, }, - DHT: dr, - DHTClient: dr, + DHT: dualDHT, + DHTClient: dualDHT, ContentRouter: in.Router, }, nil } diff --git a/core/node/libp2p/routingopt.go b/core/node/libp2p/routingopt.go index 1d47ae27308..b363f25b7da 100644 --- a/core/node/libp2p/routingopt.go +++ b/core/node/libp2p/routingopt.go @@ -43,8 +43,35 @@ func init() { } } +func constructDefaultHTTPRouters(cfg *config.Config) ([]*routinghelpers.ParallelRouter, error) { + var routers []*routinghelpers.ParallelRouter + // Append HTTP routers for additional speed + for _, endpoint := range defaultHTTPRouters { + httpRouter, err := irouting.ConstructHTTPRouter(endpoint, cfg.Identity.PeerID, cfg.Addresses.Swarm, cfg.Identity.PrivKey) + if err != nil { + return nil, err + } + + r := &irouting.Composer{ + GetValueRouter: routinghelpers.Null{}, + PutValueRouter: routinghelpers.Null{}, + ProvideRouter: routinghelpers.Null{}, // modify this when indexers supports provide + FindPeersRouter: routinghelpers.Null{}, + FindProvidersRouter: httpRouter, + } + + routers = append(routers, &routinghelpers.ParallelRouter{ + Router: r, + IgnoreError: true, // https://github.com/ipfs/kubo/pull/9475#discussion_r1042507387 + Timeout: 15 * time.Second, // 5x server value from https://github.com/ipfs/kubo/pull/9475#discussion_r1042428529 + ExecuteAfter: 0, + }) + } + return routers, nil +} + // ConstructDefaultRouting returns routers used when Routing.Type is unset or set to "auto" -func ConstructDefaultRouting(peerID string, addrs []string, privKey string, routingOpt RoutingOption) RoutingOption { +func ConstructDefaultRouting(cfg *config.Config, routingOpt RoutingOption) RoutingOption { return func(args RoutingOptionArgs) (routing.Routing, error) { // Defined routers will be queried in parallel (optimizing for response speed) // Different trade-offs can be made by setting Routing.Type = "custom" with own Routing.Routers @@ -60,29 +87,13 @@ func ConstructDefaultRouting(peerID string, addrs []string, privKey string, rout ExecuteAfter: 0, }) - // Append HTTP routers for additional speed - for _, endpoint := range defaultHTTPRouters { - httpRouter, err := irouting.ConstructHTTPRouter(endpoint, peerID, addrs, privKey) - if err != nil { - return nil, err - } - - r := &irouting.Composer{ - GetValueRouter: routinghelpers.Null{}, - PutValueRouter: routinghelpers.Null{}, - ProvideRouter: routinghelpers.Null{}, // modify this when indexers supports provide - FindPeersRouter: routinghelpers.Null{}, - FindProvidersRouter: httpRouter, - } - - routers = append(routers, &routinghelpers.ParallelRouter{ - Router: r, - IgnoreError: true, // https://github.com/ipfs/kubo/pull/9475#discussion_r1042507387 - Timeout: 15 * time.Second, // 5x server value from https://github.com/ipfs/kubo/pull/9475#discussion_r1042428529 - ExecuteAfter: 0, - }) + httpRouters, err := constructDefaultHTTPRouters(cfg) + if err != nil { + return nil, err } + routers = append(routers, httpRouters...) + routing := routinghelpers.NewComposableParallel(routers) return routing, nil } From b4504be54c6f7265aa5473f5432b801b84c5dec4 Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Tue, 2 May 2023 04:16:52 -0700 Subject: [PATCH 11/19] feat: webui@3.0.0 (#9835) --- core/corehttp/webui.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/corehttp/webui.go b/core/corehttp/webui.go index f7b27c93914..9b7cf776d56 100644 --- a/core/corehttp/webui.go +++ b/core/corehttp/webui.go @@ -1,11 +1,12 @@ package corehttp // TODO: move to IPNS -const WebUIPath = "/ipfs/bafybeifeqt7mvxaniphyu2i3qhovjaf3sayooxbh5enfdqtiehxjv2ldte" // v2.22.0 +const WebUIPath = "/ipfs/bafybeic4gops3d3lyrisqku37uio33nvt6fqxvkxihrwlqsuvf76yln4fm" // v3.0.0 // WebUIPaths is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/bafybeifeqt7mvxaniphyu2i3qhovjaf3sayooxbh5enfdqtiehxjv2ldte", "/ipfs/bafybeiequgo72mrvuml56j4gk7crewig5bavumrrzhkqbim6b3s2yqi7ty", "/ipfs/bafybeibjbq3tmmy7wuihhhwvbladjsd3gx3kfjepxzkq6wylik6wc3whzy", "/ipfs/bafybeiavrvt53fks6u32n5p2morgblcmck4bh4ymf4rrwu7ah5zsykmqqa", From d2c578878faf63ec2633788c2424e5b24edfbbf4 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 3 May 2023 09:00:41 +0200 Subject: [PATCH 12/19] docs: add changelog for v0.19.2 --- docs/changelogs/v0.19.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/changelogs/v0.19.md b/docs/changelogs/v0.19.md index 1abc2e518b2..f7e190a7e9c 100644 --- a/docs/changelogs/v0.19.md +++ b/docs/changelogs/v0.19.md @@ -1,6 +1,33 @@ # Kubo changelog v0.19 +## v0.19.2 + +### Highlights + +#### FullRT DHT HTTP Routers + +The default HTTP routers are now used when the FullRT DHT client is used. This fixes +the issue where cid.contact is not being queried by default when the accelerated +DHT client was enabled. Read more in ([ipfs/kubo#9841](https://github.com/ipfs/kubo/pull/9841)). + +### Changelog + +
Full Changelog + +- github.com/ipfs/kubo: + - fix: use default HTTP routers when FullRT DHT client is used (#9841) ([ipfs/kubo#9841](https://github.com/ipfs/kubo/pull/9841)) + - chore: update version + +
+ +### Contributors + +| Contributor | Commits | Lines Β± | Files Changed | +|-------------|---------|---------|---------------| +| Gus Eggert | 1 | +65/-53 | 4 | +| Henrique Dias | 1 | +1/-1 | 1 | + ## v0.19.1 ### πŸ”¦ Highlights From d1b0083d604e0a4b46bcdc17f03b950744b9bc55 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 3 May 2023 09:08:04 +0200 Subject: [PATCH 13/19] Merge pull request #9847 from ipfs/release-v0.19.2 Release: v0.19.2 From 5f5c16e2cc7a42ca64f2ad31bd46591a5a345c79 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 3 May 2023 12:57:21 +0200 Subject: [PATCH 14/19] Merge branch 'master' into merge-release-v0.19.2 --- .github/CODEOWNERS | 3 + test/cli/testutils/random_files.go | 116 ++++++++++++ test/cli/transports_test.go | 127 +++++++++++++ test/ipfs-test-lib.sh | 12 +- ...-docker-image.sh => t0002-docker-image.sh} | 16 +- ...ker-migrate.sh => t0003-docker-migrate.sh} | 9 +- test/sharness/t0125-twonode.sh | 178 ------------------ test/sharness/t0130-multinode.sh | 115 ----------- 8 files changed, 261 insertions(+), 315 deletions(-) create mode 100644 test/cli/testutils/random_files.go create mode 100644 test/cli/transports_test.go rename test/sharness/{t0300-docker-image.sh => t0002-docker-image.sh} (87%) rename test/sharness/{t0301-docker-migrate.sh => t0003-docker-migrate.sh} (92%) delete mode 100755 test/sharness/t0125-twonode.sh delete mode 100755 test/sharness/t0130-multinode.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5151ad178ae..7d17855e03c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,6 +2,9 @@ # request that modifies code that they own. Code owners are not automatically # requested to review draft pull requests. +# Default +* @ipfs/kubo-maintainers + # HTTP Gateway core/corehttp/ @lidel test/sharness/*gateway*.sh @lidel diff --git a/test/cli/testutils/random_files.go b/test/cli/testutils/random_files.go new file mode 100644 index 00000000000..0e550a125e3 --- /dev/null +++ b/test/cli/testutils/random_files.go @@ -0,0 +1,116 @@ +package testutils + +import ( + "fmt" + "io" + "math/rand" + "os" + "path" + "time" +) + +var AlphabetEasy = []rune("abcdefghijklmnopqrstuvwxyz01234567890-_") +var AlphabetHard = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890!@#$%^&*()-_+= ;.,<>'\"[]{}() ") + +type RandFiles struct { + Rand *rand.Rand + FileSize int // the size per file. + FilenameSize int + Alphabet []rune // for filenames + + FanoutDepth int // how deep the hierarchy goes + FanoutFiles int // how many files per dir + FanoutDirs int // how many dirs per dir + + RandomSize bool // randomize file sizes + RandomFanout bool // randomize fanout numbers +} + +func NewRandFiles() *RandFiles { + return &RandFiles{ + Rand: rand.New(rand.NewSource(time.Now().UnixNano())), + FileSize: 4096, + FilenameSize: 16, + Alphabet: AlphabetEasy, + FanoutDepth: 2, + FanoutDirs: 5, + FanoutFiles: 10, + RandomSize: true, + } +} + +func (r *RandFiles) WriteRandomFiles(root string, depth int) error { + numfiles := r.FanoutFiles + if r.RandomFanout { + numfiles = rand.Intn(r.FanoutFiles) + 1 + } + + for i := 0; i < numfiles; i++ { + if err := r.WriteRandomFile(root); err != nil { + return err + } + } + + if depth+1 <= r.FanoutDepth { + numdirs := r.FanoutDirs + if r.RandomFanout { + numdirs = r.Rand.Intn(numdirs) + 1 + } + + for i := 0; i < numdirs; i++ { + if err := r.WriteRandomDir(root, depth+1); err != nil { + return err + } + } + } + + return nil +} + +func (r *RandFiles) RandomFilename(length int) string { + b := make([]rune, length) + for i := range b { + b[i] = r.Alphabet[r.Rand.Intn(len(r.Alphabet))] + } + return string(b) +} + +func (r *RandFiles) WriteRandomFile(root string) error { + filesize := int64(r.FileSize) + if r.RandomSize { + filesize = r.Rand.Int63n(filesize) + 1 + } + + n := rand.Intn(r.FilenameSize-4) + 4 + name := r.RandomFilename(n) + filepath := path.Join(root, name) + f, err := os.Create(filepath) + if err != nil { + return fmt.Errorf("creating random file: %w", err) + } + + if _, err := io.CopyN(f, r.Rand, filesize); err != nil { + return fmt.Errorf("copying random file: %w", err) + } + + return f.Close() +} + +func (r *RandFiles) WriteRandomDir(root string, depth int) error { + if depth > r.FanoutDepth { + return nil + } + + n := rand.Intn(r.FilenameSize-4) + 4 + name := r.RandomFilename(n) + root = path.Join(root, name) + if err := os.MkdirAll(root, 0755); err != nil { + return fmt.Errorf("creating random dir: %w", err) + } + + err := r.WriteRandomFiles(root, depth) + if err != nil { + return fmt.Errorf("writing random files in random dir: %w", err) + } + return nil +} diff --git a/test/cli/transports_test.go b/test/cli/transports_test.go new file mode 100644 index 00000000000..78f21fd0540 --- /dev/null +++ b/test/cli/transports_test.go @@ -0,0 +1,127 @@ +package cli + +import ( + "os" + "path/filepath" + "testing" + + "github.com/ipfs/kubo/config" + "github.com/ipfs/kubo/test/cli/harness" + "github.com/ipfs/kubo/test/cli/testutils" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestTransports(t *testing.T) { + disableRouting := func(nodes harness.Nodes) { + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + cfg.Routing.Type = config.NewOptionalString("none") + cfg.Bootstrap = nil + }) + }) + } + checkSingleFile := func(nodes harness.Nodes) { + s := testutils.RandomStr(100) + hash := nodes[0].IPFSAddStr(s) + nodes.ForEachPar(func(n *harness.Node) { + val := n.IPFS("cat", hash).Stdout.String() + assert.Equal(t, s, val) + }) + } + checkRandomDir := func(nodes harness.Nodes) { + randDir := filepath.Join(nodes[0].Dir, "foobar") + require.NoError(t, os.Mkdir(randDir, 0777)) + rf := testutils.NewRandFiles() + rf.FanoutDirs = 3 + rf.FanoutFiles = 6 + require.NoError(t, rf.WriteRandomFiles(randDir, 4)) + + hash := nodes[1].IPFS("add", "-r", "-Q", randDir).Stdout.Trimmed() + nodes.ForEachPar(func(n *harness.Node) { + res := n.RunIPFS("refs", "-r", hash) + assert.Equal(t, 0, res.ExitCode()) + }) + } + + runTests := func(nodes harness.Nodes) { + checkSingleFile(nodes) + checkRandomDir(nodes) + } + + tcpNodes := func(t *testing.T) harness.Nodes { + nodes := harness.NewT(t).NewNodes(2).Init() + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + cfg.Addresses.Swarm = []string{"/ip4/127.0.0.1/tcp/0"} + cfg.Swarm.Transports.Network.QUIC = config.False + cfg.Swarm.Transports.Network.Relay = config.False + cfg.Swarm.Transports.Network.WebTransport = config.False + cfg.Swarm.Transports.Network.Websocket = config.False + }) + }) + disableRouting(nodes) + return nodes + } + + t.Run("tcp", func(t *testing.T) { + t.Parallel() + nodes := tcpNodes(t).StartDaemons().Connect() + runTests(nodes) + }) + + t.Run("tcp with mplex", func(t *testing.T) { + t.Parallel() + nodes := tcpNodes(t) + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + cfg.Swarm.Transports.Multiplexers.Yamux = config.Disabled + }) + }) + nodes.StartDaemons().Connect() + runTests(nodes) + }) + + t.Run("tcp with NOISE", func(t *testing.T) { + t.Parallel() + nodes := tcpNodes(t) + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + cfg.Swarm.Transports.Security.TLS = config.Disabled + }) + }) + nodes.StartDaemons().Connect() + runTests(nodes) + }) + + t.Run("QUIC", func(t *testing.T) { + t.Parallel() + nodes := harness.NewT(t).NewNodes(5).Init() + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + cfg.Addresses.Swarm = []string{"/ip4/127.0.0.1/udp/0/quic-v1"} + cfg.Swarm.Transports.Network.QUIC = config.True + cfg.Swarm.Transports.Network.TCP = config.False + }) + }) + disableRouting(nodes) + nodes.StartDaemons().Connect() + runTests(nodes) + }) + + t.Run("QUIC", func(t *testing.T) { + t.Parallel() + nodes := harness.NewT(t).NewNodes(5).Init() + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + cfg.Addresses.Swarm = []string{"/ip4/127.0.0.1/udp/0/quic-v1/webtransport"} + cfg.Swarm.Transports.Network.QUIC = config.True + cfg.Swarm.Transports.Network.WebTransport = config.True + }) + }) + disableRouting(nodes) + nodes.StartDaemons().Connect() + runTests(nodes) + }) + +} diff --git a/test/ipfs-test-lib.sh b/test/ipfs-test-lib.sh index eabf17020d2..a3bc32bbbd3 100644 --- a/test/ipfs-test-lib.sh +++ b/test/ipfs-test-lib.sh @@ -50,19 +50,19 @@ test_path_cmp() { # Docker -# This takes a Dockerfile, and a build context directory +# This takes a Dockerfile, a tag name, and a build context directory docker_build() { - docker build --rm -f "$1" "$2" | ansi_strip + docker build --rm --tag "$1" --file "$2" "$3" | ansi_strip } # This takes an image as argument and writes a docker ID on stdout docker_run() { - docker run -d "$1" + docker run --detach "$1" } # This takes a docker ID and a command as arguments docker_exec() { - docker exec -t "$1" /bin/sh -c "$2" + docker exec --tty "$1" /bin/sh -c "$2" } # This takes a docker ID as argument @@ -72,12 +72,12 @@ docker_stop() { # This takes a docker ID as argument docker_rm() { - docker rm -f -v "$1" > /dev/null + docker rm --force --volumes "$1" > /dev/null } # This takes a docker image name as argument docker_rmi() { - docker rmi -f "$1" > /dev/null + docker rmi --force "$1" > /dev/null } # Test whether all the expected lines are included in a file. The file diff --git a/test/sharness/t0300-docker-image.sh b/test/sharness/t0002-docker-image.sh similarity index 87% rename from test/sharness/t0300-docker-image.sh rename to test/sharness/t0002-docker-image.sh index 3c390a4535f..11ccf01b74e 100755 --- a/test/sharness/t0300-docker-image.sh +++ b/test/sharness/t0002-docker-image.sh @@ -27,18 +27,12 @@ TEST_TRASH_DIR=$(pwd) TEST_SCRIPTS_DIR=$(dirname "$TEST_TRASH_DIR") TEST_TESTS_DIR=$(dirname "$TEST_SCRIPTS_DIR") APP_ROOT_DIR=$(dirname "$TEST_TESTS_DIR") +IMAGE_TAG=kubo_test test_expect_success "docker image build succeeds" ' - docker_build "$TEST_TESTS_DIR/../Dockerfile" "$APP_ROOT_DIR" | tee build-actual || + docker_build "$IMAGE_TAG" "$TEST_TESTS_DIR/../Dockerfile" "$APP_ROOT_DIR" || test_fsh echo "TEST_TESTS_DIR: $TEST_TESTS_DIR" || - test_fsh echo "APP_ROOT_DIR : $APP_ROOT_DIR" || - test_fsh cat build-actual -' - -test_expect_success "docker image build output looks good" ' - SUCCESS_LINE=$(egrep "^Successfully built" build-actual) && - IMAGE_ID=$(expr "$SUCCESS_LINE" : "^Successfully built \(.*\)") || - test_fsh cat build-actual + test_fsh echo "APP_ROOT_DIR : $APP_ROOT_DIR" ' test_expect_success "write init scripts" ' @@ -52,7 +46,7 @@ test_expect_success "docker image runs" ' -p 127.0.0.1:5001:5001 -p 127.0.0.1:8080:8080 \ -v "$PWD/001.sh":/container-init.d/001.sh \ -v "$PWD/002.sh":/container-init.d/002.sh \ - "$IMAGE_ID") + "$IMAGE_TAG") ' test_expect_success "docker container gateway is up" ' @@ -100,5 +94,5 @@ test_expect_success "stop docker container" ' ' docker_rm "$DOC_ID" -docker_rmi "$IMAGE_ID" +docker_rmi "$IMAGE_TAG" test_done diff --git a/test/sharness/t0301-docker-migrate.sh b/test/sharness/t0003-docker-migrate.sh similarity index 92% rename from test/sharness/t0301-docker-migrate.sh rename to test/sharness/t0003-docker-migrate.sh index 3f7d32f214b..ac3c7aee2bc 100755 --- a/test/sharness/t0301-docker-migrate.sh +++ b/test/sharness/t0003-docker-migrate.sh @@ -24,10 +24,10 @@ TEST_TRASH_DIR=$(pwd) TEST_SCRIPTS_DIR=$(dirname "$TEST_TRASH_DIR") TEST_TESTS_DIR=$(dirname "$TEST_SCRIPTS_DIR") APP_ROOT_DIR=$(dirname "$TEST_TESTS_DIR") +IMAGE_TAG=kubo_migrate test_expect_success "docker image build succeeds" ' - docker_build "$TEST_TESTS_DIR/../Dockerfile" "$APP_ROOT_DIR" >actual && - IMAGE_ID=$(tail -n1 actual | cut -d " " -f 3) + docker_build "$IMAGE_TAG" "$TEST_TESTS_DIR/../Dockerfile" "$APP_ROOT_DIR" ' test_init_ipfs @@ -53,7 +53,7 @@ test_expect_success "startup fake dists server" ' ' test_expect_success "docker image runs" ' - DOC_ID=$(docker run -d -v "$IPFS_PATH":/data/ipfs --net=host "$IMAGE_ID") + DOC_ID=$(docker run -d -v "$IPFS_PATH":/data/ipfs --net=host "$IMAGE_TAG") ' test_expect_success "docker container tries to pull migrations from netcat" ' @@ -78,6 +78,5 @@ test_expect_success "correct version was requested" ' ' docker_rm "$DOC_ID" -docker_rmi "$IMAGE_ID" +docker_rmi "$IMAGE_TAG" test_done - diff --git a/test/sharness/t0125-twonode.sh b/test/sharness/t0125-twonode.sh deleted file mode 100755 index 8ea1c9e5d1b..00000000000 --- a/test/sharness/t0125-twonode.sh +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2017 Jeromy Johnson -# MIT Licensed; see the LICENSE file in this repository. -# - -test_description="Test two ipfs nodes transferring a file" - -. lib/test-lib.sh - -check_file_fetch() { - node=$1 - fhash=$2 - fname=$3 - - test_expect_success "can fetch file" ' - ipfsi $node cat $fhash > fetch_out - ' - - test_expect_success "file looks good" ' - test_cmp $fname fetch_out - ' -} - -check_dir_fetch() { - node=$1 - ref=$2 - - test_expect_success "node can fetch all refs for dir" ' - ipfsi $node refs -r $ref > /dev/null - ' -} - -run_single_file_test() { - test_expect_success "add a file on node1" ' - random 1000000 > filea && - FILEA_HASH=$(ipfsi 1 add -q filea) - ' - - check_file_fetch 0 $FILEA_HASH filea -} - -run_random_dir_test() { - test_expect_success "create a bunch of random files" ' - random-files -depth=3 -dirs=4 -files=5 -seed=5 foobar > /dev/null - ' - - test_expect_success "add those on node 0" ' - DIR_HASH=$(ipfsi 0 add -r -Q foobar) - ' - - check_dir_fetch 1 $DIR_HASH -} - -flaky_advanced_test() { - startup_cluster 2 "$@" - - test_expect_success "clean repo before test" ' - ipfsi 0 repo gc > /dev/null && - ipfsi 1 repo gc > /dev/null - ' - - run_single_file_test - - run_random_dir_test - - test_expect_success "gather bitswap stats" ' - ipfsi 0 bitswap stat -v > stat0 && - ipfsi 1 bitswap stat -v > stat1 - ' - - test_expect_success "shut down nodes" ' - iptb stop && iptb_wait_stop - ' - - # NOTE: data transferred stats checks are flaky - # trying to debug them by printing out the stats hides the flakiness - # my theory is that the extra time cat calls take to print out the stats - # allow for proper cleanup to happen - go-sleep 1s -} - -run_advanced_test() { - # TODO: investigate why flaky_advanced_test is flaky - # Context: https://github.com/ipfs/kubo/pull/9486 - # sometimes, bitswap status returns unexpected block transfers - # and everyone has been re-running circleci until is passes for at least a year. - # this re-runs test until it passes or a timeout hits - - BLOCKS_0=126 - BLOCKS_1=5 - DATA_0=228113 - DATA_1=1000256 - for i in $(test_seq 1 600); do - flaky_advanced_test - (grep -q "$DATA_0" stat0 && grep -q "$DATA_1" stat1) && break - go-sleep 100ms - done - - test_expect_success "node0 data transferred looks correct" ' - test_should_contain "blocks sent: $BLOCKS_0" stat0 && - test_should_contain "blocks received: $BLOCKS_1" stat0 && - test_should_contain "data sent: $DATA_0" stat0 && - test_should_contain "data received: $DATA_1" stat0 - ' - - test_expect_success "node1 data transferred looks correct" ' - test_should_contain "blocks received: $BLOCKS_0" stat1 && - test_should_contain "blocks sent: $BLOCKS_1" stat1 && - test_should_contain "data received: $DATA_0" stat1 && - test_should_contain "data sent: $DATA_1" stat1 - ' - -} - -test_expect_success "set up tcp testbed" ' - iptb testbed create -type localipfs -count 2 -force -init -' - -test_expect_success "disable routing, use direct peering" ' - iptb run -- ipfs config Routing.Type none && - iptb run -- ipfs config --json Bootstrap "[]" -' - -# Test TCP transport -echo "Testing TCP" -addrs='"[\"/ip4/127.0.0.1/tcp/0\"]"' -test_expect_success "use TCP only" ' - iptb run -- ipfs config --json Addresses.Swarm '"${addrs}"' && - iptb run -- ipfs config --json Swarm.Transports.Network.QUIC false && - iptb run -- ipfs config --json Swarm.Transports.Network.Relay false && - iptb run -- ipfs config --json Swarm.Transports.Network.WebTransport false && - iptb run -- ipfs config --json Swarm.Transports.Network.Websocket false -' -run_advanced_test - -# test multiplex muxer -echo "Running TCP tests with mplex" -test_expect_success "disable yamux" ' - iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux false -' -run_advanced_test - -test_expect_success "re-enable yamux" ' - iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux null -' -# test Noise -echo "Running TCP tests with NOISE" -test_expect_success "use noise only" ' - iptb run -- ipfs config --json Swarm.Transports.Security.TLS false -' -run_advanced_test - -test_expect_success "re-enable TLS" ' - iptb run -- ipfs config --json Swarm.Transports.Security.TLS null -' - -# test QUIC -echo "Running advanced tests over QUIC" -addrs='"[\"/ip4/127.0.0.1/udp/0/quic-v1\"]"' -test_expect_success "use QUIC only" ' - iptb run -- ipfs config --json Addresses.Swarm '"${addrs}"' && - iptb run -- ipfs config --json Swarm.Transports.Network.QUIC true && - iptb run -- ipfs config --json Swarm.Transports.Network.TCP false -' -run_advanced_test - -# test WebTransport -echo "Running advanced tests over WebTransport" -addrs='"[\"/ip4/127.0.0.1/udp/0/quic-v1/webtransport\"]"' -test_expect_success "use WebTransport only" ' - iptb run -- ipfs config --json Addresses.Swarm '"${addrs}"' && - iptb run -- ipfs config --json Swarm.Transports.Network.QUIC true && - iptb run -- ipfs config --json Swarm.Transports.Network.WebTransport true -' -run_advanced_test - -test_done diff --git a/test/sharness/t0130-multinode.sh b/test/sharness/t0130-multinode.sh deleted file mode 100755 index 04746850bb1..00000000000 --- a/test/sharness/t0130-multinode.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (c) 2015 Jeromy Johnson -# MIT Licensed; see the LICENSE file in this repository. -# - -test_description="Test multiple ipfs nodes" - -. lib/test-lib.sh - -check_file_fetch() { - node=$1 - fhash=$2 - fname=$3 - - test_expect_success "can fetch file" ' - ipfsi $node cat $fhash > fetch_out - ' - - test_expect_success "file looks good" ' - test_cmp $fname fetch_out - ' -} - -check_dir_fetch() { - node=$1 - ref=$2 - - test_expect_success "node can fetch all refs for dir" ' - ipfsi $node refs -r $ref > /dev/null - ' -} - -run_single_file_test() { - test_expect_success "add a file on node1" ' - random 1000000 > filea && - FILEA_HASH=$(ipfsi 1 add -q filea) - ' - - check_file_fetch 4 $FILEA_HASH filea - check_file_fetch 3 $FILEA_HASH filea - check_file_fetch 2 $FILEA_HASH filea - check_file_fetch 1 $FILEA_HASH filea - check_file_fetch 0 $FILEA_HASH filea -} - -run_random_dir_test() { - test_expect_success "create a bunch of random files" ' - random-files -depth=4 -dirs=3 -files=6 foobar > /dev/null - ' - - test_expect_success "add those on node 2" ' - DIR_HASH=$(ipfsi 2 add -r -Q foobar) - ' - - check_dir_fetch 0 $DIR_HASH - check_dir_fetch 1 $DIR_HASH - check_dir_fetch 2 $DIR_HASH - check_dir_fetch 3 $DIR_HASH - check_dir_fetch 4 $DIR_HASH -} - - -run_basic_test() { - startup_cluster 5 - - run_single_file_test - - test_expect_success "shut down nodes" ' - iptb stop && iptb_wait_stop - ' -} - -run_advanced_test() { - startup_cluster 5 "$@" - - run_single_file_test - - run_random_dir_test - - test_expect_success "shut down nodes" ' - iptb stop && iptb_wait_stop || - test_fsh tail -n +1 .iptb/testbeds/default/*/daemon.std* - ' -} - -test_expect_success "set up /tcp testbed" ' - iptb testbed create -type localipfs -count 5 -force -init -' - -# test default configuration -run_advanced_test - -# test multiplex muxer -test_expect_success "disable yamux" ' - iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux false -' -run_advanced_test - -test_expect_success "set up /ws testbed" ' - iptb testbed create -type localipfs -count 5 -attr listentype,ws -force -init -' - -# test default configuration -run_advanced_test - -# test multiplex muxer -test_expect_success "disable yamux" ' - iptb run -- ipfs config --json Swarm.Transports.Multiplexers.Yamux false -' - -run_advanced_test - - -test_done From d1c94776bbed16c24b6ec435d1384a531878fda6 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Wed, 3 May 2023 14:15:14 +0200 Subject: [PATCH 15/19] Merge pull request #9848 from ipfs/merge-release-v0.19.2 Merge Release: v0.19.2 From 548d082db4b76f2170e34d2de34c7568b627b059 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Mon, 8 May 2023 14:20:51 +0200 Subject: [PATCH 16/19] docs(config): remove mentions of relay v1 (#9860) Context: https://github.com/ipfs/interop/pull/592 --- docs/config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config.md b/docs/config.md index bb2d8b7022f..91866a42323 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1622,8 +1622,8 @@ Type: `flag` #### `Swarm.RelayClient.StaticRelays` -Your node will use these statically configured relay servers (V1 or V2) -instead of discovering public relays V2 from the network. +Your node will use these statically configured relay servers +instead of discovering public relays ([Circuit Relay v2](https://github.com/libp2p/specs/blob/master/relay/circuit-v2.md)) from the network. Default: `[]` From 8684f05ef376f5971b8df6f67e9aaddccdba5bed Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Mon, 8 May 2023 16:11:03 +0200 Subject: [PATCH 17/19] fix: deadlock on retrieving WebTransport addresses (#9857) Co-authored-by: Marco Polo --- core/mock/mock.go | 11 +++++++- core/node/groups.go | 2 +- core/node/libp2p/addrs.go | 38 ++++---------------------- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 +-- go.mod | 2 +- go.sum | 4 +-- test/cli/harness/peering.go | 4 +-- test/cli/transports_test.go | 23 ++++++++++++++++ 9 files changed, 48 insertions(+), 42 deletions(-) diff --git a/core/mock/mock.go b/core/mock/mock.go index 7b718c43efe..f9e0876f8d1 100644 --- a/core/mock/mock.go +++ b/core/mock/mock.go @@ -34,7 +34,16 @@ func NewMockNode() (*core.IpfsNode, error) { } func MockHostOption(mn mocknet.Mocknet) libp2p2.HostOption { - return func(id peer.ID, ps pstore.Peerstore, _ ...libp2p.Option) (host.Host, error) { + return func(id peer.ID, ps pstore.Peerstore, opts ...libp2p.Option) (host.Host, error) { + var cfg libp2p.Config + if err := cfg.Apply(opts...); err != nil { + return nil, err + } + + // The mocknet does not use the provided libp2p.Option. This options include + // the listening addresses we want our peer listening on. Therefore, we have + // to manually parse the configuration and add them here. + ps.AddAddrs(id, cfg.ListenAddrs, pstore.PermanentAddrTTL) return mn.AddPeerWithPeerstore(id, ps) } } diff --git a/core/node/groups.go b/core/node/groups.go index ae8ce85399a..5486788358c 100644 --- a/core/node/groups.go +++ b/core/node/groups.go @@ -155,7 +155,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config, userResourceOverrides rcmgr.Part fx.Provide(libp2p.RelayTransport(enableRelayTransport)), fx.Provide(libp2p.RelayService(enableRelayService, cfg.Swarm.RelayService)), fx.Provide(libp2p.Transports(cfg.Swarm.Transports)), - fx.Invoke(libp2p.StartListening(cfg.Addresses.Swarm)), + fx.Provide(libp2p.ListenOn(cfg.Addresses.Swarm)), fx.Invoke(libp2p.SetupDiscovery(cfg.Discovery.MDNS.Enabled)), fx.Provide(libp2p.ForceReachability(cfg.Internal.Libp2pForceReachability)), fx.Provide(libp2p.HolePunching(cfg.Swarm.EnableHolePunching, enableRelayClient)), diff --git a/core/node/libp2p/addrs.go b/core/node/libp2p/addrs.go index 480b045f852..b287c20ff3b 100644 --- a/core/node/libp2p/addrs.go +++ b/core/node/libp2p/addrs.go @@ -4,7 +4,6 @@ import ( "fmt" "github.com/libp2p/go-libp2p" - "github.com/libp2p/go-libp2p/core/host" p2pbhost "github.com/libp2p/go-libp2p/p2p/host/basic" ma "github.com/multiformats/go-multiaddr" mamask "github.com/whyrusleeping/multiaddr-filter" @@ -99,37 +98,12 @@ func AddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string } } -func listenAddresses(addresses []string) ([]ma.Multiaddr, error) { - listen := make([]ma.Multiaddr, len(addresses)) - for i, addr := range addresses { - maddr, err := ma.NewMultiaddr(addr) - if err != nil { - return nil, fmt.Errorf("failure to parse config.Addresses.Swarm: %s", addresses) - } - listen[i] = maddr - } - - return listen, nil -} - -func StartListening(addresses []string) func(host host.Host) error { - return func(host host.Host) error { - listenAddrs, err := listenAddresses(addresses) - if err != nil { - return err - } - - // Actually start listening: - if err := host.Network().Listen(listenAddrs...); err != nil { - return err - } - - // list out our addresses - addrs, err := host.Network().InterfaceListenAddresses() - if err != nil { - return err +func ListenOn(addresses []string) interface{} { + return func() (opts Libp2pOpts) { + return Libp2pOpts{ + Opts: []libp2p.Option{ + libp2p.ListenAddrStrings(addresses...), + }, } - log.Infof("Swarm listening at: %s", addrs) - return nil } } diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index 6eb1bcb5eb5..ae1e3b796a6 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -9,7 +9,7 @@ replace github.com/ipfs/kubo => ./../../.. require ( github.com/ipfs/boxo v0.8.1 github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 - github.com/libp2p/go-libp2p v0.27.1 + github.com/libp2p/go-libp2p v0.27.2 github.com/multiformats/go-multiaddr v0.9.0 ) diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 2302548a970..9fc6e5a2937 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -489,8 +489,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.1 h1:k1u6RHsX3hqKnslDjsSgLNURxJ3O1atIZCY4gpMbbus= -github.com/libp2p/go-libp2p v0.27.1/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= +github.com/libp2p/go-libp2p v0.27.2 h1:I1fxqxdm/O0TFoAZKje8wSMu9tfLlLdzTQvgT3HA6v0= +github.com/libp2p/go-libp2p v0.27.2/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= diff --git a/go.mod b/go.mod index b83143f9bb1..d9310c7bec1 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/jbenet/goprocess v0.1.4 github.com/julienschmidt/httprouter v1.3.0 github.com/libp2p/go-doh-resolver v0.4.0 - github.com/libp2p/go-libp2p v0.27.1 + github.com/libp2p/go-libp2p v0.27.2 github.com/libp2p/go-libp2p-http v0.5.0 github.com/libp2p/go-libp2p-kad-dht v0.23.0 github.com/libp2p/go-libp2p-kbucket v0.5.0 diff --git a/go.sum b/go.sum index b00e5aed63f..8ca1f10b961 100644 --- a/go.sum +++ b/go.sum @@ -540,8 +540,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.1 h1:k1u6RHsX3hqKnslDjsSgLNURxJ3O1atIZCY4gpMbbus= -github.com/libp2p/go-libp2p v0.27.1/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= +github.com/libp2p/go-libp2p v0.27.2 h1:I1fxqxdm/O0TFoAZKje8wSMu9tfLlLdzTQvgT3HA6v0= +github.com/libp2p/go-libp2p v0.27.2/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= diff --git a/test/cli/harness/peering.go b/test/cli/harness/peering.go index 3fcd8bb6bda..13c3430f065 100644 --- a/test/cli/harness/peering.go +++ b/test/cli/harness/peering.go @@ -13,7 +13,7 @@ type Peering struct { To int } -func newRandPort() int { +func NewRandPort() int { n := rand.Int() return 3000 + (n % 1000) } @@ -24,7 +24,7 @@ func CreatePeerNodes(t *testing.T, n int, peerings []Peering) (*Harness, Nodes) nodes.ForEachPar(func(node *Node) { node.UpdateConfig(func(cfg *config.Config) { cfg.Routing.Type = config.NewOptionalString("none") - cfg.Addresses.Swarm = []string{fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", newRandPort())} + cfg.Addresses.Swarm = []string{fmt.Sprintf("/ip4/127.0.0.1/tcp/%d", NewRandPort())} }) }) diff --git a/test/cli/transports_test.go b/test/cli/transports_test.go index 78f21fd0540..3a7b5ed933a 100644 --- a/test/cli/transports_test.go +++ b/test/cli/transports_test.go @@ -1,6 +1,7 @@ package cli import ( + "fmt" "os" "path/filepath" "testing" @@ -124,4 +125,26 @@ func TestTransports(t *testing.T) { runTests(nodes) }) + t.Run("QUIC connects with non-dialable transports", func(t *testing.T) { + // This test targets specific Kubo internals which may change later. This checks + // if we can announce an address we do not listen on, and then are able to connect + // via a different address that is available. + t.Parallel() + nodes := harness.NewT(t).NewNodes(5).Init() + nodes.ForEachPar(func(n *harness.Node) { + n.UpdateConfig(func(cfg *config.Config) { + // We need a specific port to announce so we first generate a random port. + // We can't use 0 here to automatically assign an available port because + // that would only work with Swarm, but not for the announcing. + port := harness.NewRandPort() + quicAddr := fmt.Sprintf("/ip4/127.0.0.1/udp/%d/quic-v1", port) + cfg.Addresses.Swarm = []string{quicAddr} + cfg.Addresses.Announce = []string{quicAddr, quicAddr + "/webtransport"} + }) + }) + disableRouting(nodes) + nodes.StartDaemons().Connect() + runTests(nodes) + }) + } From 34653542f6c16a7aac1e77c47ba27ecbc152aebf Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 9 May 2023 10:59:05 +0200 Subject: [PATCH 18/19] chore: update go-libp2p to v0.27.3 (#9862) --- docs/examples/kubo-as-a-library/go.mod | 2 +- docs/examples/kubo-as-a-library/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index ae1e3b796a6..240bd2402e9 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -9,7 +9,7 @@ replace github.com/ipfs/kubo => ./../../.. require ( github.com/ipfs/boxo v0.8.1 github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 - github.com/libp2p/go-libp2p v0.27.2 + github.com/libp2p/go-libp2p v0.27.3 github.com/multiformats/go-multiaddr v0.9.0 ) diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index 9fc6e5a2937..c1e617c731b 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -489,8 +489,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.2 h1:I1fxqxdm/O0TFoAZKje8wSMu9tfLlLdzTQvgT3HA6v0= -github.com/libp2p/go-libp2p v0.27.2/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= +github.com/libp2p/go-libp2p v0.27.3 h1:tkV/zm3KCZ4R5er9Xcs2pt0YNB4JH0iBfGAtHJdLHRs= +github.com/libp2p/go-libp2p v0.27.3/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= diff --git a/go.mod b/go.mod index d9310c7bec1..be52c6d65b7 100644 --- a/go.mod +++ b/go.mod @@ -45,7 +45,7 @@ require ( github.com/jbenet/goprocess v0.1.4 github.com/julienschmidt/httprouter v1.3.0 github.com/libp2p/go-doh-resolver v0.4.0 - github.com/libp2p/go-libp2p v0.27.2 + github.com/libp2p/go-libp2p v0.27.3 github.com/libp2p/go-libp2p-http v0.5.0 github.com/libp2p/go-libp2p-kad-dht v0.23.0 github.com/libp2p/go-libp2p-kbucket v0.5.0 diff --git a/go.sum b/go.sum index 8ca1f10b961..cad142edc39 100644 --- a/go.sum +++ b/go.sum @@ -540,8 +540,8 @@ github.com/libp2p/go-flow-metrics v0.0.1/go.mod h1:Iv1GH0sG8DtYN3SVJ2eG221wMiNpZ github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= github.com/libp2p/go-flow-metrics v0.1.0 h1:0iPhMI8PskQwzh57jB9WxIuIOQ0r+15PChFGkx3Q3WM= github.com/libp2p/go-flow-metrics v0.1.0/go.mod h1:4Xi8MX8wj5aWNDAZttg6UPmc0ZrnFNsMtpsYUClFtro= -github.com/libp2p/go-libp2p v0.27.2 h1:I1fxqxdm/O0TFoAZKje8wSMu9tfLlLdzTQvgT3HA6v0= -github.com/libp2p/go-libp2p v0.27.2/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= +github.com/libp2p/go-libp2p v0.27.3 h1:tkV/zm3KCZ4R5er9Xcs2pt0YNB4JH0iBfGAtHJdLHRs= +github.com/libp2p/go-libp2p v0.27.3/go.mod h1:FAvvfQa/YOShUYdiSS03IR9OXzkcJXwcNA2FUCh9ImE= github.com/libp2p/go-libp2p-asn-util v0.3.0 h1:gMDcMyYiZKkocGXDQ5nsUQyquC9+H+iLEQHwOCZ7s8s= github.com/libp2p/go-libp2p-asn-util v0.3.0/go.mod h1:B1mcOrKUE35Xq/ASTmQ4tN3LNzVVaMNmq2NACuqyB9w= github.com/libp2p/go-libp2p-core v0.2.4/go.mod h1:STh4fdfa5vDYr0/SzYYeqnt+E6KfEV5VxfIrm0bcI0g= From 3a6fa1e2290aea790d4810c755b3f9c05e69b686 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Tue, 9 May 2023 09:31:11 +0000 Subject: [PATCH 19/19] chore: update changelog for v0.20 --- docs/changelogs/v0.20.md | 472 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 472 insertions(+) diff --git a/docs/changelogs/v0.20.md b/docs/changelogs/v0.20.md index 590ef5453a5..3a6ce8f6485 100644 --- a/docs/changelogs/v0.20.md +++ b/docs/changelogs/v0.20.md @@ -116,6 +116,478 @@ You can read more about the rationale behind this decision on the [tracking issu ### πŸ“ Changelog +
Full Changelog + +- github.com/ipfs/kubo: + - fix: deadlock on retrieving WebTransport addresses (#9857) ([ipfs/kubo#9857](https://github.com/ipfs/kubo/pull/9857)) + - docs(config): remove mentions of relay v1 (#9860) ([ipfs/kubo#9860](https://github.com/ipfs/kubo/pull/9860)) + - Merge branch 'master' into merge-release-v0.19.2 + - docs: add changelog for v0.19.2 + - feat: webui@3.0.0 (#9835) ([ipfs/kubo#9835](https://github.com/ipfs/kubo/pull/9835)) + - fix: use default HTTP routers when FullRT DHT client is used (#9841) ([ipfs/kubo#9841](https://github.com/ipfs/kubo/pull/9841)) + - chore: update version + - docs: add `ipfs pubsub` deprecation reminder to changelog (#9827) ([ipfs/kubo#9827](https://github.com/ipfs/kubo/pull/9827)) + - docs: preparing 0.20 changelog for release (#9799) ([ipfs/kubo#9799](https://github.com/ipfs/kubo/pull/9799)) + - feat: boxo tracing and traceparent support (#9811) ([ipfs/kubo#9811](https://github.com/ipfs/kubo/pull/9811)) + - chore: update version + - chore: update version + - update go-libp2p to v0.27.0 + - docs: add optimistic provide feature description + - feat: add experimental optimistic provide + - fix(ci): speed up docker build (#9800) ([ipfs/kubo#9800](https://github.com/ipfs/kubo/pull/9800)) + - feat(tracing): use OTEL_PROPAGATORS as per OTel spec (#9801) ([ipfs/kubo#9801](https://github.com/ipfs/kubo/pull/9801)) + - docs: fix jaeger command (#9797) ([ipfs/kubo#9797](https://github.com/ipfs/kubo/pull/9797)) + - Merge Release: v0.19.1 (#9794) ([ipfs/kubo#9794](https://github.com/ipfs/kubo/pull/9794)) + - chore: upgrade OpenTelemetry dependencies (#9736) ([ipfs/kubo#9736](https://github.com/ipfs/kubo/pull/9736)) + - test: fix flaky content routing over HTTP test (#9772) ([ipfs/kubo#9772](https://github.com/ipfs/kubo/pull/9772)) + - feat: allow injecting custom path resolvers (#9750) ([ipfs/kubo#9750](https://github.com/ipfs/kubo/pull/9750)) + - feat: add changelog entry for router timeouts for v0.19.1 (#9784) ([ipfs/kubo#9784](https://github.com/ipfs/kubo/pull/9784)) + - feat(gw): new metrics and HTTP range support (#9786) ([ipfs/kubo#9786](https://github.com/ipfs/kubo/pull/9786)) + - feat!: make --empty-repo default (#9758) ([ipfs/kubo#9758](https://github.com/ipfs/kubo/pull/9758)) + - fix: remove timeout on default DHT operations (#9783) ([ipfs/kubo#9783](https://github.com/ipfs/kubo/pull/9783)) + - refactor: switch gateway code to new API from go-libipfs (#9681) ([ipfs/kubo#9681](https://github.com/ipfs/kubo/pull/9681)) + - test: port remote pinning tests to Go (#9720) ([ipfs/kubo#9720](https://github.com/ipfs/kubo/pull/9720)) + - feat: add identify option to swarm peers command + - test: port routing DHT tests to Go (#9709) ([ipfs/kubo#9709](https://github.com/ipfs/kubo/pull/9709)) + - test: fix autoclient flakiness (#9769) ([ipfs/kubo#9769](https://github.com/ipfs/kubo/pull/9769)) + - test: skip flaky pubsub test (#9770) ([ipfs/kubo#9770](https://github.com/ipfs/kubo/pull/9770)) + - chore: migrate go-libipfs to boxo + - feat: add tracing to the commands client + - feat: add client-side metrics for routing-v1 client + - test: increase max wait time for peering assertion + - feat: remove writable gateway (#9743) ([ipfs/kubo#9743](https://github.com/ipfs/kubo/pull/9743)) + - Process Improvement: v0.18.0 ([ipfs/kubo#9484](https://github.com/ipfs/kubo/pull/9484)) + - fix: deadlock while racing `ipfs dag import` and `ipfs repo gc` + - feat: improve dag/import (#9721) ([ipfs/kubo#9721](https://github.com/ipfs/kubo/pull/9721)) + - ci: remove circleci config ([ipfs/kubo#9687](https://github.com/ipfs/kubo/pull/9687)) + - docs: use fx.Decorate instead of fx.Replace in examples (#9725) ([ipfs/kubo#9725](https://github.com/ipfs/kubo/pull/9725)) + - Create Changelog: v0.20 ([ipfs/kubo#9742](https://github.com/ipfs/kubo/pull/9742)) + - Merge Release: v0.19.0 ([ipfs/kubo#9741](https://github.com/ipfs/kubo/pull/9741)) + - feat(gateway): invalid CID returns 400 Bad Request (#9726) ([ipfs/kubo#9726](https://github.com/ipfs/kubo/pull/9726)) + - fix: remove outdated changelog part ([ipfs/kubo#9739](https://github.com/ipfs/kubo/pull/9739)) + - docs: 0.19 changelog ([ipfs/kubo#9707](https://github.com/ipfs/kubo/pull/9707)) + - fix: canonicalize user defined headers + - fix: apply API.HTTPHeaders to /webui redirect + - feat: add heap allocs to 'ipfs diag profile' + - fix: future proof with > rcmgr.DefaultLimit for new enum rcmgr values + - test: add test for presarvation of unlimited configs for inbound systems + - fix: preserve Unlimited StreamsInbound in connmgr reconciliation + - test: fix flaky rcmgr test + - chore: deprecate the pubsub api + - Revert "chore: add hamt directory sharding test" + - chore: add hamt directory sharding test + - test: port peering test from sharness to Go + - test: use `T.TempDir` to create temporary test directory + - fix: --verify forgets the verified key + - test: name --verify forgets the verified key + - chore: fix toc in changelog for 0.18 + - feat: add "autoclient" routing type + - test: parallelize more of rcmgr Go tests + - test: port legacy DHT tests to Go + - fix: t0116-gateway-cache.sh ([ipfs/kubo#9696](https://github.com/ipfs/kubo/pull/9696)) + - docs: add bifrost to early testers ([ipfs/kubo#9699](https://github.com/ipfs/kubo/pull/9699)) + - fix: typo in documentation for install path + - docs: fix typos + - Update Version: v0.19 ([ipfs/kubo#9698](https://github.com/ipfs/kubo/pull/9698)) +- github.com/ipfs/go-block-format (v0.1.1 -> v0.1.2): + - chore: release v0.1.2 + - Revert deprecation and go-libipfs/blocks stub types + - docs: deprecation notice [ci skip] +- github.com/ipfs/go-cid (v0.3.2 -> v0.4.1): + - v0.4.1 + - Add unit test for unexpected eof + - Update cid.go + - CidFromReader should not wrap valid EOF return. + - chore: version 0.4.0 + - feat: wrap parsing errors into ErrInvalidCid + - fix: use crypto/rand.Read + - Fix README.md example error (#146) ([ipfs/go-cid#146](https://github.com/ipfs/go-cid/pull/146)) +- github.com/ipfs/go-delegated-routing (v0.7.0 -> v0.8.0): + - chore: release v0.8.0 + - chore: migrate from go-ipns to boxo + - docs: add deprecation notice [ci skip] +- github.com/ipfs/go-graphsync (v0.14.1 -> v0.14.4): + - Update version to cover latest fixes (#419) ([ipfs/go-graphsync#419](https://github.com/ipfs/go-graphsync/pull/419)) + - Bring changes from #412 + - Bring changes from #391 + - fix: calling message queue Shutdown twice causes panic (because close is called twice on done channel) (#414) ([ipfs/go-graphsync#414](https://github.com/ipfs/go-graphsync/pull/414)) + - docs(CHANGELOG): update for v0.14.3 + - fix: wire up proper linksystem to traverser (#411) ([ipfs/go-graphsync#411](https://github.com/ipfs/go-graphsync/pull/411)) + - sync: update CI config files (#378) ([ipfs/go-graphsync#378](https://github.com/ipfs/go-graphsync/pull/378)) + - chore: remove social links (#398) ([ipfs/go-graphsync#398](https://github.com/ipfs/go-graphsync/pull/398)) + - Removes `main` branch callout. + - release v0.14.2 +- github.com/ipfs/go-ipfs-blockstore (v1.2.0 -> v1.3.0): + - chore: release v1.3.0 + - feat: stub and deprecate NewBlockstoreNoPrefix + - Accept options for blockstore: start with WriteThrough and NoPrefix + - Allow using a NewWriteThrough() blockstore. + - sync: update CI config files (#105) ([ipfs/go-ipfs-blockstore#105](https://github.com/ipfs/go-ipfs-blockstore/pull/105)) + - feat: fast-path for PutMany, falling back to Put for single block call (#97) ([ipfs/go-ipfs-blockstore#97](https://github.com/ipfs/go-ipfs-blockstore/pull/97)) +- github.com/ipfs/go-ipfs-cmds (v0.8.2 -> v0.9.0): + - chore: release v0.9.0 + - chore: change go-libipfs to boxo +- github.com/ipfs/go-libipfs (v0.6.2 -> v0.7.0): + - chore: bump to 0.7.0 (#213) ([ipfs/go-libipfs#213](https://github.com/ipfs/go-libipfs/pull/213)) + - feat: return 400 on /ipfs/invalid-cid (#205) ([ipfs/go-libipfs#205](https://github.com/ipfs/go-libipfs/pull/205)) + - docs: add note in README that go-libipfs is not comprehensive (#163) ([ipfs/go-libipfs#163](https://github.com/ipfs/go-libipfs/pull/163)) +- github.com/ipfs/go-merkledag (v0.9.0 -> v0.10.0): + - chore: bump version to 0.10.0 + - fix: switch to crypto/rand.Read + - stop using the deprecated io/ioutil package +- github.com/ipfs/go-unixfs (v0.4.4 -> v0.4.5): + - chore: release v0.4.5 + - chore: remove go-libipfs dependency +- github.com/ipfs/go-unixfsnode (v1.5.2 -> v1.6.0): + - chore: bump v1.6.0 + - feat: add UnixFSPathSelectorBuilder ([ipfs/go-unixfsnode#45](https://github.com/ipfs/go-unixfsnode/pull/45)) + - fix: update state to allow iter continuance on NotFound errors + - chore!: make PBLinkItr private - not intended for public use + - fix: propagate iteration errors +- github.com/ipld/go-car/v2 (v2.5.1 -> v2.9.1-0.20230325062757-fff0e4397a3d): + - chore: unmigrate from go-libipfs + - Create CODEOWNERS + - blockstore: give a direct access to the index for read operations + - blockstore: only close the file on error in OpenReadWrite, not OpenReadWriteFile + - fix: handle (and test) WholeCID vs not; fast Has() path for storage + - ReadWrite: faster Has() by using the in-memory index instead of reading on disk + - fix: let `extract` skip missing unixfs shard links + - fix: error when no files extracted + - fix: make -f optional, read from stdin if omitted + - fix: update cmd/car/README with latest description + - chore: add test cases for extract modes + - feat: extract accepts '-' as an output path for stdout + - feat: extract specific path, accept stdin as streaming input + - fix: if we don't read the full block data, don't error on !EOF + - blockstore: try to close during Finalize(), even in case of previous error + - ReadWrite: add an alternative FinalizeReadOnly+Close flow + - feat: add WithTrustedCar() reader option (#381) ([ipld/go-car#381](https://github.com/ipld/go-car/pull/381)) + - blockstore: fast path for AllKeysChan using the index + - fix: switch to crypto/rand.Read + - stop using the deprecated io/ioutil package + - fix(doc): fix storage package doc formatting + - fix: return errors for unsupported operations + - chore: move insertionindex into store pkg + - chore: add experimental note + - fix: minor lint & windows fd test problems + - feat: docs for StorageCar interfaces + - feat: ReadableWritable; dedupe shared code + - feat: add Writable functionality to StorageCar + - feat: StorageCar as a Readable storage, separate from blockstore + - feat(blockstore): implement a streaming read only storage + - feat(cmd): add index create subcommand to create an external carv2 index ([ipld/go-car#350](https://github.com/ipld/go-car/pull/350)) + - chore: bump version to 0.6.0 + - fix: use goreleaser instead + - Allow using WalkOption in WriteCar function ([ipld/go-car#357](https://github.com/ipld/go-car/pull/357)) + - fix: update go-block-format to the version that includes the stubs + - feat: upgrade from go-block-format to go-libipfs/blocks + - cleanup readme a bit to make the cli more discoverable (#353) ([ipld/go-car#353](https://github.com/ipld/go-car/pull/353)) + - Update install instructions in README.md + - Add a debugging form for car files. (#341) ([ipld/go-car#341](https://github.com/ipld/go-car/pull/341)) + - ([ipld/go-car#340](https://github.com/ipld/go-car/pull/340)) +- github.com/ipld/go-codec-dagpb (v1.5.0 -> v1.6.0): + - Update version.json +- github.com/ipld/go-ipld-prime (v0.19.0 -> v0.20.0): + - Prepare v0.20.0 + - fix(datamodel): add tests to Copy, make it complain on nil + - feat(dagcbor): mode to allow parsing undelimited streamed objects + - Fix mispatched package declaration. + - Add several pieces of docs to schema/dmt. + - Additional access to schema/dmt package; schema concatenation feature ([ipld/go-ipld-prime#483](https://github.com/ipld/go-ipld-prime/pull/483)) + - Fix hash mismatch error on matching link pointer + - feat: support errors.Is for schema errors +- github.com/ipld/go-ipld-prime/storage/bsadapter (v0.0.0-20211210234204-ce2a1c70cd73 -> v0.0.0-20230102063945-1a409dc236dd): + - build(deps): bump github.com/ipfs/go-blockservice + - Fix mispatched package declaration. + - Add several pieces of docs to schema/dmt. + - Additional access to schema/dmt package; schema concatenation feature ([ipld/go-ipld-prime/storage/bsadapter#483](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/483)) + - fix: go mod tidy + - build(deps): bump github.com/frankban/quicktest from 1.14.3 to 1.14.4 + - Fix hash mismatch error on matching link pointer + - build(deps): bump github.com/warpfork/go-testmark from 0.10.0 to 0.11.0 + - feat: support errors.Is for schema errors + - build(deps): bump github.com/multiformats/go-multicodec + - Prepare v0.19.0 + - fix: correct json codec links & bytes handling + - build(deps): bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#468) ([ipld/go-ipld-prime/storage/bsadapter#468](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/468)) + - build(deps): bump github.com/ipfs/go-cid from 0.3.0 to 0.3.2 (#466) ([ipld/go-ipld-prime/storage/bsadapter#466](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/466)) + - build(deps): bump github.com/ipfs/go-cid in /storage/bsrvadapter (#464) ([ipld/go-ipld-prime/storage/bsadapter#464](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/464)) + - test(basicnode): increase test coverage for int and map types (#454) ([ipld/go-ipld-prime/storage/bsadapter#454](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/454)) + - build(deps): bump github.com/ipfs/go-cid in /storage/bsrvadapter + - build(deps): bump github.com/ipfs/go-cid from 0.2.0 to 0.3.0 + - build(deps): bump github.com/multiformats/go-multicodec + - fix: remove reliance on ioutil + - fix: update sub-package modules + - build(deps): bump github.com/multiformats/go-multihash + - build(deps): bump github.com/ipfs/go-datastore in /storage/dsadapter + - update .github/workflows/go-check.yml + - update .github/workflows/go-test.yml + - run gofmt -s + - bump go.mod to Go 1.18 and run go fix + - bump go.mod to Go 1.18 and run go fix + - bump go.mod to Go 1.18 and run go fix + - bump go.mod to Go 1.18 and run go fix + - feat: add kinded union to gendemo + - fix: go mod 1.17 compat problems + - build(deps): bump github.com/ipfs/go-blockservice + - Prepare v0.18.0 + - fix(deps): update benchmarks go.sum + - build(deps): bump github.com/multiformats/go-multihash + - feat(bindnode): add a BindnodeRegistry utility (#437) ([ipld/go-ipld-prime/storage/bsadapter#437](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/437)) + - feat(bindnode): support full uint64 range + - chore(bindnode): remove typed functions for options + - chore(bindnode): docs and minor tweaks + - feat(bindnode): make Any converters work for List and Map values + - fix(bindnode): shorten converter option names, minor perf improvements + - fix(bindnode): only custom convert AssignNull for Any converter + - feat(bindnode): pass Null on to nullable custom converters + - chore(bindnode): config helper refactor w/ short-circuit + - feat(bindnode): add AddCustomTypeAnyConverter() to handle `Any` fields + - feat(bindnode): add AddCustomTypeXConverter() options for most scalar kinds + - chore(bindnode): back out of reflection for converters + - feat(bindnode): switch to converter functions instead of type + - feat(bindnode): allow custom type conversions with options + - feat: add release checklist (#442) ([ipld/go-ipld-prime/storage/bsadapter#442](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/442)) + - Prepare v0.17.0 + - feat: introduce UIntNode interface, used within DAG-CBOR codec + - add option to not parse beyond end of structure (#435) ([ipld/go-ipld-prime/storage/bsadapter#435](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/435)) + - sync benchmarks go.sum + - build(deps): bump github.com/multiformats/go-multicodec + - patch: first draft. ([ipld/go-ipld-prime/storage/bsadapter#350](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/350)) + - feat(bindnode): infer links and Any from Go types (#432) ([ipld/go-ipld-prime/storage/bsadapter#432](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/432)) + - fix(codecs): error on cid.Undef links in dag{json,cbor} encoding (#433) ([ipld/go-ipld-prime/storage/bsadapter#433](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/433)) + - chore(bindnode): add test for sub-node unwrapping + - fix(bindnode): more helpful error message for enum value footgun + - fix(bindnode): panic early if API has been passed ptr-to-ptr + - fix(deps): mod tidy for dependencies + - build(deps): bump github.com/warpfork/go-testmark from 0.3.0 to 0.10.0 + - build(deps): bump github.com/multiformats/go-multicodec + - build(deps): bump github.com/ipfs/go-cid from 0.0.4 to 0.2.0 + - build(deps): bump github.com/google/go-cmp from 0.5.7 to 0.5.8 + - build(deps): bump github.com/frankban/quicktest from 1.14.2 to 1.14.3 + - build(deps): bump github.com/ipfs/go-cid in /storage/bsrvadapter + - chore(deps): expand dependabot to sub-modules + - chore(deps): add dependabot config + - printer: fix printing of floats + - add version.json file (#411) ([ipld/go-ipld-prime/storage/bsadapter#411](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/411)) + - ci: use GOFLAGS to control test tags + - ci: disable coverpkg using custom workflow insertion + - ci: add initial web3 unified-ci files + - fix: make 32-bit safe and stable & add to CI + - ci: add go-check.yml workflow from unified-ci + - ci: go mod tidy + - fix: staticcheck and govet fixes + - test: make tests work on Windows, add Windows to CI (#405) ([ipld/go-ipld-prime/storage/bsadapter#405](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/405)) + - schema: enable inline types through dsl parser & compiler (#404) ([ipld/go-ipld-prime/storage/bsadapter#404](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/404)) + - node/bindnode: allow nilable types for IPLD optional/nullable + - test(ci): enable macos in GitHub Actions + - test(gen-go): disable parallelism when testing on macos + - storage: update deps + - dsl support for stringjoin struct repr and stringprefix union repr ([ipld/go-ipld-prime/storage/bsadapter#397](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/397)) + - codec/dagcbor: add DecodeOptions.ExperimentalDeterminism + - node/bindnode: add some more docs + - start testing on Go 1.18.x, drop Go 1.16.x + - readme: getting started pointers. + - readme: bindnode definitely needs a mention! + - Readme updates! + - datamodel: document that repr prototypes produce type nodes + - node/bindnode: minor fuzz improvements + - gengo: update readme. + - fix(dagcbor): don't accept trailing bytes + - schema/dmt: reject duplicate or missing union repr members + - node/bindnode: actually check schemadmt.Compile errors when fuzzing + - node/bindnode: avoid OOM when inferring from cyclic IPLD schemas + - schema/dmt: require enum reprs to refer valid members + - skip NaN/Inf errors for dag-json + - node/bindnode: refuse to decode empty union values + - schema/dmt: error in Compile if union reprs refer to unknown members + - node/bindnode: start fuzzing with schema/dmt and codec/dagcbor + - mark v0.16.0 + - node/bindnode: enforce pointer requirement for nullable maps + - Implement WalkTransforming traversal (#376) ([ipld/go-ipld-prime/storage/bsadapter#376](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/376)) + - docs(datamodel): add comment to LargeBytesNode + - Add partial-match traversal of large bytes (#375) ([ipld/go-ipld-prime/storage/bsadapter#375](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/375)) + - Implement option to start traversals at a path ([ipld/go-ipld-prime/storage/bsadapter#358](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/358)) + - add top-level "go value with schema" example + - Support optional `LargeBytesNode` interface (#372) ([ipld/go-ipld-prime/storage/bsadapter#372](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/372)) + - node/bindnode: support pointers to datamodel.Node to bind with Any + - fix(bindnode): tuple struct iterator should handle absent fields properly + - node/bindnode: make AssignNode work at the repr level + - node/bindnode: add support for unsigned integers + - node/bindnode: cover even more edge case panics + - node/bindnode: polish some more AsT panics + - schema/dmt: stop using a fake test to generate code ([ipld/go-ipld-prime/storage/bsadapter#356](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/356)) + - schema: remove one review note; add another. + - fix: minor EncodedLength fixes, add tests to fully exercise + - feat: add dagcbor.EncodedLength(Node) to calculate length without encoding + - chore: rename Garbage() to Generate() + - fix: minor garbage nits + - fix: Garbage() takes rand parameter, tweak algorithms, improve docs + - feat: add Garbage() Node generator + - node/bindnode: introduce an assembler that always errors + - node/bindnode: polish panics on invalid AssignT calls + - datamodel: don't panic when stringifying an empty KindSet + - node/bindnode: start using ipld.LoadSchema APIs + - selectors: fix for edge case around recursion clauses with an immediate edge. ([ipld/go-ipld-prime/storage/bsadapter#334](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/334)) + - node/bindnode: improve support for pointer types + - node/bindnode: subtract all absents in Length at the repr level + - fix(codecs): error when encoding maps whose lengths don't match entry count + - schema: avoid alloc and copy in Struct and Enum methods + - node/bindnode: allow mapping int-repr enums with Go integers + - schema,node/bindnode: add support for Any + - signaling ADLs in selectors (#301) ([ipld/go-ipld-prime/storage/bsadapter#301](https://github.com/ipld/go-ipld-prime/storage/bsadapter/pull/301)) + - node/bindnode: add support for enums + - schema/...: add support for enum int representations + - node/bindnode: allow binding cidlink.Link to links +- github.com/libp2p/go-libp2p (v0.26.4 -> v0.27.3): + - release v0.27.3 + - quic virtual listener: don't panic when quic-go's accept call errors (#2276) ([libp2p/go-libp2p#2276](https://github.com/libp2p/go-libp2p/pull/2276)) + - Release v0.27.2 (#2270) ([libp2p/go-libp2p#2270](https://github.com/libp2p/go-libp2p/pull/2270)) + - release v0.27.1 (#2252) ([libp2p/go-libp2p#2252](https://github.com/libp2p/go-libp2p/pull/2252)) + - Infer public webtransport addrs from quic-v1 addrs. (#2251) ([libp2p/go-libp2p#2251](https://github.com/libp2p/go-libp2p/pull/2251)) + - basichost: don't allocate when deduplicating multiaddrs (#2206) ([libp2p/go-libp2p#2206](https://github.com/libp2p/go-libp2p/pull/2206)) + - identify: fix normalization of interface listen addresses (#2250) ([libp2p/go-libp2p#2250](https://github.com/libp2p/go-libp2p/pull/2250)) + - autonat: fix flaky TestAutoNATDialRefused (#2245) ([libp2p/go-libp2p#2245](https://github.com/libp2p/go-libp2p/pull/2245)) + - basichost: remove stray print statement in test (#2249) ([libp2p/go-libp2p#2249](https://github.com/libp2p/go-libp2p/pull/2249)) + - swarm: fix multiaddr comparison in ListenClose (#2247) ([libp2p/go-libp2p#2247](https://github.com/libp2p/go-libp2p/pull/2247)) + - release v0.27.0 (#2242) ([libp2p/go-libp2p#2242](https://github.com/libp2p/go-libp2p/pull/2242)) + - add a security policy (#2238) ([libp2p/go-libp2p#2238](https://github.com/libp2p/go-libp2p/pull/2238)) + - chore: 0.27.0 changelog entries (#2241) ([libp2p/go-libp2p#2241](https://github.com/libp2p/go-libp2p/pull/2241)) + - correctly handle WebTransport addresses without certhashes (#2239) ([libp2p/go-libp2p#2239](https://github.com/libp2p/go-libp2p/pull/2239)) + - autorelay: add metrics (#2185) ([libp2p/go-libp2p#2185](https://github.com/libp2p/go-libp2p/pull/2185)) + - autonat: don't change status on dial request refused (#2225) ([libp2p/go-libp2p#2225](https://github.com/libp2p/go-libp2p/pull/2225)) + - autonat: fix closing of listeners in dialPolicy tests (#2226) ([libp2p/go-libp2p#2226](https://github.com/libp2p/go-libp2p/pull/2226)) + - discovery (backoff): fix typo in comment (#2214) ([libp2p/go-libp2p#2214](https://github.com/libp2p/go-libp2p/pull/2214)) + - relaysvc: flaky TestReachabilityChangeEvent (#2215) ([libp2p/go-libp2p#2215](https://github.com/libp2p/go-libp2p/pull/2215)) + - Add wss transport to interop tester impl (#2178) ([libp2p/go-libp2p#2178](https://github.com/libp2p/go-libp2p/pull/2178)) + - tests: add a stream read deadline transport test (#2210) ([libp2p/go-libp2p#2210](https://github.com/libp2p/go-libp2p/pull/2210)) + - autorelay: fix busy loop bug and flaky tests in relay finder (#2208) ([libp2p/go-libp2p#2208](https://github.com/libp2p/go-libp2p/pull/2208)) + - tests: test mplex and Yamux, Noise and TLS in transport tests (#2209) ([libp2p/go-libp2p#2209](https://github.com/libp2p/go-libp2p/pull/2209)) + - tests: add some basic transport integration tests (#2207) ([libp2p/go-libp2p#2207](https://github.com/libp2p/go-libp2p/pull/2207)) + - autorelay: remove unused semaphore (#2184) ([libp2p/go-libp2p#2184](https://github.com/libp2p/go-libp2p/pull/2184)) + - basichost: prevent duplicate dials (#2196) ([libp2p/go-libp2p#2196](https://github.com/libp2p/go-libp2p/pull/2196)) + - websocket: don't set a WSS multiaddr for accepted unencrypted conns (#2199) ([libp2p/go-libp2p#2199](https://github.com/libp2p/go-libp2p/pull/2199)) + - websocket: Don't limit message sizes in the websocket reader (#2193) ([libp2p/go-libp2p#2193](https://github.com/libp2p/go-libp2p/pull/2193)) + - identify: fix stale comment (#2179) ([libp2p/go-libp2p#2179](https://github.com/libp2p/go-libp2p/pull/2179)) + - relay service: add metrics (#2154) ([libp2p/go-libp2p#2154](https://github.com/libp2p/go-libp2p/pull/2154)) + - identify: Fix IdentifyWait when Connected events happen out of order (#2173) ([libp2p/go-libp2p#2173](https://github.com/libp2p/go-libp2p/pull/2173)) + - chore: fix ressource manager's README (#2168) ([libp2p/go-libp2p#2168](https://github.com/libp2p/go-libp2p/pull/2168)) + - relay: fix deadlock when closing (#2171) ([libp2p/go-libp2p#2171](https://github.com/libp2p/go-libp2p/pull/2171)) + - core: remove LocalPrivateKey method from network.Conn interface (#2144) ([libp2p/go-libp2p#2144](https://github.com/libp2p/go-libp2p/pull/2144)) + - routed host: return connection error instead of routing error (#2169) ([libp2p/go-libp2p#2169](https://github.com/libp2p/go-libp2p/pull/2169)) + - connmgr: reduce log level for closing connections (#2165) ([libp2p/go-libp2p#2165](https://github.com/libp2p/go-libp2p/pull/2165)) + - circuitv2: cleanup relay service properly (#2164) ([libp2p/go-libp2p#2164](https://github.com/libp2p/go-libp2p/pull/2164)) + - chore: add patch release to changelog (#2151) ([libp2p/go-libp2p#2151](https://github.com/libp2p/go-libp2p/pull/2151)) + - chore: remove superfluous testing section from README (#2150) ([libp2p/go-libp2p#2150](https://github.com/libp2p/go-libp2p/pull/2150)) + - autonat: don't use autonat for address discovery (#2148) ([libp2p/go-libp2p#2148](https://github.com/libp2p/go-libp2p/pull/2148)) + - swarm metrics: fix connection direction (#2147) ([libp2p/go-libp2p#2147](https://github.com/libp2p/go-libp2p/pull/2147)) + - connmgr: Use eventually equal helper in connmgr tests (#2128) ([libp2p/go-libp2p#2128](https://github.com/libp2p/go-libp2p/pull/2128)) + - swarm: emit PeerConnectedness event from swarm instead of from hosts (#1574) ([libp2p/go-libp2p#1574](https://github.com/libp2p/go-libp2p/pull/1574)) + - relay: initialize the ASN util when starting the service (#2143) ([libp2p/go-libp2p#2143](https://github.com/libp2p/go-libp2p/pull/2143)) + - Fix flaky TestMetricsNoAllocNoCover test (#2142) ([libp2p/go-libp2p#2142](https://github.com/libp2p/go-libp2p/pull/2142)) + - identify: Bump timeouts/sleep in tests (#2135) ([libp2p/go-libp2p#2135](https://github.com/libp2p/go-libp2p/pull/2135)) + - Add sleep to fix flaky test (#2129) ([libp2p/go-libp2p#2129](https://github.com/libp2p/go-libp2p/pull/2129)) + - basic_host: Fix flaky tests (#2136) ([libp2p/go-libp2p#2136](https://github.com/libp2p/go-libp2p/pull/2136)) + - swarm: Check context once more before dialing (#2139) ([libp2p/go-libp2p#2139](https://github.com/libp2p/go-libp2p/pull/2139)) +- github.com/libp2p/go-libp2p-asn-util (v0.2.0 -> v0.3.0): + - release v0.3.0 (#26) ([libp2p/go-libp2p-asn-util#26](https://github.com/libp2p/go-libp2p-asn-util/pull/26)) + - initialize the store lazily (#25) ([libp2p/go-libp2p-asn-util#25](https://github.com/libp2p/go-libp2p-asn-util/pull/25)) +- github.com/libp2p/go-libp2p-gostream (v0.5.0 -> v0.6.0): + - Update libp2p ([libp2p/go-libp2p-gostream#80](https://github.com/libp2p/go-libp2p-gostream/pull/80)) + - fix typo in README (#75) ([libp2p/go-libp2p-gostream#75](https://github.com/libp2p/go-libp2p-gostream/pull/75)) +- github.com/libp2p/go-libp2p-http (v0.4.0 -> v0.5.0): + - sync: update CI config files ([libp2p/go-libp2p-http#82](https://github.com/libp2p/go-libp2p-http/pull/82)) +- github.com/libp2p/go-libp2p-kad-dht (v0.21.1 -> v0.23.0): + - Release v0.23.0 + - Specified CODEOWNERS ([libp2p/go-libp2p-kad-dht#828](https://github.com/libp2p/go-libp2p-kad-dht/pull/828)) + - fix: optimistic provide ci checks in tests ([libp2p/go-libp2p-kad-dht#833](https://github.com/libp2p/go-libp2p-kad-dht/pull/833)) + - feat: add experimental optimistic provide (#783) ([libp2p/go-libp2p-kad-dht#783](https://github.com/libp2p/go-libp2p-kad-dht/pull/783)) + - feat: rework tracing a bit + - feat: add basic tracing + - chore: release v0.22.0 + - chore: migrate go-libipfs to boxo + - Fix multiple ProviderAddrTTL definitions #795 ([libp2p/go-libp2p-kad-dht#831](https://github.com/libp2p/go-libp2p-kad-dht/pull/831)) + - Increase provider Multiaddress TTL ([libp2p/go-libp2p-kad-dht#795](https://github.com/libp2p/go-libp2p-kad-dht/pull/795)) + - Make provider manager options configurable in `fullrt` ([libp2p/go-libp2p-kad-dht#829](https://github.com/libp2p/go-libp2p-kad-dht/pull/829)) + - Adjust PeerSet logic in the DHT lookup process ([libp2p/go-libp2p-kad-dht#802](https://github.com/libp2p/go-libp2p-kad-dht/pull/802)) + - added maintainers in the README ([libp2p/go-libp2p-kad-dht#826](https://github.com/libp2p/go-libp2p-kad-dht/pull/826)) + - Allow DHT crawler to be swappable + - Introduce options to parameterize config of the accelerated DHT client ([libp2p/go-libp2p-kad-dht#822](https://github.com/libp2p/go-libp2p-kad-dht/pull/822)) +- github.com/libp2p/go-libp2p-pubsub (v0.9.0 -> v0.9.3): + - Fix Memory Leak In New Timecache Implementations (#528) ([libp2p/go-libp2p-pubsub#528](https://github.com/libp2p/go-libp2p-pubsub/pull/528)) + - Default validator support (#525) ([libp2p/go-libp2p-pubsub#525](https://github.com/libp2p/go-libp2p-pubsub/pull/525)) + - Refactor timecache implementations (#523) ([libp2p/go-libp2p-pubsub#523](https://github.com/libp2p/go-libp2p-pubsub/pull/523)) + - fix(timecache): remove panic in first seen cache on Add (#522) ([libp2p/go-libp2p-pubsub#522](https://github.com/libp2p/go-libp2p-pubsub/pull/522)) + - chore: update go version and dependencies (#516) ([libp2p/go-libp2p-pubsub#516](https://github.com/libp2p/go-libp2p-pubsub/pull/516)) +- github.com/multiformats/go-multiaddr (v0.8.0 -> v0.9.0): + - Release v0.9.0 ([multiformats/go-multiaddr#196](https://github.com/multiformats/go-multiaddr/pull/196)) + - Update webrtc protocols after rename ([multiformats/go-multiaddr#195](https://github.com/multiformats/go-multiaddr/pull/195)) +- github.com/multiformats/go-multibase (v0.1.1 -> v0.2.0): + - chore: bump v0.2.0 + - fix: math/rand -> crypto/rand + - fuzz: add Decoder fuzzing +- github.com/multiformats/go-multicodec (v0.7.0 -> v0.8.1): + - Bump version to release `ipns-record` code + - chore: update submodules and go generate + - deps: upgrade stringer to compatible version + - v0.8.0 + - chore: update submodules and go generate +- github.com/warpfork/go-testmark (v0.10.0 -> v0.11.0): + - Quick changelog to note we have an API update. + - Index fix ([warpfork/go-testmark#13](https://github.com/warpfork/go-testmark/pull/13)) + - Link to python implementation in the readme! + +
+ ### πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Contributors +| Contributor | Commits | Lines Β± | Files Changed | +|-------------|---------|---------|---------------| +| Rod Vagg | 40 | +4214/-1400 | 102 | +| Sukun | 12 | +3541/-267 | 34 | +| Gus Eggert | 22 | +2387/-1160 | 81 | +| galargh | 23 | +1331/-1734 | 34 | +| Henrique Dias | 23 | +681/-1167 | 79 | +| Marco Munizaga | 19 | +1500/-187 | 55 | +| Jorropo | 25 | +897/-597 | 180 | +| Dennis Trautwein | 4 | +990/-60 | 14 | +| Marten Seemann | 18 | +443/-450 | 53 | +| vyzo | 2 | +595/-152 | 11 | +| Michael MurΓ© | 8 | +427/-182 | 18 | +| Will | 2 | +536/-15 | 5 | +| Adin Schmahmann | 3 | +327/-125 | 11 | +| hannahhoward | 2 | +344/-1 | 4 | +| Arthur Gavazza | 1 | +210/-50 | 4 | +| Hector Sanjuan | 6 | +181/-77 | 13 | +| Masih H. Derkani | 5 | +214/-42 | 12 | +| Calvin Behling | 4 | +158/-58 | 11 | +| Eric Myhre | 7 | +113/-27 | 15 | +| Marcin Rataj | 5 | +72/-30 | 5 | +| Steve Loeppky | 2 | +99/-0 | 2 | +| Piotr Galar | 9 | +60/-18 | 9 | +| gammazero | 4 | +69/-0 | 8 | +| Prithvi Shahi | 2 | +55/-14 | 2 | +| Eng Zer Jun | 1 | +15/-54 | 5 | +| Laurent Senta | 3 | +44/-2 | 3 | +| Ian Davis | 1 | +35/-0 | 1 | +| web3-bot | 4 | +19/-13 | 7 | +| guillaumemichel | 2 | +18/-14 | 3 | +| Guillaume Michel - guissou | 4 | +24/-8 | 4 | +| omahs | 1 | +9/-9 | 3 | +| cortze | 3 | +9/-9 | 3 | +| Nishant Das | 1 | +9/-5 | 3 | +| Hlib Kanunnikov | 2 | +11/-3 | 3 | +| Andrew Gillis | 3 | +6/-8 | 3 | +| Johnny | 1 | +0/-10 | 1 | +| RafaΕ‚ Leszko | 1 | +4/-4 | 1 | +| Dirk McCormick | 1 | +4/-1 | 1 | +| Antonio Navarro Perez | 1 | +4/-1 | 1 | +| RichΞ›rd | 2 | +2/-2 | 2 | +| Russell Dempsey | 1 | +2/-1 | 1 | +| Winterhuman | 1 | +1/-1 | 1 | +| Will Hawkins | 1 | +1/-1 | 1 | +| Nikhilesh Susarla | 1 | +1/-1 | 1 | +| Kubo Mage | 1 | +1/-1 | 1 | +| Bryan White | 1 | +1/-1 | 1 | +