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

Migrate some packages to hive and update the imports #2593

Merged
merged 1 commit into from
Mar 1, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/evilspammer/spammer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
"github.com/iotaledger/hive.go/app/configuration"
appLogger "github.com/iotaledger/hive.go/app/logger"
"github.com/iotaledger/hive.go/core/logger"
"github.com/iotaledger/hive.go/ds/types"
"github.com/iotaledger/hive.go/logger"
)

// region Spammer //////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion client/evilwallet/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/iotaledger/goshimmer/packages/protocol/ledger/utxo"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
"github.com/iotaledger/goshimmer/packages/protocol/models"
"github.com/iotaledger/hive.go/core/identity"
"github.com/iotaledger/hive.go/crypto/identity"
)

type ServersStatus []*wallet.ServerStatus
Expand Down
2 changes: 1 addition & 1 deletion client/evilwallet/evilwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/iotaledger/goshimmer/client/wallet/packages/address"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/utxo"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
"github.com/iotaledger/hive.go/core/identity"
"github.com/iotaledger/hive.go/crypto/identity"
"github.com/iotaledger/hive.go/ds/types"
)

Expand Down
2 changes: 1 addition & 1 deletion client/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/iotaledger/goshimmer/packages/app/jsonmodels"
"github.com/iotaledger/goshimmer/packages/core/pow"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
"github.com/iotaledger/hive.go/core/identity"
"github.com/iotaledger/hive.go/crypto/identity"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/manualpeering.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/iotaledger/goshimmer/packages/app/jsonmodels"
"github.com/iotaledger/goshimmer/packages/network/manualpeering"
"github.com/iotaledger/hive.go/core/crypto/ed25519"
"github.com/iotaledger/hive.go/crypto/ed25519"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion client/wallet/packages/seed/seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package seed
import (
"github.com/iotaledger/goshimmer/client/wallet/packages/address"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
"github.com/iotaledger/hive.go/core/crypto/ed25519"
"github.com/iotaledger/hive.go/crypto/ed25519"
)

// Seed represents a seed for IOTA wallets. A seed allows us to generate a deterministic sequence of Addresses and their
Expand Down
2 changes: 1 addition & 1 deletion client/wallet/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/iotaledger/goshimmer/client/wallet/packages/withdrawfromnftoptions"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/utxo"
"github.com/iotaledger/goshimmer/packages/protocol/ledger/vm/devnetvm"
"github.com/iotaledger/hive.go/core/identity"
"github.com/iotaledger/hive.go/crypto/identity"
"github.com/iotaledger/hive.go/ds/bitmask"
"github.com/iotaledger/hive.go/lo"
"github.com/iotaledger/hive.go/serializer/v2/marshalutil"
Expand Down
2 changes: 1 addition & 1 deletion documentation/docs/apis/manual_peering.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ curl --location --request DELETE 'http://localhost:8080/manualpeering/peers' \
#### `RemoveManualPeers`

```go
import "github.com/iotaledger/hive.go/core/crypto/ed25519"
import "github.com/iotaledger/hive.go/crypto/ed25519"
import "github.com/iotaledger/goshimmer/packages/manualpeering"

publicKeysToRemove := []ed25519.PublicKey{publicKey1, publicKey2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The above explanation also allows a better understanding of why all handlers mus
2. Next, a new event object needs to be created. We pass the handler caller as an argument, which is saved inside the object to be called when the event is triggered.

```go
import "github.com/iotaledger/hive.go/core/events"
import "github.com/iotaledger/hive.go/runtime/events"

ThisEvent := events.NewEvent(singleArgCaller)
```
Expand Down
24 changes: 6 additions & 18 deletions get_hive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,15 @@

COMMIT=$1

go get github.com/iotaledger/hive.go/constraints@$COMMIT
go get github.com/iotaledger/hive.go/stringify@$COMMIT
go get github.com/iotaledger/hive.go/serializer/v2@$COMMIT
MODULES="ads app autopeering constraints core crypto ds kvstore lo logger objectstorage runtime serializer/v2 stringify"
for i in $MODULES
do
go get -u github.com/iotaledger/hive.go/$i@$COMMIT

go get github.com/iotaledger/hive.go/lo@$COMMIT

go get github.com/iotaledger/hive.go/ds@$COMMIT

go get github.com/iotaledger/hive.go/runtime@$COMMIT

go get github.com/iotaledger/hive.go/core@$COMMIT

go get github.com/iotaledger/hive.go/app@$COMMIT

go get github.com/iotaledger/hive.go/kvstore@$COMMIT

go get github.com/iotaledger/hive.go/objectstorage@$COMMIT
go get github.com/iotaledger/hive.go/autopeering@$COMMIT
done

go mod tidy

pushd tools/integration-tests/tester
go mod tidy
popd
popd
71 changes: 38 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,29 @@ require (
github.com/bygui86/multi-profile/v2 v2.1.0
github.com/capossele/asset-registry v0.0.0-20210521112927-c9d6e74574e8
github.com/celestiaorg/smt v0.3.0
github.com/cockroachdb/errors v1.9.1
github.com/emirpasic/gods v1.18.1
github.com/felixge/fgprof v0.9.3
github.com/go-resty/resty/v2 v2.6.0
github.com/google/uuid v1.3.0
github.com/gorilla/websocket v1.4.2
github.com/iotaledger/hive.go/app v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/autopeering v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/constraints v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/ds v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/kvstore v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/lo v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/runtime v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/stringify v0.0.0-20230223001851-8caba55e57d4
github.com/iotaledger/hive.go/ads v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/app v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/autopeering v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/constraints v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/crypto v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/ds v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/kvstore v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/lo v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/logger v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/objectstorage v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/runtime v0.0.0-20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20230301135914-603c4dac79e1
github.com/iotaledger/hive.go/stringify v0.0.0-20230301135914-603c4dac79e1
github.com/jellydator/ttlcache/v2 v2.11.1
github.com/labstack/echo/v4 v4.10.0
github.com/libp2p/go-libp2p v0.25.1
github.com/libp2p/go-libp2p v0.26.1
github.com/mr-tron/base58 v1.2.0
github.com/multiformats/go-multiaddr v0.8.0
github.com/multiformats/go-varint v0.0.7
Expand All @@ -36,13 +40,13 @@ require (
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
github.com/stretchr/testify v1.8.1
github.com/stretchr/testify v1.8.2
github.com/zyedidia/generic v1.2.1
gitlab.com/NebulousLabs/merkletree v0.0.0-20200118113624-07fbf710afc4
go.dedis.ch/kyber/v3 v3.1.0
go.uber.org/atomic v1.10.0
go.uber.org/dig v1.16.1
golang.org/x/crypto v0.4.0
golang.org/x/crypto v0.6.0
golang.org/x/sync v0.1.0
google.golang.org/protobuf v1.28.1
gopkg.in/src-d/go-git.v4 v4.13.1
Expand All @@ -54,8 +58,7 @@ require (
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.0 // indirect
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/containerd/cgroups v1.0.4 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
Expand All @@ -64,14 +67,14 @@ require (
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect
github.com/ethereum/go-ethereum v1.10.26 // indirect
github.com/ethereum/go-ethereum v1.11.2 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/flynn/noise v1.0.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.12.0 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-ole/go-ole v1.2.1 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/go-stack/stack v1.8.1 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -91,10 +94,11 @@ require (
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.1 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/knadh/koanf v1.5.0 // indirect
github.com/koron/go-ssdp v0.0.3 // indirect
github.com/kr/pretty v0.3.1 // indirect
Expand All @@ -104,7 +108,7 @@ require (
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-cidranger v1.1.0 // indirect
github.com/libp2p/go-flow-metrics v0.1.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
github.com/libp2p/go-libp2p-asn-util v0.3.0 // indirect
github.com/libp2p/go-msgio v0.3.0 // indirect
github.com/libp2p/go-nat v0.1.0 // indirect
github.com/libp2p/go-netroute v0.2.1 // indirect
Expand All @@ -124,6 +128,8 @@ require (
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
Expand All @@ -137,18 +143,17 @@ require (
github.com/opencontainers/runtime-spec v1.0.2 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/petermattis/goid v0.0.0-20230222173705-8ff7bb262a50 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/common v0.40.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
github.com/quic-go/quic-go v0.32.0 // indirect
github.com/quic-go/webtransport-go v0.5.1 // indirect
github.com/quic-go/qtls-go1-19 v0.2.1 // indirect
github.com/quic-go/qtls-go1-20 v0.1.1 // indirect
github.com/quic-go/quic-go v0.33.0 // indirect
github.com/quic-go/webtransport-go v0.5.2 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
Expand All @@ -174,7 +179,7 @@ require (
go.uber.org/fx v1.18.2 // indirect
go.uber.org/multierr v1.9.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
Expand All @@ -183,7 +188,7 @@ require (
golang.org/x/time v0.2.0 // indirect
golang.org/x/tools v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gopkg.in/ini.v1 v1.66.4 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down