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

feat(deps):upgrade libp2p and ipfs-log deps #4

Merged
merged 1 commit into from
Apr 23, 2024
Merged
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
4 changes: 2 additions & 2 deletions example/memory_kv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
iflog "github.com/IceFireDB/icefiredb-ipfs-log"
"github.com/IceFireDB/icefiredb-ipfs-log/stores/kv"
"github.com/abiosoft/ishell/v2"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core/peer"
ma "github.com/multiformats/go-multiaddr"
"github.com/pkg/errors"
"go.uber.org/zap"
Expand All @@ -22,7 +22,7 @@ func main() {
}

// Build host multiaddress
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/ipfs/%s", node.PeerHost.ID().Pretty()))
hostAddr, _ := ma.NewMultiaddr(fmt.Sprintf("/ipfs/%s", node.PeerHost.ID().String()))
for _, a := range node.PeerHost.Addrs() {
fmt.Println(a.Encapsulate(hostAddr).String())
}
Expand Down
305 changes: 149 additions & 156 deletions go.mod

Large diffs are not rendered by default.

1,734 changes: 400 additions & 1,334 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions identityprovider/icefiredb.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package identityprovider // import "berty.tech/go-ipfs-log/identityprovider"

import (
idp "berty.tech/go-ipfs-log/identityprovider"
"context"
"encoding/hex"

"github.com/libp2p/go-libp2p-core/crypto"
idp "berty.tech/go-ipfs-log/identityprovider"

"github.com/libp2p/go-libp2p/core/crypto"

"berty.tech/go-ipfs-log/errmsg"
"berty.tech/go-ipfs-log/keystore"
Expand Down
9 changes: 5 additions & 4 deletions ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@ import (
"context"
"crypto/sha256"
"fmt"
"os"
"path/filepath"

"github.com/ipfs/go-cid"
ifGoIpfsCore "github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
"github.com/ipfs/kubo/config"
"github.com/ipfs/kubo/core"
"github.com/ipfs/kubo/core/coreapi"
ifGoIpfsCore "github.com/ipfs/kubo/core/coreiface"
"github.com/ipfs/kubo/core/coreiface/options"
"github.com/ipfs/kubo/core/node/libp2p"
"github.com/ipfs/kubo/plugin/loader"
"github.com/ipfs/kubo/repo/fsrepo"
"github.com/mr-tron/base58"
"github.com/multiformats/go-multihash"
"github.com/pkg/errors"
"os"
"path/filepath"
)

func CreateNode(ctx context.Context, repoPath string) (*core.IpfsNode, ifGoIpfsCore.CoreAPI, error) {
Expand Down
19 changes: 10 additions & 9 deletions log.go
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
package icefiredb_ipfs_log

import (
"context"
"encoding/json"
"fmt"
"path"
"sync"
"time"

ipfslog "berty.tech/go-ipfs-log"
"berty.tech/go-ipfs-log/entry"
idp "berty.tech/go-ipfs-log/identityprovider"
ifacelog "berty.tech/go-ipfs-log/iface"
"berty.tech/go-ipfs-log/io"
"berty.tech/go-ipfs-log/keystore"
"context"
"encoding/json"
"fmt"
"github.com/IceFireDB/icefiredb-ipfs-log/cache"
"github.com/IceFireDB/icefiredb-ipfs-log/cache/cacheleveldown"
_ "github.com/IceFireDB/icefiredb-ipfs-log/identityprovider"
"github.com/IceFireDB/icefiredb-ipfs-log/pubsub"
"github.com/ipfs/go-cid"
"github.com/ipfs/go-datastore"
leveldb "github.com/ipfs/go-ds-leveldb"
iface "github.com/ipfs/interface-go-ipfs-core"
ipfscore "github.com/ipfs/kubo/core"
iface "github.com/ipfs/kubo/core/coreiface"
"github.com/libp2p/go-eventbus"
core "github.com/libp2p/go-libp2p-core"
"github.com/libp2p/go-libp2p-core/event"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p/core"
"github.com/libp2p/go-libp2p/core/peer"
"github.com/pkg/errors"
"go.uber.org/zap"
"path"
"sync"
"time"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions msg.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package icefiredb_ipfs_log

import (
"berty.tech/go-ipfs-log/entry"
"encoding/json"
core "github.com/libp2p/go-libp2p-core"

"berty.tech/go-ipfs-log/entry"
core "github.com/libp2p/go-libp2p/core"
)

type LocalWrite struct {
Expand Down
9 changes: 5 additions & 4 deletions pubsub/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package pubsub

import (
"context"
core "github.com/libp2p/go-libp2p-core"
"sync"
"time"

coreapi "github.com/ipfs/interface-go-ipfs-core"
options "github.com/ipfs/interface-go-ipfs-core/options"
"github.com/libp2p/go-libp2p-core/peer"
core "github.com/libp2p/go-libp2p/core"

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

Expand Down
3 changes: 2 additions & 1 deletion pubsub/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package pubsub

import (
"context"
core "github.com/libp2p/go-libp2p-core"

core "github.com/libp2p/go-libp2p/core"
)

// PubSubTopic is a pub sub subscription to a topic
Expand Down
Loading