Skip to content

Commit

Permalink
test: bump go-libp2p
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos authored and siddarthkay committed Jan 22, 2024
1 parent cd9617c commit 5ffec68
Show file tree
Hide file tree
Showing 1,042 changed files with 23,027 additions and 25,438 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ setup: setup-check setup-build setup-dev tidy

setup-check: ##@setup Check if Go compiler is installed.
ifeq (, $(shell which go))
$(error "No Go compiler found! Make sure to install 1.19.0 or newer.")
$(error "No Go compiler found! Make sure to install 1.20.0 or newer.")
endif

setup-dev: ##@setup Install all necessary tools for development
Expand All @@ -253,7 +253,7 @@ install-gomobile: ##@install Go Mobile Build Tools
GO111MODULE=off go get -d golang.org/x/mobile/cmd/gobind

install-lint: ##@install Install Linting Tools
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52.2
GO111MODULE=on go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55.2

install-junit-report: ##@install Install Junit Report Tool for Jenkins integration
GO111MODULE=on go install github.com/jstemmer/go-junit-report/v2@latest
Expand Down
8 changes: 4 additions & 4 deletions api/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ func TestLoginAccount(t *testing.T) {
Password: password,
BackupDisabledDataDir: tmpdir,
NetworkID: 1,
LogFilePath: tmpdir + "/log",
LogFilePath: tmpdir + "/log", // nolint: goconst
}
c := make(chan interface{}, 10)
signal.SetMobileSignalHandler(func(data []byte) {
Expand Down Expand Up @@ -918,7 +918,7 @@ func TestConvertAccount(t *testing.T) {
const keycardPassword = "222222" // represents password for a keycard user
const keycardUID = "1234"
const pathEIP1581Root = "m/43'/60'/1581'"
const pathEIP1581Chat = pathEIP1581Root + "/0'/0"
const pathEIP1581Chat = pathEIP1581Root + "/0'/0" // nolint: goconst
const pathWalletRoot = "m/44'/60'/0'/0"
const pathDefaultWalletAccount = pathWalletRoot + "/0"
const customWalletPath1 = pathWalletRoot + "/1"
Expand Down Expand Up @@ -1314,7 +1314,7 @@ func TestCreateWallet(t *testing.T) {
Password: password,
BackupDisabledDataDir: tmpdir,
NetworkID: 1,
LogFilePath: tmpdir + "/log",
LogFilePath: tmpdir + "/log", // nolint: goconst
}
c := make(chan interface{}, 10)
signal.SetMobileSignalHandler(func(data []byte) {
Expand Down Expand Up @@ -1374,7 +1374,7 @@ func TestSetFleet(t *testing.T) {
Password: password,
BackupDisabledDataDir: tmpdir,
NetworkID: 1,
LogFilePath: tmpdir + "/log",
LogFilePath: tmpdir + "/log", // nolint: goconst
Emoji: "some",
}
c := make(chan interface{}, 10)
Expand Down
2 changes: 1 addition & 1 deletion api/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const pathWalletRoot = "m/44'/60'/0'/0"
const pathEIP1581 = "m/43'/60'/1581'"
const pathDefaultChat = pathEIP1581 + "/0'/0"
const pathDefaultChat = pathEIP1581 + "/0'/0" // nolint: goconst
const pathDefaultWallet = pathWalletRoot + "/0"
const defaultMnemonicLength = 12
const shardsTestClusterID = 16
Expand Down
22 changes: 12 additions & 10 deletions api/geth_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ var (
ErrConfigNotAvailable = errors.New("NodeConfig is not available")
)

const shm = "-shm"

var _ StatusBackend = (*GethStatusBackend)(nil)

// GethStatusBackend implements the Status.im service over go-ethereum
Expand Down Expand Up @@ -269,11 +271,11 @@ func (b *GethStatusBackend) DeleteMultiaccount(keyUID string, keyStoreDir string
filepath.Join(b.rootDataDir, fmt.Sprintf("%s.db-shm", keyUID)),
filepath.Join(b.rootDataDir, fmt.Sprintf("%s.db-wal", keyUID)),
appDbPath,
appDbPath + "-shm",
appDbPath + "-wal",
appDbPath + shm,
appDbPath + "-wal", // nolint: goconst
walletDbPath,
walletDbPath + "-shm",
walletDbPath + "-wal",
walletDbPath + shm,
walletDbPath + "-wal", // nolint: goconst
}
for _, path := range dbFiles {
if _, err := os.Stat(path); err == nil {
Expand Down Expand Up @@ -332,19 +334,19 @@ func (b *GethStatusBackend) runDBFileMigrations(account multiaccounts.Account, p
}

// rename journals as well, but ignore errors
_ = os.Rename(unsupportedPath+"-shm", v3Path+"-shm")
_ = os.Rename(unsupportedPath+shm, v3Path+shm)
_ = os.Rename(unsupportedPath+"-wal", v3Path+"-wal")
}

if _, err = os.Stat(v3Path); err == nil {
if err := appdatabase.MigrateV3ToV4(v3Path, v4Path, password, account.KDFIterations, signal.SendReEncryptionStarted, signal.SendReEncryptionFinished); err != nil {
_ = os.Remove(v4Path)
_ = os.Remove(v4Path + "-shm")
_ = os.Remove(v4Path + shm)
_ = os.Remove(v4Path + "-wal")
return "", errors.New("Failed to migrate v3 db to v4: " + err.Error())
}
_ = os.Remove(v3Path)
_ = os.Remove(v3Path + "-shm")
_ = os.Remove(v3Path + shm)
_ = os.Remove(v3Path + "-wal")
}

Expand Down Expand Up @@ -1100,7 +1102,7 @@ func (b *GethStatusBackend) createTempDBFile(pattern string) (tmpDbPath string,
filePath := file.Name()
_ = os.Remove(filePath)
_ = os.Remove(filePath + "-wal")
_ = os.Remove(filePath + "-shm")
_ = os.Remove(filePath + shm)
_ = os.Remove(filePath + "-journal")
}
return
Expand All @@ -1114,9 +1116,9 @@ func replaceDBFile(dbPath string, newDBPath string) (cleanup func(), err error)

cleanup = func() {
_ = os.Remove(dbPath + "-wal")
_ = os.Remove(dbPath + "-shm")
_ = os.Remove(dbPath + shm)
_ = os.Rename(newDBPath+"-wal", dbPath+"-wal")
_ = os.Rename(newDBPath+"-shm", dbPath+"-shm")
_ = os.Rename(newDBPath+shm, dbPath+shm)
}

return
Expand Down
7 changes: 1 addition & 6 deletions eth-node/bridge/geth/wakuv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,6 @@ func (w *gethWakuV2Wrapper) SendMessagesRequest(peerID []byte, r types.MessagesR
func (w *gethWakuV2Wrapper) RequestStoreMessages(ctx context.Context, peerID []byte, r types.MessagesRequest, processEnvelopes bool) (*types.StoreRequestCursor, int, error) {
var options []store.HistoryRequestOption

peer, err := peer.Decode(string(peerID))
if err != nil {
return nil, 0, err
}

options = []store.HistoryRequestOption{
store.WithPaging(false, uint64(r.Limit)),
}
Expand All @@ -202,7 +197,7 @@ func (w *gethWakuV2Wrapper) RequestStoreMessages(ctx context.Context, peerID []b
contentTopics = append(contentTopics, wakucommon.BytesToTopic(topic))
}

pbCursor, envelopesCount, err := w.waku.Query(ctx, peer, r.PubsubTopic, contentTopics, uint64(r.From), uint64(r.To), options, processEnvelopes)
pbCursor, envelopesCount, err := w.waku.Query(ctx, peer.ID(peerID), r.PubsubTopic, contentTopics, uint64(r.From), uint64(r.To), options, processEnvelopes)
if err != nil {
return nil, 0, err
}
Expand Down
97 changes: 48 additions & 49 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/status-im/status-go

go 1.19
go 1.20

replace github.com/ethereum/go-ethereum v1.10.26 => github.com/status-im/go-ethereum v1.10.25-status.11

Expand Down Expand Up @@ -33,11 +33,11 @@ require (
github.com/keighl/metabolize v0.0.0-20150915210303-97ab655d4034
github.com/kilic/bls12-381 v0.0.0-20200607163746-32e1441c8a9f
github.com/lib/pq v1.10.4
github.com/libp2p/go-libp2p v0.29.2
github.com/libp2p/go-libp2p-pubsub v0.9.3
github.com/libp2p/go-libp2p v0.32.2
github.com/libp2p/go-libp2p-pubsub v0.10.0
github.com/lucasb-eyer/go-colorful v1.0.3
github.com/mat/besticon v0.0.0-20210314201728-1579f269edb7
github.com/multiformats/go-multiaddr v0.10.1
github.com/multiformats/go-multiaddr v0.12.0
github.com/multiformats/go-multibase v0.2.0
github.com/multiformats/go-multihash v0.2.3
github.com/multiformats/go-varint v0.0.7
Expand All @@ -51,7 +51,7 @@ require (
github.com/status-im/doubleratchet v3.0.0+incompatible
github.com/status-im/markdown v0.0.0-20231114210825-6c2d15b5dc57
github.com/status-im/migrate/v4 v4.6.2-status.3
github.com/status-im/rendezvous v1.3.7
github.com/status-im/rendezvous v1.3.8-0.20240110194857-cc5be22bf83e
github.com/status-im/status-go/extkeys v1.1.2
github.com/status-im/tcp-shaker v1.1.1-status
github.com/status-im/zxcvbn-go v0.0.0-20220311183720-5e8676676857
Expand All @@ -63,8 +63,8 @@ require (
github.com/wealdtech/go-multicodec v1.4.0
github.com/xeipuuv/gojsonschema v1.2.0
github.com/zenthangplus/goccm v0.0.0-20211005163543-2f2e522aca15
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.12.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.14.0
golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
google.golang.org/protobuf v1.31.0
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
Expand All @@ -88,14 +88,14 @@ require (
github.com/mutecomm/go-sqlcipher/v4 v4.4.2
github.com/schollz/peerdiscovery v1.7.0
github.com/siphiuel/lc-proxy-wrapper v0.0.0-20230516150924-246507cee8c7
github.com/waku-org/go-waku v0.8.1-0.20240104144340-585648c4eefe
github.com/waku-org/go-waku v0.8.1-0.20240112174027-faf046e059a5
github.com/wk8/go-ordered-map/v2 v2.1.7
github.com/yeqown/go-qrcode/v2 v2.2.1
github.com/yeqown/go-qrcode/writer/standard v1.2.1
go.uber.org/multierr v1.11.0
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
golang.org/x/net v0.14.0
golang.org/x/text v0.12.0
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/net v0.17.0
golang.org/x/text v0.13.0
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af
)

Expand Down Expand Up @@ -161,21 +161,21 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gopacket v1.1.19 // indirect
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
github.com/google/pprof v0.0.0-20231023181126-ff6d637d2a7b // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-bexpr v0.1.10 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/hashicorp/golang-lru/v2 v2.0.2 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.0 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/huin/goupnp v1.2.0 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/koron/go-ssdp v0.0.4 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
Expand All @@ -185,19 +185,20 @@ require (
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.3.0 // indirect
github.com/libp2p/go-libp2p-mplex v0.9.0 // indirect
github.com/libp2p/go-mplex v0.7.0 // indirect
github.com/libp2p/go-msgio v0.3.0 // indirect
github.com/libp2p/go-nat v0.2.0 // indirect
github.com/libp2p/go-netroute v0.2.1 // indirect
github.com/libp2p/go-reuseport v0.3.0 // indirect
github.com/libp2p/go-reuseport v0.4.0 // indirect
github.com/libp2p/go-yamux/v4 v4.0.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/miekg/dns v1.1.55 // indirect
github.com/miekg/dns v1.1.56 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
Expand All @@ -210,38 +211,36 @@ require (
github.com/multiformats/go-multiaddr-dns v0.3.1 // indirect
github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multistream v0.4.1 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/onsi/ginkgo/v2 v2.11.0 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/onsi/ginkgo/v2 v2.13.0 // indirect
github.com/opencontainers/runtime-spec v1.1.0 // indirect
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
github.com/pion/datachannel v1.5.2 // indirect
github.com/pion/dtls/v2 v2.1.2 // indirect
github.com/pion/ice/v2 v2.1.20 // indirect
github.com/pion/interceptor v0.1.7 // indirect
github.com/pion/datachannel v1.5.5 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
github.com/pion/ice/v2 v2.3.6 // indirect
github.com/pion/interceptor v0.1.17 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.5 // indirect
github.com/pion/mdns v0.0.7 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.9 // indirect
github.com/pion/rtp v1.7.4 // indirect
github.com/pion/sctp v1.8.2 // indirect
github.com/pion/sdp/v3 v3.0.4 // indirect
github.com/pion/srtp/v2 v2.0.5 // indirect
github.com/pion/stun v0.3.5 // indirect
github.com/pion/transport v0.13.0 // indirect
github.com/pion/turn/v2 v2.0.6 // indirect
github.com/pion/udp v0.1.1 // indirect
github.com/pion/webrtc/v3 v3.1.24-0.20220208053747-94262c1b2b38 // indirect
github.com/pion/rtcp v1.2.10 // indirect
github.com/pion/rtp v1.7.13 // indirect
github.com/pion/sctp v1.8.7 // indirect
github.com/pion/sdp/v3 v3.0.6 // indirect
github.com/pion/srtp/v2 v2.0.15 // indirect
github.com/pion/stun v0.6.0 // indirect
github.com/pion/transport/v2 v2.2.1 // indirect
github.com/pion/turn/v2 v2.1.0 // indirect
github.com/pion/webrtc/v3 v3.2.9 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prometheus/tsdb v0.10.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-19 v0.3.3 // indirect
github.com/quic-go/qtls-go1-20 v0.2.3 // indirect
github.com/quic-go/quic-go v0.36.4 // indirect
github.com/quic-go/webtransport-go v0.5.3 // indirect
github.com/quic-go/qtls-go1-20 v0.3.4 // indirect
github.com/quic-go/quic-go v0.39.4 // indirect
github.com/quic-go/webtransport-go v0.6.0 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand All @@ -262,7 +261,7 @@ require (
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/urfave/cli/v2 v2.24.4 // indirect
github.com/waku-org/go-discover v0.0.0-20221209174356-61c833f34d98 // indirect
github.com/waku-org/go-libp2p-rendezvous v0.0.0-20230628220917-7b4e5ae4c0e7 // indirect
github.com/waku-org/go-libp2p-rendezvous v0.0.0-20240110193335-a67d1cc760a0 // indirect
github.com/waku-org/go-zerokit-rln v0.1.14-0.20240102145250-fa738c0bdf59 // indirect
github.com/waku-org/go-zerokit-rln-apple v0.0.0-20230916172309-ee0ee61dde2b // indirect
github.com/waku-org/go-zerokit-rln-arm v0.0.0-20230916171929-1dd9494ff065 // indirect
Expand All @@ -275,14 +274,14 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/dig v1.17.0 // indirect
go.uber.org/fx v1.20.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/tools v0.12.1-0.20230818130535-1517d1a3ba60 // indirect
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
go.uber.org/dig v1.17.1 // indirect
go.uber.org/fx v1.20.1 // indirect
go.uber.org/mock v0.3.0 // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
Expand Down
Loading

0 comments on commit 5ffec68

Please sign in to comment.