From 58b1a61acfa7a4e12b4ba78540ed952849722df3 Mon Sep 17 00:00:00 2001 From: Jorropo Date: Mon, 20 Mar 2023 22:47:45 +0100 Subject: [PATCH] Boxo !!! Fixes #215 --- .github/workflows/gateway-sharness.yml | 8 +-- README.md | 54 +++++++++---------- bitswap/README.md | 4 +- bitswap/benchmarks_test.go | 12 ++--- bitswap/bitswap.go | 14 ++--- bitswap/bitswap_test.go | 14 ++--- bitswap/client/bitswap_with_sessions_test.go | 12 ++--- bitswap/client/client.go | 34 ++++++------ .../blockpresencemanager_test.go | 4 +- bitswap/client/internal/getter/getter.go | 6 +-- .../messagequeue/donthavetimeoutmgr_test.go | 4 +- .../internal/messagequeue/messagequeue.go | 8 +-- .../messagequeue/messagequeue_test.go | 10 ++-- .../internal/notifications/notifications.go | 2 +- .../notifications/notifications_test.go | 4 +- .../internal/peermanager/peermanager_test.go | 4 +- .../peermanager/peerwantmanager_test.go | 4 +- .../providerquerymanager_test.go | 4 +- .../session/peerresponsetracker_test.go | 4 +- .../session/sentwantblockstracker_test.go | 4 +- bitswap/client/internal/session/session.go | 14 ++--- .../client/internal/session/session_test.go | 14 ++--- .../internal/session/sessionwants_test.go | 4 +- .../internal/session/sessionwantsender.go | 2 +- .../session/sessionwantsender_test.go | 10 ++-- .../client/internal/session/wantinfo_test.go | 4 +- .../sessioninterestmanager.go | 2 +- .../sessioninterestmanager_test.go | 4 +- .../internal/sessionmanager/sessionmanager.go | 10 ++-- .../sessionmanager/sessionmanager_test.go | 16 +++--- .../sessionpeermanager_test.go | 4 +- bitswap/client/wantlist/wantlist.go | 2 +- bitswap/client/wantlist/wantlist_test.go | 4 +- bitswap/decision/forward.go | 2 +- bitswap/forward.go | 4 +- bitswap/internal/testutil/testutil.go | 6 +-- bitswap/internal/testutil/testutil_test.go | 2 +- bitswap/message/message.go | 6 +-- bitswap/message/message_test.go | 6 +-- bitswap/message/pb/cid_test.go | 2 +- bitswap/network/connecteventmanager_test.go | 4 +- bitswap/network/interface.go | 4 +- bitswap/network/ipfs_impl.go | 4 +- bitswap/network/ipfs_impl_test.go | 12 ++--- bitswap/network/ipfs_impl_timeout_test.go | 2 +- bitswap/options.go | 6 +-- bitswap/sendOnlyTracer.go | 4 +- bitswap/server/forward.go | 2 +- .../internal/decision/blockstoremanager.go | 2 +- .../decision/blockstoremanager_test.go | 6 +-- bitswap/server/internal/decision/engine.go | 12 ++--- .../server/internal/decision/engine_test.go | 10 ++-- .../server/internal/decision/peer_ledger.go | 4 +- .../internal/decision/taskmerger_test.go | 4 +- bitswap/server/server.go | 16 +++--- bitswap/testinstance/testinstance.go | 6 +-- bitswap/testnet/interface.go | 2 +- bitswap/testnet/network_test.go | 6 +-- bitswap/testnet/peernet.go | 2 +- bitswap/testnet/virtual.go | 4 +- bitswap/tracer/tracer.go | 2 +- bitswap/wantlist/forward.go | 2 +- examples/README.md | 4 +- examples/gateway/car/main.go | 4 +- examples/gateway/car/main_test.go | 2 +- examples/gateway/common/blocks.go | 6 +-- examples/gateway/proxy/blockstore.go | 2 +- examples/gateway/proxy/main.go | 4 +- examples/gateway/proxy/main_test.go | 4 +- examples/go.mod | 6 +-- examples/unixfs-file-cid/README.md | 2 +- examples/unixfs-file-cid/main.go | 8 +-- files/README.md | 6 +-- gateway/README.md | 2 +- gateway/gateway.go | 4 +- gateway/gateway_test.go | 4 +- gateway/handler.go | 2 +- gateway/handler_car.go | 2 +- gateway/handler_codec.go | 2 +- gateway/handler_tar.go | 2 +- gateway/handler_test.go | 4 +- gateway/handler_unixfs.go | 2 +- gateway/handler_unixfs__redirects.go | 2 +- gateway/handler_unixfs_dir.go | 4 +- gateway/handler_unixfs_file.go | 2 +- go.mod | 2 +- routing/http/README.md | 2 +- routing/http/client/client.go | 8 +-- routing/http/client/client_test.go | 4 +- routing/http/client/transport_test.go | 4 +- routing/http/contentrouter/contentrouter.go | 4 +- .../http/contentrouter/contentrouter_test.go | 2 +- routing/http/server/server.go | 4 +- routing/http/server/server_test.go | 2 +- routing/http/types/ipfs.go | 2 +- routing/http/types/provider_bitswap.go | 2 +- routing/http/types/provider_unknown.go | 2 +- routing/http/types/time.go | 2 +- 98 files changed, 282 insertions(+), 282 deletions(-) diff --git a/.github/workflows/gateway-sharness.yml b/.github/workflows/gateway-sharness.yml index 88901fc17..09fba74da 100644 --- a/.github/workflows/gateway-sharness.yml +++ b/.github/workflows/gateway-sharness.yml @@ -19,10 +19,10 @@ jobs: uses: actions/setup-go@v3 with: go-version: 1.19.1 - - name: Checkout go-libipfs + - name: Checkout boxo uses: actions/checkout@v3 with: - path: go-libipfs + path: boxo - name: Checkout Kubo uses: actions/checkout@v3 with: @@ -34,9 +34,9 @@ jobs: uses: protocol/cache-go-action@v1 with: name: ${{ github.job }} - - name: Replace go-libipfs in Kubo go.mod + - name: Replace boxo in Kubo go.mod run: | - go mod edit -replace=github.com/ipfs/go-libipfs=../go-libipfs + go mod edit -replace=github.com/ipfs/boxo=../boxo go mod tidy cat go.mod working-directory: kubo diff --git a/README.md b/README.md index e7da30956..824c08380 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,26 @@

-go-libipfs 🍌 +Boxo 🍌
-go-libipfs logo +Boxo logo

A library for building IPFS applications and implementations.


-[![Go Test](https://github.com/ipfs/go-libipfs/actions/workflows/go-test.yml/badge.svg)](https://github.com/ipfs/go-libipfs/actions/workflows/go-test.yml) -[![Go Docs](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/ipfs/go-libipfs) -[![codecov](https://codecov.io/gh/ipfs/go-libipfs/branch/main/graph/badge.svg?token=9eG7d8fbCB)](https://codecov.io/gh/ipfs/go-libipfs) +[![Go Test](https://github.com/ipfs/Boxo/actions/workflows/go-test.yml/badge.svg)](https://github.com/ipfs/Boxo/actions/workflows/go-test.yml) +[![Go Docs](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/ipfs/Boxo) +[![codecov](https://codecov.io/gh/ipfs/Boxo/branch/main/graph/badge.svg?token=9eG7d8fbCB)](https://codecov.io/gh/ipfs/Boxo) - [About](#about) - [Motivation](#motivation) -- [What kind of components does go-libipfs have?](#what-kind-of-components-does-go-libipfs-have) - - [Does go-libipfs == IPFS?](#does-go-libipfs--ipfs) +- [What kind of components does Boxo have?](#what-kind-of-components-does-boxo-have) + - [Does Boxo == IPFS?](#does-boxo--ipfs) - [Is everything related to IPFS in the Go ecosystem in this repo?](#is-everything-related-to-ipfs-in-the-go-ecosystem-in-this-repo) - [Getting started](#getting-started) -- [Should I add my IPFS component to go-libipfs?](#should-i-add-my-ipfs-component-to-go-libipfs) +- [Should I add my IPFS component to Boxo?](#should-i-add-my-ipfs-component-to-boxo) - [Help](#help) - [Governance and Access](#governance-and-access) - [Release Process](#release-process) @@ -31,30 +31,30 @@ go-libipfs 🍌 ## About -go-libipfs is a component library for building IPFS applications and implementations in Go. +Boxo is a component library for building IPFS applications and implementations in Go. -Some scenarios in which you may find go-libipfs helpful: +Some scenarios in which you may find Boxo helpful: * You are building an application that interacts with the IPFS network * You are building an IPFS implementation * You want to reuse some components of IPFS such as its Kademlia DHT, Bitswap, data encoding, etc. * You want to experiment with IPFS -go-libipfs powers [Kubo](https://github.com/ipfs/kubo), which is [the most popular IPFS implementation](https://github.com/protocol/network-measurements/tree/master/reports), +Boxo powers [Kubo](https://github.com/ipfs/kubo), which is [the most popular IPFS implementation](https://github.com/protocol/network-measurements/tree/master/reports), so its code has been battle-tested on the IPFS network for years, and is well-understood by the community. ### Motivation **TL;DR** The goal of this repo is to help people build things. Previously users struggled to find existing useful code or to figure out how to use what they did find. We observed many running Kubo and using its HTTP RPC API. This repo aims to do better. We're taking the libraries that many were already effectively relying on in production and making them more easily discoverable and usable. -The maintainers primarily aim to help people trying to build with IPFS in Go that were previously either giving up or relying on the [Kubo HTTP RPC API](https://docs.ipfs.tech/reference/kubo/rpc/). Some of these people will end up being better served by IPFS tooling in other languages (e.g., Javascript, Rust, Java, Python), but for those who are either looking to write in Go or to leverage the set of IPFS tooling we already have in Go we’d like to make their lives easier. +The maintainers primarily aim to help people trying to build with IPFS in Go that were previously either giving up or relying on the [Kubo HTTP RPC API](https://docs.ipfs.tech/reference/kubo/rpc/). Some of these people will end up being better served by IPFS tooling in other languages (e.g., Javascript, Rust, Java, Python), but for those who are either looking to write in Go or to leverage the set of IPFS tooling we already have in Go we’d like to make their lives easier. -We’d also like to make life easier on ourselves as the maintainers by reducing the maintenance burden that comes from being the owners on [many repos](https://github.com/ipfs/kubo/issues/8543) and then use that time to contribute more to the community in the form of easier to use libraries, better implementations, improved protocols, new protocols, etc. +We’d also like to make life easier on ourselves as the maintainers by reducing the maintenance burden that comes from being the owners on [many repos](https://github.com/ipfs/kubo/issues/8543) and then use that time to contribute more to the community in the form of easier to use libraries, better implementations, improved protocols, new protocols, etc. -Go-libipfs is not exhaustive nor comprehensive--there are plenty of useful IPFS protocols, specs, libraries, etc. that are not in go-libipfs. The goal of go-libipfs is to provide cohesive and well-maintained components for common IPFS use cases. +Boxo is not exhaustive nor comprehensive--there are plenty of useful IPFS protocols, specs, libraries, etc. that are not in Boxo. The goal of Boxo is to provide cohesive and well-maintained components for common IPFS use cases. -## What kind of components does go-libipfs have? +## What kind of components does Boxo have? -Go-libipfs includes high-quality components useful for interacting with IPFS protocols, public and private IPFS networks, and content-addressed data, such as: +Boxo includes high-quality components useful for interacting with IPFS protocols, public and private IPFS networks, and content-addressed data, such as: - Content routing (DHT, delegated content routing, providing) - Data transfer (gateways, Bitswap, incremental verification) @@ -62,44 +62,44 @@ Go-libipfs includes high-quality components useful for interacting with IPFS pro - Interacting with public and private IPFS networks - Working with content-addressed data -Go-libipfs aims to provide a cohesive interface into these components. Note that not all of the underlying components necessarily reside in this respository. +Boxo aims to provide a cohesive interface into these components. Note that not all of the underlying components necessarily reside in this respository. -### Does go-libipfs == IPFS? +### Does Boxo == IPFS? No. This repo houses some IPFS functionality written in Go that has been useful in practice, and is maintained by a group that has long term commitments to the IPFS project ### Is everything related to IPFS in the Go ecosystem in this repo? -No. Not everything related to IPFS is intended to be in go-libipfs. View it as a starter toolbox (potentially among multiple). If you’d like to build an IPFS implementation with Go, here are some tools you might want that are maintained by a group that has long term commitments to the IPFS project. There are certainly repos that others maintainer that aren't included here (e.g., ipfs/go-car) which are still useful to IPFS implementations. It's expected and fine for new IPFS functionality to be developed that won't be part of go-libipfs. +No. Not everything related to IPFS is intended to be in Boxo. View it as a starter toolbox (potentially among multiple). If you’d like to build an IPFS implementation with Go, here are some tools you might want that are maintained by a group that has long term commitments to the IPFS project. There are certainly repos that others maintainer that aren't included here (e.g., ipfs/go-car) which are still useful to IPFS implementations. It's expected and fine for new IPFS functionality to be developed that won't be part of Boxo. ## Getting started See [examples](./examples/README.md). -## Should I add my IPFS component to go-libipfs? -We happily accept external contributions! However, go-libipfs maintains a high quality bar, so code accepted into go-libipfs must meet some minimum maintenance criteria: +## Should I add my IPFS component to Boxo? +We happily accept external contributions! However, Boxo maintains a high quality bar, so code accepted into Boxo must meet some minimum maintenance criteria: * Actively maintained * Must be actively used by, or will be included in software that is actively used by, a significant number of users or production systems. Code that is not actively used cannot be properly maintained. - * Must have multiple engineers who are willing and able to maintain the relevant code in go-libipfs for a long period of time. - * If either of these changes, go-libipfs maintainers will consider removing the component from go-libipfs. + * Must have multiple engineers who are willing and able to maintain the relevant code in Boxo for a long period of time. + * If either of these changes, Boxo maintainers will consider removing the component from Boxo. * Adequately tested * At least with unit tests * Ideally also including integration tests with other components * Adequately documented * Godocs at minimum * Complex components should have their own doc.go or README.md describing the component, its use cases, tradeoffs, design rationale, etc. -* If the maintainers are not go-libipfs maintainers, then the component must include a CODEOWNERS file with at least two code owners who can commit to reviewing PRs +* If the maintainers are not Boxo maintainers, then the component must include a CODEOWNERS file with at least two code owners who can commit to reviewing PRs -If you have some experimental component that you think would benefit the IPFS community, we suggest you build the component in your own repository until it's clear that there's community demand for it, and then open an issue/PR in this repository to discuss including it in go-libipfs. +If you have some experimental component that you think would benefit the IPFS community, we suggest you build the component in your own repository until it's clear that there's community demand for it, and then open an issue/PR in this repository to discuss including it in Boxo. ## Help -If you have questions, feel free to open an issue. You can also find the go-libipfs maintainers in [Filecoin Slack](https://filecoin.io/slack/) at #go-libipfs-maintainers. (If you would like to engage via IPFS Discord or ipfs.io Matrix, please drop into the #ipfs-implementers channel/room or file an issue, and we'll get bridging from #go-libipfs-maintainers to these other chat platforms.) +If you have questions, feel free to open an issue. You can also find the Boxo maintainers in [Filecoin Slack](https://filecoin.io/slack/) at #Boxo-maintainers. (If you would like to engage via IPFS Discord or ipfs.io Matrix, please drop into the #ipfs-implementers channel/room or file an issue, and we'll get bridging from #Boxo-maintainers to these other chat platforms.) ## Governance and Access See [CODEOWNERS](./docs/CODEOWNERS) for the current maintainers list. Governance for graduating additional maintainers hasn't been established. Repo permissions are all managed through [ipfs/github-mgmt](https://github.com/ipfs/github-mgmt). ## Release Process -To be documented: https://github.com/ipfs/go-libipfs/issues/170 +To be documented: https://github.com/ipfs/Boxo/issues/170 ## Related Items * [Initial proposal for "Consolidate IPFS Repositories" that spawned this project](https://github.com/ipfs/kubo/issues/8543) diff --git a/bitswap/README.md b/bitswap/README.md index 804341ac9..c8fd819e8 100644 --- a/bitswap/README.md +++ b/bitswap/README.md @@ -40,8 +40,8 @@ wants those blocks. ```golang import ( "context" - bitswap "github.com/ipfs/go-libipfs/bitswap" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" + bitswap "github.com/ipfs/boxo/bitswap" + bsnet "github.com/ipfs/boxo/bitswap/network" blockstore "github.com/ipfs/go-ipfs-blockstore" "github.com/libp2p/go-libp2p-core/routing" "github.com/libp2p/go-libp2p-core/host" diff --git a/bitswap/benchmarks_test.go b/bitswap/benchmarks_test.go index 99316ca81..acacbc884 100644 --- a/bitswap/benchmarks_test.go +++ b/bitswap/benchmarks_test.go @@ -12,17 +12,17 @@ import ( "testing" "time" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - blocks "github.com/ipfs/go-libipfs/blocks" + "github.com/ipfs/boxo/bitswap/internal/testutil" + blocks "github.com/ipfs/boxo/blocks" protocol "github.com/libp2p/go-libp2p/core/protocol" cid "github.com/ipfs/go-cid" delay "github.com/ipfs/go-ipfs-delay" mockrouting "github.com/ipfs/go-ipfs-routing/mock" - "github.com/ipfs/go-libipfs/bitswap" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - testinstance "github.com/ipfs/go-libipfs/bitswap/testinstance" - tn "github.com/ipfs/go-libipfs/bitswap/testnet" + "github.com/ipfs/boxo/bitswap" + bsnet "github.com/ipfs/boxo/bitswap/network" + testinstance "github.com/ipfs/boxo/bitswap/testinstance" + tn "github.com/ipfs/boxo/bitswap/testnet" ) type fetchFunc func(b *testing.B, bs *bitswap.Bitswap, ks []cid.Cid) diff --git a/bitswap/bitswap.go b/bitswap/bitswap.go index 73000f342..4dc58a98a 100644 --- a/bitswap/bitswap.go +++ b/bitswap/bitswap.go @@ -4,18 +4,18 @@ import ( "context" "fmt" - "github.com/ipfs/go-libipfs/bitswap/client" - "github.com/ipfs/go-libipfs/bitswap/internal/defaults" - "github.com/ipfs/go-libipfs/bitswap/message" - "github.com/ipfs/go-libipfs/bitswap/network" - "github.com/ipfs/go-libipfs/bitswap/server" - "github.com/ipfs/go-libipfs/bitswap/tracer" + "github.com/ipfs/boxo/bitswap/client" + "github.com/ipfs/boxo/bitswap/internal/defaults" + "github.com/ipfs/boxo/bitswap/message" + "github.com/ipfs/boxo/bitswap/network" + "github.com/ipfs/boxo/bitswap/server" + "github.com/ipfs/boxo/bitswap/tracer" "github.com/ipfs/go-metrics-interface" "github.com/ipfs/go-cid" blockstore "github.com/ipfs/go-ipfs-blockstore" exchange "github.com/ipfs/go-ipfs-exchange-interface" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" logging "github.com/ipfs/go-log" "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/bitswap_test.go b/bitswap/bitswap_test.go index 16c5f4162..37da74893 100644 --- a/bitswap/bitswap_test.go +++ b/bitswap/bitswap_test.go @@ -15,13 +15,13 @@ import ( delay "github.com/ipfs/go-ipfs-delay" mockrouting "github.com/ipfs/go-ipfs-routing/mock" ipld "github.com/ipfs/go-ipld-format" - "github.com/ipfs/go-libipfs/bitswap" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - "github.com/ipfs/go-libipfs/bitswap/server" - testinstance "github.com/ipfs/go-libipfs/bitswap/testinstance" - tn "github.com/ipfs/go-libipfs/bitswap/testnet" - blocks "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap" + bsmsg "github.com/ipfs/boxo/bitswap/message" + "github.com/ipfs/boxo/bitswap/server" + testinstance "github.com/ipfs/boxo/bitswap/testinstance" + tn "github.com/ipfs/boxo/bitswap/testnet" + blocks "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/internal/test" tu "github.com/libp2p/go-libp2p-testing/etc" p2ptestutil "github.com/libp2p/go-libp2p-testing/netutil" peer "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/client/bitswap_with_sessions_test.go b/bitswap/client/bitswap_with_sessions_test.go index 37a5786f0..90c506377 100644 --- a/bitswap/client/bitswap_with_sessions_test.go +++ b/bitswap/client/bitswap_with_sessions_test.go @@ -10,12 +10,12 @@ import ( blocksutil "github.com/ipfs/go-ipfs-blocksutil" delay "github.com/ipfs/go-ipfs-delay" mockrouting "github.com/ipfs/go-ipfs-routing/mock" - "github.com/ipfs/go-libipfs/bitswap" - "github.com/ipfs/go-libipfs/bitswap/client/internal/session" - testinstance "github.com/ipfs/go-libipfs/bitswap/testinstance" - tn "github.com/ipfs/go-libipfs/bitswap/testnet" - blocks "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap" + "github.com/ipfs/boxo/bitswap/client/internal/session" + testinstance "github.com/ipfs/boxo/bitswap/testinstance" + tn "github.com/ipfs/boxo/bitswap/testnet" + blocks "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/internal/test" tu "github.com/libp2p/go-libp2p-testing/etc" ) diff --git a/bitswap/client/client.go b/bitswap/client/client.go index 31942ae60..2969f2028 100644 --- a/bitswap/client/client.go +++ b/bitswap/client/client.go @@ -16,23 +16,23 @@ import ( "github.com/ipfs/go-cid" blockstore "github.com/ipfs/go-ipfs-blockstore" exchange "github.com/ipfs/go-ipfs-exchange-interface" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" - bsgetter "github.com/ipfs/go-libipfs/bitswap/client/internal/getter" - bsmq "github.com/ipfs/go-libipfs/bitswap/client/internal/messagequeue" - "github.com/ipfs/go-libipfs/bitswap/client/internal/notifications" - bspm "github.com/ipfs/go-libipfs/bitswap/client/internal/peermanager" - bspqm "github.com/ipfs/go-libipfs/bitswap/client/internal/providerquerymanager" - bssession "github.com/ipfs/go-libipfs/bitswap/client/internal/session" - bssim "github.com/ipfs/go-libipfs/bitswap/client/internal/sessioninterestmanager" - bssm "github.com/ipfs/go-libipfs/bitswap/client/internal/sessionmanager" - bsspm "github.com/ipfs/go-libipfs/bitswap/client/internal/sessionpeermanager" - "github.com/ipfs/go-libipfs/bitswap/internal" - "github.com/ipfs/go-libipfs/bitswap/internal/defaults" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - bmetrics "github.com/ipfs/go-libipfs/bitswap/metrics" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - "github.com/ipfs/go-libipfs/bitswap/tracer" - blocks "github.com/ipfs/go-libipfs/blocks" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" + bsgetter "github.com/ipfs/boxo/bitswap/client/internal/getter" + bsmq "github.com/ipfs/boxo/bitswap/client/internal/messagequeue" + "github.com/ipfs/boxo/bitswap/client/internal/notifications" + bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager" + bspqm "github.com/ipfs/boxo/bitswap/client/internal/providerquerymanager" + bssession "github.com/ipfs/boxo/bitswap/client/internal/session" + bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager" + bssm "github.com/ipfs/boxo/bitswap/client/internal/sessionmanager" + bsspm "github.com/ipfs/boxo/bitswap/client/internal/sessionpeermanager" + "github.com/ipfs/boxo/bitswap/internal" + "github.com/ipfs/boxo/bitswap/internal/defaults" + bsmsg "github.com/ipfs/boxo/bitswap/message" + bmetrics "github.com/ipfs/boxo/bitswap/metrics" + bsnet "github.com/ipfs/boxo/bitswap/network" + "github.com/ipfs/boxo/bitswap/tracer" + blocks "github.com/ipfs/boxo/blocks" logging "github.com/ipfs/go-log" "github.com/ipfs/go-metrics-interface" process "github.com/jbenet/goprocess" diff --git a/bitswap/client/internal/blockpresencemanager/blockpresencemanager_test.go b/bitswap/client/internal/blockpresencemanager/blockpresencemanager_test.go index 991b0166c..1ce11481c 100644 --- a/bitswap/client/internal/blockpresencemanager/blockpresencemanager_test.go +++ b/bitswap/client/internal/blockpresencemanager/blockpresencemanager_test.go @@ -4,8 +4,8 @@ import ( "testing" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/getter/getter.go b/bitswap/client/internal/getter/getter.go index b091a6a3b..b8205b942 100644 --- a/bitswap/client/internal/getter/getter.go +++ b/bitswap/client/internal/getter/getter.go @@ -4,13 +4,13 @@ import ( "context" "errors" - "github.com/ipfs/go-libipfs/bitswap/client/internal" - notifications "github.com/ipfs/go-libipfs/bitswap/client/internal/notifications" + "github.com/ipfs/boxo/bitswap/client/internal" + notifications "github.com/ipfs/boxo/bitswap/client/internal/notifications" logging "github.com/ipfs/go-log" cid "github.com/ipfs/go-cid" ipld "github.com/ipfs/go-ipld-format" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" ) var log = logging.Logger("bitswap") diff --git a/bitswap/client/internal/messagequeue/donthavetimeoutmgr_test.go b/bitswap/client/internal/messagequeue/donthavetimeoutmgr_test.go index 6cbf8d2f3..a3630998f 100644 --- a/bitswap/client/internal/messagequeue/donthavetimeoutmgr_test.go +++ b/bitswap/client/internal/messagequeue/donthavetimeoutmgr_test.go @@ -9,8 +9,8 @@ import ( "github.com/benbjohnson/clock" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" "github.com/libp2p/go-libp2p/p2p/protocol/ping" ) diff --git a/bitswap/client/internal/messagequeue/messagequeue.go b/bitswap/client/internal/messagequeue/messagequeue.go index 2508ecd57..3b34b33f6 100644 --- a/bitswap/client/internal/messagequeue/messagequeue.go +++ b/bitswap/client/internal/messagequeue/messagequeue.go @@ -8,10 +8,10 @@ import ( "github.com/benbjohnson/clock" cid "github.com/ipfs/go-cid" - bswl "github.com/ipfs/go-libipfs/bitswap/client/wantlist" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" + bswl "github.com/ipfs/boxo/bitswap/client/wantlist" + bsmsg "github.com/ipfs/boxo/bitswap/message" + pb "github.com/ipfs/boxo/bitswap/message/pb" + bsnet "github.com/ipfs/boxo/bitswap/network" logging "github.com/ipfs/go-log" peer "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/p2p/protocol/ping" diff --git a/bitswap/client/internal/messagequeue/messagequeue_test.go b/bitswap/client/internal/messagequeue/messagequeue_test.go index ac3c523a6..10843a23b 100644 --- a/bitswap/client/internal/messagequeue/messagequeue_test.go +++ b/bitswap/client/internal/messagequeue/messagequeue_test.go @@ -11,11 +11,11 @@ import ( "github.com/benbjohnson/clock" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + bsmsg "github.com/ipfs/boxo/bitswap/message" + pb "github.com/ipfs/boxo/bitswap/message/pb" + bsnet "github.com/ipfs/boxo/bitswap/network" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/p2p/protocol/ping" ) diff --git a/bitswap/client/internal/notifications/notifications.go b/bitswap/client/internal/notifications/notifications.go index 92d63ee18..428914f9c 100644 --- a/bitswap/client/internal/notifications/notifications.go +++ b/bitswap/client/internal/notifications/notifications.go @@ -6,7 +6,7 @@ import ( pubsub "github.com/cskr/pubsub" cid "github.com/ipfs/go-cid" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" ) const bufferSize = 16 diff --git a/bitswap/client/internal/notifications/notifications_test.go b/bitswap/client/internal/notifications/notifications_test.go index 790c69446..d5a68781f 100644 --- a/bitswap/client/internal/notifications/notifications_test.go +++ b/bitswap/client/internal/notifications/notifications_test.go @@ -8,8 +8,8 @@ import ( cid "github.com/ipfs/go-cid" blocksutil "github.com/ipfs/go-ipfs-blocksutil" - blocks "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/internal/test" + blocks "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/internal/test" ) func TestDuplicates(t *testing.T) { diff --git a/bitswap/client/internal/peermanager/peermanager_test.go b/bitswap/client/internal/peermanager/peermanager_test.go index 9c9b9d39a..02eec4b8a 100644 --- a/bitswap/client/internal/peermanager/peermanager_test.go +++ b/bitswap/client/internal/peermanager/peermanager_test.go @@ -7,8 +7,8 @@ import ( "time" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/peermanager/peerwantmanager_test.go b/bitswap/client/internal/peermanager/peerwantmanager_test.go index 6a351c60b..c211d7bf6 100644 --- a/bitswap/client/internal/peermanager/peerwantmanager_test.go +++ b/bitswap/client/internal/peermanager/peerwantmanager_test.go @@ -4,8 +4,8 @@ import ( "testing" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/providerquerymanager/providerquerymanager_test.go b/bitswap/client/internal/providerquerymanager/providerquerymanager_test.go index 57e076469..c38f06d8e 100644 --- a/bitswap/client/internal/providerquerymanager/providerquerymanager_test.go +++ b/bitswap/client/internal/providerquerymanager/providerquerymanager_test.go @@ -9,8 +9,8 @@ import ( "time" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/session/peerresponsetracker_test.go b/bitswap/client/internal/session/peerresponsetracker_test.go index 0ab3cd5c0..1aed9c4ef 100644 --- a/bitswap/client/internal/session/peerresponsetracker_test.go +++ b/bitswap/client/internal/session/peerresponsetracker_test.go @@ -4,8 +4,8 @@ import ( "math" "testing" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/session/sentwantblockstracker_test.go b/bitswap/client/internal/session/sentwantblockstracker_test.go index c4b3c8c79..ccb920e31 100644 --- a/bitswap/client/internal/session/sentwantblockstracker_test.go +++ b/bitswap/client/internal/session/sentwantblockstracker_test.go @@ -3,8 +3,8 @@ package session import ( "testing" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" ) func TestSendWantBlocksTracker(t *testing.T) { diff --git a/bitswap/client/internal/session/session.go b/bitswap/client/internal/session/session.go index 68d030672..d7059eeff 100644 --- a/bitswap/client/internal/session/session.go +++ b/bitswap/client/internal/session/session.go @@ -6,13 +6,13 @@ import ( cid "github.com/ipfs/go-cid" delay "github.com/ipfs/go-ipfs-delay" - "github.com/ipfs/go-libipfs/bitswap/client/internal" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" - bsgetter "github.com/ipfs/go-libipfs/bitswap/client/internal/getter" - notifications "github.com/ipfs/go-libipfs/bitswap/client/internal/notifications" - bspm "github.com/ipfs/go-libipfs/bitswap/client/internal/peermanager" - bssim "github.com/ipfs/go-libipfs/bitswap/client/internal/sessioninterestmanager" - blocks "github.com/ipfs/go-libipfs/blocks" + "github.com/ipfs/boxo/bitswap/client/internal" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" + bsgetter "github.com/ipfs/boxo/bitswap/client/internal/getter" + notifications "github.com/ipfs/boxo/bitswap/client/internal/notifications" + bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager" + bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager" + blocks "github.com/ipfs/boxo/blocks" logging "github.com/ipfs/go-log" peer "github.com/libp2p/go-libp2p/core/peer" "go.uber.org/zap" diff --git a/bitswap/client/internal/session/session_test.go b/bitswap/client/internal/session/session_test.go index 27fd17ac6..e01c44fc7 100644 --- a/bitswap/client/internal/session/session_test.go +++ b/bitswap/client/internal/session/session_test.go @@ -9,13 +9,13 @@ import ( cid "github.com/ipfs/go-cid" blocksutil "github.com/ipfs/go-ipfs-blocksutil" delay "github.com/ipfs/go-ipfs-delay" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" - notifications "github.com/ipfs/go-libipfs/bitswap/client/internal/notifications" - bspm "github.com/ipfs/go-libipfs/bitswap/client/internal/peermanager" - bssim "github.com/ipfs/go-libipfs/bitswap/client/internal/sessioninterestmanager" - bsspm "github.com/ipfs/go-libipfs/bitswap/client/internal/sessionpeermanager" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" + notifications "github.com/ipfs/boxo/bitswap/client/internal/notifications" + bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager" + bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager" + bsspm "github.com/ipfs/boxo/bitswap/client/internal/sessionpeermanager" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/session/sessionwants_test.go b/bitswap/client/internal/session/sessionwants_test.go index 1de335c33..fd773683b 100644 --- a/bitswap/client/internal/session/sessionwants_test.go +++ b/bitswap/client/internal/session/sessionwants_test.go @@ -4,8 +4,8 @@ import ( "testing" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" ) func TestEmptySessionWants(t *testing.T) { diff --git a/bitswap/client/internal/session/sessionwantsender.go b/bitswap/client/internal/session/sessionwantsender.go index e06e05da3..41145fbf6 100644 --- a/bitswap/client/internal/session/sessionwantsender.go +++ b/bitswap/client/internal/session/sessionwantsender.go @@ -3,7 +3,7 @@ package session import ( "context" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" cid "github.com/ipfs/go-cid" peer "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/client/internal/session/sessionwantsender_test.go b/bitswap/client/internal/session/sessionwantsender_test.go index eb1fe0624..46cb47061 100644 --- a/bitswap/client/internal/session/sessionwantsender_test.go +++ b/bitswap/client/internal/session/sessionwantsender_test.go @@ -7,11 +7,11 @@ import ( "time" cid "github.com/ipfs/go-cid" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" - bspm "github.com/ipfs/go-libipfs/bitswap/client/internal/peermanager" - bsspm "github.com/ipfs/go-libipfs/bitswap/client/internal/sessionpeermanager" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" + bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager" + bsspm "github.com/ipfs/boxo/bitswap/client/internal/sessionpeermanager" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/session/wantinfo_test.go b/bitswap/client/internal/session/wantinfo_test.go index 883f1eea3..c7348a4a1 100644 --- a/bitswap/client/internal/session/wantinfo_test.go +++ b/bitswap/client/internal/session/wantinfo_test.go @@ -3,8 +3,8 @@ package session import ( "testing" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" ) func TestEmptyWantInfo(t *testing.T) { diff --git a/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go b/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go index 320cca735..78358c042 100644 --- a/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go +++ b/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager.go @@ -3,7 +3,7 @@ package sessioninterestmanager import ( "sync" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" cid "github.com/ipfs/go-cid" ) diff --git a/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager_test.go b/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager_test.go index 2bc79c232..23ccb2814 100644 --- a/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager_test.go +++ b/bitswap/client/internal/sessioninterestmanager/sessioninterestmanager_test.go @@ -4,8 +4,8 @@ import ( "testing" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" ) func TestEmpty(t *testing.T) { diff --git a/bitswap/client/internal/sessionmanager/sessionmanager.go b/bitswap/client/internal/sessionmanager/sessionmanager.go index 690077e70..06c821d21 100644 --- a/bitswap/client/internal/sessionmanager/sessionmanager.go +++ b/bitswap/client/internal/sessionmanager/sessionmanager.go @@ -12,11 +12,11 @@ import ( "go.opentelemetry.io/otel/trace" exchange "github.com/ipfs/go-ipfs-exchange-interface" - "github.com/ipfs/go-libipfs/bitswap/client/internal" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" - notifications "github.com/ipfs/go-libipfs/bitswap/client/internal/notifications" - bssession "github.com/ipfs/go-libipfs/bitswap/client/internal/session" - bssim "github.com/ipfs/go-libipfs/bitswap/client/internal/sessioninterestmanager" + "github.com/ipfs/boxo/bitswap/client/internal" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" + notifications "github.com/ipfs/boxo/bitswap/client/internal/notifications" + bssession "github.com/ipfs/boxo/bitswap/client/internal/session" + bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/sessionmanager/sessionmanager_test.go b/bitswap/client/internal/sessionmanager/sessionmanager_test.go index c2bcf72a2..051d0d3a1 100644 --- a/bitswap/client/internal/sessionmanager/sessionmanager_test.go +++ b/bitswap/client/internal/sessionmanager/sessionmanager_test.go @@ -9,14 +9,14 @@ import ( cid "github.com/ipfs/go-cid" delay "github.com/ipfs/go-ipfs-delay" - bsbpm "github.com/ipfs/go-libipfs/bitswap/client/internal/blockpresencemanager" - notifications "github.com/ipfs/go-libipfs/bitswap/client/internal/notifications" - bspm "github.com/ipfs/go-libipfs/bitswap/client/internal/peermanager" - bssession "github.com/ipfs/go-libipfs/bitswap/client/internal/session" - bssim "github.com/ipfs/go-libipfs/bitswap/client/internal/sessioninterestmanager" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - blocks "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/internal/test" + bsbpm "github.com/ipfs/boxo/bitswap/client/internal/blockpresencemanager" + notifications "github.com/ipfs/boxo/bitswap/client/internal/notifications" + bspm "github.com/ipfs/boxo/bitswap/client/internal/peermanager" + bssession "github.com/ipfs/boxo/bitswap/client/internal/session" + bssim "github.com/ipfs/boxo/bitswap/client/internal/sessioninterestmanager" + "github.com/ipfs/boxo/bitswap/internal/testutil" + blocks "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/internal/sessionpeermanager/sessionpeermanager_test.go b/bitswap/client/internal/sessionpeermanager/sessionpeermanager_test.go index ba9b4d165..fc1d7274d 100644 --- a/bitswap/client/internal/sessionpeermanager/sessionpeermanager_test.go +++ b/bitswap/client/internal/sessionpeermanager/sessionpeermanager_test.go @@ -4,8 +4,8 @@ import ( "sync" "testing" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/client/wantlist/wantlist.go b/bitswap/client/wantlist/wantlist.go index 9e40e1604..6cb71eecc 100644 --- a/bitswap/client/wantlist/wantlist.go +++ b/bitswap/client/wantlist/wantlist.go @@ -5,7 +5,7 @@ package wantlist import ( "sort" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" + pb "github.com/ipfs/boxo/bitswap/message/pb" cid "github.com/ipfs/go-cid" ) diff --git a/bitswap/client/wantlist/wantlist_test.go b/bitswap/client/wantlist/wantlist_test.go index 9177ae7e6..7bf381063 100644 --- a/bitswap/client/wantlist/wantlist_test.go +++ b/bitswap/client/wantlist/wantlist_test.go @@ -4,8 +4,8 @@ import ( "testing" cid "github.com/ipfs/go-cid" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - "github.com/ipfs/go-libipfs/internal/test" + pb "github.com/ipfs/boxo/bitswap/message/pb" + "github.com/ipfs/boxo/internal/test" "github.com/stretchr/testify/require" ) diff --git a/bitswap/decision/forward.go b/bitswap/decision/forward.go index 913e3093c..c7e7b42f4 100644 --- a/bitswap/decision/forward.go +++ b/bitswap/decision/forward.go @@ -1,6 +1,6 @@ package decision -import "github.com/ipfs/go-libipfs/bitswap/server" +import "github.com/ipfs/boxo/bitswap/server" type ( // Deprecated: use server.Receipt instead diff --git a/bitswap/forward.go b/bitswap/forward.go index 59d32e525..d6d657b2b 100644 --- a/bitswap/forward.go +++ b/bitswap/forward.go @@ -1,8 +1,8 @@ package bitswap import ( - "github.com/ipfs/go-libipfs/bitswap/server" - "github.com/ipfs/go-libipfs/bitswap/tracer" + "github.com/ipfs/boxo/bitswap/server" + "github.com/ipfs/boxo/bitswap/tracer" ) type ( diff --git a/bitswap/internal/testutil/testutil.go b/bitswap/internal/testutil/testutil.go index fadff9340..16f57ce6b 100644 --- a/bitswap/internal/testutil/testutil.go +++ b/bitswap/internal/testutil/testutil.go @@ -6,9 +6,9 @@ import ( cid "github.com/ipfs/go-cid" blocksutil "github.com/ipfs/go-ipfs-blocksutil" - "github.com/ipfs/go-libipfs/bitswap/client/wantlist" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - blocks "github.com/ipfs/go-libipfs/blocks" + "github.com/ipfs/boxo/bitswap/client/wantlist" + bsmsg "github.com/ipfs/boxo/bitswap/message" + blocks "github.com/ipfs/boxo/blocks" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/internal/testutil/testutil_test.go b/bitswap/internal/testutil/testutil_test.go index 99c76f86b..e2b669986 100644 --- a/bitswap/internal/testutil/testutil_test.go +++ b/bitswap/internal/testutil/testutil_test.go @@ -3,7 +3,7 @@ package testutil import ( "testing" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" ) func TestGenerateBlocksOfSize(t *testing.T) { diff --git a/bitswap/message/message.go b/bitswap/message/message.go index 42c0a46a2..059ac4392 100644 --- a/bitswap/message/message.go +++ b/bitswap/message/message.go @@ -5,11 +5,11 @@ import ( "errors" "io" - "github.com/ipfs/go-libipfs/bitswap/client/wantlist" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" + "github.com/ipfs/boxo/bitswap/client/wantlist" + pb "github.com/ipfs/boxo/bitswap/message/pb" cid "github.com/ipfs/go-cid" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" pool "github.com/libp2p/go-buffer-pool" msgio "github.com/libp2p/go-msgio" diff --git a/bitswap/message/message_test.go b/bitswap/message/message_test.go index e4559f8b4..fc5ebe506 100644 --- a/bitswap/message/message_test.go +++ b/bitswap/message/message_test.go @@ -5,12 +5,12 @@ import ( "testing" blocksutil "github.com/ipfs/go-ipfs-blocksutil" - "github.com/ipfs/go-libipfs/bitswap/client/wantlist" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" + "github.com/ipfs/boxo/bitswap/client/wantlist" + pb "github.com/ipfs/boxo/bitswap/message/pb" cid "github.com/ipfs/go-cid" u "github.com/ipfs/go-ipfs-util" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" ) func mkFakeCid(s string) cid.Cid { diff --git a/bitswap/message/pb/cid_test.go b/bitswap/message/pb/cid_test.go index d0d5d2b23..81a446764 100644 --- a/bitswap/message/pb/cid_test.go +++ b/bitswap/message/pb/cid_test.go @@ -7,7 +7,7 @@ import ( "github.com/ipfs/go-cid" u "github.com/ipfs/go-ipfs-util" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" + pb "github.com/ipfs/boxo/bitswap/message/pb" ) func TestCID(t *testing.T) { diff --git a/bitswap/network/connecteventmanager_test.go b/bitswap/network/connecteventmanager_test.go index 77bbe33dc..e3904ee55 100644 --- a/bitswap/network/connecteventmanager_test.go +++ b/bitswap/network/connecteventmanager_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" "github.com/libp2p/go-libp2p/core/peer" "github.com/stretchr/testify/require" ) diff --git a/bitswap/network/interface.go b/bitswap/network/interface.go index 7c6eeecd4..962bc2588 100644 --- a/bitswap/network/interface.go +++ b/bitswap/network/interface.go @@ -4,8 +4,8 @@ import ( "context" "time" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - "github.com/ipfs/go-libipfs/bitswap/network/internal" + bsmsg "github.com/ipfs/boxo/bitswap/message" + "github.com/ipfs/boxo/bitswap/network/internal" cid "github.com/ipfs/go-cid" diff --git a/bitswap/network/ipfs_impl.go b/bitswap/network/ipfs_impl.go index c796a4731..00eb76ba4 100644 --- a/bitswap/network/ipfs_impl.go +++ b/bitswap/network/ipfs_impl.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - "github.com/ipfs/go-libipfs/bitswap/network/internal" + bsmsg "github.com/ipfs/boxo/bitswap/message" + "github.com/ipfs/boxo/bitswap/network/internal" cid "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log" diff --git a/bitswap/network/ipfs_impl_test.go b/bitswap/network/ipfs_impl_test.go index 62b3ac98e..a8cd0052c 100644 --- a/bitswap/network/ipfs_impl_test.go +++ b/bitswap/network/ipfs_impl_test.go @@ -10,12 +10,12 @@ import ( ds "github.com/ipfs/go-datastore" blocksutil "github.com/ipfs/go-ipfs-blocksutil" mockrouting "github.com/ipfs/go-ipfs-routing/mock" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - "github.com/ipfs/go-libipfs/bitswap/network/internal" - tn "github.com/ipfs/go-libipfs/bitswap/testnet" - "github.com/ipfs/go-libipfs/internal/test" + bsmsg "github.com/ipfs/boxo/bitswap/message" + pb "github.com/ipfs/boxo/bitswap/message/pb" + bsnet "github.com/ipfs/boxo/bitswap/network" + "github.com/ipfs/boxo/bitswap/network/internal" + tn "github.com/ipfs/boxo/bitswap/testnet" + "github.com/ipfs/boxo/internal/test" tnet "github.com/libp2p/go-libp2p-testing/net" "github.com/libp2p/go-libp2p/core/host" "github.com/libp2p/go-libp2p/core/network" diff --git a/bitswap/network/ipfs_impl_timeout_test.go b/bitswap/network/ipfs_impl_timeout_test.go index 2543075d5..178c2fb69 100644 --- a/bitswap/network/ipfs_impl_timeout_test.go +++ b/bitswap/network/ipfs_impl_timeout_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/internal/test" "github.com/stretchr/testify/require" ) diff --git a/bitswap/options.go b/bitswap/options.go index 9ccf3c4d6..02d3c524b 100644 --- a/bitswap/options.go +++ b/bitswap/options.go @@ -4,9 +4,9 @@ import ( "time" delay "github.com/ipfs/go-ipfs-delay" - "github.com/ipfs/go-libipfs/bitswap/client" - "github.com/ipfs/go-libipfs/bitswap/server" - "github.com/ipfs/go-libipfs/bitswap/tracer" + "github.com/ipfs/boxo/bitswap/client" + "github.com/ipfs/boxo/bitswap/server" + "github.com/ipfs/boxo/bitswap/tracer" ) type option func(*Bitswap) diff --git a/bitswap/sendOnlyTracer.go b/bitswap/sendOnlyTracer.go index 9570b4390..ad03e2922 100644 --- a/bitswap/sendOnlyTracer.go +++ b/bitswap/sendOnlyTracer.go @@ -1,8 +1,8 @@ package bitswap import ( - "github.com/ipfs/go-libipfs/bitswap/message" - "github.com/ipfs/go-libipfs/bitswap/tracer" + "github.com/ipfs/boxo/bitswap/message" + "github.com/ipfs/boxo/bitswap/tracer" "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/server/forward.go b/bitswap/server/forward.go index bb8395229..ee353da19 100644 --- a/bitswap/server/forward.go +++ b/bitswap/server/forward.go @@ -1,7 +1,7 @@ package server import ( - "github.com/ipfs/go-libipfs/bitswap/server/internal/decision" + "github.com/ipfs/boxo/bitswap/server/internal/decision" ) type ( diff --git a/bitswap/server/internal/decision/blockstoremanager.go b/bitswap/server/internal/decision/blockstoremanager.go index 4171c038d..813ee60a6 100644 --- a/bitswap/server/internal/decision/blockstoremanager.go +++ b/bitswap/server/internal/decision/blockstoremanager.go @@ -8,7 +8,7 @@ import ( cid "github.com/ipfs/go-cid" bstore "github.com/ipfs/go-ipfs-blockstore" ipld "github.com/ipfs/go-ipld-format" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" "github.com/ipfs/go-metrics-interface" ) diff --git a/bitswap/server/internal/decision/blockstoremanager_test.go b/bitswap/server/internal/decision/blockstoremanager_test.go index 06c5ec56d..e77c77046 100644 --- a/bitswap/server/internal/decision/blockstoremanager_test.go +++ b/bitswap/server/internal/decision/blockstoremanager_test.go @@ -13,9 +13,9 @@ import ( ds_sync "github.com/ipfs/go-datastore/sync" blockstore "github.com/ipfs/go-ipfs-blockstore" delay "github.com/ipfs/go-ipfs-delay" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - blocks "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + blocks "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/internal/test" "github.com/ipfs/go-metrics-interface" ) diff --git a/bitswap/server/internal/decision/engine.go b/bitswap/server/internal/decision/engine.go index 208fef740..606df78c0 100644 --- a/bitswap/server/internal/decision/engine.go +++ b/bitswap/server/internal/decision/engine.go @@ -12,12 +12,12 @@ import ( "github.com/ipfs/go-cid" bstore "github.com/ipfs/go-ipfs-blockstore" - wl "github.com/ipfs/go-libipfs/bitswap/client/wantlist" - "github.com/ipfs/go-libipfs/bitswap/internal/defaults" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - bmetrics "github.com/ipfs/go-libipfs/bitswap/metrics" - blocks "github.com/ipfs/go-libipfs/blocks" + wl "github.com/ipfs/boxo/bitswap/client/wantlist" + "github.com/ipfs/boxo/bitswap/internal/defaults" + bsmsg "github.com/ipfs/boxo/bitswap/message" + pb "github.com/ipfs/boxo/bitswap/message/pb" + bmetrics "github.com/ipfs/boxo/bitswap/metrics" + blocks "github.com/ipfs/boxo/blocks" logging "github.com/ipfs/go-log" "github.com/ipfs/go-metrics-interface" "github.com/ipfs/go-peertaskqueue" diff --git a/bitswap/server/internal/decision/engine_test.go b/bitswap/server/internal/decision/engine_test.go index 5d93ad83f..edc84c760 100644 --- a/bitswap/server/internal/decision/engine_test.go +++ b/bitswap/server/internal/decision/engine_test.go @@ -17,11 +17,11 @@ import ( ds "github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-datastore/sync" blockstore "github.com/ipfs/go-ipfs-blockstore" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - message "github.com/ipfs/go-libipfs/bitswap/message" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - blocks "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + message "github.com/ipfs/boxo/bitswap/message" + pb "github.com/ipfs/boxo/bitswap/message/pb" + blocks "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/internal/test" process "github.com/jbenet/goprocess" peer "github.com/libp2p/go-libp2p/core/peer" libp2ptest "github.com/libp2p/go-libp2p/core/test" diff --git a/bitswap/server/internal/decision/peer_ledger.go b/bitswap/server/internal/decision/peer_ledger.go index 102dad4c4..cc7a5e1ac 100644 --- a/bitswap/server/internal/decision/peer_ledger.go +++ b/bitswap/server/internal/decision/peer_ledger.go @@ -1,8 +1,8 @@ package decision import ( - wl "github.com/ipfs/go-libipfs/bitswap/client/wantlist" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" + wl "github.com/ipfs/boxo/bitswap/client/wantlist" + pb "github.com/ipfs/boxo/bitswap/message/pb" "github.com/ipfs/go-cid" "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/server/internal/decision/taskmerger_test.go b/bitswap/server/internal/decision/taskmerger_test.go index 2a0b2dab1..e0ce46ed6 100644 --- a/bitswap/server/internal/decision/taskmerger_test.go +++ b/bitswap/server/internal/decision/taskmerger_test.go @@ -3,8 +3,8 @@ package decision import ( "testing" - "github.com/ipfs/go-libipfs/bitswap/internal/testutil" - "github.com/ipfs/go-libipfs/internal/test" + "github.com/ipfs/boxo/bitswap/internal/testutil" + "github.com/ipfs/boxo/internal/test" "github.com/ipfs/go-peertaskqueue" "github.com/ipfs/go-peertaskqueue/peertask" ) diff --git a/bitswap/server/server.go b/bitswap/server/server.go index 7918b73d7..f65b89d5a 100644 --- a/bitswap/server/server.go +++ b/bitswap/server/server.go @@ -10,14 +10,14 @@ import ( "github.com/ipfs/go-cid" blockstore "github.com/ipfs/go-ipfs-blockstore" - "github.com/ipfs/go-libipfs/bitswap/internal/defaults" - "github.com/ipfs/go-libipfs/bitswap/message" - pb "github.com/ipfs/go-libipfs/bitswap/message/pb" - bmetrics "github.com/ipfs/go-libipfs/bitswap/metrics" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - "github.com/ipfs/go-libipfs/bitswap/server/internal/decision" - "github.com/ipfs/go-libipfs/bitswap/tracer" - blocks "github.com/ipfs/go-libipfs/blocks" + "github.com/ipfs/boxo/bitswap/internal/defaults" + "github.com/ipfs/boxo/bitswap/message" + pb "github.com/ipfs/boxo/bitswap/message/pb" + bmetrics "github.com/ipfs/boxo/bitswap/metrics" + bsnet "github.com/ipfs/boxo/bitswap/network" + "github.com/ipfs/boxo/bitswap/server/internal/decision" + "github.com/ipfs/boxo/bitswap/tracer" + blocks "github.com/ipfs/boxo/blocks" logging "github.com/ipfs/go-log" "github.com/ipfs/go-metrics-interface" process "github.com/jbenet/goprocess" diff --git a/bitswap/testinstance/testinstance.go b/bitswap/testinstance/testinstance.go index 47e22b7a2..ace629aa2 100644 --- a/bitswap/testinstance/testinstance.go +++ b/bitswap/testinstance/testinstance.go @@ -9,9 +9,9 @@ import ( ds_sync "github.com/ipfs/go-datastore/sync" blockstore "github.com/ipfs/go-ipfs-blockstore" delay "github.com/ipfs/go-ipfs-delay" - "github.com/ipfs/go-libipfs/bitswap" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - tn "github.com/ipfs/go-libipfs/bitswap/testnet" + "github.com/ipfs/boxo/bitswap" + bsnet "github.com/ipfs/boxo/bitswap/network" + tn "github.com/ipfs/boxo/bitswap/testnet" tnet "github.com/libp2p/go-libp2p-testing/net" p2ptestutil "github.com/libp2p/go-libp2p-testing/netutil" peer "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/testnet/interface.go b/bitswap/testnet/interface.go index 62f3ca625..ec2818518 100644 --- a/bitswap/testnet/interface.go +++ b/bitswap/testnet/interface.go @@ -1,7 +1,7 @@ package bitswap import ( - bsnet "github.com/ipfs/go-libipfs/bitswap/network" + bsnet "github.com/ipfs/boxo/bitswap/network" tnet "github.com/libp2p/go-libp2p-testing/net" "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/testnet/network_test.go b/bitswap/testnet/network_test.go index 388b9c9c3..a8e135b53 100644 --- a/bitswap/testnet/network_test.go +++ b/bitswap/testnet/network_test.go @@ -5,12 +5,12 @@ import ( "sync" "testing" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" + bsmsg "github.com/ipfs/boxo/bitswap/message" + bsnet "github.com/ipfs/boxo/bitswap/network" delay "github.com/ipfs/go-ipfs-delay" mockrouting "github.com/ipfs/go-ipfs-routing/mock" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" tnet "github.com/libp2p/go-libp2p-testing/net" "github.com/libp2p/go-libp2p/core/peer" diff --git a/bitswap/testnet/peernet.go b/bitswap/testnet/peernet.go index ea98b98f4..4955636ac 100644 --- a/bitswap/testnet/peernet.go +++ b/bitswap/testnet/peernet.go @@ -3,7 +3,7 @@ package bitswap import ( "context" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" + bsnet "github.com/ipfs/boxo/bitswap/network" ds "github.com/ipfs/go-datastore" mockrouting "github.com/ipfs/go-ipfs-routing/mock" diff --git a/bitswap/testnet/virtual.go b/bitswap/testnet/virtual.go index b74348966..f35a61a80 100644 --- a/bitswap/testnet/virtual.go +++ b/bitswap/testnet/virtual.go @@ -8,8 +8,8 @@ import ( "sync/atomic" "time" - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" + bsmsg "github.com/ipfs/boxo/bitswap/message" + bsnet "github.com/ipfs/boxo/bitswap/network" cid "github.com/ipfs/go-cid" delay "github.com/ipfs/go-ipfs-delay" diff --git a/bitswap/tracer/tracer.go b/bitswap/tracer/tracer.go index 91ff25cf8..421212adf 100644 --- a/bitswap/tracer/tracer.go +++ b/bitswap/tracer/tracer.go @@ -1,7 +1,7 @@ package tracer import ( - bsmsg "github.com/ipfs/go-libipfs/bitswap/message" + bsmsg "github.com/ipfs/boxo/bitswap/message" peer "github.com/libp2p/go-libp2p/core/peer" ) diff --git a/bitswap/wantlist/forward.go b/bitswap/wantlist/forward.go index 75a255597..18b854481 100644 --- a/bitswap/wantlist/forward.go +++ b/bitswap/wantlist/forward.go @@ -2,7 +2,7 @@ package wantlist import ( "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/bitswap/client/wantlist" + "github.com/ipfs/boxo/bitswap/client/wantlist" ) type ( diff --git a/examples/README.md b/examples/README.md index 73d3e0a5d..438766e4c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,6 +1,6 @@ -# go-libipfs examples and tutorials +# boxo examples and tutorials -In this folder, you can find some examples to help you get started using go-libipfs and its associated libraries in your applications. +In this folder, you can find some examples to help you get started using boxo and its associated libraries in your applications. Let us know if you find any issue or if you want to contribute and add a new tutorial, feel welcome to submit a pr, thank you! diff --git a/examples/gateway/car/main.go b/examples/gateway/car/main.go index 4ba63d253..e4ec2a9a9 100644 --- a/examples/gateway/car/main.go +++ b/examples/gateway/car/main.go @@ -11,8 +11,8 @@ import ( "github.com/ipfs/go-blockservice" "github.com/ipfs/go-cid" offline "github.com/ipfs/go-ipfs-exchange-offline" - "github.com/ipfs/go-libipfs/examples/gateway/common" - "github.com/ipfs/go-libipfs/gateway" + "github.com/ipfs/boxo/examples/gateway/common" + "github.com/ipfs/boxo/gateway" carblockstore "github.com/ipld/go-car/v2/blockstore" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/examples/gateway/car/main_test.go b/examples/gateway/car/main_test.go index aebf0b997..fe7174198 100644 --- a/examples/gateway/car/main_test.go +++ b/examples/gateway/car/main_test.go @@ -6,7 +6,7 @@ import ( "net/http/httptest" "testing" - "github.com/ipfs/go-libipfs/examples/gateway/common" + "github.com/ipfs/boxo/examples/gateway/common" "github.com/ipld/go-ipld-prime/codec/dagjson" "github.com/ipld/go-ipld-prime/node/basicnode" "github.com/stretchr/testify/assert" diff --git a/examples/gateway/common/blocks.go b/examples/gateway/common/blocks.go index a0a0f4702..539cb9614 100644 --- a/examples/gateway/common/blocks.go +++ b/examples/gateway/common/blocks.go @@ -12,9 +12,9 @@ import ( bsfetcher "github.com/ipfs/go-fetcher/impl/blockservice" blockstore "github.com/ipfs/go-ipfs-blockstore" format "github.com/ipfs/go-ipld-format" - "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/files" - "github.com/ipfs/go-libipfs/gateway" + "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/files" + "github.com/ipfs/boxo/gateway" "github.com/ipfs/go-merkledag" "github.com/ipfs/go-namesys" "github.com/ipfs/go-namesys/resolve" diff --git a/examples/gateway/proxy/blockstore.go b/examples/gateway/proxy/blockstore.go index 5612fdfb0..98c2e8dd2 100644 --- a/examples/gateway/proxy/blockstore.go +++ b/examples/gateway/proxy/blockstore.go @@ -10,7 +10,7 @@ import ( "github.com/ipfs/go-cid" blockstore "github.com/ipfs/go-ipfs-blockstore" - "github.com/ipfs/go-libipfs/blocks" + "github.com/ipfs/boxo/blocks" ) var ( diff --git a/examples/gateway/proxy/main.go b/examples/gateway/proxy/main.go index 793fee121..9ec09bb45 100644 --- a/examples/gateway/proxy/main.go +++ b/examples/gateway/proxy/main.go @@ -8,8 +8,8 @@ import ( "github.com/ipfs/go-blockservice" offline "github.com/ipfs/go-ipfs-exchange-offline" - "github.com/ipfs/go-libipfs/examples/gateway/common" - "github.com/ipfs/go-libipfs/gateway" + "github.com/ipfs/boxo/examples/gateway/common" + "github.com/ipfs/boxo/gateway" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/examples/gateway/proxy/main_test.go b/examples/gateway/proxy/main_test.go index 453f3e21b..ff2c9ecba 100644 --- a/examples/gateway/proxy/main_test.go +++ b/examples/gateway/proxy/main_test.go @@ -8,8 +8,8 @@ import ( "github.com/ipfs/go-blockservice" offline "github.com/ipfs/go-ipfs-exchange-offline" - "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/examples/gateway/common" + "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/examples/gateway/common" "github.com/stretchr/testify/assert" ) diff --git a/examples/go.mod b/examples/go.mod index e4232893d..8cefb778c 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -1,4 +1,4 @@ -module github.com/ipfs/go-libipfs/examples +module github.com/ipfs/boxo/examples go 1.19 @@ -13,7 +13,7 @@ require ( github.com/ipfs/go-ipfs-exchange-offline v0.3.0 github.com/ipfs/go-ipld-format v0.4.0 github.com/ipfs/go-ipns v0.3.0 - github.com/ipfs/go-libipfs v0.4.0 + github.com/ipfs/boxo v0.4.0 github.com/ipfs/go-merkledag v0.9.0 github.com/ipfs/go-namesys v0.7.0 github.com/ipfs/go-path v0.3.1 @@ -164,4 +164,4 @@ require ( nhooyr.io/websocket v1.8.7 // indirect ) -replace github.com/ipfs/go-libipfs => ../ +replace github.com/ipfs/boxo => ../ diff --git a/examples/unixfs-file-cid/README.md b/examples/unixfs-file-cid/README.md index b4c224a73..eeea0d7bd 100644 --- a/examples/unixfs-file-cid/README.md +++ b/examples/unixfs-file-cid/README.md @@ -10,7 +10,7 @@ In client mode, it will start up, connect to the server, request the data needed ## Build -From the `go-libipfs/examples` directory run the following: +From the `boxo/examples` directory run the following: ``` > cd unixfs-file-cid/ diff --git a/examples/unixfs-file-cid/main.go b/examples/unixfs-file-cid/main.go index 6ab3e9687..a73e26ec8 100644 --- a/examples/unixfs-file-cid/main.go +++ b/examples/unixfs-file-cid/main.go @@ -34,10 +34,10 @@ import ( uih "github.com/ipfs/go-unixfs/importer/helpers" "github.com/libp2p/go-libp2p-routing-helpers" - bsclient "github.com/ipfs/go-libipfs/bitswap/client" - bsnet "github.com/ipfs/go-libipfs/bitswap/network" - bsserver "github.com/ipfs/go-libipfs/bitswap/server" - "github.com/ipfs/go-libipfs/files" + bsclient "github.com/ipfs/boxo/bitswap/client" + bsnet "github.com/ipfs/boxo/bitswap/network" + bsserver "github.com/ipfs/boxo/bitswap/server" + "github.com/ipfs/boxo/files" ) const exampleBinaryName = "unixfs-file-cid" diff --git a/files/README.md b/files/README.md index b5720c5ef..5de61887e 100644 --- a/files/README.md +++ b/files/README.md @@ -1,14 +1,14 @@ -# go-libipfs/files +# boxo/files > File interfaces and utils used in GO implementations of [IPFS](https://ipfs.tech) ## Documentation -https://pkg.go.dev/github.com/ipfs/go-libipfs/files +https://pkg.go.dev/github.com/ipfs/boxo/files ## Contribute -Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/go-libipfs/issues)! +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/boxo/issues)! This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). diff --git a/gateway/README.md b/gateway/README.md index 6c7a7cf47..0aacd9069 100644 --- a/gateway/README.md +++ b/gateway/README.md @@ -4,7 +4,7 @@ ## Documentation -* Go Documentation: https://pkg.go.dev/github.com/ipfs/go-libipfs/gateway +* Go Documentation: https://pkg.go.dev/github.com/ipfs/boxo/gateway * Gateway Specification: https://github.com/ipfs/specs/tree/main/http-gateways#readme * Types of HTTP Gateways: https://docs.ipfs.tech/how-to/address-ipfs-on-web/#http-gateways ## Example diff --git a/gateway/gateway.go b/gateway/gateway.go index 977c6b960..52fd27b7a 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -6,8 +6,8 @@ import ( "sort" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/files" iface "github.com/ipfs/interface-go-ipfs-core" "github.com/ipfs/interface-go-ipfs-core/path" ) diff --git a/gateway/gateway_test.go b/gateway/gateway_test.go index 4fad1527a..ee0acbda0 100644 --- a/gateway/gateway_test.go +++ b/gateway/gateway_test.go @@ -19,8 +19,8 @@ import ( blockstore "github.com/ipfs/go-ipfs-blockstore" offline "github.com/ipfs/go-ipfs-exchange-offline" format "github.com/ipfs/go-ipld-format" - "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/files" "github.com/ipfs/go-merkledag" "github.com/ipfs/go-namesys" "github.com/ipfs/go-namesys/resolve" diff --git a/gateway/handler.go b/gateway/handler.go index 7dea21eab..3462cd2e1 100644 --- a/gateway/handler.go +++ b/gateway/handler.go @@ -876,5 +876,5 @@ func (i *handler) setCommonHeaders(w http.ResponseWriter, r *http.Request, conte // spanTrace starts a new span using the standard IPFS tracing conventions. func spanTrace(ctx context.Context, spanName string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { - return otel.Tracer("go-libipfs").Start(ctx, fmt.Sprintf("%s.%s", " Gateway", spanName), opts...) + return otel.Tracer("boxo").Start(ctx, fmt.Sprintf("%s.%s", " Gateway", spanName), opts...) } diff --git a/gateway/handler_car.go b/gateway/handler_car.go index 0ccb60200..eb683e7ba 100644 --- a/gateway/handler_car.go +++ b/gateway/handler_car.go @@ -7,7 +7,7 @@ import ( "time" cid "github.com/ipfs/go-cid" - blocks "github.com/ipfs/go-libipfs/blocks" + blocks "github.com/ipfs/boxo/blocks" ipath "github.com/ipfs/interface-go-ipfs-core/path" gocar "github.com/ipld/go-car" selectorparse "github.com/ipld/go-ipld-prime/traversal/selector/parse" diff --git a/gateway/handler_codec.go b/gateway/handler_codec.go index ed02ab107..145210c64 100644 --- a/gateway/handler_codec.go +++ b/gateway/handler_codec.go @@ -9,7 +9,7 @@ import ( "time" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/gateway/assets" + "github.com/ipfs/boxo/gateway/assets" ipath "github.com/ipfs/interface-go-ipfs-core/path" "github.com/ipld/go-ipld-prime/multicodec" "github.com/ipld/go-ipld-prime/node/basicnode" diff --git a/gateway/handler_tar.go b/gateway/handler_tar.go index 569c031d4..38b75d205 100644 --- a/gateway/handler_tar.go +++ b/gateway/handler_tar.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/files" ipath "github.com/ipfs/interface-go-ipfs-core/path" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" diff --git a/gateway/handler_test.go b/gateway/handler_test.go index cd67ba9e4..c8cf2eea2 100644 --- a/gateway/handler_test.go +++ b/gateway/handler_test.go @@ -11,8 +11,8 @@ import ( cid "github.com/ipfs/go-cid" ipld "github.com/ipfs/go-ipld-format" - "github.com/ipfs/go-libipfs/blocks" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/blocks" + "github.com/ipfs/boxo/files" "github.com/ipfs/go-path/resolver" iface "github.com/ipfs/interface-go-ipfs-core" ipath "github.com/ipfs/interface-go-ipfs-core/path" diff --git a/gateway/handler_unixfs.go b/gateway/handler_unixfs.go index 28a0677d3..9691c2da5 100644 --- a/gateway/handler_unixfs.go +++ b/gateway/handler_unixfs.go @@ -6,7 +6,7 @@ import ( "net/http" "time" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/files" ipath "github.com/ipfs/interface-go-ipfs-core/path" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" diff --git a/gateway/handler_unixfs__redirects.go b/gateway/handler_unixfs__redirects.go index b9658e4e5..5a23c49ec 100644 --- a/gateway/handler_unixfs__redirects.go +++ b/gateway/handler_unixfs__redirects.go @@ -9,7 +9,7 @@ import ( "strings" redirects "github.com/ipfs/go-ipfs-redirects-file" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/files" ipath "github.com/ipfs/interface-go-ipfs-core/path" "go.uber.org/zap" ) diff --git a/gateway/handler_unixfs_dir.go b/gateway/handler_unixfs_dir.go index c03a4b81b..d9e83c5c1 100644 --- a/gateway/handler_unixfs_dir.go +++ b/gateway/handler_unixfs_dir.go @@ -11,8 +11,8 @@ import ( "github.com/dustin/go-humanize" cid "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/files" - "github.com/ipfs/go-libipfs/gateway/assets" + "github.com/ipfs/boxo/files" + "github.com/ipfs/boxo/gateway/assets" path "github.com/ipfs/go-path" "github.com/ipfs/go-path/resolver" ipath "github.com/ipfs/interface-go-ipfs-core/path" diff --git a/gateway/handler_unixfs_file.go b/gateway/handler_unixfs_file.go index 55a61ee8c..cf65034fb 100644 --- a/gateway/handler_unixfs_file.go +++ b/gateway/handler_unixfs_file.go @@ -11,7 +11,7 @@ import ( "time" "github.com/gabriel-vasile/mimetype" - "github.com/ipfs/go-libipfs/files" + "github.com/ipfs/boxo/files" ipath "github.com/ipfs/interface-go-ipfs-core/path" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" diff --git a/go.mod b/go.mod index 51ffc5db3..e9aa13e15 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/ipfs/go-libipfs +module github.com/ipfs/boxo go 1.19 diff --git a/routing/http/README.md b/routing/http/README.md index de3d4a074..65650ed50 100644 --- a/routing/http/README.md +++ b/routing/http/README.md @@ -9,7 +9,7 @@ This package provides delegated routing implementation in Go: ## Documentation -- Go docs: https://pkg.go.dev/github.com/ipfs/go-libipfs/routing/http/ +- Go docs: https://pkg.go.dev/github.com/ipfs/boxo/routing/http/ ## Lead Maintainer diff --git a/routing/http/client/client.go b/routing/http/client/client.go index 34f90eb6a..03a4e9ae5 100644 --- a/routing/http/client/client.go +++ b/routing/http/client/client.go @@ -12,10 +12,10 @@ import ( "github.com/benbjohnson/clock" "github.com/ipfs/go-cid" ipns "github.com/ipfs/go-ipns" - "github.com/ipfs/go-libipfs/routing/http/contentrouter" - "github.com/ipfs/go-libipfs/routing/http/internal/drjson" - "github.com/ipfs/go-libipfs/routing/http/server" - "github.com/ipfs/go-libipfs/routing/http/types" + "github.com/ipfs/boxo/routing/http/contentrouter" + "github.com/ipfs/boxo/routing/http/internal/drjson" + "github.com/ipfs/boxo/routing/http/server" + "github.com/ipfs/boxo/routing/http/types" logging "github.com/ipfs/go-log/v2" record "github.com/libp2p/go-libp2p-record" "github.com/libp2p/go-libp2p/core/crypto" diff --git a/routing/http/client/client_test.go b/routing/http/client/client_test.go index 82e9e3b51..18c4a29c6 100644 --- a/routing/http/client/client_test.go +++ b/routing/http/client/client_test.go @@ -11,8 +11,8 @@ import ( "github.com/benbjohnson/clock" "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/routing/http/server" - "github.com/ipfs/go-libipfs/routing/http/types" + "github.com/ipfs/boxo/routing/http/server" + "github.com/ipfs/boxo/routing/http/types" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multiaddr" diff --git a/routing/http/client/transport_test.go b/routing/http/client/transport_test.go index 3db46a99f..7da545062 100644 --- a/routing/http/client/transport_test.go +++ b/routing/http/client/transport_test.go @@ -78,7 +78,7 @@ func TestResponseBodyLimitedTransport(t *testing.T) { func TestUserAgentVersionString(t *testing.T) { // forks will have to update below lines to pass test - assert.Equal(t, importPath(), "github.com/ipfs/go-libipfs") + assert.Equal(t, importPath(), "github.com/ipfs/boxo") // @unknown because we run in tests - assert.Equal(t, moduleVersion(), "github.com/ipfs/go-libipfs@unknown") + assert.Equal(t, moduleVersion(), "github.com/ipfs/boxo@unknown") } diff --git a/routing/http/contentrouter/contentrouter.go b/routing/http/contentrouter/contentrouter.go index c4c196f04..4cbc435a9 100644 --- a/routing/http/contentrouter/contentrouter.go +++ b/routing/http/contentrouter/contentrouter.go @@ -6,8 +6,8 @@ import ( "time" "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/routing/http/internal" - "github.com/ipfs/go-libipfs/routing/http/types" + "github.com/ipfs/boxo/routing/http/internal" + "github.com/ipfs/boxo/routing/http/types" logging "github.com/ipfs/go-log/v2" "github.com/libp2p/go-libp2p/core/peer" "github.com/libp2p/go-libp2p/core/routing" diff --git a/routing/http/contentrouter/contentrouter_test.go b/routing/http/contentrouter/contentrouter_test.go index 18a22981c..31b5a8bd4 100644 --- a/routing/http/contentrouter/contentrouter_test.go +++ b/routing/http/contentrouter/contentrouter_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/routing/http/types" + "github.com/ipfs/boxo/routing/http/types" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multihash" "github.com/stretchr/testify/assert" diff --git a/routing/http/server/server.go b/routing/http/server/server.go index ed67423bd..2491ff782 100644 --- a/routing/http/server/server.go +++ b/routing/http/server/server.go @@ -12,8 +12,8 @@ import ( "github.com/gorilla/mux" "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/routing/http/internal/drjson" - "github.com/ipfs/go-libipfs/routing/http/types" + "github.com/ipfs/boxo/routing/http/internal/drjson" + "github.com/ipfs/boxo/routing/http/types" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multiaddr" diff --git a/routing/http/server/server_test.go b/routing/http/server/server_test.go index 02cf9a378..96c54bac6 100644 --- a/routing/http/server/server_test.go +++ b/routing/http/server/server_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/routing/http/types" + "github.com/ipfs/boxo/routing/http/types" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/routing/http/types/ipfs.go b/routing/http/types/ipfs.go index 0b13134ef..1f5faa16f 100644 --- a/routing/http/types/ipfs.go +++ b/routing/http/types/ipfs.go @@ -4,7 +4,7 @@ import ( "encoding/json" "github.com/ipfs/go-cid" - "github.com/ipfs/go-libipfs/routing/http/internal/drjson" + "github.com/ipfs/boxo/routing/http/internal/drjson" "github.com/multiformats/go-multiaddr" ) diff --git a/routing/http/types/provider_bitswap.go b/routing/http/types/provider_bitswap.go index 2648bdb6c..66243dd5d 100644 --- a/routing/http/types/provider_bitswap.go +++ b/routing/http/types/provider_bitswap.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" - "github.com/ipfs/go-libipfs/routing/http/internal/drjson" + "github.com/ipfs/boxo/routing/http/internal/drjson" "github.com/libp2p/go-libp2p/core/crypto" "github.com/libp2p/go-libp2p/core/peer" "github.com/multiformats/go-multibase" diff --git a/routing/http/types/provider_unknown.go b/routing/http/types/provider_unknown.go index c3fc3d3a1..3dadc0e9b 100644 --- a/routing/http/types/provider_unknown.go +++ b/routing/http/types/provider_unknown.go @@ -3,7 +3,7 @@ package types import ( "encoding/json" - "github.com/ipfs/go-libipfs/routing/http/internal/drjson" + "github.com/ipfs/boxo/routing/http/internal/drjson" ) var _ ReadProviderRecord = &UnknownProviderRecord{} diff --git a/routing/http/types/time.go b/routing/http/types/time.go index 6ef0f8889..1d938807e 100644 --- a/routing/http/types/time.go +++ b/routing/http/types/time.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - "github.com/ipfs/go-libipfs/routing/http/internal/drjson" + "github.com/ipfs/boxo/routing/http/internal/drjson" ) type Time struct{ time.Time }