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

Khalil/6474 Gossipsub RPC control message Spam protection: GRAFT & PRUNE #4103

Merged
merged 138 commits into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
9a9c2ed
CI sync scripts
gomisha Feb 17, 2023
61ee991
added README for branch sync branches
gomisha Feb 17, 2023
a379818
Merge branch 'master' of https://github.com/onflow/flow-go into maste…
github-actions[bot] Feb 17, 2023
ce1f3a2
Merge pull request #6504 from dapperlabs/master-sync
gomisha Feb 17, 2023
f912471
Update sync-from-public-flow-go.yml
gomisha Feb 17, 2023
ce61d9f
Merge branch 'master-private' of https://github.com/dapperlabs/flow-g…
gomisha Feb 17, 2023
c7873fd
Security Code Scanning
Latkes Feb 3, 2023
b27ba03
Update for new branch structure
Kay-Zee Feb 17, 2023
013f7e5
adding C in addition to GO
franc-crypt0-s3curity Feb 18, 2023
6810a56
Merge pull request #6508 from dapperlabs/kan/add-sec-scanning
franc-crypt0-s3curity Feb 18, 2023
456329e
Merge branch 'master' of https://github.com/onflow/flow-go into maste…
github-actions[bot] Feb 20, 2023
5a21b15
Merge pull request #6510 from dapperlabs/master-sync
gomisha Feb 21, 2023
b877593
Create dependabot.yml
gomisha Feb 21, 2023
b858f81
Update dependabot.yml
gomisha Feb 21, 2023
3b23a76
Run CI against all master branches
Kay-Zee Feb 21, 2023
5e7980d
Merge branch 'master' of https://github.com/onflow/flow-go into maste…
github-actions[bot] Feb 22, 2023
9979d02
Merge pull request #6530 from dapperlabs/kan/run-ci-against-all-maste…
Kay-Zee Feb 22, 2023
f7cca6b
Merge pull request #6531 from dapperlabs/master-sync
gomisha Feb 22, 2023
c113a14
Update ci.yml
gomisha Feb 22, 2023
90e9a53
Update ci.yml
gomisha Feb 22, 2023
2342d8f
Update ci.yml
gomisha Feb 22, 2023
9c5e615
Update ci.yml
gomisha Feb 22, 2023
cb3d0c2
Merge pull request #6532 from dapperlabs/misha/run-ci-against-all-mas…
gomisha Feb 22, 2023
3e56b3f
Merge pull request #6534 from dapperlabs/master-sync
gomisha Feb 24, 2023
0b61b91
Merge pull request #6547 from dapperlabs/master-sync
gomisha Feb 28, 2023
6cf1b35
Merge pull request #6550 from dapperlabs/master-sync
gomisha Mar 1, 2023
af8a983
Merge pull request #6552 from dapperlabs/master-sync
gomisha Mar 2, 2023
4a01602
add RPC validation inspector
kc1116 Mar 2, 2023
7f99cba
Merge pull request #6554 from dapperlabs/master-sync
gomisha Mar 3, 2023
5a16923
add testing for each validation error case using gossip spammer
kc1116 Mar 3, 2023
de61788
generate mocks
kc1116 Mar 3, 2023
d9d1af5
Update control_message_validation_test.go
kc1116 Mar 3, 2023
dbf3b9e
Merge pull request #6558 from dapperlabs/master-sync
gomisha Mar 6, 2023
c34c10d
Merge pull request #6571 from dapperlabs/master-sync
gomisha Mar 8, 2023
ee3b03d
undo CI changes
kc1116 Mar 10, 2023
bc23cda
move ErrValidationLimit definition into erros.go
kc1116 Mar 10, 2023
107792b
Update network/p2p/inspector/aggregate.go
kc1116 Mar 10, 2023
4fb9139
Merge branch 'khalil/6474-graft-prune-spam' of github.com:dapperlabs/…
kc1116 Mar 10, 2023
36cadad
Update aggregate.go
kc1116 Mar 10, 2023
2e24aa8
update RPC inspector interface Inspect godoc
kc1116 Mar 10, 2023
b8d11aa
add concurrency safe and non-blocking requirements to rpc inspector i…
kc1116 Mar 10, 2023
7690ead
document RateLimiterMap fields
kc1116 Mar 10, 2023
e7926da
document RateLimiter fields
kc1116 Mar 10, 2023
f327906
Update network/p2p/inspector/validation/control_message_validation.go
kc1116 Mar 10, 2023
cdb3d0f
use signaler context to control cleanup loop in rate limiters
kc1116 Mar 10, 2023
0ef9fc8
Merge branch 'khalil/6474-graft-prune-spam' of github.com:dapperlabs/…
kc1116 Mar 10, 2023
0e16074
Merge branch 'master-public' of github.com:dapperlabs/flow-go into kh…
kc1116 Mar 10, 2023
aea6830
Update subscriptions.go
kc1116 Mar 10, 2023
6b01f97
Merge pull request #6574 from dapperlabs/master-sync
gomisha Mar 10, 2023
8ffeee6
Merge branch 'master-public' of github.com:dapperlabs/flow-go into kh…
kc1116 Mar 10, 2023
0d8668f
wire gossipsub notification distributor and update tests
kc1116 Mar 13, 2023
b1f8ab0
Merge pull request #6579 from dapperlabs/master-sync
gomisha Mar 13, 2023
1b06340
Merge pull request #6581 from dapperlabs/master-sync
gomisha Mar 15, 2023
22bdd2d
Merge pull request #6582 from dapperlabs/master-sync
gomisha Mar 15, 2023
dd9a8f8
add context to logs
kc1116 Mar 16, 2023
86ba471
document typed err ErrUpperThreshold
kc1116 Mar 16, 2023
7dcd771
use RWMutex in aggregate inspector
kc1116 Mar 16, 2023
e8f201f
update logger context value keys
kc1116 Mar 16, 2023
65689f4
update occurrences of RPC -> rpc
kc1116 Mar 16, 2023
5b8c48d
lower log level from info -> trace
kc1116 Mar 16, 2023
9174fc6
add logging.KeySuspicious when err occurs distributing notification
kc1116 Mar 16, 2023
0e54126
Merge pull request #6583 from dapperlabs/master-sync
gomisha Mar 16, 2023
4733c66
replace inspectMessageQ with worker pool and herocache
kc1116 Mar 17, 2023
02f2617
Merge pull request #6587 from dapperlabs/master-sync
gomisha Mar 17, 2023
edf5445
avoid looping over all topic IDS when doing initial synchronous check
kc1116 Mar 17, 2023
399b502
update topic validation, ensure topic sporkID matches the current spo…
kc1116 Mar 17, 2023
417b97c
track duplicate topic IDs when validating control message topics
kc1116 Mar 20, 2023
6366141
Merge pull request #6588 from dapperlabs/master-sync
gomisha Mar 20, 2023
fab4ce4
use lowercase map keys
kc1116 Mar 20, 2023
65cda55
add godoc for default config values
kc1116 Mar 20, 2023
5740c16
update default validation config values
kc1116 Mar 20, 2023
c060361
rename UpperThreshold -> DiscardThreshold
kc1116 Mar 20, 2023
ebb6ad6
rename ErrValidationLimit -> ErrInvalidLimitConfig
kc1116 Mar 20, 2023
f5e1ef5
add godocs to struct fields
kc1116 Mar 20, 2023
0f6227b
remove unused RateLimit field
kc1116 Mar 20, 2023
8030dce
add Limits suffix to graft & prune cli config limit struct fields
kc1116 Mar 20, 2023
aa7f6b2
add context to err
kc1116 Mar 20, 2023
796440f
wait for ready chan when starting rpc msg inspector
kc1116 Mar 20, 2023
440c411
rename cm -> builder
kc1116 Mar 20, 2023
5948799
rename InspectMsgReq -> InspectMsgRequest
kc1116 Mar 20, 2023
1dcbf9f
Update network/p2p/utils/rate_limiter_map_test.go
kc1116 Mar 20, 2023
e8f7318
Update control_message_validation.go
kc1116 Mar 20, 2023
bcaa9e3
Merge branch 'khalil/6474-graft-prune-spam' of github.com:dapperlabs/…
kc1116 Mar 20, 2023
8199280
document discard error return
kc1116 Mar 20, 2023
c60157c
Merge branch 'master-public' of github.com:dapperlabs/flow-go into kh…
kc1116 Mar 20, 2023
ab13908
reduce coupling of gossipsub rpc inspector
kc1116 Mar 20, 2023
0536669
Update fixtures.go
kc1116 Mar 20, 2023
dba6dad
update mocks
kc1116 Mar 20, 2023
167eb60
update godoc node should crash if validation limit error encountered
kc1116 Mar 20, 2023
214a236
lint fix
kc1116 Mar 20, 2023
69464e6
update all builders
kc1116 Mar 20, 2023
4cb94eb
Merge pull request #6589 from dapperlabs/master-sync
gomisha Mar 21, 2023
4e484a3
Merge pull request #6590 from dapperlabs/master-sync
gomisha Mar 22, 2023
d6fe87d
move rpc validation inspector start to the pubsub adapter
kc1116 Mar 22, 2023
c863764
rename BasicGossipSubRPCInspector -> GossipSubAppSpecificRpcInspector
kc1116 Mar 22, 2023
4f3d205
Update network/p2p/inspector/control_message_metrics.go
kc1116 Mar 22, 2023
4b7563e
remove obsolete sync.mutex from aggregate inspector
kc1116 Mar 22, 2023
528ba87
improve Inspect func readability
kc1116 Mar 22, 2023
889bb94
remove obsolete time.now override options
kc1116 Mar 22, 2023
fe12245
add rpc validation inspector to gossip sub configs using WithRPCValid…
kc1116 Mar 22, 2023
807f09a
replace CleanupLoop with component.Component to simplify rate limiter…
kc1116 Mar 22, 2023
64893ab
move GossipSubRPCInspector from cmd -> p2pbuilder
kc1116 Mar 22, 2023
d81af94
refactor hero store opts pattern
kc1116 Mar 22, 2023
fea0c99
Merge branch 'khalil/6474-graft-prune-spam' of github.com:dapperlabs/…
kc1116 Mar 22, 2023
ee839f3
remove extra LN config from epoch test suite
kc1116 Mar 22, 2023
6ba2e86
check type inference
kc1116 Mar 22, 2023
62057aa
simplify error returns in SporkIDFromTopic
kc1116 Mar 22, 2023
ebcd801
fix lint
kc1116 Mar 22, 2023
a30b5ab
Merge branch 'master-public' into khalil/6474-graft-prune-spam
kc1116 Mar 22, 2023
aba41a1
update mocks
kc1116 Mar 22, 2023
d6f68c3
Merge branch 'khalil/6474-graft-prune-spam' of github.com:dapperlabs/…
kc1116 Mar 22, 2023
af0318c
Update network/p2p/inspector/validation/control_message_validation.go
kc1116 Mar 23, 2023
c443cfb
log error message
kc1116 Mar 23, 2023
af8ef96
update notification distributor helper builder funcs
kc1116 Mar 23, 2023
e8a5dd3
Merge pull request #6598 from dapperlabs/master-sync
gomisha Mar 23, 2023
14a9b96
clean up RPC inspector injection
kc1116 Mar 23, 2023
9a8da84
lint fix
kc1116 Mar 23, 2023
924c9e4
set GossipSubInspectorNotifDistributor in corrupted builder
kc1116 Mar 23, 2023
b016d5b
Merge branch 'master-public' into khalil/6474-graft-prune-spam
kc1116 Mar 23, 2023
511c8cd
add Name() to print inspector component name when starting up
kc1116 Mar 23, 2023
0b97cd0
add godocs
kc1116 Mar 23, 2023
66b8994
Update network/channels/channels.go
kc1116 Mar 23, 2023
ea93cdc
Update network/channels/channels.go
kc1116 Mar 23, 2023
55a5132
Update control_message_validation.go
kc1116 Mar 24, 2023
2af1c23
remove requestMsgInspection func
kc1116 Mar 24, 2023
367f417
use NoopReadyDoneAware
kc1116 Mar 24, 2023
aa07aed
Merge branch 'khalil/6474-graft-prune-spam' of github.com:dapperlabs/…
kc1116 Mar 24, 2023
9593aab
wait for rate limiter to be done
kc1116 Mar 24, 2023
f535ce1
Merge pull request #6599 from dapperlabs/master-sync
gomisha Mar 24, 2023
de45f61
Merge pull request #6601 from dapperlabs/master-sync
gomisha Mar 27, 2023
1603ed0
Merge branch 'master-public' of github.com:dapperlabs/flow-go into kh…
kc1116 Mar 27, 2023
15d06ee
reduce entropy to 16 bytes
kc1116 Mar 27, 2023
fdc9c4e
add NoopComponent
kc1116 Mar 27, 2023
06662cb
Update control_message_validation.go
kc1116 Mar 27, 2023
e46de0a
remove rpc validation inspector from public libp2p node
kc1116 Mar 27, 2023
ba04bca
Merge branch 'master-public' of https://github.com/dapperlabs/flow-go…
gomisha Mar 27, 2023
827ce54
Merge pull request #6555 from dapperlabs/khalil/6474-graft-prune-spam
kc1116 Mar 27, 2023
09a5704
Merge branch 'master-public' of https://github.com/dapperlabs/flow-go…
gomisha Mar 27, 2023
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
9 changes: 1 addition & 8 deletions cmd/access/node_builder/access_node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import (
"github.com/onflow/flow-go/module/executiondatasync/execution_data"
finalizer "github.com/onflow/flow-go/module/finalizer/consensus"
"github.com/onflow/flow-go/module/id"
"github.com/onflow/flow-go/module/mempool/queue"
"github.com/onflow/flow-go/module/mempool/stdmap"
"github.com/onflow/flow-go/module/metrics"
"github.com/onflow/flow-go/module/metrics/unstaked"
Expand All @@ -68,7 +67,6 @@ import (
"github.com/onflow/flow-go/network/p2p/cache"
"github.com/onflow/flow-go/network/p2p/connection"
"github.com/onflow/flow-go/network/p2p/dht"
"github.com/onflow/flow-go/network/p2p/distributor"
"github.com/onflow/flow-go/network/p2p/middleware"
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
"github.com/onflow/flow-go/network/p2p/subscription"
Expand Down Expand Up @@ -699,12 +697,7 @@ func (builder *FlowAccessNodeBuilder) InitIDProviders() {
}
builder.IDTranslator = translator.NewHierarchicalIDTranslator(idCache, translator.NewPublicNetworkIDTranslator())

heroStoreOpts := []queue.HeroStoreConfigOption{queue.WithHeroStoreSizeLimit(builder.DisallowListNotificationCacheSize)}
if builder.HeroCacheMetricsEnable {
collector := metrics.DisallowListNotificationQueueMetricFactory(builder.MetricsRegisterer)
heroStoreOpts = append(heroStoreOpts, queue.WithHeroStoreCollector(collector))
}
builder.NodeDisallowListDistributor = distributor.DefaultDisallowListNotificationDistributor(builder.Logger, heroStoreOpts...)
builder.NodeDisallowListDistributor = cmd.BuildDisallowListNotificationDisseminator(builder.DisallowListNotificationCacheSize, builder.MetricsRegisterer, builder.Logger, builder.MetricsEnabled)

// The following wrapper allows to disallow-list byzantine nodes via an admin command:
// the wrapper overrides the 'Ejected' flag of disallow-listed nodes to true
Expand Down
80 changes: 50 additions & 30 deletions cmd/node_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/onflow/flow-go/network/p2p"
"github.com/onflow/flow-go/network/p2p/connection"
"github.com/onflow/flow-go/network/p2p/dns"
"github.com/onflow/flow-go/network/p2p/inspector/validation"
"github.com/onflow/flow-go/network/p2p/middleware"
"github.com/onflow/flow-go/network/p2p/unicast"
"github.com/onflow/flow-go/state/protocol"
Expand Down Expand Up @@ -188,33 +189,36 @@ type NetworkConfig struct {
// PreferredUnicastProtocols list of unicast protocols in preferred order
PreferredUnicastProtocols []string
NetworkReceivedMessageCacheSize uint32
// UnicastRateLimitDryRun will disable connection disconnects and gating when unicast rate limiters are configured
UnicastRateLimitDryRun bool
//UnicastRateLimitLockoutDuration the number of seconds a peer will be forced to wait before being allowed to successful reconnect to the node
// after being rate limited.
UnicastRateLimitLockoutDuration time.Duration
// UnicastMessageRateLimit amount of unicast messages that can be sent by a peer per second.
UnicastMessageRateLimit int
// UnicastBandwidthRateLimit bandwidth size in bytes a peer is allowed to send via unicast streams per second.
UnicastBandwidthRateLimit int
// UnicastBandwidthBurstLimit bandwidth size in bytes a peer is allowed to send via unicast streams at once.
UnicastBandwidthBurstLimit int
// PeerUpdateInterval interval used by the libp2p node peer manager component to periodically request peer updates.
PeerUpdateInterval time.Duration
// UnicastMessageTimeout how long a unicast transmission can take to complete.
UnicastMessageTimeout time.Duration

PeerUpdateInterval time.Duration
UnicastMessageTimeout time.Duration
DNSCacheTTL time.Duration
LibP2PResourceManagerConfig *p2pbuilder.ResourceManagerConfig
ConnectionManagerConfig *connection.ManagerConfig
// UnicastCreateStreamRetryDelay initial delay used in the exponential backoff for create stream retries
UnicastCreateStreamRetryDelay time.Duration
// DNSCacheTTL time to live for DNS cache
DNSCacheTTL time.Duration
// LibP2PResourceManagerConfig configuration for p2pbuilder.ResourceManagerConfig
LibP2PResourceManagerConfig *p2pbuilder.ResourceManagerConfig
// ConnectionManagerConfig configuration for connection.ManagerConfig=
ConnectionManagerConfig *connection.ManagerConfig
// size of the queue for notifications about new peers in the disallow list.
DisallowListNotificationCacheSize uint32
// size of the queue for notifications about gossipsub RPC inspections.
GossipSubRPCInspectorNotificationCacheSize uint32
GossipSubRPCInspectorCacheSize uint32
UnicastRateLimitersConfig *UnicastRateLimitersConfig
GossipSubRPCValidationConfigs *p2pbuilder.GossipSubRPCValidationConfigs
}

// UnicastRateLimitersConfig unicast rate limiter configuration for the message and bandwidth rate limiters.
type UnicastRateLimitersConfig struct {
// DryRun setting this to true will disable connection disconnects and gating when unicast rate limiters are configured
DryRun bool
// LockoutDuration the number of seconds a peer will be forced to wait before being allowed to successful reconnect to the node
// after being rate limited.
LockoutDuration time.Duration
// MessageRateLimit amount of unicast messages that can be sent by a peer per second.
MessageRateLimit int
// BandwidthRateLimit bandwidth size in bytes a peer is allowed to send via unicast streams per second.
BandwidthRateLimit int
// BandwidthBurstLimit bandwidth size in bytes a peer is allowed to send via unicast streams at once.
BandwidthBurstLimit int
}

// NodeConfig contains all the derived parameters such the NodeID, private keys etc. and initialized instances of
Expand Down Expand Up @@ -272,6 +276,8 @@ type NodeConfig struct {
UnicastRateLimiterDistributor p2p.UnicastRateLimiterDistributor
// NodeDisallowListDistributor notifies consumers of updates to disallow listing of nodes.
NodeDisallowListDistributor p2p.DisallowListNotificationDistributor
// GossipSubInspectorNotifDistributor notifies consumers when an invalid RPC message is encountered.
GossipSubInspectorNotifDistributor p2p.GossipSubInspectorNotificationDistributor
}

func DefaultBaseConfig() *BaseConfig {
Expand All @@ -288,19 +294,33 @@ func DefaultBaseConfig() *BaseConfig {
PeerUpdateInterval: connection.DefaultPeerUpdateInterval,
UnicastMessageTimeout: middleware.DefaultUnicastTimeout,
NetworkReceivedMessageCacheSize: p2p.DefaultReceiveCacheSize,
// By default we let networking layer trim connections to all nodes that
// are no longer part of protocol state.
NetworkConnectionPruning: connection.ConnectionPruningEnabled,
GossipSubConfig: p2pbuilder.DefaultGossipSubConfig(),
UnicastMessageRateLimit: 0,
UnicastBandwidthRateLimit: 0,
UnicastBandwidthBurstLimit: middleware.LargeMsgMaxUnicastMsgSize,
UnicastRateLimitLockoutDuration: 10,
UnicastRateLimitDryRun: true,
UnicastRateLimitersConfig: &UnicastRateLimitersConfig{
DryRun: true,
LockoutDuration: 10,
MessageRateLimit: 0,
BandwidthRateLimit: 0,
BandwidthBurstLimit: middleware.LargeMsgMaxUnicastMsgSize,
},
GossipSubRPCValidationConfigs: &p2pbuilder.GossipSubRPCValidationConfigs{
NumberOfWorkers: validation.DefaultNumberOfWorkers,
GraftLimits: map[string]int{
validation.DiscardThresholdMapKey: validation.DefaultGraftDiscardThreshold,
validation.SafetyThresholdMapKey: validation.DefaultGraftSafetyThreshold,
validation.RateLimitMapKey: validation.DefaultGraftRateLimit,
},
PruneLimits: map[string]int{
validation.DiscardThresholdMapKey: validation.DefaultPruneDiscardThreshold,
validation.SafetyThresholdMapKey: validation.DefaultPruneSafetyThreshold,
validation.RateLimitMapKey: validation.DefaultPruneRateLimit,
},
},
DNSCacheTTL: dns.DefaultTimeToLive,
LibP2PResourceManagerConfig: p2pbuilder.DefaultResourceManagerConfig(),
ConnectionManagerConfig: connection.DefaultConnManagerConfig(),
NetworkConnectionPruning: connection.ConnectionPruningEnabled,
GossipSubConfig: p2pbuilder.DefaultGossipSubConfig(),
GossipSubRPCInspectorNotificationCacheSize: distributor.DefaultGossipSubInspectorNotificationQueueCacheSize,
GossipSubRPCInspectorCacheSize: validation.DefaultControlMsgValidationInspectorQueueCacheSize,
DisallowListNotificationCacheSize: distributor.DefaultDisallowListNotificationQueueCacheSize,
},
nodeIDHex: NotSet,
Expand Down
18 changes: 9 additions & 9 deletions cmd/observer/node_builder/observer_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ import (
finalizer "github.com/onflow/flow-go/module/finalizer/consensus"
"github.com/onflow/flow-go/module/id"
"github.com/onflow/flow-go/module/local"
"github.com/onflow/flow-go/module/mempool/queue"
"github.com/onflow/flow-go/module/metrics"
"github.com/onflow/flow-go/module/state_synchronization"
edrequester "github.com/onflow/flow-go/module/state_synchronization/requester"
Expand All @@ -62,7 +61,6 @@ import (
"github.com/onflow/flow-go/network/p2p/blob"
"github.com/onflow/flow-go/network/p2p/cache"
p2pdht "github.com/onflow/flow-go/network/p2p/dht"
"github.com/onflow/flow-go/network/p2p/distributor"
"github.com/onflow/flow-go/network/p2p/keyutils"
"github.com/onflow/flow-go/network/p2p/middleware"
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
Expand Down Expand Up @@ -729,13 +727,7 @@ func (builder *ObserverServiceBuilder) InitIDProviders() {
}
builder.IDTranslator = translator.NewHierarchicalIDTranslator(idCache, translator.NewPublicNetworkIDTranslator())

heroStoreOpts := []queue.HeroStoreConfigOption{queue.WithHeroStoreSizeLimit(builder.DisallowListNotificationCacheSize)}
if builder.HeroCacheMetricsEnable {
collector := metrics.DisallowListNotificationQueueMetricFactory(builder.MetricsRegisterer)
heroStoreOpts = append(heroStoreOpts, queue.WithHeroStoreCollector(collector))
}

builder.NodeDisallowListDistributor = distributor.DefaultDisallowListNotificationDistributor(builder.Logger, heroStoreOpts...)
builder.NodeDisallowListDistributor = cmd.BuildDisallowListNotificationDisseminator(builder.DisallowListNotificationCacheSize, builder.MetricsRegisterer, builder.Logger, builder.MetricsEnabled)

// The following wrapper allows to black-list byzantine nodes via an admin command:
// the wrapper overrides the 'Ejected' flag of disallow-listed nodes to true
Expand Down Expand Up @@ -866,6 +858,13 @@ func (builder *ObserverServiceBuilder) initLibP2PFactory(networkKey crypto.Priva
builder.IdentityProvider,
builder.GossipSubConfig.LocalMeshLogInterval)

builder.GossipSubInspectorNotifDistributor = cmd.BuildGossipsubRPCValidationInspectorNotificationDisseminator(builder.GossipSubRPCInspectorNotificationCacheSize, builder.MetricsRegisterer, builder.Logger, builder.MetricsEnabled)
heroStoreOpts := cmd.BuildGossipsubRPCValidationInspectorHeroStoreOpts(builder.GossipSubRPCInspectorCacheSize, builder.MetricsRegisterer, builder.MetricsEnabled)
rpcValidationInspector, err := p2pbuilder.BuildGossipSubRPCValidationInspector(builder.Logger, builder.SporkID, builder.GossipSubRPCValidationConfigs, builder.GossipSubInspectorNotifDistributor, heroStoreOpts...)
if err != nil {
return nil, fmt.Errorf("failed to create gossipsub rpc validation inspector: %w", err)
}

node, err := p2pbuilder.NewNodeBuilder(
builder.Logger,
builder.Metrics.Network,
Expand All @@ -889,6 +888,7 @@ func (builder *ObserverServiceBuilder) initLibP2PFactory(networkKey crypto.Priva
SetStreamCreationRetryInterval(builder.UnicastCreateStreamRetryDelay).
SetGossipSubTracer(meshTracer).
SetGossipSubScoreTracerInterval(builder.GossipSubConfig.ScoreTracerInterval).
SetGossipSubValidationInspector(rpcValidationInspector).
Build()

if err != nil {
Expand Down