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: nwaku (TEST) #6345

Draft
wants to merge 44 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
55d2f24
refactor_: start using nwaku
richard-ramos Jan 23, 2025
05b4b07
adding waku-go-bindings and some changes to nwaku.go
gabrielmer Jan 24, 2025
6f1160d
cleanup
gabrielmer Jan 24, 2025
8e55b49
fix compilation errors
gabrielmer Jan 24, 2025
0d63f23
updating makefile
gabrielmer Jan 24, 2025
b11fb30
updating type
gabrielmer Jan 24, 2025
eb83f30
always building libwaku
gabrielmer Jan 24, 2025
5aeaae3
always build libwaku
gabrielmer Jan 24, 2025
5ff2c1a
remove nwaku submodule
gabrielmer Jan 27, 2025
3e19d09
Revert "remove nwaku submodule"
gabrielmer Jan 28, 2025
21f3956
removing submodule
gabrielmer Jan 28, 2025
68e74f7
removing libwaku auto libwaku build
gabrielmer Jan 28, 2025
64edef5
updating vendors
gabrielmer Jan 30, 2025
a5491bb
workaround for using pb types
gabrielmer Jan 30, 2025
ae2d77f
adding nwaku_utils.go
gabrielmer Jan 30, 2025
65f17e7
fixing store requests
gabrielmer Jan 30, 2025
5d26d00
converting store responses
gabrielmer Jan 30, 2025
12dacbd
converting from envelope types on received message
gabrielmer Jan 31, 2025
4157ad0
improving store types conversion
gabrielmer Feb 3, 2025
75b4ac9
fixing cursor conversion
gabrielmer Feb 4, 2025
b4e2974
fixing crash
gabrielmer Feb 5, 2025
8cced85
first rebase attempt
gabrielmer Feb 7, 2025
bd9de1b
improvements
gabrielmer Feb 7, 2025
8d4055a
more fixes
gabrielmer Feb 7, 2025
8c05b99
adding unimplemented methods + fixes
gabrielmer Feb 7, 2025
efe6d2c
fixing compilatioj
gabrielmer Feb 7, 2025
1ebc366
fix crash
gabrielmer Feb 7, 2025
b03ebe9
fix gowaku error
gabrielmer Feb 7, 2025
dccef9c
fixing store message parsing
gabrielmer Feb 12, 2025
fd762ee
updating waku-go-bindings
gabrielmer Feb 13, 2025
ecf4144
fixing waku-go-bindings integration
gabrielmer Feb 13, 2025
645b2c7
updaring gitignore
gabrielmer Feb 13, 2025
eae2821
fixing gowaku compilation
gabrielmer Feb 13, 2025
b31544c
Revert "updating vendors"
gabrielmer Feb 13, 2025
969266e
adding missing vendor file
gabrielmer Feb 13, 2025
d776c31
fix for bindings vendor
gabrielmer Feb 13, 2025
9bbc18a
temporarily fixing test target
gabrielmer Feb 14, 2025
73516ff
fixing statusgo-library target
gabrielmer Feb 14, 2025
a6cd1c6
fixing status-cli
gabrielmer Feb 14, 2025
1981fcb
updating waku-go-bindings
gabrielmer Feb 14, 2025
d4ab7cb
improving compilation for non-nwaku cases
gabrielmer Feb 14, 2025
59eb5c9
temporarily moving to waku-go-bindings version that allows go compila…
gabrielmer Feb 14, 2025
ad43318
updating waku-go-bindings
gabrielmer Feb 14, 2025
c0f837c
fixing compilation
gabrielmer Feb 14, 2025
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: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ coverage.html
Session.vim
.undodir/*
/.idea/
/.vscode/
/cmd/*/.ethereum/
*.iml

Expand All @@ -89,6 +88,9 @@ vendor/github.com/waku-org/go-zerokit-rln-x86_64/
vendor/github.com/waku-org/go-zerokit-rln-apple/
vendor/github.com/waku-org/go-zerokit-rln-arm/

# waku-go-bindings third_party directory
vendor/**/waku-go-bindings/third_party/

# status-cli logs
alice.log
bob.log
Expand Down
Empty file added .gitmodules
Empty file.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
"cSpell.words": [
"unmarshalling"
],
"gopls":{
"buildFlags": ["-tags=use_nwaku,gowaku_skip_migrations,gowaku_no_rln"]
}
}
30 changes: 27 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.PHONY: statusgo all test clean help
.PHONY: statusgo-android statusgo-ios
.PHONY: build-libwaku test-libwaku clean-libwaku rebuild-libwaku

# Clear any GOROOT set outside of the Nix shell
export GOROOT=
Expand Down Expand Up @@ -40,7 +41,7 @@ else
endif

ifeq ($(detected_OS),Darwin)
GOBIN_SHARED_LIB_EXT := dylib
GOBIN_SHARED_LIB_EXT := so
GOBIN_SHARED_LIB_CFLAGS := CGO_ENABLED=1 GOOS=darwin
else ifeq ($(detected_OS),Windows)
GOBIN_SHARED_LIB_EXT := dll
Expand All @@ -60,6 +61,10 @@ GIT_AUTHOR ?= $(shell git config user.email || echo $$USER)
ENABLE_METRICS ?= true
BUILD_TAGS ?= gowaku_no_rln

ifeq ($(USE_NWAKU), true)
BUILD_TAGS += use_nwaku
endif

BUILD_FLAGS ?= -ldflags="-X github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/metrics.EnabledStr=$(ENABLE_METRICS)"
BUILD_FLAGS_MOBILE ?=

Expand Down Expand Up @@ -141,6 +146,13 @@ $(GO_CMD_BUILDS): ##@build Build any Go project from cmd folder
echo "Compilation done." ;\
echo "Run \"build/bin/$(notdir $@) -h\" to view available commands."

LIBWAKU := $(CURDIR)/vendor/github.com/waku-org/waku-go-bindings/third_party/nwaku/build/libwaku.$(GOBIN_SHARED_LIB_EXT)
$(LIBWAKU):
ifeq ($(USE_NWAKU),true)
@echo "Building libwaku"
$(MAKE) -C $(CURDIR)/vendor/github.com/waku-org/waku-go-bindings/waku
endif

statusgo: ##@build Build status-go as statusd server
statusgo: build/bin/statusd
statusd: statusgo
Expand Down Expand Up @@ -193,7 +205,7 @@ statusgo-ios: ##@cross-compile Build status-go for iOS
@echo "iOS framework cross compilation done in build/bin/Statusgo.xcframework"

statusgo-library: generate
statusgo-library: ##@cross-compile Build status-go as static library for current platform
statusgo-library: $(LIBWAKU) ##@cross-compile Build status-go as static library for current platform
## cmd/library/README.md explains the magic incantation behind this
mkdir -p build/bin/statusgo-lib
go run cmd/library/*.go > build/bin/statusgo-lib/main.go
Expand All @@ -207,8 +219,11 @@ statusgo-library: ##@cross-compile Build status-go as static library for current
@echo "Static library built:"
@ls -la build/bin/libstatus.*


build-libwaku: $(LIBWAKU)

statusgo-shared-library: generate
statusgo-shared-library: ##@cross-compile Build status-go as shared library for current platform
statusgo-shared-library: $(LIBWAKU) ##@cross-compile Build status-go as shared library for current platform
## cmd/library/README.md explains the magic incantation behind this
mkdir -p build/bin/statusgo-lib
go run cmd/library/*.go > build/bin/statusgo-lib/main.go
Expand Down Expand Up @@ -294,6 +309,15 @@ lint-fix:
docker-test: ##@tests Run tests in a docker container with golang.
docker run --privileged --rm -it -v "$(PWD):$(DOCKER_TEST_WORKDIR)" -w "$(DOCKER_TEST_WORKDIR)" $(DOCKER_TEST_IMAGE) go test ${ARGS}

test-libwaku: | $(LIBWAKU)
go test -tags '$(BUILD_TAGS) use_nwaku' -run TestDial ./wakuv2/... -count 1 -v -json | jq -r '.Output'

clean-libwaku:
@echo "Removing libwaku"
rm $(LIBWAKU)

rebuild-libwaku: | clean-libwaku $(LIBWAKU)

test: test-unit ##@tests Run basic, short tests during development

test-unit-prep: generate
Expand Down
15 changes: 7 additions & 8 deletions cmd/ping-community/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,20 @@ import (

"github.com/status-im/status-go/account/generator"
"github.com/status-im/status-go/api"
"github.com/status-im/status-go/cmd/utils"
"github.com/status-im/status-go/common/dbsetup"
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/multiaccounts"
"github.com/status-im/status-go/multiaccounts/accounts"
"github.com/status-im/status-go/multiaccounts/settings"

"github.com/status-im/status-go/cmd/utils"
"github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/params"
"github.com/status-im/status-go/protocol"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/common/shard"
"github.com/status-im/status-go/protocol/identity/alias"
"github.com/status-im/status-go/protocol/protobuf"
wakuextn "github.com/status-im/status-go/services/wakuext"
"github.com/status-im/status-go/wakuv2"
)

const (
Expand All @@ -49,8 +48,8 @@ var (
seedPhrase = flag.String("seed-phrase", "", "Seed phrase")
version = flag.Bool("version", false, "Print version and dump configuration")
communityID = flag.String("community-id", "", "The id of the community")
shardCluster = flag.Int("shard-cluster", shard.MainStatusShardCluster, "The shard cluster in which the of the community is published")
shardIndex = flag.Int("shard-index", shard.DefaultShardIndex, "The shard index in which the community is published")
shardCluster = flag.Int("shard-cluster", wakuv2.MainStatusShardCluster, "The shard cluster in which the of the community is published")
shardIndex = flag.Int("shard-index", wakuv2.DefaultShardIndex, "The shard index in which the community is published")
chatID = flag.String("chat-id", "", "The id of the chat")

dataDir = flag.String("dir", getDefaultDataDir(), "Directory used by node to store data")
Expand Down Expand Up @@ -152,9 +151,9 @@ func main() {

messenger := wakuextservice.Messenger()

var s *shard.Shard = nil
var s *wakuv2.Shard = nil
if shardCluster != nil && shardIndex != nil {
s = &shard.Shard{
s = &wakuv2.Shard{
Cluster: uint16(*shardCluster),
Index: uint16(*shardIndex),
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/status-cli/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func start(p StartParams, logger *zap.SugaredLogger) (*StatusCLI, error) {
return nil, err
}
waku := backend.StatusNode().WakuV2Service()
telemetryClient := telemetry.NewClient(telemetryLogger, p.TelemetryURL, backend.SelectedAccountKeyID(), p.Name, "cli", telemetry.WithPeerID(waku.PeerID().String()))
peerID := waku.PeerID()
telemetryClient := telemetry.NewClient(telemetryLogger, p.TelemetryURL, backend.SelectedAccountKeyID(), p.Name, "cli", telemetry.WithPeerID(peerID.String()))
telemetryClient.Start(context.Background())
backend.StatusNode().WakuV2Service().SetStatusTelemetryClient(telemetryClient)
}
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ require (
github.com/schollz/peerdiscovery v1.7.0
github.com/siphiuel/lc-proxy-wrapper v0.0.0-20230516150924-246507cee8c7
github.com/urfave/cli/v2 v2.27.2
github.com/waku-org/go-waku v0.8.1-0.20250103101727-4ef460cb951a
github.com/waku-org/go-waku v0.8.1-0.20250122182117-bf357f223b55
github.com/waku-org/waku-go-bindings v0.0.0-20250214150103-cd77341fb3c7
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
Expand Down Expand Up @@ -262,6 +263,7 @@ require (
github.com/segmentio/encoding v0.3.4 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shopspring/decimal v1.2.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/status-im/keycard-go v0.0.0-20200402102358-957c09536969 // indirect
github.com/stretchr/objx v0.5.2 // indirect
Expand Down
13 changes: 11 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2152,8 +2152,8 @@ github.com/waku-org/go-libp2p-pubsub v0.12.0-gowaku.0.20240823143342-b0f2429ca27
github.com/waku-org/go-libp2p-pubsub v0.12.0-gowaku.0.20240823143342-b0f2429ca27f/go.mod h1:Oi0zw9aw8/Y5GC99zt+Ef2gYAl+0nZlwdJonDyOz/sE=
github.com/waku-org/go-libp2p-rendezvous v0.0.0-20240110193335-a67d1cc760a0 h1:R4YYx2QamhBRl/moIxkDCNW+OP7AHbyWLBygDc/xIMo=
github.com/waku-org/go-libp2p-rendezvous v0.0.0-20240110193335-a67d1cc760a0/go.mod h1:EhZP9fee0DYjKH/IOQvoNSy1tSHp2iZadsHGphcAJgY=
github.com/waku-org/go-waku v0.8.1-0.20250103101727-4ef460cb951a h1:20W3RwuJvLWEtXxXZ7RWwoVfTQJtJrjde3qQETP9QMs=
github.com/waku-org/go-waku v0.8.1-0.20250103101727-4ef460cb951a/go.mod h1:zYhLgqwBE3sGP2vP+aNiM5moOKlf/uSoIv36puAj9WI=
github.com/waku-org/go-waku v0.8.1-0.20250122182117-bf357f223b55 h1:bo1vIU4Kcfs9lGXO7Rt4BGKGW9vwuI9tOro3AWnPj/g=
github.com/waku-org/go-waku v0.8.1-0.20250122182117-bf357f223b55/go.mod h1:zYhLgqwBE3sGP2vP+aNiM5moOKlf/uSoIv36puAj9WI=
github.com/waku-org/go-zerokit-rln v0.1.14-0.20240102145250-fa738c0bdf59 h1:jisj+OCI6QydLtFq3Pyhu49wl9ytPN7oAHjMfepHDrA=
github.com/waku-org/go-zerokit-rln v0.1.14-0.20240102145250-fa738c0bdf59/go.mod h1:1PdBdPzyTaKt3VnpAHk3zj+r9dXPFOr3IHZP9nFle6E=
github.com/waku-org/go-zerokit-rln-apple v0.0.0-20230916172309-ee0ee61dde2b h1:KgZVhsLkxsj5gb/FfndSCQu6VYwALrCOgYI3poR95yE=
Expand All @@ -2162,6 +2162,14 @@ github.com/waku-org/go-zerokit-rln-arm v0.0.0-20230916171929-1dd9494ff065 h1:Sd7
github.com/waku-org/go-zerokit-rln-arm v0.0.0-20230916171929-1dd9494ff065/go.mod h1:7cSGUoGVIla1IpnChrLbkVjkYgdOcr7rcifEfh4ReR4=
github.com/waku-org/go-zerokit-rln-x86_64 v0.0.0-20230916171518-2a77c3734dd1 h1:4HSdWMFMufpRo3ECTX6BrvA+VzKhXZf7mS0rTa5cCWU=
github.com/waku-org/go-zerokit-rln-x86_64 v0.0.0-20230916171518-2a77c3734dd1/go.mod h1:+LeEYoW5/uBUTVjtBGLEVCUe9mOYAlu5ZPkIxLOSr5Y=
github.com/waku-org/waku-go-bindings v0.0.0-20250212142023-46b1648912ad h1:/vYXB+trQPPxfR0/tqkSvpq9tekqWPXnreWHc3GwZaw=
github.com/waku-org/waku-go-bindings v0.0.0-20250212142023-46b1648912ad/go.mod h1:ZumFjFmErDtVBY5t1HH7pD9cQeeepAmlLA6MD/MjHx4=
github.com/waku-org/waku-go-bindings v0.0.0-20250214122049-77122cd5d7d0 h1:dlTEDjyeKPv2OwaYqo7qtperqCv9WV9Ype40usgpNeE=
github.com/waku-org/waku-go-bindings v0.0.0-20250214122049-77122cd5d7d0/go.mod h1:ZumFjFmErDtVBY5t1HH7pD9cQeeepAmlLA6MD/MjHx4=
github.com/waku-org/waku-go-bindings v0.0.0-20250214142304-7d8ea671c827 h1:+uKmky4rByMOCgg22gSpB4fM8GcIAV8s6uO+uaf8Mig=
github.com/waku-org/waku-go-bindings v0.0.0-20250214142304-7d8ea671c827/go.mod h1:ZumFjFmErDtVBY5t1HH7pD9cQeeepAmlLA6MD/MjHx4=
github.com/waku-org/waku-go-bindings v0.0.0-20250214150103-cd77341fb3c7 h1:6Vql94mKR5xPdeEC1chQM3LLZ8B+2uoRlBAiyDmI3Sc=
github.com/waku-org/waku-go-bindings v0.0.0-20250214150103-cd77341fb3c7/go.mod h1:ZumFjFmErDtVBY5t1HH7pD9cQeeepAmlLA6MD/MjHx4=
github.com/wealdtech/go-ens/v3 v3.5.0 h1:Huc9GxBgiGweCOGTYomvsg07K2QggAqZpZ5SuiZdC8o=
github.com/wealdtech/go-ens/v3 v3.5.0/go.mod h1:bVuYoWYEEeEu7Zy95rIMjPR34QFJarxt8p84ywSo0YM=
github.com/wealdtech/go-multicodec v1.4.0 h1:iq5PgxwssxnXGGPTIK1srvt6U5bJwIp7k6kBrudIWxg=
Expand Down Expand Up @@ -2710,6 +2718,7 @@ golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
2 changes: 1 addition & 1 deletion nix/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ in mkShell {
buildInputs = with pkgs; [
git jq which
go golangci-lint go-junit-report gopls go-bindata gomobileMod codecov-cli go-generate-fast
mockgen protobuf3_20 protoc-gen-go gotestsum go-modvendor openjdk
mockgen protobuf3_20 protoc-gen-go gotestsum go-modvendor openjdk openssl
] ++ lib.optionals (stdenv.isDarwin) [ xcodeWrapper ];

shellHook = lib.optionalString (!isMacM1) ''
Expand Down
15 changes: 12 additions & 3 deletions node/status_node_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package node
import (
"crypto/ecdsa"
"database/sql"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
Expand All @@ -12,7 +13,6 @@ import (

"go.uber.org/zap"

"github.com/status-im/status-go/protocol/common/shard"
"github.com/status-im/status-go/server"
"github.com/status-im/status-go/signal"
"github.com/status-im/status-go/transactions"
Expand Down Expand Up @@ -66,6 +66,7 @@ import (
"github.com/status-im/status-go/timesource"
wakuv1common "github.com/status-im/status-go/wakuv1/common"
"github.com/status-im/status-go/wakuv2"
bindings "github.com/waku-org/waku-go-bindings/waku/common"
)

var (
Expand Down Expand Up @@ -338,7 +339,7 @@ func (b *StatusNode) wakuV2Service(nodeConfig *params.NodeConfig) (*wakuv2.Waku,
Nameserver: nodeConfig.WakuV2Config.Nameserver,
UDPPort: nodeConfig.WakuV2Config.UDPPort,
AutoUpdate: nodeConfig.WakuV2Config.AutoUpdate,
DefaultShardPubsubTopic: shard.DefaultShardPubsubTopic(),
DefaultShardPubsubTopic: wakuv2.DefaultShardPubsubTopic(),
TelemetryServerURL: nodeConfig.WakuV2Config.TelemetryServerURL,
ClusterID: nodeConfig.ClusterConfig.ClusterID,
EnableMissingMessageVerification: nodeConfig.WakuV2Config.EnableMissingMessageVerification,
Expand Down Expand Up @@ -383,8 +384,16 @@ func (b *StatusNode) wakuV2Service(nodeConfig *params.NodeConfig) (*wakuv2.Waku,
}
}

w, err := wakuv2.New(nodeKey, nodeConfig.ClusterConfig.Fleet, cfg, logutils.ZapLogger(), b.appDB, b.timeSource(), signal.SendHistoricMessagesRequestFailed, signal.SendPeerStats)
nwakuCfg := &bindings.WakuConfig{
Nodekey: hex.EncodeToString(crypto.FromECDSA(nodeKey)),
Host: nodeConfig.WakuV2Config.Host,
TcpPort: nodeConfig.WakuV2Config.Port,
LogLevel: "DEBUG", // TODO-nwaku ?
ClusterID: nodeConfig.ClusterConfig.ClusterID,
Shards: []uint16{wakuv2.DefaultShardIndex, wakuv2.NonProtectedShardIndex},
}

w, err := wakuv2.New(nodeKey, nodeConfig.ClusterConfig.Fleet, cfg, nwakuCfg, logutils.ZapLogger(), b.appDB, b.timeSource(), signal.SendHistoricMessagesRequestFailed, signal.SendPeerStats)
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions protocol/communities/community.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/images"
"github.com/status-im/status-go/protocol/common"
"github.com/status-im/status-go/protocol/common/shard"
community_token "github.com/status-im/status-go/protocol/communities/token"
"github.com/status-im/status-go/protocol/protobuf"
"github.com/status-im/status-go/protocol/requests"
"github.com/status-im/status-go/protocol/v1"
"github.com/status-im/status-go/server"
"github.com/status-im/status-go/wakuv2"
)

const signatureLength = 65
Expand All @@ -55,7 +55,7 @@ type Config struct {
RequestsToJoin []*RequestToJoin
MemberIdentity *ecdsa.PrivateKey
EventsData *EventsData
Shard *shard.Shard
Shard *wakuv2.Shard
PubsubTopicPrivateKey *ecdsa.PrivateKey
LastOpenedAt int64
}
Expand Down Expand Up @@ -172,7 +172,7 @@ func (o *Community) MarshalPublicAPIJSON() ([]byte, error) {
ActiveMembersCount uint64 `json:"activeMembersCount"`
PubsubTopic string `json:"pubsubTopic"`
PubsubTopicKey string `json:"pubsubTopicKey"`
Shard *shard.Shard `json:"shard"`
Shard *wakuv2.Shard `json:"shard"`
}{
ID: o.ID(),
Verified: o.config.Verified,
Expand Down Expand Up @@ -308,7 +308,7 @@ func (o *Community) MarshalJSON() ([]byte, error) {
ActiveMembersCount uint64 `json:"activeMembersCount"`
PubsubTopic string `json:"pubsubTopic"`
PubsubTopicKey string `json:"pubsubTopicKey"`
Shard *shard.Shard `json:"shard"`
Shard *wakuv2.Shard `json:"shard"`
LastOpenedAt int64 `json:"lastOpenedAt"`
Clock uint64 `json:"clock"`
}{
Expand Down Expand Up @@ -461,7 +461,7 @@ func (o *Community) DescriptionText() string {
return ""
}

func (o *Community) Shard() *shard.Shard {
func (o *Community) Shard() *wakuv2.Shard {
if o != nil && o.config != nil {
return o.config.Shard
}
Expand Down
Loading
Loading