Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ipfs/rainbow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.3
Choose a base ref
...
head repository: ipfs/rainbow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.9.0
Choose a head ref
  • 12 commits
  • 11 files changed
  • 4 contributors

Commits on Nov 4, 2024

  1. feat: purge peer connections and information (#194)

    * feat: purge peer connections and information
    
    Connections to a specific peer, or to all peers, can be closed and the peer information removed from the peer store. This can be useful to help determine if the presence/absence of a connection to a peer is affecting behavior. Be aware that purging a connection is inherently racey as it is possible for the peer to reestablish a connection at any time following a purge.
    
    * Output peers list in json
    * Do not export mgr handler functions
    * Update README.md
    gammazero authored Nov 4, 2024
    Copy the full SHA
    54dbdda View commit details

Commits on Nov 15, 2024

  1. chore: boxo v0.24.3 + kad-dht v0.28.1 (#200)

    * chore: update deps
    * fix: go-libp2p-kad-dht v0.28.1
    
    ---------
    
    Co-authored-by: Marcin Rataj <lidel@lidel.org>
    aschmahmann and lidel authored Nov 15, 2024
    Copy the full SHA
    e692866 View commit details

Commits on Nov 25, 2024

  1. Error instead of dropping unauthorized headers (#201)

    * fix: returns an HTTP 401 if authorization headers are required, but are not there or incorrect rather than silently ignoring those headers
    aschmahmann authored Nov 25, 2024
    Copy the full SHA
    9b0b7f4 View commit details

Commits on Dec 2, 2024

  1. feat: increase routing limits (#154)

    * feat: increase routing limits
    * bitswap_setup: Update boxo and call pqm.Startup
    * Update changelog for increased routing limits
    aschmahmann authored Dec 2, 2024
    Copy the full SHA
    10cd50a View commit details

Commits on Dec 3, 2024

  1. feat: add flags to configure bitswap tuning params (#203)

    * feat: allow configuration of bitswap/routing tuning params.
    
    New CLI flags:
    
    - `routing-max-requests` - Maximum number of concurrent find requests
    - `routing-max-providers` - Maximum number of providers to return for each find request
    - `routing-max-timeout` - Maximum time for to find the maximum number of providers
    
    Corresponding environ vars:
    
    `ROUTING_MAX_REQUESTS`
    `ROUTING_MAX_PROVIDERS`
    `ROUTING_MAX_TIMEOUT`
    gammazero authored Dec 3, 2024
    Copy the full SHA
    f3dcc26 View commit details

Commits on Dec 5, 2024

  1. Update boxo (#204)

    * update to boxo with wants state update fix
    gammazero authored Dec 5, 2024
    Copy the full SHA
    5b3fcac View commit details

Commits on Dec 6, 2024

  1. update to latest boxo

    gammazero committed Dec 6, 2024
    Copy the full SHA
    7ac1d74 View commit details

Commits on Dec 9, 2024

  1. Upgrade to Boxo v0.25.0 (#205)

    * Upgrade to Boxo v0.25.0
    gammazero authored Dec 9, 2024
    Copy the full SHA
    ddfbdea View commit details
  2. chore(deps): bump go.opentelemetry.io/otel/sdk from 1.29.0 to 1.32.0 (#…

    …195)
    
    Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.29.0 to 1.32.0.
    - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
    - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
    - [Commits](open-telemetry/opentelemetry-go@v1.29.0...v1.32.0)
    
    ---
    updated-dependencies:
    - dependency-name: go.opentelemetry.io/otel/sdk
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 9, 2024
    Copy the full SHA
    18bea8c View commit details
  3. chore(deps): bump go.opentelemetry.io/contrib/instrumentation/net/htt…

    …p/otelhttp (#197)
    
    Bumps [go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.52.0 to 0.57.0.
    - [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
    - [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
    - [Commits](open-telemetry/opentelemetry-go-contrib@zpages/v0.52.0...zpages/v0.57.0)
    
    ---
    updated-dependencies:
    - dependency-name: go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 9, 2024
    Copy the full SHA
    ff7727c View commit details
  4. chore(deps): bump go.opentelemetry.io/contrib/propagators/autoprop (#198

    )
    
    Bumps [go.opentelemetry.io/contrib/propagators/autoprop](https://github.com/open-telemetry/opentelemetry-go-contrib) from 0.52.0 to 0.57.0.
    - [Release notes](https://github.com/open-telemetry/opentelemetry-go-contrib/releases)
    - [Changelog](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/CHANGELOG.md)
    - [Commits](open-telemetry/opentelemetry-go-contrib@zpages/v0.52.0...zpages/v0.57.0)
    
    ---
    updated-dependencies:
    - dependency-name: go.opentelemetry.io/contrib/propagators/autoprop
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 9, 2024
    Copy the full SHA
    3198b18 View commit details

Commits on Dec 10, 2024

  1. Release v0.9.0 (#206)

    * tidy changelog and update version
    gammazero authored Dec 10, 2024
    Copy the full SHA
    37f0dbe View commit details
Showing with 340 additions and 146 deletions.
  1. +19 −0 CHANGELOG.md
  2. +15 −0 README.md
  3. +3 −3 docs/headers.md
  4. +36 −34 go.mod
  5. +74 −72 go.sum
  6. +5 −11 handler_test.go
  7. +119 −9 handlers.go
  8. +26 −1 main.go
  9. +5 −0 setup.go
  10. +37 −15 setup_bitswap.go
  11. +1 −1 version.json
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -17,12 +17,31 @@ The following emojis are used to highlight certain changes:

### Changed

### Fixed

### Removed

### Fixed

### Security

## [v1.9.0]

### Added

- Added endpoints to show and purge connected peers [#194](https://github.com/ipfs/rainbow/pull/194)
- Added flags to configure bitswap/routing tuning params:
- `routing-max-requests`
- `routing-max-providers`
- `routing-max-timeout`

### Changed

- boxo [v0.25.0](https://github.com/ipfs/boxo/releases/tag/v0.25.0)
- go-libp2p-kad-dht [v0.28.1](https://github.com/libp2p/go-libp2p-kad-dht/releases/tag/v0.28.1)
- passing headers that require authorization but are not authorized now results in an HTTP 401 instead of ignoring those headers
- Bitswap settings: Increased default content-discovery limits, with up to 100 in-flight requests.

## [v1.8.3]

### Changed
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -142,6 +142,21 @@ possible to dynamically modify the logging at runtime.
- `http://$RAINBOW_CTL_LISTEN_ADDRESS/mgr/log/level?subsystem=<system name or * for all system>&level=<level>` will set the logging level for a subsystem
- `http://$RAINBOW_CTL_LISTEN_ADDRESS/mgr/log/ls` will return a comma separated list of available logging subsystems

## Purging Peer Connections

Connections to a specific peer, or to all peers, can be closed and the peer information removed from the peer store. This can be useful to help determine if the presence/absence of a connection to a peer is affecting behavior. Be aware that purging a connection is inherently racey as it is possible for the peer to reestablish a connection at any time following a purge.

If `RAINBOW_DHT_SHARED_HOST=false` this endpoint will not show peers connected to DHT host, and only list ones used for Bitswap.

- `http://$RAINBOW_CTL_LISTEN_ADDRESS/mgr/purge?peer=<peer_id>` purges connection and info for peer identifid by peer_id
- `http://$RAINBOW_CTL_LISTEN_ADDRESS/mgr/purge?peer=all` purges connections and info for all peers
- `http://$RAINBOW_CTL_LISTEN_ADDRESS/mgr/peers` returns a list of currently connected peers

Example cURL commmand to show connected peers and purge peer connection:

curl http://127.0.0.1:8091/mgr/peers
curl http://127.0.0.1:8091/mgr/purge?peer=QmQzqxhK82kAmKvARFZSkUVS6fo9sySaiogAnx5EnZ6ZmC

## Tracing

See [docs/tracing.md](docs/tracing.md).
6 changes: 3 additions & 3 deletions docs/headers.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ See [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth)

Optional. Clients may use this header to return a additional vendor-specific trace identification information across different distributed tracing systems.

Currently ignored unless `Authorization` matches [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth).
Will error unless `Authorization` matches [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth).

> [!TIP]
> `Traceparent` value format can be found in [W3C Trace Context Specification](https://www.w3.org/TR/trace-context-1/#trace-context-http-headers-format).
@@ -19,7 +19,7 @@ Currently ignored unless `Authorization` matches [`RAINBOW_TRACING_AUTH`](./envi

Optional. Clients may use this header to return a additional vendor-specific trace identification information in addition to `Traceparent`.

Currently ignored unless `Authorization` matches [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth).
Will error unless `Authorization` matches [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth).

> [!TIP]
> `Tracestate` value format can be found in [W3C Trace Context Specification](https://www.w3.org/TR/trace-context-1/#trace-context-http-headers-format).
@@ -28,6 +28,6 @@ Currently ignored unless `Authorization` matches [`RAINBOW_TRACING_AUTH`](./envi

If the value is `true` the associated request will skip the local block cache and leverage a separate in-memory block cache for the request.

This header is not respected unless the request has a valid `Authorization` header
Will error unless the request has a valid `Authorization` header

See [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth)
70 changes: 36 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
@@ -5,12 +5,12 @@ go 1.23.2
require (
github.com/cockroachdb/pebble v1.1.2
github.com/coreos/go-systemd/v22 v22.5.0
github.com/dgraph-io/badger/v4 v4.3.0
github.com/dgraph-io/badger/v4 v4.4.0
github.com/dustin/go-humanize v1.0.1
github.com/felixge/httpsnoop v1.0.4
github.com/ipfs-shipyard/nopfs v0.0.12
github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231024163508-120e0c51ee3a
github.com/ipfs/boxo v0.24.2
github.com/ipfs/boxo v0.25.0
github.com/ipfs/go-block-format v0.2.0
github.com/ipfs/go-cid v0.4.1
github.com/ipfs/go-datastore v0.6.0
@@ -21,12 +21,12 @@ require (
github.com/ipfs/go-ipfs-delay v0.0.1
github.com/ipfs/go-log/v2 v2.5.1
github.com/ipfs/go-metrics-interface v0.0.1
github.com/ipfs/go-metrics-prometheus v0.0.2
github.com/ipfs/go-metrics-prometheus v0.0.3
github.com/ipfs/go-test v0.0.4
github.com/ipfs/go-unixfsnode v1.9.2
github.com/ipld/go-codec-dagpb v1.6.0
github.com/libp2p/go-libp2p v0.37.0
github.com/libp2p/go-libp2p-kad-dht v0.27.0
github.com/libp2p/go-libp2p v0.37.2
github.com/libp2p/go-libp2p-kad-dht v0.28.1
github.com/libp2p/go-libp2p-record v0.2.0
github.com/libp2p/go-libp2p-routing-helpers v0.7.4
github.com/libp2p/go-libp2p-testing v0.12.0
@@ -41,19 +41,19 @@ require (
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.4
go.opencensus.io v0.24.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0
go.opentelemetry.io/contrib/propagators/autoprop v0.52.0
go.opentelemetry.io/otel v1.30.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/trace v1.30.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0
go.opentelemetry.io/contrib/propagators/autoprop v0.57.0
go.opentelemetry.io/otel v1.32.0
go.opentelemetry.io/otel/sdk v1.32.0
go.opentelemetry.io/otel/trace v1.32.0
golang.org/x/crypto v0.28.0
golang.org/x/sys v0.26.0
golang.org/x/sys v0.27.0
)

require (
github.com/DataDog/zstd v1.4.5 // indirect
github.com/Jorropo/jsync v1.0.1 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
@@ -66,18 +66,20 @@ require (
github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/crackcomm/go-gitignore v0.0.0-20231225121904-e25f5bc08668 // indirect
github.com/crackcomm/go-gitignore v0.0.0-20241020182519-7843d2ba8fdf // indirect
github.com/cskr/pubsub v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/dgraph-io/ristretto v0.1.2-0.20240116140435-c67e07994f91 // indirect
github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.4 // indirect
github.com/gabriel-vasile/mimetype v1.4.6 // indirect
github.com/gammazero/chanqueue v1.0.0 // indirect
github.com/gammazero/deque v1.0.0 // indirect
github.com/getsentry/sentry-go v0.27.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
@@ -94,7 +96,7 @@ require (
github.com/google/pprof v0.0.0-20241017200806-017d972448fc // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
@@ -147,11 +149,11 @@ require (
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr-dns v0.4.0 // indirect
github.com/multiformats/go-multiaddr-dns v0.4.1 // indirect
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/multiformats/go-multistream v0.6.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/onsi/ginkgo/v2 v2.20.2 // indirect
@@ -183,12 +185,12 @@ require (
github.com/prometheus/common v0.60.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/quic-go/qpack v0.5.1 // indirect
github.com/quic-go/quic-go v0.48.1 // indirect
github.com/quic-go/quic-go v0.48.2 // indirect
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/samber/lo v1.39.0 // indirect
github.com/samber/lo v1.47.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/ucarion/urlpath v0.0.0-20200424170820-7ccc79b76bbb // indirect
@@ -200,16 +202,16 @@ require (
github.com/wlynxg/anet v0.0.5 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
go.opentelemetry.io/contrib/propagators/aws v1.29.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.29.0 // indirect
go.opentelemetry.io/contrib/propagators/jaeger v1.29.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.29.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/contrib/propagators/aws v1.32.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.32.0 // indirect
go.opentelemetry.io/contrib/propagators/jaeger v1.32.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.32.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.31.0 // indirect
go.opentelemetry.io/otel/exporters/zipkin v1.31.0 // indirect
go.opentelemetry.io/otel/metric v1.32.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/dig v1.18.0 // indirect
@@ -225,9 +227,9 @@ require (
golang.org/x/tools v0.26.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
gonum.org/v1/gonum v0.15.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240624140628-dc46fd24d27d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240624140628-dc46fd24d27d // indirect
google.golang.org/grpc v1.64.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
Loading