diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c46f5371..49ac96690 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: - 'master' env: - GO_VERSION: 1.20.x + GO_VERSION: 1.21.x concurrency: group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }} @@ -36,13 +36,10 @@ jobs: run: shell: bash steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - - uses: actions/checkout@v3 - - uses: protocol/cache-go-action@v1 - with: - name: ${{ github.job }} + - uses: actions/checkout@v4 - run: make build - uses: actions/upload-artifact@v3 with: @@ -76,7 +73,7 @@ jobs: restore-keys: ${{ runner.os }}-${{ github.job }}-${{ matrix.repo-to-test-against }}- - run: sudo apt update - run: sudo apt install -y libxkbcommon0 libxdamage1 libgbm1 libpango-1.0-0 libcairo2 # dependencies for playwright - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: ipfs/${{ matrix.repo-to-test-against }} fetch-depth: 0 @@ -118,7 +115,7 @@ jobs: run: shell: bash steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} - uses: actions/download-artifact@v3 @@ -126,7 +123,7 @@ jobs: name: kubo path: cmd/ipfs - run: chmod +x cmd/ipfs/ipfs - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: ipfs/go-ipfs-api path: go-ipfs-api @@ -136,9 +133,6 @@ jobs: sleep 1 done timeout-minutes: 5 - - uses: protocol/cache-go-action@v1 - with: - name: ${{ github.job }} - run: go test -count=1 -v ./... working-directory: go-ipfs-api - run: cmd/ipfs/ipfs shutdown @@ -167,7 +161,7 @@ jobs: name: kubo path: cmd/ipfs - run: chmod +x cmd/ipfs/ipfs - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: ipfs/ipfs-webui path: ipfs-webui diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 04c695467..60bc3c409 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index bfbd57d9a..d05429a6c 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -26,9 +26,9 @@ jobs: run: shell: bash steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: 1.20.x - - uses: actions/checkout@v3 + go-version: 1.21.x + - uses: actions/checkout@v4 - run: docker build -t $IMAGE_NAME:$WIP_IMAGE_TAG . - run: docker run --rm $IMAGE_NAME:$WIP_IMAGE_TAG --version diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index a4fd6d6e3..c1e77112d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -37,7 +37,7 @@ jobs: LEGACY_IMAGE_NAME: ipfs/go-ipfs steps: - name: Check out the repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v2 diff --git a/.github/workflows/gateway-conformance.yml b/.github/workflows/gateway-conformance.yml index d91319585..f663cebd3 100644 --- a/.github/workflows/gateway-conformance.yml +++ b/.github/workflows/gateway-conformance.yml @@ -49,7 +49,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v4 with: - go-version: 1.20.x + go-version: 1.21.x - uses: protocol/cache-go-action@v1 with: name: ${{ github.job }} diff --git a/.github/workflows/gobuild.yml b/.github/workflows/gobuild.yml index a299e1115..13eabc0fc 100644 --- a/.github/workflows/gobuild.yml +++ b/.github/workflows/gobuild.yml @@ -28,13 +28,10 @@ jobs: run: shell: bash steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: 1.20.x - - uses: actions/checkout@v3 - - uses: protocol/cache-go-action@v1 - with: - name: ${{ github.job }} + go-version: 1.21.x + - uses: actions/checkout@v4 - run: make cmd/ipfs-try-build env: TEST_FUSE: 1 diff --git a/.github/workflows/golang-analysis.yml b/.github/workflows/golang-analysis.yml index 9e70e6b0f..eddaba988 100644 --- a/.github/workflows/golang-analysis.yml +++ b/.github/workflows/golang-analysis.yml @@ -22,14 +22,14 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v4 with: - go-version: "1.20.x" + go-version: "1.21.x" - name: Check that go.mod is tidy - uses: protocol/multiple-go-modules@v1.2 + uses: protocol/multiple-go-modules@v1.4 with: run: | go mod tidy @@ -49,6 +49,6 @@ jobs: fi - name: go vet if: always() # run this step even if the previous one failed - uses: protocol/multiple-go-modules@v1.2 + uses: protocol/multiple-go-modules@v1.4 with: run: go vet ./... diff --git a/.github/workflows/golint.yml b/.github/workflows/golint.yml index 28a13b87a..d6191e6f3 100644 --- a/.github/workflows/golint.yml +++ b/.github/workflows/golint.yml @@ -29,11 +29,8 @@ jobs: run: shell: bash steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: - go-version: 1.20.x - - uses: actions/checkout@v3 - - uses: protocol/cache-go-action@v1 - with: - name: ${{ github.job }} + go-version: 1.21.x + - uses: actions/checkout@v4 - run: make -O test_go_lint diff --git a/.github/workflows/gotest.yml b/.github/workflows/gotest.yml index 1ca6f4619..a1042cf7a 100644 --- a/.github/workflows/gotest.yml +++ b/.github/workflows/gotest.yml @@ -30,17 +30,13 @@ jobs: shell: bash steps: - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.20.x + go-version: 1.21.x - name: Check out Kubo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install missing tools run: sudo apt update && sudo apt install -y zsh - - name: Restore Go cache - uses: protocol/cache-go-action@v1 - with: - name: ${{ github.job }} - name: 👉️ If this step failed, go to «Summary» (top left) → inspect the «Failures/Errors» table env: # increasing parallelism beyond 2 doesn't speed up the tests much diff --git a/.github/workflows/sharness.yml b/.github/workflows/sharness.yml index 8bed22793..448e112de 100644 --- a/.github/workflows/sharness.yml +++ b/.github/workflows/sharness.yml @@ -23,19 +23,15 @@ jobs: shell: bash steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.20.x + go-version: 1.21.x - name: Checkout Kubo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: kubo - name: Install missing tools run: sudo apt update && sudo apt install -y socat net-tools fish libxml2-utils - - name: Restore Go Cache - uses: protocol/cache-go-action@v1 - with: - name: ${{ github.job }} - uses: actions/cache@v3 with: path: test/sharness/lib/dependencies diff --git a/.github/workflows/sync-release-assets.yml b/.github/workflows/sync-release-assets.yml index 2ade3cbcc..bc7eaed8d 100644 --- a/.github/workflows/sync-release-assets.yml +++ b/.github/workflows/sync-release-assets.yml @@ -22,7 +22,7 @@ jobs: - uses: ipfs/start-ipfs-daemon-action@v1 with: args: --init --init-profile=flatfs,server --enable-gc=false - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: node-version: 14 - name: Sync the latest 5 github releases diff --git a/Dockerfile b/Dockerfile index 348fbc440..15dff4aea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20 AS builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21 AS builder ARG TARGETOS TARGETARCH diff --git a/client/rpc/dht.go b/client/rpc/dht.go index 1d3b24643..ffdf39681 100644 --- a/client/rpc/dht.go +++ b/client/rpc/dht.go @@ -17,7 +17,7 @@ func (api *DhtAPI) FindPeer(ctx context.Context, p peer.ID) (peer.AddrInfo, erro Type routing.QueryEventType Responses []peer.AddrInfo } - resp, err := api.core().Request("dht/findpeer", p.Pretty()).Send(ctx) + resp, err := api.core().Request("dht/findpeer", p.String()).Send(ctx) if err != nil { return peer.AddrInfo{}, err } diff --git a/client/rpc/swarm.go b/client/rpc/swarm.go index 49ece0d07..7d257a2d1 100644 --- a/client/rpc/swarm.go +++ b/client/rpc/swarm.go @@ -14,7 +14,7 @@ import ( type SwarmAPI HttpApi func (api *SwarmAPI) Connect(ctx context.Context, pi peer.AddrInfo) error { - pidma, err := multiaddr.NewComponent("p2p", pi.ID.Pretty()) + pidma, err := multiaddr.NewComponent("p2p", pi.ID.String()) if err != nil { return err } diff --git a/config/init.go b/config/init.go index 1ccfc7251..f40d373bb 100644 --- a/config/init.go +++ b/config/init.go @@ -237,7 +237,7 @@ func CreateIdentity(out io.Writer, opts []options.KeyGenerateOption) (Identity, if err != nil { return ident, err } - ident.PeerID = id.Pretty() + ident.PeerID = id.String() fmt.Fprintf(out, "peer identity: %s\n", ident.PeerID) return ident, nil } diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 649142fd0..07851eb31 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -234,10 +234,10 @@ Specification of CAR formats: https://ipld.io/specs/transport/car/ if event.Root.PinErrorMsg != "" { return fmt.Errorf("pinning root %q FAILED: %s", enc.Encode(event.Root.Cid), event.Root.PinErrorMsg) - } else { - event.Root.PinErrorMsg = "success" } + event.Root.PinErrorMsg = "success" + _, err = fmt.Fprintf( w, "Pinned root\t%s\t%s\n", diff --git a/core/commands/dht_test.go b/core/commands/dht_test.go index d6a87c954..b0e03f5cd 100644 --- a/core/commands/dht_test.go +++ b/core/commands/dht_test.go @@ -14,12 +14,12 @@ func TestKeyTranslation(t *testing.T) { pkname := namesys.PkKeyForID(pid) ipnsname := ipns.NameFromPeer(pid).RoutingKey() - pkk, err := escapeDhtKey("/pk/" + pid.Pretty()) + pkk, err := escapeDhtKey("/pk/" + pid.String()) if err != nil { t.Fatal(err) } - ipnsk, err := escapeDhtKey("/ipns/" + pid.Pretty()) + ipnsk, err := escapeDhtKey("/ipns/" + pid.String()) if err != nil { t.Fatal(err) } diff --git a/core/commands/name/ipns.go b/core/commands/name/ipns.go index 8c2b755d5..b5c7fd7e3 100644 --- a/core/commands/name/ipns.go +++ b/core/commands/name/ipns.go @@ -93,7 +93,7 @@ Resolve the value of a dnslink: if err != nil { return err } - name = self.ID().Pretty() + name = self.ID().String() } else { name = req.Arguments[0] } diff --git a/core/commands/ping.go b/core/commands/ping.go index 26e2e3d12..dabc1a248 100644 --- a/core/commands/ping.go +++ b/core/commands/ping.go @@ -79,7 +79,7 @@ trip latency information. if len(n.Peerstore.Addrs(pid)) == 0 { // Make sure we can find the node in question if err := res.Emit(&PingResult{ - Text: fmt.Sprintf("Looking up peer %s", pid.Pretty()), + Text: fmt.Sprintf("Looking up peer %s", pid), Success: true, }); err != nil { return err @@ -95,7 +95,7 @@ trip latency information. } if err := res.Emit(&PingResult{ - Text: fmt.Sprintf("PING %s.", pid.Pretty()), + Text: fmt.Sprintf("PING %s.", pid), Success: true, }); err != nil { return err diff --git a/core/commands/pubsub.go b/core/commands/pubsub.go index aadc681d9..1c2e82799 100644 --- a/core/commands/pubsub.go +++ b/core/commands/pubsub.go @@ -110,7 +110,7 @@ TOPIC AND DATA ENCODING encoder, _ := mbase.EncoderByName("base64url") psm := pubsubMessage{ Data: encoder.Encode(msg.Data()), - From: msg.From().Pretty(), + From: msg.From().String(), Seqno: encoder.Encode(msg.Seq()), } for _, topic := range msg.Topics() { @@ -323,7 +323,7 @@ TOPIC AND DATA ENCODING list := &stringList{make([]string, 0, len(peers))} for _, peer := range peers { - list.Strings = append(list.Strings, peer.Pretty()) + list.Strings = append(list.Strings, peer.String()) } sort.Strings(list.Strings) return cmds.EmitOnce(res, list) diff --git a/core/commands/routing.go b/core/commands/routing.go index e2071fd40..c0955456a 100644 --- a/core/commands/routing.go +++ b/core/commands/routing.go @@ -114,7 +114,7 @@ var findProvidersRoutingCmd = &cmds.Command{ if verbose { fmt.Fprintf(out, "provider: ") } - fmt.Fprintf(out, "%s\n", prov.ID.Pretty()) + fmt.Fprintf(out, "%s\n", prov.ID) if verbose { for _, a := range prov.Addrs { fmt.Fprintf(out, "\t%s\n", a) @@ -479,7 +479,7 @@ identified by QmFoo. return nil }, routing.Value: func(obj *routing.QueryEvent, out io.Writer, verbose bool) error { - fmt.Fprintf(out, "%s\n", obj.ID.Pretty()) + fmt.Fprintf(out, "%s\n", obj.ID) return nil }, } diff --git a/core/commands/swarm.go b/core/commands/swarm.go index fc4d8f7d2..4fe535ffc 100644 --- a/core/commands/swarm.go +++ b/core/commands/swarm.go @@ -262,7 +262,7 @@ var swarmPeersCmd = &cmds.Command{ for _, c := range conns { ci := connInfo{ Addr: c.Address().String(), - Peer: c.ID().Pretty(), + Peer: c.ID().String(), } if verbose || direction { @@ -536,7 +536,7 @@ var swarmAddrsCmd = &cmds.Command{ out := make(map[string][]string) for p, paddrs := range addrs { - s := p.Pretty() + s := p.String() for _, a := range paddrs { out[s] = append(out[s], a.String()) } @@ -599,7 +599,7 @@ var swarmAddrsLocalCmd = &cmds.Command{ for _, addr := range maddrs { saddr := addr.String() if showid { - saddr = path.Join(saddr, p2pProtocolName, self.ID().Pretty()) + saddr = path.Join(saddr, p2pProtocolName, self.ID().String()) } addrs = append(addrs, saddr) } @@ -680,7 +680,7 @@ ipfs swarm connect /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N output := make([]string, len(pis)) for i, pi := range pis { - output[i] = "connect " + pi.ID.Pretty() + output[i] = "connect " + pi.ID.String() err := api.Swarm().Connect(req.Context, pi) if err != nil { @@ -745,7 +745,7 @@ it will reconnect. // a good backwards compat solution. Right now, I'm just // preserving the current behavior. for _, addr := range maddrs { - msg := "disconnect " + ainfo.ID.Pretty() + msg := "disconnect " + ainfo.ID.String() if err := api.Swarm().Disconnect(req.Context, addr); err != nil { msg += " failure: " + err.Error() } else { diff --git a/core/coreapi/test/api_test.go b/core/coreapi/test/api_test.go index fa09a96d8..3ae74b97e 100644 --- a/core/coreapi/test/api_test.go +++ b/core/coreapi/test/api_test.go @@ -56,7 +56,7 @@ func (NodeProvider) MakeAPISwarm(t *testing.T, ctx context.Context, fullIdentity } ident = config.Identity{ - PeerID: id.Pretty(), + PeerID: id.String(), PrivKey: base64.StdEncoding.EncodeToString(kbytes), } } else { diff --git a/core/corehttp/option_test.go b/core/corehttp/option_test.go index b401be9d5..be4f3afaa 100644 --- a/core/corehttp/option_test.go +++ b/core/corehttp/option_test.go @@ -51,10 +51,9 @@ func TestCheckVersionOption(t *testing.T) { called = true if !tc.shouldHandle { t.Error("handler was called even though version didn't match") - } else { - if _, err := io.WriteString(w, "check!"); err != nil { - t.Error(err) - } + } + if _, err := io.WriteString(w, "check!"); err != nil { + t.Error(err) } }) diff --git a/core/corehttp/routing.go b/core/corehttp/routing.go index 357122a45..e648afb4e 100644 --- a/core/corehttp/routing.go +++ b/core/corehttp/routing.go @@ -100,10 +100,9 @@ func (it *peerChanIter) Next() bool { if ok { it.next = &addr return true - } else { - it.next = nil - return false } + it.next = nil + return false } func (it *peerChanIter) Val() types.Record { diff --git a/core/corehttp/webui.go b/core/corehttp/webui.go index 4030a0053..e54d31afd 100644 --- a/core/corehttp/webui.go +++ b/core/corehttp/webui.go @@ -1,11 +1,12 @@ package corehttp // TODO: move to IPNS -const WebUIPath = "/ipfs/bafybeicyp7ssbnj3hdzehcibmapmpuc3atrsc4ch3q6acldfh4ojjdbcxe" // v4.0.2 +const WebUIPath = "/ipfs/bafybeieqdeoqkf7xf4aozd524qncgiloh33qgr25lyzrkusbcre4c3fxay" // v4.1.0 // WebUIPaths is a list of all past webUI paths. var WebUIPaths = []string{ WebUIPath, + "/ipfs/bafybeicyp7ssbnj3hdzehcibmapmpuc3atrsc4ch3q6acldfh4ojjdbcxe", "/ipfs/bafybeigs6d53gpgu34553mbi5bbkb26e4ikruoaaar75jpfdywpup2r3my", "/ipfs/bafybeic4gops3d3lyrisqku37uio33nvt6fqxvkxihrwlqsuvf76yln4fm", "/ipfs/bafybeifeqt7mvxaniphyu2i3qhovjaf3sayooxbh5enfdqtiehxjv2ldte", diff --git a/core/node/builder.go b/core/node/builder.go index 9c4951801..57fa20945 100644 --- a/core/node/builder.go +++ b/core/node/builder.go @@ -141,7 +141,7 @@ func defaultRepo(dstore repo.Datastore) (repo.Repo, error) { c.Bootstrap = cfg.DefaultBootstrapAddresses c.Addresses.Swarm = []string{"/ip4/0.0.0.0/tcp/4001", "/ip4/0.0.0.0/udp/4001/quic-v1"} - c.Identity.PeerID = pid.Pretty() + c.Identity.PeerID = pid.String() c.Identity.PrivKey = base64.StdEncoding.EncodeToString(privkeyb) return &repo.Mock{ diff --git a/core/node/libp2p/hostopt.go b/core/node/libp2p/hostopt.go index 74d6e5723..1dc671487 100644 --- a/core/node/libp2p/hostopt.go +++ b/core/node/libp2p/hostopt.go @@ -17,7 +17,7 @@ var DefaultHostOption HostOption = constructPeerHost func constructPeerHost(id peer.ID, ps peerstore.Peerstore, options ...libp2p.Option) (host.Host, error) { pkey := ps.PrivKey(id) if pkey == nil { - return nil, fmt.Errorf("missing private key for node ID: %s", id.Pretty()) + return nil, fmt.Errorf("missing private key for node ID: %s", id) } options = append([]libp2p.Option{libp2p.Identity(pkey), libp2p.Peerstore(ps)}, options...) return libp2p.New(options...) diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index 47a823d5d..f545126c4 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -360,7 +360,7 @@ func LimitConfigsToInfo(stats LimitsConfigAndUsage) ResourceInfos { for i, p := range stats.Peers { result = append(result, resourceLimitsAndUsageToResourceInfo( - config.ResourceMgrPeerScopePrefix+i.Pretty(), + config.ResourceMgrPeerScopePrefix+i.String(), p, )...) } diff --git a/core/node/libp2p/smux.go b/core/node/libp2p/smux.go index d96dacf0a..0966dfaf2 100644 --- a/core/node/libp2p/smux.go +++ b/core/node/libp2p/smux.go @@ -38,17 +38,16 @@ func makeSmuxTransportOption(tptConfig config.Transports) (libp2p.Option, error) } } return libp2p.ChainOptions(opts...), nil - } else { - return prioritizeOptions([]priorityOption{{ - priority: tptConfig.Multiplexers.Yamux, - defaultPriority: 100, - opt: libp2p.Muxer(yamux.ID, yamux.DefaultTransport), - }, { - priority: tptConfig.Multiplexers.Mplex, - defaultPriority: config.Disabled, - opt: libp2p.Muxer(mplex.ID, mplex.DefaultTransport), - }}), nil } + return prioritizeOptions([]priorityOption{{ + priority: tptConfig.Multiplexers.Yamux, + defaultPriority: 100, + opt: libp2p.Muxer(yamux.ID, yamux.DefaultTransport), + }, { + priority: tptConfig.Multiplexers.Mplex, + defaultPriority: config.Disabled, + opt: libp2p.Muxer(mplex.ID, mplex.DefaultTransport), + }}), nil } func SmuxTransport(tptConfig config.Transports) func() (opts Libp2pOpts, err error) { diff --git a/docs/changelogs/v0.22.md b/docs/changelogs/v0.22.md index db51a1b00..3aa55f30e 100644 --- a/docs/changelogs/v0.22.md +++ b/docs/changelogs/v0.22.md @@ -46,7 +46,8 @@ by passing `--v1compat=false`. By default, we still create V1+V2 records, such that there is the highest chance of backwards compatibility. The goal is to move to V2 only in the future. -**TODO**: add links to IPIP https://github.com/ipfs/specs/issues/376 +For more details, see [IPIP-428](https://specs.ipfs.tech/ipips/ipip-0428/) +and the updated [IPNS Record Verification](https://specs.ipfs.tech/ipns/ipns-record/#record-verification) logic. #### IPNS name resolution has been fixed diff --git a/docs/examples/kubo-as-a-library/go.mod b/docs/examples/kubo-as-a-library/go.mod index ea374715a..e6c84006e 100644 --- a/docs/examples/kubo-as-a-library/go.mod +++ b/docs/examples/kubo-as-a-library/go.mod @@ -7,7 +7,7 @@ go 1.20 replace github.com/ipfs/kubo => ./../../.. require ( - github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd + github.com/ipfs/boxo v0.13.0 github.com/ipfs/kubo v0.0.0-00010101000000-000000000000 github.com/libp2p/go-libp2p v0.31.0 github.com/multiformats/go-multiaddr v0.11.0 diff --git a/docs/examples/kubo-as-a-library/go.sum b/docs/examples/kubo-as-a-library/go.sum index d401c6fae..cf646229e 100644 --- a/docs/examples/kubo-as-a-library/go.sum +++ b/docs/examples/kubo-as-a-library/go.sum @@ -300,8 +300,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd h1:uAp9W7FRQ7W16FENlURZqBh7/3PnakG0DjHpKPirKVY= -github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= +github.com/ipfs/boxo v0.13.0 h1:uzCQekieYS4PysbYYdodNmKLuqOdLjlUziXVZ19oDeQ= +github.com/ipfs/boxo v0.13.0/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.0.2/go.mod h1:AWR46JfpcObNfg3ok2JHDUfdiHRgWhJgCQF+KIgOPJY= diff --git a/fuse/ipns/ipns_test.go b/fuse/ipns/ipns_test.go index ca2ec4c1a..d26e78c4d 100644 --- a/fuse/ipns/ipns_test.go +++ b/fuse/ipns/ipns_test.go @@ -151,7 +151,7 @@ func TestIpnsLocalLink(t *testing.T) { t.Fatal(err) } - if linksto != nd.Identity.Pretty() { + if linksto != nd.Identity.String() { t.Fatal("Link invalid") } } @@ -176,7 +176,7 @@ func TestIpnsBasicIO(t *testing.T) { t.Fatal("Incorrect Read!") } - fname2 := mnt.Dir + "/" + nd.Identity.Pretty() + "/testfile" + fname2 := mnt.Dir + "/" + nd.Identity.String() + "/testfile" rbuf, err = os.ReadFile(fname2) if err != nil { t.Fatal(err) diff --git a/fuse/ipns/ipns_unix.go b/fuse/ipns/ipns_unix.go index b66634015..2cb25d332 100644 --- a/fuse/ipns/ipns_unix.go +++ b/fuse/ipns/ipns_unix.go @@ -220,7 +220,7 @@ func (r *Root) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) { listing := make([]fuse.Dirent, 0, len(r.Keys)*2) for alias, k := range r.Keys { ent := fuse.Dirent{ - Name: k.ID().Pretty(), + Name: k.ID().String(), Type: fuse.DT_Dir, } link := fuse.Dirent{ diff --git a/fuse/node/mount_darwin.go b/fuse/node/mount_darwin.go index bd0bbb3ae..4d2446ecd 100644 --- a/fuse/node/mount_darwin.go +++ b/fuse/node/mount_darwin.go @@ -141,9 +141,8 @@ func darwinFuseCheckVersion(node *core.IpfsNode) error { return err } else if skip { return nil // user told us not to check version... ok.... - } else { - return errGFV } + return errGFV } log.Debug("mount: osxfuse version:", ov) diff --git a/fuse/readonly/readonly_unix.go b/fuse/readonly/readonly_unix.go index 3ecda1cf3..e944f1b6e 100644 --- a/fuse/readonly/readonly_unix.go +++ b/fuse/readonly/readonly_unix.go @@ -284,7 +284,7 @@ func (s *Node) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadR return nil // may be non-nil / not succeeded } -// to check that out Node implements all the interfaces we want. +// to check that our Node implements all the interfaces we want. type roRoot interface { fs.Node fs.HandleReadDirAller diff --git a/go.mod b/go.mod index 4150653e2..ff7cbba6d 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/fsnotify/fsnotify v1.6.0 github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 - github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd + github.com/ipfs/boxo v0.13.0 github.com/ipfs/go-block-format v0.1.2 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-cidutil v0.1.0 diff --git a/go.sum b/go.sum index b116f9894..5193ebfe9 100644 --- a/go.sum +++ b/go.sum @@ -335,8 +335,8 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1: github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd h1:uAp9W7FRQ7W16FENlURZqBh7/3PnakG0DjHpKPirKVY= -github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= +github.com/ipfs/boxo v0.13.0 h1:uzCQekieYS4PysbYYdodNmKLuqOdLjlUziXVZ19oDeQ= +github.com/ipfs/boxo v0.13.0/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ= diff --git a/p2p/local.go b/p2p/local.go index 6ef110c39..98028c5d4 100644 --- a/p2p/local.go +++ b/p2p/local.go @@ -76,7 +76,7 @@ func (l *localListener) setupStream(local manet.Conn) { remote, err := l.dial(l.ctx) if err != nil { local.Close() - log.Warnf("failed to dial to remote %s/%s", l.peer.Pretty(), l.proto) + log.Warnf("failed to dial to remote %s/%s", l.peer, l.proto) return } @@ -109,7 +109,7 @@ func (l *localListener) ListenAddress() ma.Multiaddr { } func (l *localListener) TargetAddress() ma.Multiaddr { - addr, err := ma.NewMultiaddr(maPrefix + l.peer.Pretty()) + addr, err := ma.NewMultiaddr(maPrefix + l.peer.String()) if err != nil { panic(err) } diff --git a/p2p/remote.go b/p2p/remote.go index a90155a21..b867cb313 100644 --- a/p2p/remote.go +++ b/p2p/remote.go @@ -55,13 +55,13 @@ func (l *remoteListener) handleStream(remote net.Stream) { peer := remote.Conn().RemotePeer() if l.reportRemote { - if _, err := fmt.Fprintf(local, "%s\n", peer.Pretty()); err != nil { + if _, err := fmt.Fprintf(local, "%s\n", peer); err != nil { _ = remote.Reset() return } } - peerMa, err := ma.NewMultiaddr(maPrefix + peer.Pretty()) + peerMa, err := ma.NewMultiaddr(maPrefix + peer.String()) if err != nil { _ = remote.Reset() return @@ -88,7 +88,7 @@ func (l *remoteListener) Protocol() protocol.ID { } func (l *remoteListener) ListenAddress() ma.Multiaddr { - addr, err := ma.NewMultiaddr(maPrefix + l.p2p.identity.Pretty()) + addr, err := ma.NewMultiaddr(maPrefix + l.p2p.identity.String()) if err != nil { panic(err) } diff --git a/plugin/plugins/peerlog/peerlog.go b/plugin/plugins/peerlog/peerlog.go index f41a8b654..d55a7f0b9 100644 --- a/plugin/plugins/peerlog/peerlog.go +++ b/plugin/plugins/peerlog/peerlog.go @@ -148,7 +148,7 @@ func (pl *peerLogPlugin) collectEvents(node *core.IpfsNode) { case e = <-pl.events: } - peerID := zap.String("peer", e.peer.Pretty()) + peerID := zap.String("peer", e.peer.String()) switch e.kind { case eventConnect: diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index 13e7e4150..591d25aee 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -37,7 +37,7 @@ const LockFile = "repo.lock" var log = logging.Logger("fsrepo") // RepoVersion is the version number that we are currently expecting to see. -var RepoVersion = 14 +var RepoVersion = 15 var migrationInstructions = `See https://github.com/ipfs/fs-repo-migrations/blob/master/run.md Sorry for the inconvenience. In the future, these will run automatically.` diff --git a/repo/fsrepo/migrations/fetcher.go b/repo/fsrepo/migrations/fetcher.go index dc6d3c642..880492b92 100644 --- a/repo/fsrepo/migrations/fetcher.go +++ b/repo/fsrepo/migrations/fetcher.go @@ -11,7 +11,7 @@ import ( const ( // Current distribution to fetch migrations from. - CurrentIpfsDist = "/ipfs/QmYerugGRCZWA8yQMKDsd9daEVXUR3C5nuw3VXuX1mggHa" // fs-repo-13-to-14 v1.0.0 + CurrentIpfsDist = "/ipfs/QmZPedUiZNe6Gq9oDvoizuuCMVoeb7shwq9xKhysq7exMo" // fs-repo-14-to-15 v1.0.1 // Latest distribution path. Default for fetchers. LatestIpfsDist = "/ipns/dist.ipfs.tech" diff --git a/test/dependencies/go.mod b/test/dependencies/go.mod index 64a0f9bff..064cdbfb9 100644 --- a/test/dependencies/go.mod +++ b/test/dependencies/go.mod @@ -7,7 +7,7 @@ replace github.com/ipfs/kubo => ../../ require ( github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd github.com/golangci/golangci-lint v1.54.1 - github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd + github.com/ipfs/boxo v0.13.0 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-cidutil v0.1.0 github.com/ipfs/go-datastore v0.6.0 diff --git a/test/dependencies/go.sum b/test/dependencies/go.sum index 89ae1027e..fb6929682 100644 --- a/test/dependencies/go.sum +++ b/test/dependencies/go.sum @@ -396,8 +396,8 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd h1:uAp9W7FRQ7W16FENlURZqBh7/3PnakG0DjHpKPirKVY= -github.com/ipfs/boxo v0.12.1-0.20230825151903-13569468babd/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= +github.com/ipfs/boxo v0.13.0 h1:uzCQekieYS4PysbYYdodNmKLuqOdLjlUziXVZ19oDeQ= +github.com/ipfs/boxo v0.13.0/go.mod h1:btrtHy0lmO1ODMECbbEY1pxNtrLilvKSYLoGQt1yYCk= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-block-format v0.1.2 h1:GAjkfhVx1f4YTODS6Esrj1wt2HhrtwTnhEr+DyPUaJo=