Skip to content

Commit 1b065d9

Browse files
committed
add metrics inspector test
1 parent dce2111 commit 1b065d9

File tree

9 files changed

+160
-59
lines changed

9 files changed

+160
-59
lines changed

insecure/corruptlibp2p/libp2p_node_factory.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/onflow/flow-go/network/p2p/inspector"
1919
"github.com/onflow/flow-go/network/p2p/inspector/validation"
2020
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
21+
inspectorbuilder "github.com/onflow/flow-go/network/p2p/p2pbuilder/inspector"
2122
"github.com/onflow/flow-go/network/p2p/p2pnode"
2223
)
2324

@@ -47,7 +48,7 @@ func NewCorruptLibP2PNodeFactory(
4748

4849
gossipSubMetrics := p2pnode.NewGossipSubControlMessageMetrics(metrics, log)
4950
metricsInspector := inspector.NewControlMsgMetricsInspector(log, gossipSubMetrics, inspector.DefaultControlMsgMetricsInspectorNumberOfWorkers)
50-
rpcValidationInspector := validation.NewControlMsgValidationInspector(log, sporkId, p2pbuilder.DefaultRPCValidationConfig(), distributor.DefaultGossipSubInspectorNotificationDistributor(log))
51+
rpcValidationInspector := validation.NewControlMsgValidationInspector(log, sporkId, inspectorbuilder.DefaultRPCValidationConfig(), distributor.DefaultGossipSubInspectorNotificationDistributor(log))
5152
gossipSubCfg.RPCInspectors = []p2p.GossipSubRPCInspector{metricsInspector, rpcValidationInspector}
5253
builder, err := p2pbuilder.DefaultNodeBuilder(
5354
log,
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
package rpc_inspector
2+
3+
import (
4+
"context"
5+
"testing"
6+
"time"
7+
8+
pubsub "github.com/libp2p/go-libp2p-pubsub"
9+
"github.com/libp2p/go-libp2p/core/peer"
10+
"github.com/stretchr/testify/mock"
11+
"go.uber.org/atomic"
12+
13+
"github.com/onflow/flow-go/insecure/corruptlibp2p"
14+
"github.com/onflow/flow-go/insecure/internal"
15+
"github.com/onflow/flow-go/model/flow"
16+
"github.com/onflow/flow-go/module/irrecoverable"
17+
"github.com/onflow/flow-go/network/channels"
18+
"github.com/onflow/flow-go/network/p2p"
19+
"github.com/onflow/flow-go/network/p2p/inspector"
20+
mockp2p "github.com/onflow/flow-go/network/p2p/mock"
21+
p2ptest "github.com/onflow/flow-go/network/p2p/test"
22+
"github.com/onflow/flow-go/utils/unittest"
23+
"github.com/stretchr/testify/require"
24+
)
25+
26+
// TestMetricsInspector_ObserveRPC ensures that the gossipsub rpc metrics inspector observes metrics for control messages as expected.
27+
func TestMetricsInspector_ObserveRPC(t *testing.T) {
28+
t.Parallel()
29+
role := flow.RoleConsensus
30+
sporkID := unittest.IdentifierFixture()
31+
spammer := corruptlibp2p.NewGossipSubRouterSpammer(t, sporkID, role)
32+
ctx, cancel := context.WithCancel(context.Background())
33+
signalerCtx := irrecoverable.NewMockSignalerContext(t, ctx)
34+
35+
messageCount := 100
36+
controlMessageCount := 20
37+
38+
metricsObservedCount := atomic.NewInt64(0)
39+
mockMetricsObserver := mockp2p.NewGossipSubControlMetricsObserver(t)
40+
mockMetricsObserver.On("ObserveRPC", mock.Anything, mock.Anything).
41+
Run(func(args mock.Arguments) {
42+
peerID, ok := args.Get(0).(peer.ID)
43+
require.True(t, ok)
44+
require.Equal(t, spammer.SpammerNode.Host().ID(), peerID)
45+
rpc, ok := args.Get(1).(*pubsub.RPC)
46+
require.True(t, ok)
47+
// there are some default rpc messages exchanged between the nodes on startup
48+
// we can ignore those rpc messages not configured directly by this test
49+
if len(rpc.GetControl().GetPrune()) != 100 {
50+
return
51+
}
52+
require.True(t, messageCount == len(rpc.GetControl().GetPrune()))
53+
require.True(t, messageCount == len(rpc.GetControl().GetGraft()))
54+
require.True(t, messageCount == len(rpc.GetControl().GetIhave()))
55+
metricsObservedCount.Inc()
56+
})
57+
metricsInspector := inspector.NewControlMsgMetricsInspector(unittest.Logger(), mockMetricsObserver, 2)
58+
corruptInspectorFunc := corruptlibp2p.CorruptInspectorFunc(metricsInspector)
59+
victimNode, _ := p2ptest.NodeFixture(
60+
t,
61+
sporkID,
62+
t.Name(),
63+
p2ptest.WithRole(role),
64+
internal.WithCorruptGossipSub(corruptlibp2p.CorruptGossipSubFactory(),
65+
corruptlibp2p.CorruptGossipSubConfigFactoryWithInspector(corruptInspectorFunc)),
66+
)
67+
metricsInspector.Start(signalerCtx)
68+
nodes := []p2p.LibP2PNode{victimNode, spammer.SpammerNode}
69+
startNodesAndEnsureConnected(t, signalerCtx, nodes, sporkID)
70+
spammer.Start(t)
71+
defer stopNodesAndInspector(t, cancel, nodes, metricsInspector)
72+
// prepare to spam - generate control messages
73+
ctlMsgs := spammer.GenerateCtlMessages(controlMessageCount,
74+
corruptlibp2p.WithGraft(messageCount, channels.PushBlocks.String()),
75+
corruptlibp2p.WithPrune(messageCount, channels.PushBlocks.String()),
76+
corruptlibp2p.WithIHave(messageCount, 1000))
77+
78+
// start spamming the victim peer
79+
spammer.SpamControlMessage(t, victimNode, ctlMsgs)
80+
81+
// eventually we should process each spammed control message and observe metrics for them
82+
require.Eventually(t, func() bool {
83+
return metricsObservedCount.Load() == int64(controlMessageCount)
84+
}, 2*time.Second, 10*time.Millisecond, "did not observe metrics for all control messages on time")
85+
}

insecure/rpc_inspector/utils.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package rpc_inspector
2+
3+
import (
4+
"context"
5+
"testing"
6+
"time"
7+
8+
"github.com/onflow/flow-go/model/flow"
9+
"github.com/onflow/flow-go/module/irrecoverable"
10+
"github.com/onflow/flow-go/network/channels"
11+
"github.com/onflow/flow-go/network/p2p"
12+
p2ptest "github.com/onflow/flow-go/network/p2p/test"
13+
"github.com/onflow/flow-go/utils/unittest"
14+
)
15+
16+
// StartNodesAndEnsureConnected starts the victim and spammer node and ensures they are both connected.
17+
func startNodesAndEnsureConnected(t *testing.T, ctx irrecoverable.SignalerContext, nodes []p2p.LibP2PNode, sporkID flow.Identifier) {
18+
p2ptest.StartNodes(t, ctx, nodes, 5*time.Second)
19+
// prior to the test we should ensure that spammer and victim connect.
20+
// this is vital as the spammer will circumvent the normal pubsub subscription mechanism and send iHAVE messages directly to the victim.
21+
// without a prior connection established, directly spamming pubsub messages may cause a race condition in the pubsub implementation.
22+
p2ptest.EnsureConnected(t, ctx, nodes)
23+
p2ptest.EnsurePubsubMessageExchange(t, ctx, nodes, func() (interface{}, channels.Topic) {
24+
blockTopic := channels.TopicFromChannel(channels.PushBlocks, sporkID)
25+
return unittest.ProposalFixture(), blockTopic
26+
})
27+
}
28+
29+
func stopNodesAndInspector(t *testing.T, cancel context.CancelFunc, nodes []p2p.LibP2PNode, inspector p2p.GossipSubRPCInspector) {
30+
p2ptest.StopNodes(t, nodes, cancel, 5*time.Second)
31+
unittest.RequireComponentsDoneBefore(t, time.Second, inspector)
32+
}

insecure/rpc_inspector_test/control_message_validation_test.go renamed to insecure/rpc_inspector/validation_inspector_test.go

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package rpc_inspector_test
1+
package rpc_inspector
22

33
import (
44
"context"
@@ -23,14 +23,14 @@ import (
2323
"github.com/onflow/flow-go/network/p2p"
2424
"github.com/onflow/flow-go/network/p2p/inspector/validation"
2525
mockp2p "github.com/onflow/flow-go/network/p2p/mock"
26-
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
26+
inspectorbuilder "github.com/onflow/flow-go/network/p2p/p2pbuilder/inspector"
2727
p2ptest "github.com/onflow/flow-go/network/p2p/test"
2828
"github.com/onflow/flow-go/utils/unittest"
2929
)
3030

31-
// TestInspect_SafetyThreshold ensures that when RPC control message count is below the configured safety threshold the control message validation inspector
31+
// TestValidationInspector_SafetyThreshold ensures that when RPC control message count is below the configured safety threshold the control message validation inspector
3232
// does not return any errors and validation is skipped.
33-
func TestInspect_SafetyThreshold(t *testing.T) {
33+
func TestValidationInspector_SafetyThreshold(t *testing.T) {
3434
t.Parallel()
3535
role := flow.RoleConsensus
3636
sporkID := unittest.IdentifierFixture()
@@ -40,7 +40,7 @@ func TestInspect_SafetyThreshold(t *testing.T) {
4040
// if GRAFT/PRUNE message count is lower than safety threshold the RPC validation should pass
4141
safetyThreshold := uint64(10)
4242
// create our RPC validation inspector
43-
inspectorConfig := p2pbuilder.DefaultRPCValidationConfig()
43+
inspectorConfig := inspectorbuilder.DefaultRPCValidationConfig()
4444
inspectorConfig.NumberOfWorkers = 1
4545
inspectorConfig.GraftValidationCfg.SafetyThreshold = safetyThreshold
4646
inspectorConfig.PruneValidationCfg.SafetyThreshold = safetyThreshold
@@ -100,9 +100,9 @@ func TestInspect_SafetyThreshold(t *testing.T) {
100100
}, 2*time.Second, 10*time.Millisecond)
101101
}
102102

103-
// TestInspect_DiscardThreshold ensures that when RPC control message count is above the configured discard threshold the control message validation inspector
103+
// TestValidationInspector_DiscardThreshold ensures that when RPC control message count is above the configured discard threshold the control message validation inspector
104104
// returns the expected error.
105-
func TestInspect_DiscardThreshold(t *testing.T) {
105+
func TestValidationInspector_DiscardThreshold(t *testing.T) {
106106
t.Parallel()
107107
role := flow.RoleConsensus
108108
sporkID := unittest.IdentifierFixture()
@@ -112,7 +112,7 @@ func TestInspect_DiscardThreshold(t *testing.T) {
112112
// if GRAFT/PRUNE message count is higher than discard threshold the RPC validation should fail and expected error should be returned
113113
discardThreshold := uint64(10)
114114
// create our RPC validation inspector
115-
inspectorConfig := p2pbuilder.DefaultRPCValidationConfig()
115+
inspectorConfig := inspectorbuilder.DefaultRPCValidationConfig()
116116
inspectorConfig.NumberOfWorkers = 1
117117
inspectorConfig.GraftValidationCfg.DiscardThreshold = discardThreshold
118118
inspectorConfig.PruneValidationCfg.DiscardThreshold = discardThreshold
@@ -170,8 +170,8 @@ func TestInspect_DiscardThreshold(t *testing.T) {
170170
unittest.RequireCloseBefore(t, done, 2*time.Second, "failed to inspect RPC messages on time")
171171
}
172172

173-
// TestInspect_RateLimitedPeer ensures that the control message validation inspector rate limits peers per control message type as expected.
174-
func TestInspect_RateLimitedPeer(t *testing.T) {
173+
// TestValidationInspector_RateLimitedPeer ensures that the control message validation inspector rate limits peers per control message type as expected.
174+
func TestValidationInspector_RateLimitedPeer(t *testing.T) {
175175
t.Parallel()
176176
role := flow.RoleConsensus
177177
sporkID := unittest.IdentifierFixture()
@@ -180,7 +180,7 @@ func TestInspect_RateLimitedPeer(t *testing.T) {
180180
signalerCtx := irrecoverable.NewMockSignalerContext(t, ctx)
181181

182182
// create our RPC validation inspector
183-
inspectorConfig := p2pbuilder.DefaultRPCValidationConfig()
183+
inspectorConfig := inspectorbuilder.DefaultRPCValidationConfig()
184184
inspectorConfig.NumberOfWorkers = 1
185185

186186
// here we set the message count to the amount of flow channels
@@ -245,8 +245,8 @@ func TestInspect_RateLimitedPeer(t *testing.T) {
245245
unittest.RequireCloseBefore(t, done, 2*time.Second, "failed to inspect RPC messages on time")
246246
}
247247

248-
// TestInspect_InvalidTopicID ensures that when an RPC control message contains an invalid topic ID the expected error is logged.
249-
func TestInspect_InvalidTopicID(t *testing.T) {
248+
// TestValidationInspector_InvalidTopicID ensures that when an RPC control message contains an invalid topic ID the expected error is logged.
249+
func TestValidationInspector_InvalidTopicID(t *testing.T) {
250250
t.Parallel()
251251
role := flow.RoleConsensus
252252
sporkID := unittest.IdentifierFixture()
@@ -255,7 +255,7 @@ func TestInspect_InvalidTopicID(t *testing.T) {
255255
signalerCtx := irrecoverable.NewMockSignalerContext(t, ctx)
256256
// if GRAFT/PRUNE message count is higher than discard threshold the RPC validation should fail and expected error should be returned
257257
// create our RPC validation inspector
258-
inspectorConfig := p2pbuilder.DefaultRPCValidationConfig()
258+
inspectorConfig := inspectorbuilder.DefaultRPCValidationConfig()
259259
inspectorConfig.PruneValidationCfg.SafetyThreshold = 0
260260
inspectorConfig.GraftValidationCfg.SafetyThreshold = 0
261261
inspectorConfig.NumberOfWorkers = 1
@@ -328,21 +328,3 @@ func TestInspect_InvalidTopicID(t *testing.T) {
328328

329329
unittest.RequireCloseBefore(t, done, 5*time.Second, "failed to inspect RPC messages on time")
330330
}
331-
332-
// StartNodesAndEnsureConnected starts the victim and spammer node and ensures they are both connected.
333-
func startNodesAndEnsureConnected(t *testing.T, ctx irrecoverable.SignalerContext, nodes []p2p.LibP2PNode, sporkID flow.Identifier) {
334-
p2ptest.StartNodes(t, ctx, nodes, 5*time.Second)
335-
// prior to the test we should ensure that spammer and victim connect.
336-
// this is vital as the spammer will circumvent the normal pubsub subscription mechanism and send iHAVE messages directly to the victim.
337-
// without a prior connection established, directly spamming pubsub messages may cause a race condition in the pubsub implementation.
338-
p2ptest.EnsureConnected(t, ctx, nodes)
339-
p2ptest.EnsurePubsubMessageExchange(t, ctx, nodes, func() (interface{}, channels.Topic) {
340-
blockTopic := channels.TopicFromChannel(channels.PushBlocks, sporkID)
341-
return unittest.ProposalFixture(), blockTopic
342-
})
343-
}
344-
345-
func stopNodesAndInspector(t *testing.T, cancel context.CancelFunc, nodes []p2p.LibP2PNode, inspector *validation.ControlMsgValidationInspector) {
346-
p2ptest.StopNodes(t, nodes, cancel, 5*time.Second)
347-
unittest.RequireComponentsDoneBefore(t, time.Second, inspector)
348-
}

network/internal/p2pfixtures/fixtures.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
"github.com/onflow/flow-go/network/p2p/inspector/validation"
3737
"github.com/onflow/flow-go/network/p2p/keyutils"
3838
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
39+
inspectorbuilder "github.com/onflow/flow-go/network/p2p/p2pbuilder/inspector"
3940
"github.com/onflow/flow-go/network/p2p/p2pnode"
4041
"github.com/onflow/flow-go/network/p2p/tracer"
4142
"github.com/onflow/flow-go/network/p2p/unicast"
@@ -109,7 +110,7 @@ func CreateNode(t *testing.T, networkKey crypto.PrivateKey, sporkID flow.Identif
109110
idProvider,
110111
p2pbuilder.DefaultGossipSubConfig().LocalMeshLogInterval)
111112

112-
defaultRPCValidationInpectorCfg := p2pbuilder.DefaultRPCValidationConfig()
113+
defaultRPCValidationInpectorCfg := inspectorbuilder.DefaultRPCValidationConfig()
113114
rpcInspectorNotifDistributor := distributor.DefaultGossipSubInspectorNotificationDistributor(logger)
114115

115116
gossipSubMetrics := p2pnode.NewGossipSubControlMessageMetrics(metrics.NewNoopCollector(), logger)

network/internal/testutils/testUtil.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
"github.com/onflow/flow-go/network/p2p/inspector/validation"
4343
"github.com/onflow/flow-go/network/p2p/middleware"
4444
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
45+
inspectorbuilder "github.com/onflow/flow-go/network/p2p/p2pbuilder/inspector"
4546
"github.com/onflow/flow-go/network/p2p/p2pnode"
4647
"github.com/onflow/flow-go/network/p2p/subscription"
4748
"github.com/onflow/flow-go/network/p2p/translator"
@@ -451,7 +452,7 @@ func generateLibP2PNode(t *testing.T,
451452
connManager, err := NewTagWatchingConnManager(logger, noopMetrics, connection.DefaultConnManagerConfig())
452453
require.NoError(t, err)
453454

454-
defaultRPCValidationInpectorCfg := p2pbuilder.DefaultRPCValidationConfig()
455+
defaultRPCValidationInpectorCfg := inspectorbuilder.DefaultRPCValidationConfig()
455456
rpcInspectorNotifDistributor := distributor.DefaultGossipSubInspectorNotificationDistributor(logger)
456457

457458
gossipSubMetrics := p2pnode.NewGossipSubControlMessageMetrics(metrics.NewNoopCollector(), logger)

network/p2p/p2pbuilder/inspector/rpc_inspector_builder.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,24 @@ func (b *GossipSubInspectorBuilder) Build() ([]p2p.GossipSubRPCInspector, error)
165165
}
166166
return []p2p.GossipSubRPCInspector{metricsInspector, validationInspector}, nil
167167
}
168+
169+
// DefaultRPCValidationConfig returns default RPC control message inspector config.
170+
func DefaultRPCValidationConfig(opts ...queue.HeroStoreConfigOption) *validation.ControlMsgValidationInspectorConfig {
171+
graftCfg, _ := validation.NewCtrlMsgValidationConfig(p2p.CtrlMsgGraft, validation.CtrlMsgValidationLimits{
172+
validation.DiscardThresholdMapKey: validation.DefaultGraftDiscardThreshold,
173+
validation.SafetyThresholdMapKey: validation.DefaultGraftSafetyThreshold,
174+
validation.RateLimitMapKey: validation.DefaultGraftRateLimit,
175+
})
176+
pruneCfg, _ := validation.NewCtrlMsgValidationConfig(p2p.CtrlMsgPrune, validation.CtrlMsgValidationLimits{
177+
validation.DiscardThresholdMapKey: validation.DefaultPruneDiscardThreshold,
178+
validation.SafetyThresholdMapKey: validation.DefaultPruneSafetyThreshold,
179+
validation.RateLimitMapKey: validation.DefaultPruneRateLimit,
180+
})
181+
182+
return &validation.ControlMsgValidationInspectorConfig{
183+
NumberOfWorkers: validation.DefaultNumberOfWorkers,
184+
InspectMsgStoreOpts: opts,
185+
GraftValidationCfg: graftCfg,
186+
PruneValidationCfg: pruneCfg,
187+
}
188+
}

network/p2p/p2pbuilder/libp2pNodeBuilder.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
madns "github.com/multiformats/go-multiaddr-dns"
2222
"github.com/rs/zerolog"
2323

24-
"github.com/onflow/flow-go/module/mempool/queue"
2524
"github.com/onflow/flow-go/network/p2p"
2625
"github.com/onflow/flow-go/network/p2p/connection"
2726
"github.com/onflow/flow-go/network/p2p/dht"
@@ -37,7 +36,6 @@ import (
3736
"github.com/onflow/flow-go/module"
3837
"github.com/onflow/flow-go/module/component"
3938
"github.com/onflow/flow-go/module/irrecoverable"
40-
"github.com/onflow/flow-go/network/p2p/inspector/validation"
4139
"github.com/onflow/flow-go/network/p2p/keyutils"
4240
gossipsubbuilder "github.com/onflow/flow-go/network/p2p/p2pbuilder/gossipsub"
4341
"github.com/onflow/flow-go/network/p2p/unicast"
@@ -157,27 +155,6 @@ func DefaultResourceManagerConfig() *ResourceManagerConfig {
157155
}
158156
}
159157

160-
// DefaultRPCValidationConfig returns default RPC control message inspector config.
161-
func DefaultRPCValidationConfig(opts ...queue.HeroStoreConfigOption) *validation.ControlMsgValidationInspectorConfig {
162-
graftCfg, _ := validation.NewCtrlMsgValidationConfig(p2p.CtrlMsgGraft, validation.CtrlMsgValidationLimits{
163-
validation.DiscardThresholdMapKey: validation.DefaultGraftDiscardThreshold,
164-
validation.SafetyThresholdMapKey: validation.DefaultGraftSafetyThreshold,
165-
validation.RateLimitMapKey: validation.DefaultGraftRateLimit,
166-
})
167-
pruneCfg, _ := validation.NewCtrlMsgValidationConfig(p2p.CtrlMsgPrune, validation.CtrlMsgValidationLimits{
168-
validation.DiscardThresholdMapKey: validation.DefaultPruneDiscardThreshold,
169-
validation.SafetyThresholdMapKey: validation.DefaultPruneSafetyThreshold,
170-
validation.RateLimitMapKey: validation.DefaultPruneRateLimit,
171-
})
172-
173-
return &validation.ControlMsgValidationInspectorConfig{
174-
NumberOfWorkers: validation.DefaultNumberOfWorkers,
175-
InspectMsgStoreOpts: opts,
176-
GraftValidationCfg: graftCfg,
177-
PruneValidationCfg: pruneCfg,
178-
}
179-
}
180-
181158
type LibP2PNodeBuilder struct {
182159
gossipSubBuilder p2p.GossipSubBuilder
183160
sporkID flow.Identifier

network/p2p/test/fixtures.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"github.com/onflow/flow-go/network/p2p/inspector"
3434
"github.com/onflow/flow-go/network/p2p/inspector/validation"
3535
"github.com/onflow/flow-go/network/p2p/p2pbuilder"
36+
inspectorbuilder "github.com/onflow/flow-go/network/p2p/p2pbuilder/inspector"
3637
"github.com/onflow/flow-go/network/p2p/p2pnode"
3738
"github.com/onflow/flow-go/network/p2p/unicast"
3839
"github.com/onflow/flow-go/network/p2p/unicast/protocols"
@@ -60,7 +61,7 @@ func NodeFixture(
6061
) (p2p.LibP2PNode, flow.Identity) {
6162
// default parameters
6263
logger := unittest.Logger().Level(zerolog.ErrorLevel)
63-
defaultRPCValidationInpectorCfg := p2pbuilder.DefaultRPCValidationConfig()
64+
defaultRPCValidationInpectorCfg := inspectorbuilder.DefaultRPCValidationConfig()
6465
rpcInspectorNotifDistributor := distributor.DefaultGossipSubInspectorNotificationDistributor(logger)
6566
gossipSubMetrics := p2pnode.NewGossipSubControlMessageMetrics(metrics.NewNoopCollector(), logger)
6667
metricsInspector := inspector.NewControlMsgMetricsInspector(logger, gossipSubMetrics, inspector.DefaultControlMsgMetricsInspectorNumberOfWorkers)

0 commit comments

Comments
 (0)