Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade ipfs deps #141

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion accesscontroller/ipfs/accesscontroller_ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"berty.tech/go-orbit-db/accesscontroller"
"berty.tech/go-orbit-db/address"
"berty.tech/go-orbit-db/iface"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
cbornode "github.com/ipfs/go-ipld-cbor"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/polydawn/refmt/obj/atlas"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion accesscontroller/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"

"berty.tech/go-ipfs-log/io"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
cbornode "github.com/ipfs/go-ipld-cbor"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/polydawn/refmt/obj/atlas"
"go.uber.org/zap"
)
Expand Down
2 changes: 1 addition & 1 deletion baseorbitdb/orbitdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"berty.tech/go-orbit-db/pubsub"
"berty.tech/go-orbit-db/pubsub/oneonone"
"berty.tech/go-orbit-db/utils"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
datastore "github.com/ipfs/go-datastore"
leveldb "github.com/ipfs/go-ds-leveldb"
cbornode "github.com/ipfs/go-ipld-cbor"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/libp2p/go-libp2p/core/event"
peer "github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/p2p/host/eventbus"
Expand Down
205 changes: 106 additions & 99 deletions go.mod

Large diffs are not rendered by default.

1,092 changes: 265 additions & 827 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion iface/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"berty.tech/go-orbit-db/events"
"berty.tech/go-orbit-db/stores/operation"
"berty.tech/go-orbit-db/stores/replicator"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
datastore "github.com/ipfs/go-datastore"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/libp2p/go-libp2p/core/event"
peer "github.com/libp2p/go-libp2p/core/peer"
"go.opentelemetry.io/otel/trace"
Expand Down
2 changes: 1 addition & 1 deletion orbitdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

coreapi "github.com/ipfs/interface-go-ipfs-core"
coreapi "github.com/ipfs/boxo/coreiface"

"berty.tech/go-orbit-db/accesscontroller/ipfs"
"berty.tech/go-orbit-db/accesscontroller/orbitdb"
Expand Down
4 changes: 2 additions & 2 deletions pubsub/oneonone/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"sync"
"time"

coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
coreapi "github.com/ipfs/boxo/coreiface"
"github.com/ipfs/boxo/coreiface/options"
peer "github.com/libp2p/go-libp2p/core/peer"
"go.uber.org/zap"

Expand Down
4 changes: 2 additions & 2 deletions pubsub/pubsubcoreapi/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sync"
"time"

coreapi "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
coreapi "github.com/ipfs/boxo/coreiface"
options "github.com/ipfs/boxo/coreiface/options"
"github.com/libp2p/go-libp2p/core/peer"
"go.opentelemetry.io/otel/trace"
"go.uber.org/zap"
Expand Down
11 changes: 8 additions & 3 deletions stores/basestore/base_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"berty.tech/go-orbit-db/stores"
"berty.tech/go-orbit-db/stores/operation"
"berty.tech/go-orbit-db/stores/replicator"
coreapi "github.com/ipfs/boxo/coreiface"
"github.com/ipfs/boxo/path"
cid "github.com/ipfs/go-cid"
datastore "github.com/ipfs/go-datastore"
files "github.com/ipfs/go-libipfs/files"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/path"
"github.com/libp2p/go-libp2p/core/event"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/libp2p/go-libp2p/p2p/host/eventbus"
Expand Down Expand Up @@ -719,7 +719,12 @@ func (b *BaseStore) LoadFromSnapshot(ctx context.Context) error {

b.Logger().Debug("loading snapshot from path", zap.String("snapshot", string(snapshot)))

resNode, err := b.IPFS().Unixfs().Get(ctx, path.New(string(snapshot)))
snapshotPath, err := path.NewPath(string(snapshot))
if err != nil {
return fmt.Errorf("unable to parse snapshot CID: %w", err)
}

resNode, err := b.IPFS().Unixfs().Get(ctx, snapshotPath)
if err != nil {
return fmt.Errorf("unable to get snapshot from ipfs: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions stores/basestore/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func SaveSnapshot(ctx context.Context, b iface.Store) (cid.Cid, error) {
return cid.Cid{}, fmt.Errorf("unable to save log data on store: %w", err)
}

err = b.Cache().Put(ctx, datastore.NewKey("snapshot"), []byte(snapshotPath.Cid().String()))
err = b.Cache().Put(ctx, datastore.NewKey("snapshot"), []byte(snapshotPath.String()))
if err != nil {
return cid.Cid{}, fmt.Errorf("unable to add snapshot data to cache: %w", err)
}
Expand All @@ -88,5 +88,5 @@ func SaveSnapshot(ctx context.Context, b iface.Store) (cid.Cid, error) {
return cid.Cid{}, fmt.Errorf("unable to add unfinished data to cache: %w", err)
}

return snapshotPath.Cid(), nil
return snapshotPath.RootCid(), nil
}
2 changes: 1 addition & 1 deletion stores/documentstore/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"berty.tech/go-orbit-db/stores/basestore"
"berty.tech/go-orbit-db/stores/operation"

coreapi "github.com/ipfs/interface-go-ipfs-core"
coreapi "github.com/ipfs/boxo/coreiface"
)

type orbitDBDocumentStore struct {
Expand Down
2 changes: 1 addition & 1 deletion stores/eventlogstore/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"berty.tech/go-orbit-db/iface"
"berty.tech/go-orbit-db/stores/basestore"
"berty.tech/go-orbit-db/stores/operation"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
coreapi "github.com/ipfs/interface-go-ipfs-core"
)

type orbitDBEventLogStore struct {
Expand Down
2 changes: 1 addition & 1 deletion stores/kvstore/keyvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"berty.tech/go-ipfs-log/identityprovider"
coreapi "github.com/ipfs/interface-go-ipfs-core"
coreapi "github.com/ipfs/boxo/coreiface"

"berty.tech/go-orbit-db/address"
"berty.tech/go-orbit-db/iface"
Expand Down
2 changes: 1 addition & 1 deletion stores/replicator/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
ipfslog "berty.tech/go-ipfs-log"
"berty.tech/go-ipfs-log/identityprovider"
"berty.tech/go-orbit-db/accesscontroller"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/libp2p/go-libp2p/core/event"
)

Expand Down
4 changes: 2 additions & 2 deletions tests/testing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/peer"

iface "github.com/ipfs/boxo/coreiface"
ds "github.com/ipfs/go-datastore"
dsync "github.com/ipfs/go-datastore/sync"
iface "github.com/ipfs/interface-go-ipfs-core"
cfg "github.com/ipfs/kubo/config"
ipfsCore "github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"
Expand All @@ -39,7 +39,7 @@ func testingRepo(ctx context.Context, t *testing.T) repo.Repo {
c.Pubsub.Enabled = cfg.True
c.Bootstrap = []string{}
c.Addresses.Swarm = []string{"/ip4/127.0.0.1/tcp/4001", "/ip4/127.0.0.1/udp/4001/quic"}
c.Identity.PeerID = pid.Pretty()
c.Identity.PeerID = pid.String()
c.Identity.PrivKey = base64.StdEncoding.EncodeToString(privkeyb)
c.Swarm.ResourceMgr.Enabled = cfg.False // we don't need ressources manager for test

Expand Down
2 changes: 1 addition & 1 deletion utils/create_db_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"path"

"berty.tech/go-ipfs-log/io"
coreapi "github.com/ipfs/boxo/coreiface"
cid "github.com/ipfs/go-cid"
cbornode "github.com/ipfs/go-ipld-cbor"
coreapi "github.com/ipfs/interface-go-ipfs-core"
"github.com/polydawn/refmt/obj/atlas"
)

Expand Down