fix: full nodes should run filter and lightpush (#4655)

This commit is contained in:
richΛrd 2024-01-31 14:45:24 -04:00 committed by GitHub
parent c84bb077fa
commit f31808d938
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 7 deletions

View File

@ -319,7 +319,6 @@ func (b *StatusNode) wakuV2Service(nodeConfig *params.NodeConfig, telemetryServe
Rendezvous: nodeConfig.Rendezvous, Rendezvous: nodeConfig.Rendezvous,
WakuNodes: nodeConfig.ClusterConfig.WakuNodes, WakuNodes: nodeConfig.ClusterConfig.WakuNodes,
PeerExchange: nodeConfig.WakuV2Config.PeerExchange, PeerExchange: nodeConfig.WakuV2Config.PeerExchange,
EnableFilterFullNode: nodeConfig.WakuV2Config.EnableFilterFullNode,
EnableStore: nodeConfig.WakuV2Config.EnableStore, EnableStore: nodeConfig.WakuV2Config.EnableStore,
StoreCapacity: nodeConfig.WakuV2Config.StoreCapacity, StoreCapacity: nodeConfig.WakuV2Config.StoreCapacity,
StoreSeconds: nodeConfig.WakuV2Config.StoreSeconds, StoreSeconds: nodeConfig.WakuV2Config.StoreSeconds,

View File

@ -212,9 +212,6 @@ type WakuV2Config struct {
// StoreSeconds indicates the maximum number of seconds before a message is removed from the store // StoreSeconds indicates the maximum number of seconds before a message is removed from the store
StoreSeconds int StoreSeconds int
// EnableFilterNode indicates if WakuFilter Full Node should be enabled
EnableFilterFullNode bool
// UseShardAsDefaultTopic indicates whether the default shard should be used instead of the default relay topic // UseShardAsDefaultTopic indicates whether the default shard should be used instead of the default relay topic
UseShardAsDefaultTopic bool UseShardAsDefaultTopic bool
} }

View File

@ -51,7 +51,6 @@ type Config struct {
StoreCapacity int `toml:",omitempty"` StoreCapacity int `toml:",omitempty"`
StoreSeconds int `toml:",omitempty"` StoreSeconds int `toml:",omitempty"`
TelemetryServerURL string `toml:",omitempty"` TelemetryServerURL string `toml:",omitempty"`
EnableFilterFullNode bool `toml:",omitempty"`
DefaultShardPubsubTopic string `toml:",omitempty"` DefaultShardPubsubTopic string `toml:",omitempty"`
UseShardAsDefaultTopic bool `toml:",omitempty"` UseShardAsDefaultTopic bool `toml:",omitempty"`
ClusterID uint16 `toml:",omitempty"` ClusterID uint16 `toml:",omitempty"`

View File

@ -57,6 +57,7 @@ import (
"github.com/waku-org/go-waku/waku/v2/dnsdisc" "github.com/waku-org/go-waku/waku/v2/dnsdisc"
wps "github.com/waku-org/go-waku/waku/v2/peerstore" wps "github.com/waku-org/go-waku/waku/v2/peerstore"
"github.com/waku-org/go-waku/waku/v2/protocol" "github.com/waku-org/go-waku/waku/v2/protocol"
"github.com/waku-org/go-waku/waku/v2/protocol/filter"
"github.com/waku-org/go-waku/waku/v2/protocol/lightpush" "github.com/waku-org/go-waku/waku/v2/protocol/lightpush"
"github.com/waku-org/go-waku/waku/v2/protocol/peer_exchange" "github.com/waku-org/go-waku/waku/v2/protocol/peer_exchange"
"github.com/waku-org/go-waku/waku/v2/protocol/relay" "github.com/waku-org/go-waku/waku/v2/protocol/relay"
@ -303,8 +304,9 @@ func New(nodeKey string, fleet string, cfg *Config, logger *zap.Logger, appDB *s
opts = append(opts, node.WithMessageProvider(dbStore)) opts = append(opts, node.WithMessageProvider(dbStore))
} }
if cfg.EnableFilterFullNode { if !cfg.LightClient {
opts = append(opts, node.WithWakuFilterFullNode()) opts = append(opts, node.WithWakuFilterFullNode(filter.WithMaxSubscribers(20)))
opts = append(opts, node.WithLightPush())
} }
if appDB != nil { if appDB != nil {