chore: update to go1.21 for gateway over libp2p

This commit is contained in:
Jorropo 2023-09-20 10:47:03 +02:00
commit 3f33e61d3a
46 changed files with 95 additions and 117 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 }}

View File

@ -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

View File

@ -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 ./...

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
}

View File

@ -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
}

View File

@ -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
}

View File

@ -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",

View File

@ -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)
}

View File

@ -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]
}

View File

@ -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

View File

@ -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)

View File

@ -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
},
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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)
}
})

View File

@ -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 {

View File

@ -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",

View File

@ -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{

View File

@ -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...)

View File

@ -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,
)...)
}

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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=

View File

@ -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)

View File

@ -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{

View File

@ -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)

View File

@ -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

2
go.mod
View File

@ -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

4
go.sum
View File

@ -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=

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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:

View File

@ -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.`

View File

@ -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"

View File

@ -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

View File

@ -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=