fix: full nodes should run filter and lightpush (#4655)
This commit is contained in:
parent
c84bb077fa
commit
f31808d938
|
@ -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,
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"`
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue