@cryptotaxi247 / kubo / commits / 514411bed

feat: opt-in Swarm.ResourceMgr (go-libp2p v0.18) (#8680)

* update go-libp2p to v0.18.0 * initialize the resource manager * add resource manager stats/limit commands * load limit file when building resource manager * log absent limit file * write rcmgr to file when IPFS_DEBUG_RCMGR is set * fix: mark swarm limit|stats as experimental * feat(cfg): opt-in Swarm.ResourceMgr This ensures we can safely test the resource manager without impacting default behavior. - Resource manager is disabled by default - Default for Swarm.ResourceMgr.Enabled is false for now - Swarm.ResourceMgr.Limits allows user to tweak limits per specific scope in a way that is persisted across restarts - 'ipfs swarm limit system' outputs human-readable json - 'ipfs swarm limit system new-limits.json' sets new runtime limits (but does not change Swarm.ResourceMgr.Limits in the config) Conventions to make libp2p devs life easier: - 'IPFS_RCMGR=1 ipfs daemon' overrides the config and enables resource manager - 'limit.json' overrides implicit defaults from libp2p (if present) * docs(config): small tweaks * fix: skip libp2p.ResourceManager if disabled This ensures 'ipfs swarm limit|stats' work only when enabled. * fix: use NullResourceManager when disabled This reverts commit b19f7c9eca4cee4187f8cba3389dc2c930258512. after clarification feedback from https://github.com/ipfs/go-ipfs/pull/8680#discussion_r841680182 * style: rename IPFS_RCMGR to LIBP2P_RCMGR preexisting libp2p toggles use LIBP2P_ prefix * test: Swarm.ResourceMgr * fix: location of opt-in limit.json and rcmgr.json.gz Places these files inside of IPFS_PATH * Update docs/config.md * feat: expose rcmgr metrics when enabled (#8785) * add metrics for the resource manager * export protocol and service name in Prometheus metrics * fix: expose rcmgr metrics only when enabled Co-authored-by: Marcin Rataj <lidel@lidel.org> * refactor: rcmgr_metrics.go * refactor: rcmgr_defaults.go This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled We keep vendored copy to ensure go-ipfs is not impacted when go-libp2p decides to change defaults in any of the future releases. * refactor: adjustedDefaultLimits Cleans up the way we initialize defaults and adds a fix for case when connection manager runs with high limits. It also hides `Swarm.ResourceMgr.Limits` until we have a better understanding what syntax makes sense. * chore: cleanup after a review * fix: restore go-ipld-prime v0.14.2 * fix: restore go-ds-flatfs v0.5.1 Co-authored-by: Lucas Molas <schomatis@gmail.com> Co-authored-by: Marcin Rataj <lidel@lidel.org>

Marten Seemann committed Apr 8, 2022 at 02:06 UTC 514411bedbd7d22d277d31f13d8ad312224c3ad4
24 files changed +1439 -109
config/swarm.go
+59
@@ -49,6 +49,9 @@ type SwarmConfig struct {
49
50 // ConnMgr configures the connection manager.
51 ConnMgr ConnMgr
52 +
53 + // ResourceMgr configures the libp2p Network Resource Manager
54 + ResourceMgr ResourceMgr
55 }
56
57 type RelayClient struct {
@@ -129,3 +132,59 @@ type ConnMgr struct {
132 HighWater int
133 GracePeriod string
134 }
135 +
136 +// ResourceMgr defines configuration options for the libp2p Network Resource Manager
137 +// <https://github.com/libp2p/go-libp2p-resource-manager#readme>
138 +type ResourceMgr struct {
139 + // Enables the Network Resource Manager feature
140 + Enabled Flag `json:",omitempty"`
141 +
142 + /* TODO: decide if and how we want to expose limits in our config
143 + Limits *ResourceMgrScopeConfig `json:",omitempty"` */
144 +}
145 +
146 +const (
147 + ResourceMgrSystemScope = "system"
148 + ResourceMgrTransientScope = "transient"
149 + ResourceMgrServiceScopePrefix = "svc:"
150 + ResourceMgrProtocolScopePrefix = "proto:"
151 + ResourceMgrPeerScopePrefix = "peer:"
152 +)
153 +
154 +/* TODO: decide if and how we want to expose limits in our config
155 +type ResourceMgrLimitsConfig struct {
156 + System *ResourceMgrScopeConfig `json:",omitempty"`
157 + Transient *ResourceMgrScopeConfig `json:",omitempty"`
158 +
159 + ServiceDefault *ResourceMgrScopeConfig `json:",omitempty"`
160 + ServicePeerDefault *ResourceMgrScopeConfig `json:",omitempty"`
161 + Service map[string]ResourceMgrScopeConfig `json:",omitempty"`
162 + ServicePeer map[string]ResourceMgrScopeConfig `json:",omitempty"`
163 +
164 + ProtocolDefault *ResourceMgrScopeConfig `json:",omitempty"`
165 + ProtocolPeerDefault *ResourceMgrScopeConfig `json:",omitempty"`
166 + Protocol map[string]ResourceMgrScopeConfig `json:",omitempty"`
167 + ProtocolPeer map[string]ResourceMgrScopeConfig `json:",omitempty"`
168 +
169 + PeerDefault *ResourceMgrScopeConfig `json:",omitempty"`
170 + Peer map[string]ResourceMgrScopeConfig `json:",omitempty"`
171 +
172 + Conn *ResourceMgrScopeConfig `json:",omitempty"`
173 + Stream *ResourceMgrScopeConfig `json:",omitempty"`
174 +}
175 +*/
176 +
177 +// libp2p Network Resource Manager config for a scope
178 +type ResourceMgrScopeConfig struct {
179 + Dynamic bool `json:",omitempty"`
180 + // set if Dynamic is false
181 + Memory int64 `json:",omitempty"`
182 + // set if Dynamic is true
183 + MemoryFraction float64 `json:",omitempty"`
184 + MinMemory int64 `json:",omitempty"`
185 + MaxMemory int64 `json:",omitempty"`
186 +
187 + Streams, StreamsInbound, StreamsOutbound int
188 + Conns, ConnsInbound, ConnsOutbound int
189 + FD int
190 +}
core/commands/commands_test.go
+2
@@ -237,11 +237,13 @@ func TestCommands(t *testing.T) {
237 "/swarm/filters",
238 "/swarm/filters/add",
239 "/swarm/filters/rm",
240 + "/swarm/limit",
241 "/swarm/peers",
242 "/swarm/peering",
243 "/swarm/peering/add",
244 "/swarm/peering/ls",
245 "/swarm/peering/rm",
246 + "/swarm/stats",
247 "/tar",
248 "/tar/add",
249 "/tar/cat",
core/commands/config.go
+11 -9
@@ -215,18 +215,20 @@ NOTE: For security reasons, this command will omit your private key and remote s
215 return cmds.EmitOnce(res, &cfg)
216 },
217 Encoders: cmds.EncoderMap{
218 - cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *map[string]interface{}) error {
219 - buf, err := config.HumanOutput(out)
220 - if err != nil {
221 - return err
222 - }
223 - buf = append(buf, byte('\n'))
224 - _, err = w.Write(buf)
225 - return err
226 - }),
218 + cmds.Text: HumanJSONEncoder,
219 },
220 }
221
222 +var HumanJSONEncoder = cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, out *map[string]interface{}) error {
223 + buf, err := config.HumanOutput(out)
224 + if err != nil {
225 + return err
226 + }
227 + buf = append(buf, byte('\n'))
228 + _, err = w.Write(buf)
229 + return err
230 +})
231 +
232 // Scrubs value and returns error if missing
233 func scrubValue(m map[string]interface{}, key []string) (map[string]interface{}, error) {
234 return scrubMapInternal(m, key, false)
core/commands/swarm.go
+139 -6
@@ -1,7 +1,9 @@
1 package commands
2
3 import (
4 + "bytes"
5 "context"
6 + "encoding/json"
7 "errors"
8 "fmt"
9 "io"
@@ -10,15 +12,17 @@ import (
12 "sync"
13 "time"
14
13 - commands "github.com/ipfs/go-ipfs/commands"
14 - cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv"
15 - repo "github.com/ipfs/go-ipfs/repo"
16 - fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo"
15 + files "github.com/ipfs/go-ipfs-files"
16 + "github.com/ipfs/go-ipfs/commands"
17 + "github.com/ipfs/go-ipfs/config"
18 + "github.com/ipfs/go-ipfs/core/commands/cmdenv"
19 + "github.com/ipfs/go-ipfs/core/node/libp2p"
20 + "github.com/ipfs/go-ipfs/repo"
21 + "github.com/ipfs/go-ipfs/repo/fsrepo"
22
23 cmds "github.com/ipfs/go-ipfs-cmds"
19 - config "github.com/ipfs/go-ipfs/config"
24 inet "github.com/libp2p/go-libp2p-core/network"
21 - peer "github.com/libp2p/go-libp2p-core/peer"
25 + "github.com/libp2p/go-libp2p-core/peer"
26 ma "github.com/multiformats/go-multiaddr"
27 madns "github.com/multiformats/go-multiaddr-dns"
28 mamask "github.com/whyrusleeping/multiaddr-filter"
@@ -52,6 +56,8 @@ ipfs peers in the internet.
56 "filters": swarmFiltersCmd,
57 "peers": swarmPeersCmd,
58 "peering": swarmPeeringCmd,
59 + "stats": swarmStatsCmd, // libp2p Network Resource Manager
60 + "limit": swarmLimitCmd, // libp2p Network Resource Manager
61 },
62 }
63
@@ -304,6 +310,133 @@ var swarmPeersCmd = &cmds.Command{
310 Type: connInfos{},
311 }
312
313 +var swarmStatsCmd = &cmds.Command{
314 + Status: cmds.Experimental,
315 + Helptext: cmds.HelpText{
316 + Tagline: "Report resource usage for a scope.",
317 + LongDescription: `Report resource usage for a scope.
318 +The scope can be one of the following:
319 +- system -- reports the system aggregate resource usage.
320 +- transient -- reports the transient resource usage.
321 +- svc:<service> -- reports the resource usage of a specific service.
322 +- proto:<proto> -- reports the resource usage of a specific protocol.
323 +- peer:<peer> -- reports the resource usage of a specific peer.
324 +- all -- reports the resource usage for all currently active scopes.
325 +
326 +The output of this command is JSON.
327 +`},
328 + Arguments: []cmds.Argument{
329 + cmds.StringArg("scope", true, false, "scope of the stat report"),
330 + },
331 + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
332 + node, err := cmdenv.GetNode(env)
333 + if err != nil {
334 + return err
335 + }
336 +
337 + if node.ResourceManager == nil {
338 + return libp2p.NoResourceMgrError
339 + }
340 +
341 + if len(req.Arguments) != 1 {
342 + return fmt.Errorf("must specify exactly one scope")
343 + }
344 + scope := req.Arguments[0]
345 + result, err := libp2p.NetStat(node.ResourceManager, scope)
346 + if err != nil {
347 + return err
348 + }
349 +
350 + b := new(bytes.Buffer)
351 + enc := json.NewEncoder(b)
352 + err = enc.Encode(result)
353 + if err != nil {
354 + return err
355 + }
356 + return cmds.EmitOnce(res, b)
357 + },
358 + Encoders: cmds.EncoderMap{
359 + cmds.Text: HumanJSONEncoder,
360 + },
361 +}
362 +
363 +var swarmLimitCmd = &cmds.Command{
364 + Status: cmds.Experimental,
365 + Helptext: cmds.HelpText{
366 + Tagline: "Get or set resource limits for a scope.",
367 + LongDescription: `Get or set resource limits for a scope.
368 +The scope can be one of the following:
369 +- system -- limits for the system aggregate resource usage.
370 +- transient -- limits for the transient resource usage.
371 +- svc:<service> -- limits for the resource usage of a specific service.
372 +- proto:<proto> -- limits for the resource usage of a specific protocol.
373 +- peer:<peer> -- limits for the resource usage of a specific peer.
374 +
375 +The output of this command is JSON.
376 +
377 +It is possible to use this command to inspect and tweak limits at runtime:
378 +
379 + $ ipfs swarm limit system > limit.json
380 + $ vi limit.json
381 + $ ipfs swarm limit system limit.json
382 +
383 +Changes made via command line are discarded on node shutdown.
384 +For permanent limits set Swarm.ResourceMgr.Limits in the $IPFS_PATH/config file.
385 +`},
386 + Arguments: []cmds.Argument{
387 + cmds.StringArg("scope", true, false, "scope of the limit"),
388 + cmds.FileArg("limit.json", false, false, "limits to be set").EnableStdin(),
389 + },
390 + Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
391 + node, err := cmdenv.GetNode(env)
392 + if err != nil {
393 + return err
394 + }
395 +
396 + if node.ResourceManager == nil {
397 + return libp2p.NoResourceMgrError
398 + }
399 +
400 + scope := req.Arguments[0]
401 +
402 + // set scope limit to new values (when limit.json is passed as a second arg)
403 + if req.Files != nil {
404 + var newLimit config.ResourceMgrScopeConfig
405 + it := req.Files.Entries()
406 + if it.Next() {
407 + file := files.FileFromEntry(it)
408 + if file == nil {
409 + return errors.New("expected a JSON file")
410 + }
411 + if err := json.NewDecoder(file).Decode(&newLimit); err != nil {
412 + return errors.New("failed to decode JSON as ResourceMgrScopeConfig")
413 + }
414 + return libp2p.NetSetLimit(node.ResourceManager, scope, newLimit)
415 + }
416 + if err := it.Err(); err != nil {
417 + return fmt.Errorf("error opening limit JSON file: %w", err)
418 + }
419 + }
420 +
421 + // get scope limit
422 + result, err := libp2p.NetLimit(node.ResourceManager, scope)
423 + if err != nil {
424 + return err
425 + }
426 +
427 + b := new(bytes.Buffer)
428 + enc := json.NewEncoder(b)
429 + err = enc.Encode(result)
430 + if err != nil {
431 + return err
432 + }
433 + return cmds.EmitOnce(res, b)
434 + },
435 + Encoders: cmds.EncoderMap{
436 + cmds.Text: HumanJSONEncoder,
437 + },
438 +}
439 +
440 type streamInfo struct {
441 Protocol string
442 }
core/core.go
+13 -11
@@ -30,6 +30,7 @@ import (
30 ic "github.com/libp2p/go-libp2p-core/crypto"
31 p2phost "github.com/libp2p/go-libp2p-core/host"
32 metrics "github.com/libp2p/go-libp2p-core/metrics"
33 + "github.com/libp2p/go-libp2p-core/network"
34 peer "github.com/libp2p/go-libp2p-core/peer"
35 pstore "github.com/libp2p/go-libp2p-core/peerstore"
36 routing "github.com/libp2p/go-libp2p-core/routing"
@@ -85,17 +86,18 @@ type IpfsNode struct {
86 RecordValidator record.Validator
87
88 // Online
88 - PeerHost p2phost.Host `optional:"true"` // the network host (server+client)
89 - Peering *peering.PeeringService `optional:"true"`
90 - Filters *ma.Filters `optional:"true"`
91 - Bootstrapper io.Closer `optional:"true"` // the periodic bootstrapper
92 - Routing routing.Routing `optional:"true"` // the routing system. recommend ipfs-dht
93 - DNSResolver *madns.Resolver // the DNS resolver
94 - Exchange exchange.Interface // the block exchange + strategy (bitswap)
95 - Namesys namesys.NameSystem // the name system, resolves paths to hashes
96 - Provider provider.System // the value provider system
97 - IpnsRepub *ipnsrp.Republisher `optional:"true"`
98 - GraphExchange graphsync.GraphExchange `optional:"true"`
89 + PeerHost p2phost.Host `optional:"true"` // the network host (server+client)
90 + Peering *peering.PeeringService `optional:"true"`
91 + Filters *ma.Filters `optional:"true"`
92 + Bootstrapper io.Closer `optional:"true"` // the periodic bootstrapper
93 + Routing routing.Routing `optional:"true"` // the routing system. recommend ipfs-dht
94 + DNSResolver *madns.Resolver // the DNS resolver
95 + Exchange exchange.Interface // the block exchange + strategy (bitswap)
96 + Namesys namesys.NameSystem // the name system, resolves paths to hashes
97 + Provider provider.System // the value provider system
98 + IpnsRepub *ipnsrp.Republisher `optional:"true"`
99 + GraphExchange graphsync.GraphExchange `optional:"true"`
100 + ResourceManager network.ResourceManager `optional:"true"`
101
102 PubSub *pubsub.PubSub `optional:"true"`
103 PSRouter *psrouter.PubsubValueStore `optional:"true"`
core/coreapi/test/api_test.go
+2 -2
@@ -23,7 +23,7 @@ import (
23 coreiface "github.com/ipfs/interface-go-ipfs-core"
24 "github.com/ipfs/interface-go-ipfs-core/tests"
25 "github.com/libp2p/go-libp2p-core/crypto"
26 - peer "github.com/libp2p/go-libp2p-core/peer"
26 + "github.com/libp2p/go-libp2p-core/peer"
27 mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
28 )
29
@@ -32,7 +32,7 @@ const testPeerID = "QmTFauExutTsy4XP6JbMFcw2Wa9645HJt2bTqL6qYDCKfe"
32 type NodeProvider struct{}
33
34 func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int) ([]coreiface.CoreAPI, error) {
35 - mn := mocknet.New(ctx)
35 + mn := mocknet.New()
36
37 nodes := make([]*core.IpfsNode, n)
38 apis := make([]coreiface.CoreAPI, n)
core/mock/mock.go
+2 -4
@@ -26,12 +26,10 @@ import (
26
27 // NewMockNode constructs an IpfsNode for use in tests.
28 func NewMockNode() (*core.IpfsNode, error) {
29 - ctx := context.Background()
30 -
29 // effectively offline, only peer in its network
32 - return core.NewNode(ctx, &core.BuildCfg{
30 + return core.NewNode(context.Background(), &core.BuildCfg{
31 Online: true,
34 - Host: MockHostOption(mocknet.New(ctx)),
32 + Host: MockHostOption(mocknet.New()),
33 })
34 }
35
core/node/groups.go
+6 -4
@@ -112,10 +112,10 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
112 }
113
114 // If `cfg.Swarm.DisableRelay` is set and `Network.RelayTransport` isn't, use the former.
115 - enableRelayTransport := cfg.Swarm.Transports.Network.Relay.WithDefault(!cfg.Swarm.DisableRelay) //nolint
115 + enableRelayTransport := cfg.Swarm.Transports.Network.Relay.WithDefault(!cfg.Swarm.DisableRelay) // nolint
116
117 // Warn about a deprecated option.
118 - //nolint
118 + // nolint
119 if cfg.Swarm.DisableRelay {
120 logger.Error("The 'Swarm.DisableRelay' config field is deprecated.")
121 if enableRelayTransport {
@@ -124,7 +124,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
124 logger.Error("Use the 'Swarm.Transports.Network.Relay' config field instead")
125 }
126 }
127 - //nolint
127 + // nolint
128 if cfg.Swarm.EnableAutoRelay {
129 logger.Error("The 'Swarm.EnableAutoRelay' config field is deprecated.")
130 if cfg.Swarm.RelayClient.Enabled == config.Default {
@@ -133,7 +133,7 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
133 logger.Error("'Swarm.EnableAutoRelay' has been overridden by 'Swarm.AutoRelay.Enabled'")
134 }
135 }
136 - //nolint
136 + // nolint
137 if cfg.Swarm.EnableRelayHop {
138 logger.Fatal("The `Swarm.EnableRelayHop` config field is ignored.\n" +
139 "Use `Swarm.RelayService` to configure the circuit v2 relay.\n" +
@@ -144,6 +144,8 @@ func LibP2P(bcfg *BuildCfg, cfg *config.Config) fx.Option {
144 opts := fx.Options(
145 BaseLibP2P,
146
147 + // Services (resource management)
148 + fx.Provide(libp2p.ResourceManager(cfg.Swarm)),
149 fx.Provide(libp2p.AddrFilters(cfg.Swarm.AddrFilters)),
150 fx.Provide(libp2p.AddrsFactory(cfg.Addresses.Announce, cfg.Addresses.AppendAnnounce, cfg.Addresses.NoAnnounce)),
151 fx.Provide(libp2p.SmuxTransport(cfg.Swarm.Transports)),
core/node/libp2p/libp2p.go
+5 -2
@@ -10,10 +10,10 @@ import (
10
11 logging "github.com/ipfs/go-log"
12 "github.com/libp2p/go-libp2p"
13 - connmgr "github.com/libp2p/go-libp2p-connmgr"
13 "github.com/libp2p/go-libp2p-core/crypto"
14 "github.com/libp2p/go-libp2p-core/peer"
15 "github.com/libp2p/go-libp2p-core/peerstore"
16 + "github.com/libp2p/go-libp2p/p2p/net/connmgr"
17 "go.uber.org/fx"
18 )
19
@@ -30,7 +30,10 @@ var UserAgent = simpleOpt(libp2p.UserAgent(version.GetUserAgentVersion()))
30
31 func ConnectionManager(low, high int, grace time.Duration) func() (opts Libp2pOpts, err error) {
32 return func() (opts Libp2pOpts, err error) {
33 - cm := connmgr.NewConnManager(low, high, grace)
33 + cm, err := connmgr.NewConnManager(low, high, connmgr.WithGracePeriod(grace))
34 + if err != nil {
35 + return opts, err
36 + }
37 opts.Opts = append(opts.Opts, libp2p.ConnectionManager(cm))
38 return
39 }
core/node/libp2p/rcmgr.go new
+368
@@ -0,0 +1,368 @@
1 +package libp2p
2 +
3 +import (
4 + "context"
5 + "errors"
6 + "fmt"
7 + "os"
8 + "path/filepath"
9 + "strings"
10 +
11 + config "github.com/ipfs/go-ipfs/config"
12 + "github.com/ipfs/go-ipfs/repo"
13 +
14 + "github.com/libp2p/go-libp2p"
15 + "github.com/libp2p/go-libp2p-core/network"
16 + "github.com/libp2p/go-libp2p-core/peer"
17 + "github.com/libp2p/go-libp2p-core/protocol"
18 + rcmgr "github.com/libp2p/go-libp2p-resource-manager"
19 +
20 + "go.uber.org/fx"
21 +)
22 +
23 +const NetLimitDefaultFilename = "limit.json"
24 +const NetLimitTraceFilename = "rcmgr.json.gz"
25 +
26 +var NoResourceMgrError = fmt.Errorf("missing ResourceMgr: make sure the daemon is running with Swarm.ResourceMgr.Enabled")
27 +
28 +func ResourceManager(cfg config.SwarmConfig) func(fx.Lifecycle, repo.Repo) (network.ResourceManager, Libp2pOpts, error) {
29 + return func(lc fx.Lifecycle, repo repo.Repo) (network.ResourceManager, Libp2pOpts, error) {
30 + var limiter *rcmgr.BasicLimiter
31 + var manager network.ResourceManager
32 + var opts Libp2pOpts
33 +
34 + // Config Swarm.ResourceMgr.Enabled decides if we run a real manager
35 + enabled := cfg.ResourceMgr.Enabled.WithDefault(false)
36 +
37 + /// ENV overrides Config (if present)
38 + switch os.Getenv("LIBP2P_RCMGR") {
39 + case "0", "false":
40 + enabled = false
41 + case "1", "true":
42 + enabled = true
43 + }
44 +
45 + if enabled {
46 + log.Debug("libp2p resource manager is enabled")
47 +
48 + repoPath, err := config.PathRoot()
49 + if err != nil {
50 + return nil, opts, fmt.Errorf("error opening IPFS_PATH: %w", err)
51 + }
52 +
53 + // Create limiter:
54 + // - parse $IPFS_PATH/limits.json if exists
55 + // - use defaultLimits from rcmgr_defaults.go
56 + defaultLimits := adjustedDefaultLimits(cfg)
57 + limitFilePath := filepath.Join(repoPath, NetLimitDefaultFilename)
58 + limitFile, err := os.Open(limitFilePath)
59 + switch {
60 + case err == nil:
61 + defer limitFile.Close()
62 + limiter, err = rcmgr.NewLimiterFromJSON(limitFile, defaultLimits)
63 + if err != nil {
64 + return nil, opts, fmt.Errorf("error parsing libp2p limit file: %w", err)
65 + }
66 + case errors.Is(err, os.ErrNotExist):
67 + limiter = rcmgr.NewStaticLimiter(defaultLimits)
68 + default:
69 + return nil, opts, err
70 + }
71 +
72 + setDefaultServiceLimits(limiter) // see rcmgr_defaults.go
73 +
74 + ropts := []rcmgr.Option{rcmgr.WithMetrics(createRcmgrMetrics())}
75 +
76 + if os.Getenv("LIBP2P_DEBUG_RCMGR") != "" {
77 + traceFilePath := filepath.Join(repoPath, NetLimitTraceFilename)
78 + ropts = append(ropts, rcmgr.WithTrace(traceFilePath))
79 + }
80 +
81 + manager, err = rcmgr.NewResourceManager(limiter, ropts...)
82 + if err != nil {
83 + return nil, opts, fmt.Errorf("error creating libp2p resource manager: %w", err)
84 + }
85 +
86 + } else {
87 + log.Debug("libp2p resource manager is disabled")
88 + manager = network.NullResourceManager
89 + }
90 +
91 + opts.Opts = append(opts.Opts, libp2p.ResourceManager(manager))
92 +
93 + lc.Append(fx.Hook{
94 + OnStop: func(_ context.Context) error {
95 + return manager.Close()
96 + }})
97 +
98 + return manager, opts, nil
99 + }
100 +}
101 +
102 +type NetStatOut struct {
103 + System *network.ScopeStat `json:",omitempty"`
104 + Transient *network.ScopeStat `json:",omitempty"`
105 + Services map[string]network.ScopeStat `json:",omitempty"`
106 + Protocols map[string]network.ScopeStat `json:",omitempty"`
107 + Peers map[string]network.ScopeStat `json:",omitempty"`
108 +}
109 +
110 +func NetStat(mgr network.ResourceManager, scope string) (NetStatOut, error) {
111 + var err error
112 + var result NetStatOut
113 + switch {
114 + case scope == "all":
115 + rapi, ok := mgr.(rcmgr.ResourceManagerState)
116 + if !ok { // NullResourceManager
117 + return result, NoResourceMgrError
118 + }
119 +
120 + stat := rapi.Stat()
121 + result.System = &stat.System
122 + result.Transient = &stat.Transient
123 + if len(stat.Services) > 0 {
124 + result.Services = stat.Services
125 + }
126 + if len(stat.Protocols) > 0 {
127 + result.Protocols = make(map[string]network.ScopeStat, len(stat.Protocols))
128 + for proto, stat := range stat.Protocols {
129 + result.Protocols[string(proto)] = stat
130 + }
131 + }
132 + if len(stat.Peers) > 0 {
133 + result.Peers = make(map[string]network.ScopeStat, len(stat.Peers))
134 + for p, stat := range stat.Peers {
135 + result.Peers[p.Pretty()] = stat
136 + }
137 + }
138 +
139 + return result, nil
140 +
141 + case scope == config.ResourceMgrSystemScope:
142 + err = mgr.ViewSystem(func(s network.ResourceScope) error {
143 + stat := s.Stat()
144 + result.System = &stat
145 + return nil
146 + })
147 + return result, err
148 +
149 + case scope == config.ResourceMgrTransientScope:
150 + err = mgr.ViewTransient(func(s network.ResourceScope) error {
151 + stat := s.Stat()
152 + result.Transient = &stat
153 + return nil
154 + })
155 + return result, err
156 +
157 + case strings.HasPrefix(scope, config.ResourceMgrServiceScopePrefix):
158 + svc := strings.TrimPrefix(scope, config.ResourceMgrServiceScopePrefix)
159 + err = mgr.ViewService(svc, func(s network.ServiceScope) error {
160 + stat := s.Stat()
161 + result.Services = map[string]network.ScopeStat{
162 + svc: stat,
163 + }
164 + return nil
165 + })
166 + return result, err
167 +
168 + case strings.HasPrefix(scope, config.ResourceMgrProtocolScopePrefix):
169 + proto := strings.TrimPrefix(scope, config.ResourceMgrProtocolScopePrefix)
170 + err = mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error {
171 + stat := s.Stat()
172 + result.Protocols = map[string]network.ScopeStat{
173 + proto: stat,
174 + }
175 + return nil
176 + })
177 + return result, err
178 +
179 + case strings.HasPrefix(scope, config.ResourceMgrPeerScopePrefix):
180 + p := strings.TrimPrefix(scope, config.ResourceMgrPeerScopePrefix)
181 + pid, err := peer.Decode(p)
182 + if err != nil {
183 + return result, fmt.Errorf("invalid peer ID: %q: %w", p, err)
184 + }
185 + err = mgr.ViewPeer(pid, func(s network.PeerScope) error {
186 + stat := s.Stat()
187 + result.Peers = map[string]network.ScopeStat{
188 + p: stat,
189 + }
190 + return nil
191 + })
192 + return result, err
193 +
194 + default:
195 + return result, fmt.Errorf("invalid scope %q", scope)
196 + }
197 +}
198 +
199 +func NetLimit(mgr network.ResourceManager, scope string) (config.ResourceMgrScopeConfig, error) {
200 + var result config.ResourceMgrScopeConfig
201 + getLimit := func(s network.ResourceScope) error {
202 + limiter, ok := s.(rcmgr.ResourceScopeLimiter)
203 + if !ok { // NullResourceManager
204 + return NoResourceMgrError
205 + }
206 +
207 + limit := limiter.Limit()
208 + switch l := limit.(type) {
209 + case *rcmgr.StaticLimit:
210 + result.Dynamic = false
211 + result.Memory = l.Memory
212 + result.Streams = l.BaseLimit.Streams
213 + result.StreamsInbound = l.BaseLimit.StreamsInbound
214 + result.StreamsOutbound = l.BaseLimit.StreamsOutbound
215 + result.Conns = l.BaseLimit.Conns
216 + result.ConnsInbound = l.BaseLimit.ConnsInbound
217 + result.ConnsOutbound = l.BaseLimit.ConnsOutbound
218 + result.FD = l.BaseLimit.FD
219 +
220 + case *rcmgr.DynamicLimit:
221 + result.Dynamic = true
222 + result.MemoryFraction = l.MemoryLimit.MemoryFraction
223 + result.MinMemory = l.MemoryLimit.MinMemory
224 + result.MaxMemory = l.MemoryLimit.MaxMemory
225 + result.Streams = l.BaseLimit.Streams
226 + result.StreamsInbound = l.BaseLimit.StreamsInbound
227 + result.StreamsOutbound = l.BaseLimit.StreamsOutbound
228 + result.Conns = l.BaseLimit.Conns
229 + result.ConnsInbound = l.BaseLimit.ConnsInbound
230 + result.ConnsOutbound = l.BaseLimit.ConnsOutbound
231 + result.FD = l.BaseLimit.FD
232 +
233 + default:
234 + return fmt.Errorf("unknown limit type %T", limit)
235 + }
236 +
237 + return nil
238 + }
239 +
240 + switch {
241 + case scope == config.ResourceMgrSystemScope:
242 + err := mgr.ViewSystem(func(s network.ResourceScope) error {
243 + return getLimit(s)
244 + })
245 + return result, err
246 +
247 + case scope == config.ResourceMgrTransientScope:
248 + err := mgr.ViewTransient(func(s network.ResourceScope) error {
249 + return getLimit(s)
250 + })
251 + return result, err
252 +
253 + case strings.HasPrefix(scope, config.ResourceMgrServiceScopePrefix):
254 + svc := strings.TrimPrefix(scope, config.ResourceMgrServiceScopePrefix)
255 + err := mgr.ViewService(svc, func(s network.ServiceScope) error {
256 + return getLimit(s)
257 + })
258 + return result, err
259 +
260 + case strings.HasPrefix(scope, config.ResourceMgrProtocolScopePrefix):
261 + proto := strings.TrimPrefix(scope, config.ResourceMgrProtocolScopePrefix)
262 + err := mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error {
263 + return getLimit(s)
264 + })
265 + return result, err
266 +
267 + case strings.HasPrefix(scope, config.ResourceMgrPeerScopePrefix):
268 + p := strings.TrimPrefix(scope, config.ResourceMgrPeerScopePrefix)
269 + pid, err := peer.Decode(p)
270 + if err != nil {
271 + return result, fmt.Errorf("invalid peer ID: %q: %w", p, err)
272 + }
273 + err = mgr.ViewPeer(pid, func(s network.PeerScope) error {
274 + return getLimit(s)
275 + })
276 + return result, err
277 +
278 + default:
279 + return result, fmt.Errorf("invalid scope %q", scope)
280 + }
281 +}
282 +
283 +func NetSetLimit(mgr network.ResourceManager, scope string, limit config.ResourceMgrScopeConfig) error {
284 + setLimit := func(s network.ResourceScope) error {
285 + limiter, ok := s.(rcmgr.ResourceScopeLimiter)
286 + if !ok { // NullResourceManager
287 + return NoResourceMgrError
288 + }
289 +
290 + var newLimit rcmgr.Limit
291 + if limit.Dynamic {
292 + newLimit = &rcmgr.DynamicLimit{
293 + MemoryLimit: rcmgr.MemoryLimit{
294 + MemoryFraction: limit.MemoryFraction,
295 + MinMemory: limit.MinMemory,
296 + MaxMemory: limit.MaxMemory,
297 + },
298 + BaseLimit: rcmgr.BaseLimit{
299 + Streams: limit.Streams,
300 + StreamsInbound: limit.StreamsInbound,
301 + StreamsOutbound: limit.StreamsOutbound,
302 + Conns: limit.Conns,
303 + ConnsInbound: limit.ConnsInbound,
304 + ConnsOutbound: limit.ConnsOutbound,
305 + FD: limit.FD,
306 + },
307 + }
308 + } else {
309 + newLimit = &rcmgr.StaticLimit{
310 + Memory: limit.Memory,
311 + BaseLimit: rcmgr.BaseLimit{
312 + Streams: limit.Streams,
313 + StreamsInbound: limit.StreamsInbound,
314 + StreamsOutbound: limit.StreamsOutbound,
315 + Conns: limit.Conns,
316 + ConnsInbound: limit.ConnsInbound,
317 + ConnsOutbound: limit.ConnsOutbound,
318 + FD: limit.FD,
319 + },
320 + }
321 + }
322 +
323 + limiter.SetLimit(newLimit)
324 + return nil
325 + }
326 +
327 + switch {
328 + case scope == config.ResourceMgrSystemScope:
329 + err := mgr.ViewSystem(func(s network.ResourceScope) error {
330 + return setLimit(s)
331 + })
332 + return err
333 +
334 + case scope == config.ResourceMgrTransientScope:
335 + err := mgr.ViewTransient(func(s network.ResourceScope) error {
336 + return setLimit(s)
337 + })
338 + return err
339 +
340 + case strings.HasPrefix(scope, config.ResourceMgrServiceScopePrefix):
341 + svc := scope[4:]
342 + err := mgr.ViewService(svc, func(s network.ServiceScope) error {
343 + return setLimit(s)
344 + })
345 + return err
346 +
347 + case strings.HasPrefix(scope, config.ResourceMgrProtocolScopePrefix):
348 + proto := scope[6:]
349 + err := mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error {
350 + return setLimit(s)
351 + })
352 + return err
353 +
354 + case strings.HasPrefix(scope, config.ResourceMgrPeerScopePrefix):
355 + p := scope[5:]
356 + pid, err := peer.Decode(p)
357 + if err != nil {
358 + return fmt.Errorf("invalid peer ID: %q: %w", p, err)
359 + }
360 + err = mgr.ViewPeer(pid, func(s network.PeerScope) error {
361 + return setLimit(s)
362 + })
363 + return err
364 +
365 + default:
366 + return fmt.Errorf("invalid scope %q", scope)
367 + }
368 +}
core/node/libp2p/rcmgr_defaults.go new
+313
@@ -0,0 +1,313 @@
1 +package libp2p
2 +
3 +import (
4 + "math/bits"
5 +
6 + config "github.com/ipfs/go-ipfs/config"
7 + "github.com/libp2p/go-libp2p-core/protocol"
8 + rcmgr "github.com/libp2p/go-libp2p-resource-manager"
9 + "github.com/libp2p/go-libp2p/p2p/host/autonat"
10 + relayv1 "github.com/libp2p/go-libp2p/p2p/protocol/circuitv1/relay"
11 + circuit "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/proto"
12 + relayv2 "github.com/libp2p/go-libp2p/p2p/protocol/circuitv2/relay"
13 + "github.com/libp2p/go-libp2p/p2p/protocol/holepunch"
14 + "github.com/libp2p/go-libp2p/p2p/protocol/identify"
15 + "github.com/libp2p/go-libp2p/p2p/protocol/ping"
16 +)
17 +
18 +// This file defines implicit limit defaults used when Swarm.ResourceMgr.Enabled
19 +// We keep vendored copy to ensure go-ipfs is not impacted when go-libp2p decides
20 +// to change defaults in any of the future releases.
21 +
22 +// adjustedDefaultLimits allows for tweaking defaults based on external factors,
23 +// such as values in Swarm.ConnMgr.HiWater config.
24 +func adjustedDefaultLimits(cfg config.SwarmConfig) rcmgr.DefaultLimitConfig {
25 +
26 + // Return to use unmodified static limits based on values from go-libp2p 0.18
27 + // return defaultLimits
28 +
29 + // Adjust limits
30 + // (based on https://github.com/filecoin-project/lotus/pull/8318/files)
31 + // - give it more memory, up to 4G, min of 1G
32 + // - if Swarm.ConnMgr.HighWater is too high, adjust Conn/FD/Stream limits
33 + defaultLimits := staticDefaultLimits.WithSystemMemory(.125, 1<<30, 4<<30)
34 +
35 + // Do we need to adjust due to Swarm.ConnMgr.HighWater?
36 + if cfg.ConnMgr.Type == "basic" {
37 + maxconns := cfg.ConnMgr.HighWater
38 + if 2*maxconns > defaultLimits.SystemBaseLimit.ConnsInbound {
39 + // adjust conns to 2x to allow for two conns per peer (TCP+QUIC)
40 + defaultLimits.SystemBaseLimit.ConnsInbound = logScale(2 * maxconns)
41 + defaultLimits.SystemBaseLimit.ConnsOutbound = logScale(2 * maxconns)
42 + defaultLimits.SystemBaseLimit.Conns = logScale(4 * maxconns)
43 +
44 + defaultLimits.SystemBaseLimit.StreamsInbound = logScale(16 * maxconns)
45 + defaultLimits.SystemBaseLimit.StreamsOutbound = logScale(64 * maxconns)
46 + defaultLimits.SystemBaseLimit.Streams = logScale(64 * maxconns)
47 +
48 + if 2*maxconns > defaultLimits.SystemBaseLimit.FD {
49 + defaultLimits.SystemBaseLimit.FD = logScale(2 * maxconns)
50 + }
51 +
52 + defaultLimits.ServiceBaseLimit.StreamsInbound = logScale(8 * maxconns)
53 + defaultLimits.ServiceBaseLimit.StreamsOutbound = logScale(32 * maxconns)
54 + defaultLimits.ServiceBaseLimit.Streams = logScale(32 * maxconns)
55 +
56 + defaultLimits.ProtocolBaseLimit.StreamsInbound = logScale(8 * maxconns)
57 + defaultLimits.ProtocolBaseLimit.StreamsOutbound = logScale(32 * maxconns)
58 + defaultLimits.ProtocolBaseLimit.Streams = logScale(32 * maxconns)
59 + }
60 + }
61 +
62 + return defaultLimits
63 +}
64 +
65 +func logScale(val int) int {
66 + bitlen := bits.Len(uint(val))
67 + return 1 << bitlen
68 +}
69 +
70 +// defaultLimits are the limits used by the default rcmgr limiter constructors.
71 +// This is a vendored copy of
72 +// https://github.com/libp2p/go-libp2p-resource-manager/blob/v0.1.5/limit_defaults.go#L49
73 +var staticDefaultLimits = rcmgr.DefaultLimitConfig{
74 + SystemBaseLimit: rcmgr.BaseLimit{
75 + StreamsInbound: 4096,
76 + StreamsOutbound: 16384,
77 + Streams: 16384,
78 + ConnsInbound: 256,
79 + ConnsOutbound: 1024,
80 + Conns: 1024,
81 + FD: 512,
82 + },
83 +
84 + SystemMemory: rcmgr.MemoryLimit{
85 + MemoryFraction: 0.125,
86 + MinMemory: 128 << 20,
87 + MaxMemory: 1 << 30,
88 + },
89 +
90 + TransientBaseLimit: rcmgr.BaseLimit{
91 + StreamsInbound: 128,
92 + StreamsOutbound: 512,
93 + Streams: 512,
94 + ConnsInbound: 32,
95 + ConnsOutbound: 128,
96 + Conns: 128,
97 + FD: 128,
98 + },
99 +
100 + TransientMemory: rcmgr.MemoryLimit{
101 + MemoryFraction: 1,
102 + MinMemory: 64 << 20,
103 + MaxMemory: 64 << 20,
104 + },
105 +
106 + ServiceBaseLimit: rcmgr.BaseLimit{
107 + StreamsInbound: 2048,
108 + StreamsOutbound: 8192,
109 + Streams: 8192,
110 + },
111 +
112 + ServiceMemory: rcmgr.MemoryLimit{
113 + MemoryFraction: 0.125 / 4,
114 + MinMemory: 64 << 20,
115 + MaxMemory: 256 << 20,
116 + },
117 +
118 + ServicePeerBaseLimit: rcmgr.BaseLimit{
119 + StreamsInbound: 256,
120 + StreamsOutbound: 512,
121 + Streams: 512,
122 + },
123 +
124 + ServicePeerMemory: rcmgr.MemoryLimit{
125 + MemoryFraction: 0.125 / 16,
126 + MinMemory: 16 << 20,
127 + MaxMemory: 64 << 20,
128 + },
129 +
130 + ProtocolBaseLimit: rcmgr.BaseLimit{
131 + StreamsInbound: 1024,
132 + StreamsOutbound: 4096,
133 + Streams: 4096,
134 + },
135 +
136 + ProtocolMemory: rcmgr.MemoryLimit{
137 + MemoryFraction: 0.125 / 8,
138 + MinMemory: 64 << 20,
139 + MaxMemory: 128 << 20,
140 + },
141 +
142 + ProtocolPeerBaseLimit: rcmgr.BaseLimit{
143 + StreamsInbound: 128,
144 + StreamsOutbound: 256,
145 + Streams: 512,
146 + },
147 +
148 + ProtocolPeerMemory: rcmgr.MemoryLimit{
149 + MemoryFraction: 0.125 / 16,
150 + MinMemory: 16 << 20,
151 + MaxMemory: 64 << 20,
152 + },
153 +
154 + PeerBaseLimit: rcmgr.BaseLimit{
155 + StreamsInbound: 512,
156 + StreamsOutbound: 1024,
157 + Streams: 1024,
158 + ConnsInbound: 8,
159 + ConnsOutbound: 16,
160 + Conns: 16,
161 + FD: 8,
162 + },
163 +
164 + PeerMemory: rcmgr.MemoryLimit{
165 + MemoryFraction: 0.125 / 16,
166 + MinMemory: 64 << 20,
167 + MaxMemory: 128 << 20,
168 + },
169 +
170 + ConnBaseLimit: rcmgr.BaseLimit{
171 + ConnsInbound: 1,
172 + ConnsOutbound: 1,
173 + Conns: 1,
174 + FD: 1,
175 + },
176 +
177 + ConnMemory: 1 << 20,
178 +
179 + StreamBaseLimit: rcmgr.BaseLimit{
180 + StreamsInbound: 1,
181 + StreamsOutbound: 1,
182 + Streams: 1,
183 + },
184 +
185 + StreamMemory: 16 << 20,
186 +}
187 +
188 +// setDefaultServiceLimits sets the default limits for bundled libp2p services.
189 +// This is a vendored copy of
190 +// https://github.com/libp2p/go-libp2p/blob/v0.18.0/limits.go
191 +func setDefaultServiceLimits(limiter *rcmgr.BasicLimiter) {
192 + if limiter.ServiceLimits == nil {
193 + limiter.ServiceLimits = make(map[string]rcmgr.Limit)
194 + }
195 + if limiter.ServicePeerLimits == nil {
196 + limiter.ServicePeerLimits = make(map[string]rcmgr.Limit)
197 + }
198 + if limiter.ProtocolLimits == nil {
199 + limiter.ProtocolLimits = make(map[protocol.ID]rcmgr.Limit)
200 + }
201 + if limiter.ProtocolPeerLimits == nil {
202 + limiter.ProtocolPeerLimits = make(map[protocol.ID]rcmgr.Limit)
203 + }
204 +
205 + // identify
206 + setServiceLimits(limiter, identify.ServiceName,
207 + limiter.DefaultServiceLimits.
208 + WithMemoryLimit(1, 4<<20, 64<<20). // max 64MB service memory
209 + WithStreamLimit(128, 128, 256), // max 256 streams -- symmetric
210 + peerLimit(16, 16, 32))
211 +
212 + setProtocolLimits(limiter, identify.ID,
213 + limiter.DefaultProtocolLimits.WithMemoryLimit(1, 4<<20, 32<<20),
214 + peerLimit(16, 16, 32))
215 + setProtocolLimits(limiter, identify.IDPush,
216 + limiter.DefaultProtocolLimits.WithMemoryLimit(1, 4<<20, 32<<20),
217 + peerLimit(16, 16, 32))
218 + setProtocolLimits(limiter, identify.IDDelta,
219 + limiter.DefaultProtocolLimits.WithMemoryLimit(1, 4<<20, 32<<20),
220 + peerLimit(16, 16, 32))
221 +
222 + // ping
223 + setServiceLimits(limiter, ping.ServiceName,
224 + limiter.DefaultServiceLimits.
225 + WithMemoryLimit(1, 4<<20, 64<<20). // max 64MB service memory
226 + WithStreamLimit(128, 128, 128), // max 128 streams - asymmetric
227 + peerLimit(2, 3, 4))
228 + setProtocolLimits(limiter, ping.ID,
229 + limiter.DefaultProtocolLimits.WithMemoryLimit(1, 4<<20, 64<<20),
230 + peerLimit(2, 3, 4))
231 +
232 + // autonat
233 + setServiceLimits(limiter, autonat.ServiceName,
234 + limiter.DefaultServiceLimits.
235 + WithMemoryLimit(1, 4<<20, 64<<20). // max 64MB service memory
236 + WithStreamLimit(128, 128, 128), // max 128 streams - asymmetric
237 + peerLimit(2, 2, 2))
238 + setProtocolLimits(limiter, autonat.AutoNATProto,
239 + limiter.DefaultProtocolLimits.WithMemoryLimit(1, 4<<20, 64<<20),
240 + peerLimit(2, 2, 2))
241 +
242 + // holepunch
243 + setServiceLimits(limiter, holepunch.ServiceName,
244 + limiter.DefaultServiceLimits.
245 + WithMemoryLimit(1, 4<<20, 64<<20). // max 64MB service memory
246 + WithStreamLimit(128, 128, 256), // max 256 streams - symmetric
247 + peerLimit(2, 2, 2))
248 + setProtocolLimits(limiter, holepunch.Protocol,
249 + limiter.DefaultProtocolLimits.WithMemoryLimit(1, 4<<20, 64<<20),
250 + peerLimit(2, 2, 2))
251 +
252 + // relay/v1
253 + setServiceLimits(limiter, relayv1.ServiceName,
254 + limiter.DefaultServiceLimits.
255 + WithMemoryLimit(1, 4<<20, 64<<20). // max 64MB service memory
256 + WithStreamLimit(1024, 1024, 1024), // max 1024 streams - asymmetric
257 + peerLimit(64, 64, 64))
258 +
259 + // relay/v2
260 + setServiceLimits(limiter, relayv2.ServiceName,
261 + limiter.DefaultServiceLimits.
262 + WithMemoryLimit(1, 4<<20, 64<<20). // max 64MB service memory
263 + WithStreamLimit(1024, 1024, 1024), // max 1024 streams - asymmetric
264 + peerLimit(64, 64, 64))
265 +
266 + // circuit protocols, both client and service
267 + setProtocolLimits(limiter, circuit.ProtoIDv1,
268 + limiter.DefaultProtocolLimits.
269 + WithMemoryLimit(1, 4<<20, 64<<20).
270 + WithStreamLimit(1280, 1280, 1280),
271 + peerLimit(128, 128, 128))
272 + setProtocolLimits(limiter, circuit.ProtoIDv2Hop,
273 + limiter.DefaultProtocolLimits.
274 + WithMemoryLimit(1, 4<<20, 64<<20).
275 + WithStreamLimit(1280, 1280, 1280),
276 + peerLimit(128, 128, 128))
277 + setProtocolLimits(limiter, circuit.ProtoIDv2Stop,
278 + limiter.DefaultProtocolLimits.
279 + WithMemoryLimit(1, 4<<20, 64<<20).
280 + WithStreamLimit(1280, 1280, 1280),
281 + peerLimit(128, 128, 128))
282 +
283 +}
284 +
285 +func setServiceLimits(limiter *rcmgr.BasicLimiter, svc string, limit rcmgr.Limit, peerLimit rcmgr.Limit) {
286 + if _, ok := limiter.ServiceLimits[svc]; !ok {
287 + limiter.ServiceLimits[svc] = limit
288 + }
289 + if _, ok := limiter.ServicePeerLimits[svc]; !ok {
290 + limiter.ServicePeerLimits[svc] = peerLimit
291 + }
292 +}
293 +
294 +func setProtocolLimits(limiter *rcmgr.BasicLimiter, proto protocol.ID, limit rcmgr.Limit, peerLimit rcmgr.Limit) {
295 + if _, ok := limiter.ProtocolLimits[proto]; !ok {
296 + limiter.ProtocolLimits[proto] = limit
297 + }
298 + if _, ok := limiter.ProtocolPeerLimits[proto]; !ok {
299 + limiter.ProtocolPeerLimits[proto] = peerLimit
300 + }
301 +}
302 +
303 +func peerLimit(numStreamsIn, numStreamsOut, numStreamsTotal int) rcmgr.Limit {
304 + return &rcmgr.StaticLimit{
305 + // memory: 256kb for window buffers plus some change for message buffers per stream
306 + Memory: int64(numStreamsTotal * (256<<10 + 16384)),
307 + BaseLimit: rcmgr.BaseLimit{
308 + StreamsInbound: numStreamsIn,
309 + StreamsOutbound: numStreamsOut,
310 + Streams: numStreamsTotal,
311 + },
312 + }
313 +}
core/node/libp2p/rcmgr_metrics.go new
+239
@@ -0,0 +1,239 @@
1 +package libp2p
2 +
3 +import (
4 + "strconv"
5 +
6 + "github.com/libp2p/go-libp2p-core/network"
7 + "github.com/libp2p/go-libp2p-core/peer"
8 + "github.com/libp2p/go-libp2p-core/protocol"
9 + rcmgr "github.com/libp2p/go-libp2p-resource-manager"
10 +
11 + "github.com/prometheus/client_golang/prometheus"
12 +)
13 +
14 +func createRcmgrMetrics() rcmgr.MetricsReporter {
15 + const (
16 + direction = "direction"
17 + usesFD = "usesFD"
18 + protocol = "protocol"
19 + service = "service"
20 + )
21 +
22 + connAllowed := prometheus.NewCounterVec(
23 + prometheus.CounterOpts{
24 + Name: "libp2p_rcmgr_conns_allowed_total",
25 + Help: "allowed connections",
26 + },
27 + []string{direction, usesFD},
28 + )
29 + prometheus.MustRegister(connAllowed)
30 +
31 + connBlocked := prometheus.NewCounterVec(
32 + prometheus.CounterOpts{
33 + Name: "libp2p_rcmgr_conns_blocked_total",
34 + Help: "blocked connections",
35 + },
36 + []string{direction, usesFD},
37 + )
38 + prometheus.MustRegister(connBlocked)
39 +
40 + streamAllowed := prometheus.NewCounterVec(
41 + prometheus.CounterOpts{
42 + Name: "libp2p_rcmgr_streams_allowed_total",
43 + Help: "allowed streams",
44 + },
45 + []string{direction},
46 + )
47 + prometheus.MustRegister(streamAllowed)
48 +
49 + streamBlocked := prometheus.NewCounterVec(
50 + prometheus.CounterOpts{
51 + Name: "libp2p_rcmgr_streams_blocked_total",
52 + Help: "blocked streams",
53 + },
54 + []string{direction},
55 + )
56 + prometheus.MustRegister(streamBlocked)
57 +
58 + peerAllowed := prometheus.NewCounter(prometheus.CounterOpts{
59 + Name: "libp2p_rcmgr_peers_allowed_total",
60 + Help: "allowed peers",
61 + })
62 + prometheus.MustRegister(peerAllowed)
63 +
64 + peerBlocked := prometheus.NewCounter(prometheus.CounterOpts{
65 + Name: "libp2p_rcmgr_peer_blocked_total",
66 + Help: "blocked peers",
67 + })
68 + prometheus.MustRegister(peerBlocked)
69 +
70 + protocolAllowed := prometheus.NewCounterVec(
71 + prometheus.CounterOpts{
72 + Name: "libp2p_rcmgr_protocols_allowed_total",
73 + Help: "allowed streams attached to a protocol",
74 + },
75 + []string{protocol},
76 + )
77 + prometheus.MustRegister(protocolAllowed)
78 +
79 + protocolBlocked := prometheus.NewCounterVec(
80 + prometheus.CounterOpts{
81 + Name: "libp2p_rcmgr_protocols_blocked_total",
82 + Help: "blocked streams attached to a protocol",
83 + },
84 + []string{protocol},
85 + )
86 + prometheus.MustRegister(protocolBlocked)
87 +
88 + protocolPeerBlocked := prometheus.NewCounterVec(
89 + prometheus.CounterOpts{
90 + Name: "libp2p_rcmgr_protocols_for_peer_blocked_total",
91 + Help: "blocked streams attached to a protocol for a specific peer",
92 + },
93 + []string{protocol},
94 + )
95 + prometheus.MustRegister(protocolPeerBlocked)
96 +
97 + serviceAllowed := prometheus.NewCounterVec(
98 + prometheus.CounterOpts{
99 + Name: "libp2p_rcmgr_services_allowed_total",
100 + Help: "allowed streams attached to a service",
101 + },
102 + []string{service},
103 + )
104 + prometheus.MustRegister(serviceAllowed)
105 +
106 + serviceBlocked := prometheus.NewCounterVec(
107 + prometheus.CounterOpts{
108 + Name: "libp2p_rcmgr_services_blocked_total",
109 + Help: "blocked streams attached to a service",
110 + },
111 + []string{service},
112 + )
113 + prometheus.MustRegister(serviceBlocked)
114 +
115 + servicePeerBlocked := prometheus.NewCounterVec(
116 + prometheus.CounterOpts{
117 + Name: "libp2p_rcmgr_service_for_peer_blocked_total",
118 + Help: "blocked streams attached to a service for a specific peer",
119 + },
120 + []string{service},
121 + )
122 + prometheus.MustRegister(servicePeerBlocked)
123 +
124 + memoryAllowed := prometheus.NewCounter(prometheus.CounterOpts{
125 + Name: "libp2p_rcmgr_memory_allocations_allowed_total",
126 + Help: "allowed memory allocations",
127 + })
128 + prometheus.MustRegister(memoryAllowed)
129 +
130 + memoryBlocked := prometheus.NewCounter(prometheus.CounterOpts{
131 + Name: "libp2p_rcmgr_memory_allocations_blocked_total",
132 + Help: "blocked memory allocations",
133 + })
134 + prometheus.MustRegister(memoryBlocked)
135 +
136 + return rcmgrMetrics{
137 + connAllowed,
138 + connBlocked,
139 + streamAllowed,
140 + streamBlocked,
141 + peerAllowed,
142 + peerBlocked,
143 + protocolAllowed,
144 + protocolBlocked,
145 + protocolPeerBlocked,
146 + serviceAllowed,
147 + serviceBlocked,
148 + servicePeerBlocked,
149 + memoryAllowed,
150 + memoryBlocked,
151 + }
152 +}
153 +
154 +// Failsafe to ensure interface from go-libp2p-resource-manager is implemented
155 +var _ rcmgr.MetricsReporter = rcmgrMetrics{}
156 +
157 +type rcmgrMetrics struct {
158 + connAllowed *prometheus.CounterVec
159 + connBlocked *prometheus.CounterVec
160 + streamAllowed *prometheus.CounterVec
161 + streamBlocked *prometheus.CounterVec
162 + peerAllowed prometheus.Counter
163 + peerBlocked prometheus.Counter
164 + protocolAllowed *prometheus.CounterVec
165 + protocolBlocked *prometheus.CounterVec
166 + protocolPeerBlocked *prometheus.CounterVec
167 + serviceAllowed *prometheus.CounterVec
168 + serviceBlocked *prometheus.CounterVec
169 + servicePeerBlocked *prometheus.CounterVec
170 + memoryAllowed prometheus.Counter
171 + memoryBlocked prometheus.Counter
172 +}
173 +
174 +func getDirection(d network.Direction) string {
175 + switch d {
176 + default:
177 + return ""
178 + case network.DirInbound:
179 + return "inbound"
180 + case network.DirOutbound:
181 + return "outbound"
182 + }
183 +}
184 +
185 +func (r rcmgrMetrics) AllowConn(dir network.Direction, usefd bool) {
186 + r.connAllowed.WithLabelValues(getDirection(dir), strconv.FormatBool(usefd)).Inc()
187 +}
188 +
189 +func (r rcmgrMetrics) BlockConn(dir network.Direction, usefd bool) {
190 + r.connBlocked.WithLabelValues(getDirection(dir), strconv.FormatBool(usefd)).Inc()
191 +}
192 +
193 +func (r rcmgrMetrics) AllowStream(_ peer.ID, dir network.Direction) {
194 + r.streamAllowed.WithLabelValues(getDirection(dir)).Inc()
195 +}
196 +
197 +func (r rcmgrMetrics) BlockStream(_ peer.ID, dir network.Direction) {
198 + r.streamBlocked.WithLabelValues(getDirection(dir)).Inc()
199 +}
200 +
201 +func (r rcmgrMetrics) AllowPeer(_ peer.ID) {
202 + r.peerAllowed.Inc()
203 +}
204 +
205 +func (r rcmgrMetrics) BlockPeer(_ peer.ID) {
206 + r.peerBlocked.Inc()
207 +}
208 +
209 +func (r rcmgrMetrics) AllowProtocol(proto protocol.ID) {
210 + r.protocolAllowed.WithLabelValues(string(proto)).Inc()
211 +}
212 +
213 +func (r rcmgrMetrics) BlockProtocol(proto protocol.ID) {
214 + r.protocolBlocked.WithLabelValues(string(proto)).Inc()
215 +}
216 +
217 +func (r rcmgrMetrics) BlockProtocolPeer(proto protocol.ID, _ peer.ID) {
218 + r.protocolPeerBlocked.WithLabelValues(string(proto)).Inc()
219 +}
220 +
221 +func (r rcmgrMetrics) AllowService(svc string) {
222 + r.serviceAllowed.WithLabelValues(svc).Inc()
223 +}
224 +
225 +func (r rcmgrMetrics) BlockService(svc string) {
226 + r.serviceBlocked.WithLabelValues(svc).Inc()
227 +}
228 +
229 +func (r rcmgrMetrics) BlockServicePeer(svc string, _ peer.ID) {
230 + r.servicePeerBlocked.WithLabelValues(svc).Inc()
231 +}
232 +
233 +func (r rcmgrMetrics) AllowMemory(_ int) {
234 + r.memoryAllowed.Inc()
235 +}
236 +
237 +func (r rcmgrMetrics) BlockMemory(_ int) {
238 + r.memoryBlocked.Inc()
239 +}
core/node/libp2p/smux.go
+2 -2
@@ -7,12 +7,12 @@ import (
7
8 config "github.com/ipfs/go-ipfs/config"
9 "github.com/libp2p/go-libp2p"
10 - smux "github.com/libp2p/go-libp2p-core/mux"
10 + "github.com/libp2p/go-libp2p-core/network"
11 mplex "github.com/libp2p/go-libp2p-mplex"
12 yamux "github.com/libp2p/go-libp2p-yamux"
13 )
14
15 -func yamuxTransport() smux.Multiplexer {
15 +func yamuxTransport() network.Multiplexer {
16 tpt := *yamux.DefaultTransport
17 tpt.AcceptBacklog = 512
18 if os.Getenv("YAMUX_DEBUG") != "" {
docs/config.md
+64
@@ -130,6 +130,8 @@ config file at runtime.
130 - [`Swarm.ConnMgr.LowWater`](#swarmconnmgrlowwater)
131 - [`Swarm.ConnMgr.HighWater`](#swarmconnmgrhighwater)
132 - [`Swarm.ConnMgr.GracePeriod`](#swarmconnmgrgraceperiod)
133 + - [`Swarm.ResourceMgr`](#swarmresourcemgr)
134 + - [`Swarm.ResourceMgr.Enabled`](#swarmresourcemgrenabled)
135 - [`Swarm.Transports`](#swarmtransports)
136 - [`Swarm.Transports.Network`](#swarmtransportsnetwork)
137 - [`Swarm.Transports.Network.TCP`](#swarmtransportsnetworktcp)
@@ -1628,6 +1630,68 @@ Default: `"20s"`
1630
1631 Type: `duration`
1632
1633 +### `Swarm.ResourceMgr`
1634 +
1635 +The [libp2p Network Resource Manager](https://github.com/libp2p/go-libp2p-resource-manager#readme) allows setting limits per a scope,
1636 +and tracking recource usage over time.
1637 +
1638 +#### `Swarm.ResourceMgr.Enabled`
1639 +
1640 +**EXPERIMENTAL**: this feature is disabled by default, use with caution.
1641 +
1642 +Enables the libp2p Network Resource Manager and auguments the default limits
1643 +using user-defined ones in `Swarm.ResourceMgr.Limits` (if present).
1644 +
1645 +Default: `false`
1646 +
1647 +Type: `flag`
1648 +
1649 +<!-- TODO: config compatible with the output of 'swarm limit' - see https://github.com/ipfs/go-ipfs/issues/8858
1650 +
1651 +#### `Swarm.ResourceMgr.Limits`
1652 +
1653 +Map of resource limits [per scope](https://github.com/libp2p/go-libp2p-resource-manager#resource-scopes).
1654 +
1655 +The format follows [`limit.json`](https://github.com/libp2p/go-libp2p-resource-manager/blob/v0.1.5/limit_config.go#L165)
1656 +struct from go-libp2p-resource-manager@v0.1.5
1657 +
1658 +Example:
1659 +
1660 +```json
1661 +{
1662 + "Swarm": {
1663 + "ResourceMgr": {
1664 + "Enabled": true,
1665 + "Limits": {
1666 + "System": {
1667 + "Conns": 1024,
1668 + "ConnsInbound": 256,
1669 + "ConnsOutbound": 1024,
1670 + "FD": 512,
1671 + "Memory": 1073741824,
1672 + "Streams": 16384,
1673 + "StreamsInbound": 4096,
1674 + "StreamsOutbound": 16384
1675 + }
1676 + }
1677 + }
1678 + }
1679 +}
1680 +```
1681 +
1682 +Current resource usage and a list of services, protocols, and peers can be obtained via
1683 +`ipfs swarm stats --help`
1684 +
1685 +It is also possible to adjust runtime limits via `ipfs stats limit --help`.
1686 +By default changes are ephemeral (config remains intact), and won't be applied
1687 +after reboot. To persist them here, pass `limit -s`.
1688 +
1689 +Default: `{}` (empty == implicit defaults from go-libp2p)
1690 +
1691 +Type: `object[string->object]`
1692 +
1693 +-->
1694 +
1695 ### `Swarm.Transports`
1696
1697 Configuration section for libp2p transports. An empty configuration will apply
docs/environment-variables.md
+27 -11
@@ -1,13 +1,5 @@
1 # go-ipfs environment variables
2
3 -## `LIBP2P_TCP_REUSEPORT`
4 -
5 -go-ipfs tries to reuse the same source port for all connections to improve NAT
6 -traversal. If this is an issue, you can disable it by setting
7 -`LIBP2P_TCP_REUSEPORT` to false.
8 -
9 -Default: true
10 -
3 ## `IPFS_PATH`
4
5 Sets the location of the IPFS repo (where the config, blocks, etc.
@@ -122,6 +114,14 @@ $ ipfs resolve -r /ipns/dnslink-test2.example.com
114 /ipfs/bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am
115 ```
116
117 +## `LIBP2P_TCP_REUSEPORT`
118 +
119 +go-ipfs tries to reuse the same source port for all connections to improve NAT
120 +traversal. If this is an issue, you can disable it by setting
121 +`LIBP2P_TCP_REUSEPORT` to false.
122 +
123 +Default: true
124 +
125 ## `LIBP2P_MUX_PREFS`
126
127 Deprecated: Use the `Swarm.Transports.Multiplexers` config field.
@@ -130,12 +130,29 @@ Tells go-ipfs which multiplexers to use in which order.
130
131 Default: "/yamux/1.0.0 /mplex/6.7.0"
132
133 +## `LIBP2P_RCMGR`
134 +
135 +Forces [libp2p Network Resource Manager](https://github.com/libp2p/go-libp2p-resource-manager#readme)
136 +to be enabled (`1`) or disabled (`0`).
137 +When set, overrides [`Swarm.ResourceMgr.Enabled`](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmresourcemgrenabled) from the config.
138 +
139 +Default: use config (not set)
140 +
141 +## `LIBP2P_DEBUG_RCMGR`
142 +
143 +Enables tracing of [libp2p Network Resource Manager](https://github.com/libp2p/go-libp2p-resource-manager#readme)
144 +and outputs it to `rcmgr.json.gz`
145 +
146 +
147 +Default: disabled (not set)
148 +
149 # Tracing
134 -**NOTE** Tracing support is experimental--releases may contain tracing-related breaking changes.
150
151 ## `IPFS_TRACING`
152 Enables OpenTelemetry tracing.
153
154 +**NOTE** Tracing support is experimental: releases may contain tracing-related breaking changes.
155 +
156 Default: false
157
158 ## `IPFS_TRACING_JAEGER`
@@ -197,5 +214,4 @@ Default: "" (disabled)
214 ## `IPFS_TRACING_RATIO`
215 The ratio of traces to export, as a floating point value in the interval [0, 1].
216
200 -Deault: 1.0 (export all traces)
201 -
217 +Default: 1.0 (export all traces)
go.mod
+13 -12
@@ -67,32 +67,33 @@ require (
67 github.com/jbenet/go-temp-err-catcher v0.1.0
68 github.com/jbenet/goprocess v0.1.4
69 github.com/libp2p/go-doh-resolver v0.4.0
70 - github.com/libp2p/go-libp2p v0.16.0
71 - github.com/libp2p/go-libp2p-connmgr v0.2.4
72 - github.com/libp2p/go-libp2p-core v0.11.0
70 + github.com/libp2p/go-libp2p v0.18.0
71 + github.com/libp2p/go-libp2p-connmgr v0.3.2-0.20220115145817-a7820a5879c7 // indirect
72 + github.com/libp2p/go-libp2p-core v0.14.0
73 github.com/libp2p/go-libp2p-discovery v0.6.0
74 github.com/libp2p/go-libp2p-http v0.2.1
75 github.com/libp2p/go-libp2p-kad-dht v0.15.0
76 github.com/libp2p/go-libp2p-kbucket v0.4.7
77 github.com/libp2p/go-libp2p-loggables v0.1.0
78 - github.com/libp2p/go-libp2p-mplex v0.4.1
78 + github.com/libp2p/go-libp2p-mplex v0.6.0
79 github.com/libp2p/go-libp2p-noise v0.3.0
80 - github.com/libp2p/go-libp2p-peerstore v0.4.0
80 + github.com/libp2p/go-libp2p-peerstore v0.6.0
81 github.com/libp2p/go-libp2p-pubsub v0.6.0
82 github.com/libp2p/go-libp2p-pubsub-router v0.5.0
83 - github.com/libp2p/go-libp2p-quic-transport v0.15.0
83 + github.com/libp2p/go-libp2p-quic-transport v0.16.1
84 github.com/libp2p/go-libp2p-record v0.1.3
85 + github.com/libp2p/go-libp2p-resource-manager v0.1.5
86 github.com/libp2p/go-libp2p-routing-helpers v0.2.3
86 - github.com/libp2p/go-libp2p-swarm v0.8.0
87 - github.com/libp2p/go-libp2p-testing v0.5.0
87 + github.com/libp2p/go-libp2p-swarm v0.10.2
88 + github.com/libp2p/go-libp2p-testing v0.8.0
89 github.com/libp2p/go-libp2p-tls v0.3.1
89 - github.com/libp2p/go-libp2p-yamux v0.6.0
90 + github.com/libp2p/go-libp2p-yamux v0.8.2
91 github.com/libp2p/go-socket-activation v0.1.0
91 - github.com/libp2p/go-tcp-transport v0.4.0
92 - github.com/libp2p/go-ws-transport v0.5.0
92 + github.com/libp2p/go-tcp-transport v0.5.1
93 + github.com/libp2p/go-ws-transport v0.6.0
94 github.com/miekg/dns v1.1.43
95 github.com/mitchellh/go-homedir v1.1.0
95 - github.com/multiformats/go-multiaddr v0.4.1
96 + github.com/multiformats/go-multiaddr v0.5.0
97 github.com/multiformats/go-multiaddr-dns v0.3.1
98 github.com/multiformats/go-multibase v0.0.3
99 github.com/multiformats/go-multicodec v0.4.0
go.sum
+88 -28
@@ -135,6 +135,7 @@ github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuP
135 github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
136 github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
137 github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
138 +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs=
139 github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
140 github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
141 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
@@ -146,6 +147,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
147 github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
148 github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
149 github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
150 +github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327 h1:7grrpcfCtbZLsjtB0DgMuzs1umsJmpzaHMZ6cO6iAWw=
151 +github.com/containerd/cgroups v0.0.0-20201119153540-4cbc285b3327/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE=
152 github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
153 github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
154 github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
@@ -157,11 +160,13 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7
160 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8=
161 github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
162 github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
163 +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk=
164 github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
165 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
166 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
167 github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
168 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
169 +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
170 github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3 h1:HVTnpeuvF6Owjd5mniCL8DEXo7uYXdQEmOP4FJbV5tg=
171 github.com/crackcomm/go-gitignore v0.0.0-20170627025303-887ab5e44cc3/go.mod h1:p1d6YEZWvFzEh4KLyvBcVSnrfNDDvK2zfK/4x2v/4pE=
172 github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
@@ -188,6 +193,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
193 github.com/dgryski/go-farm v0.0.0-20190104051053-3adb47b1fb0f/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
194 github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA=
195 github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
196 +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
197 +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
198 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
199 github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
200 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
@@ -195,6 +202,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m
202 github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
203 github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
204 github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
205 +github.com/elastic/gosigar v0.12.0 h1:AsdhYCJlTudhfOYQyFNgx+fIVTfrDO0V1ST0vHgiapU=
206 +github.com/elastic/gosigar v0.12.0/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
207 github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302 h1:QV0ZrfBLpFc2KDk+a4LJefDczXnonRwrYrQJY/9L4dA=
208 github.com/elgris/jsondiff v0.0.0-20160530203242-765b5c24c302/go.mod h1:qBlWZqWeVx9BjvqBsnC/8RUlAYpIFmPvgROcw0n1scE=
209 github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
@@ -254,6 +263,7 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me
263 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
264 github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
265 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
266 +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA=
267 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
268 github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
269 github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -310,6 +320,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
320 github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
321 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
322 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
323 +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
324 github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
325 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
326 github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
@@ -553,8 +564,10 @@ github.com/ipfs/go-log/v2 v2.0.3/go.mod h1:O7P1lJt27vWHhOwQmcFEvlmo49ry2VY2+JfBW
564 github.com/ipfs/go-log/v2 v2.0.5/go.mod h1:eZs4Xt4ZUJQFM3DlanGhy7TkwwawCZcSByscwkWG+dw=
565 github.com/ipfs/go-log/v2 v2.1.1/go.mod h1:2v2nsGfZsvvAJz13SyFzf9ObaqwHiHxsPLEHntrv9KM=
566 github.com/ipfs/go-log/v2 v2.1.3/go.mod h1:/8d0SH3Su5Ooc31QlL1WysJhvyOTDCjcCZ9Axpmri6g=
556 -github.com/ipfs/go-log/v2 v2.3.0 h1:31Re/cPqFHpsRHgyVwjWADPoF0otB1WrjTy8ZFYwEZU=
567 github.com/ipfs/go-log/v2 v2.3.0/go.mod h1:QqGoj30OTpnKaG/LKTGTxoP2mmQtjVMEnK72gynbe/g=
568 +github.com/ipfs/go-log/v2 v2.4.0/go.mod h1:nPZnh7Cj7lwS3LpRU5Mwr2ol1c2gXIEXuF6aywqrtmo=
569 +github.com/ipfs/go-log/v2 v2.5.0 h1:+MhAooFd9XZNvR0i9FriKW6HB0ql7HNXUuflWtc0dd4=
570 +github.com/ipfs/go-log/v2 v2.5.0/go.mod h1:prSpmC1Gpllc9UYWxDiZDreBYw7zp4Iqp1kOLU9U5UI=
571 github.com/ipfs/go-merkledag v0.0.6/go.mod h1:QYPdnlvkOg7GnQRofu9XZimC5ZW5Wi3bKys/4GQQfto=
572 github.com/ipfs/go-merkledag v0.2.3/go.mod h1:SQiXrtSts3KGNmgOzMICy5c0POOpUNQLvB3ClKnBAlk=
573 github.com/ipfs/go-merkledag v0.3.2/go.mod h1:fvkZNNZixVW6cKSZ/JfLlON5OlgTXNdRLz0p6QG/I2M=
@@ -655,8 +668,9 @@ github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHz
668 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
669 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
670 github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
658 -github.com/klauspost/compress v1.11.7 h1:0hzRabrMN4tSTvMfnL3SCv1ZGeAP23ynzodBgaHeMeg=
671 github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
672 +github.com/klauspost/compress v1.13.6 h1:P76CopJELS0TiO2mebmnzgWaajssP/EszplttgQxcgc=
673 +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
674 github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
675 github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
676 github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
@@ -680,7 +694,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
694 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
695 github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ=
696 github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E=
683 -github.com/libp2p/go-addr-util v0.1.0 h1:acKsntI33w2bTU7tC9a0SaPimJGfSI0bFKC18ChxeVI=
697 github.com/libp2p/go-addr-util v0.1.0/go.mod h1:6I3ZYuFr2O/9D+SoyM0zEw0EF3YkldtTX406BpdQMqw=
698 github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ=
699 github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs=
@@ -714,8 +727,9 @@ github.com/libp2p/go-libp2p v0.12.0/go.mod h1:FpHZrfC1q7nA8jitvdjKBDF31hguaC676g
727 github.com/libp2p/go-libp2p v0.13.0/go.mod h1:pM0beYdACRfHO1WcJlp65WXyG2A6NqYM+t2DTVAJxMo=
728 github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0=
729 github.com/libp2p/go-libp2p v0.14.4/go.mod h1:EIRU0Of4J5S8rkockZM7eJp2S0UrCyi55m2kJVru3rM=
717 -github.com/libp2p/go-libp2p v0.16.0 h1:aTxzQPllnW+nyC9mY8xaS20BbcrSYMt1HCkjZRHvdGY=
730 github.com/libp2p/go-libp2p v0.16.0/go.mod h1:ump42BsirwAWxKzsCiFnTtN1Yc+DuPu76fyMX364/O4=
731 +github.com/libp2p/go-libp2p v0.18.0 h1:moKKKG875KNGsCjZxTIFB75ihHiVjFeWg5I4aR1pDLk=
732 +github.com/libp2p/go-libp2p v0.18.0/go.mod h1:+veaZ9z1SZQhmc5PW78jvnnxZ89Mgvmh4cggO11ETmw=
733 github.com/libp2p/go-libp2p-asn-util v0.0.0-20200825225859-85005c6cf052/go.mod h1:nRMRTab+kZuk0LnKZpxhOVH/ndsdr2Nr//Zltc/vwgo=
734 github.com/libp2p/go-libp2p-asn-util v0.1.0 h1:rABPCO77SjdbJ/eJ/ynIo8vWICy1VEnL5JAxJbQLo1E=
735 github.com/libp2p/go-libp2p-asn-util v0.1.0/go.mod h1:wu+AnM9Ii2KgO5jMmS1rz9dvzTdj8BXqsPR9HR0XB7I=
@@ -727,21 +741,23 @@ github.com/libp2p/go-libp2p-autonat v0.2.1/go.mod h1:MWtAhV5Ko1l6QBsHQNSuM6b1sRk
741 github.com/libp2p/go-libp2p-autonat v0.2.2/go.mod h1:HsM62HkqZmHR2k1xgX34WuWDzk/nBwNHoeyyT4IWV6A=
742 github.com/libp2p/go-libp2p-autonat v0.4.0/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk=
743 github.com/libp2p/go-libp2p-autonat v0.4.2/go.mod h1:YxaJlpr81FhdOv3W3BTconZPfhaYivRdf53g+S2wobk=
730 -github.com/libp2p/go-libp2p-autonat v0.6.0 h1:+vbQ1pMzMGjE/RJopiQKK2FRjdCKHPNPrkPm8u+luQU=
744 github.com/libp2p/go-libp2p-autonat v0.6.0/go.mod h1:bFC6kY8jwzNNWoqc8iGE57vsfwyJ/lP4O4DOV1e0B2o=
745 github.com/libp2p/go-libp2p-blankhost v0.0.1/go.mod h1:Ibpbw/7cPPYwFb7PACIWdvxxv0t0XCCI10t7czjAjTc=
746 github.com/libp2p/go-libp2p-blankhost v0.1.1/go.mod h1:pf2fvdLJPsC1FsVrNP3DUUvMzUts2dsLLBEpo1vW1ro=
747 github.com/libp2p/go-libp2p-blankhost v0.1.4/go.mod h1:oJF0saYsAXQCSfDq254GMNmLNz6ZTHTOvtF4ZydUvwU=
735 -github.com/libp2p/go-libp2p-blankhost v0.2.0 h1:3EsGAi0CBGcZ33GwRuXEYJLLPoVWyXJ1bcJzAJjINkk=
748 github.com/libp2p/go-libp2p-blankhost v0.2.0/go.mod h1:eduNKXGTioTuQAUcZ5epXi9vMl+t4d8ugUBRQ4SqaNQ=
749 +github.com/libp2p/go-libp2p-blankhost v0.3.0 h1:kTnLArltMabZlzY63pgGDA4kkUcLkBFSM98zBssn/IY=
750 +github.com/libp2p/go-libp2p-blankhost v0.3.0/go.mod h1:urPC+7U01nCGgJ3ZsV8jdwTp6Ji9ID0dMTvq+aJ+nZU=
751 github.com/libp2p/go-libp2p-circuit v0.0.9/go.mod h1:uU+IBvEQzCu953/ps7bYzC/D/R0Ho2A9LfKVVCatlqU=
752 github.com/libp2p/go-libp2p-circuit v0.1.0/go.mod h1:Ahq4cY3V9VJcHcn1SBXjr78AbFkZeIRmfunbA7pmFh8=
753 github.com/libp2p/go-libp2p-circuit v0.1.4/go.mod h1:CY67BrEjKNDhdTk8UgBX1Y/H5c3xkAcs3gnksxY7osU=
754 github.com/libp2p/go-libp2p-circuit v0.2.1/go.mod h1:BXPwYDN5A8z4OEY9sOfr2DUQMLQvKt/6oku45YUmjIo=
741 -github.com/libp2p/go-libp2p-circuit v0.4.0 h1:eqQ3sEYkGTtybWgr6JLqJY6QLtPWRErvFjFDfAOO1wc=
755 github.com/libp2p/go-libp2p-circuit v0.4.0/go.mod h1:t/ktoFIUzM6uLQ+o1G6NuBl2ANhBKN9Bc8jRIk31MoA=
743 -github.com/libp2p/go-libp2p-connmgr v0.2.4 h1:TMS0vc0TCBomtQJyWr7fYxcVYYhx+q/2gF++G5Jkl/w=
756 +github.com/libp2p/go-libp2p-circuit v0.6.0 h1:rw/HlhmUB3OktS/Ygz6+2XABOmHKzZpPUuMNUMosj8w=
757 +github.com/libp2p/go-libp2p-circuit v0.6.0/go.mod h1:kB8hY+zCpMeScyvFrKrGicRdid6vNXbunKE4rXATZ0M=
758 github.com/libp2p/go-libp2p-connmgr v0.2.4/go.mod h1:YV0b/RIm8NGPnnNWM7hG9Q38OeQiQfKhHCCs1++ufn0=
759 +github.com/libp2p/go-libp2p-connmgr v0.3.2-0.20220115145817-a7820a5879c7 h1:74g7rKhKikoMDKNtpeSjttE5ELgpmk2gD7U1nqDgoPw=
760 +github.com/libp2p/go-libp2p-connmgr v0.3.2-0.20220115145817-a7820a5879c7/go.mod h1:RVoyPjJm0J9Vd1m6qUN2Tn7kJm4rL1Ml20pFsFgPGik=
761 github.com/libp2p/go-libp2p-core v0.0.1/go.mod h1:g/VxnTZ/1ygHxH3dKok7Vno1VfpvGcGip57wjTU4fco=
762 github.com/libp2p/go-libp2p-core v0.0.2/go.mod h1:9dAcntw/n46XycV4RnlBq3BpgrmyUi9LuoTNdPrbUco=
763 github.com/libp2p/go-libp2p-core v0.0.3/go.mod h1:j+YQMNz9WNSkNezXOsahp9kwZBKBvxLpKD316QWSJXE=
@@ -770,8 +786,11 @@ github.com/libp2p/go-libp2p-core v0.8.5/go.mod h1:FfewUH/YpvWbEB+ZY9AQRQ4TAD8sJB
786 github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM=
787 github.com/libp2p/go-libp2p-core v0.9.0/go.mod h1:ESsbz31oC3C1AvMJoGx26RTuCkNhmkSRCqZ0kQtJ2/8=
788 github.com/libp2p/go-libp2p-core v0.10.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg=
773 -github.com/libp2p/go-libp2p-core v0.11.0 h1:75jAgdA+IChNa+/mZXogfmrGkgwxkVvxmIC7pV+F6sI=
789 github.com/libp2p/go-libp2p-core v0.11.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg=
790 +github.com/libp2p/go-libp2p-core v0.12.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg=
791 +github.com/libp2p/go-libp2p-core v0.13.0/go.mod h1:ECdxehoYosLYHgDDFa2N4yE8Y7aQRAMf0sX9mf2sbGg=
792 +github.com/libp2p/go-libp2p-core v0.14.0 h1:0kYSgiK/D7Eo28GTuRXo5YHsWwAisVpFCqCVPUd/vJs=
793 +github.com/libp2p/go-libp2p-core v0.14.0/go.mod h1:tLasfcVdTXnixsLB0QYaT1syJOhsbrhG7q6pGrHtBg8=
794 github.com/libp2p/go-libp2p-crypto v0.0.1/go.mod h1:yJkNyDmO341d5wwXxDUGO0LykUVT72ImHNUqh5D/dBE=
795 github.com/libp2p/go-libp2p-crypto v0.0.2/go.mod h1:eETI5OUfBnvARGOHrJz2eWNyTUxEGZnBxMcbUjfIj4I=
796 github.com/libp2p/go-libp2p-crypto v0.1.0/go.mod h1:sPUokVISZiy+nNuTTH/TY+leRSxnFj/2GLjtOTW90hI=
@@ -808,8 +827,10 @@ github.com/libp2p/go-libp2p-mplex v0.2.2/go.mod h1:74S9eum0tVQdAfFiKxAyKzNdSuLqw
827 github.com/libp2p/go-libp2p-mplex v0.2.3/go.mod h1:CK3p2+9qH9x+7ER/gWWDYJ3QW5ZxWDkm+dVvjfuG3ek=
828 github.com/libp2p/go-libp2p-mplex v0.3.0/go.mod h1:l9QWxRbbb5/hQMECEb908GbS9Sm2UAR2KFZKUJEynEs=
829 github.com/libp2p/go-libp2p-mplex v0.4.0/go.mod h1:yCyWJE2sc6TBTnFpjvLuEJgTSw/u+MamvzILKdX7asw=
811 -github.com/libp2p/go-libp2p-mplex v0.4.1 h1:/pyhkP1nLwjG3OM+VuaNJkQT/Pqq73WzB3aDN3Fx1sc=
830 github.com/libp2p/go-libp2p-mplex v0.4.1/go.mod h1:cmy+3GfqfM1PceHTLL7zQzAAYaryDu6iPSC+CIb094g=
831 +github.com/libp2p/go-libp2p-mplex v0.5.0/go.mod h1:eLImPJLkj3iG5t5lq68w3Vm5NAQ5BcKwrrb2VmOYb3M=
832 +github.com/libp2p/go-libp2p-mplex v0.6.0 h1:5ubK4/vLE2JkogKlJ2JLeXcSfA6qY6mE2HMJV9ve/Sk=
833 +github.com/libp2p/go-libp2p-mplex v0.6.0/go.mod h1:i3usuPrBbh9FD2fLZjGpotyNkwr42KStYZQY7BeTiu4=
834 github.com/libp2p/go-libp2p-nat v0.0.4/go.mod h1:N9Js/zVtAXqaeT99cXgTV9e75KpnWCvVOiGzlcHmBbY=
835 github.com/libp2p/go-libp2p-nat v0.0.5/go.mod h1:1qubaE5bTZMJE+E/uu2URroMbzdubFz1ChgiN79yKPE=
836 github.com/libp2p/go-libp2p-nat v0.0.6/go.mod h1:iV59LVhB3IkFvS6S6sauVTSOrNEANnINbI/fkaLimiw=
@@ -838,8 +859,9 @@ github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRj
859 github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s=
860 github.com/libp2p/go-libp2p-peerstore v0.2.7/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s=
861 github.com/libp2p/go-libp2p-peerstore v0.2.8/go.mod h1:gGiPlXdz7mIHd2vfAsHzBNAMqSDkt2UBFwgcITgw1lA=
841 -github.com/libp2p/go-libp2p-peerstore v0.4.0 h1:DOhRJLnM9Dc9lIXi3rPDZBf789LXy1BrzwIs7Tj0cKA=
862 github.com/libp2p/go-libp2p-peerstore v0.4.0/go.mod h1:rDJUFyzEWPpXpEwywkcTYYzDHlwza8riYMaUzaN6hX0=
863 +github.com/libp2p/go-libp2p-peerstore v0.6.0 h1:HJminhQSGISBIRb93N6WK3t6Fa8OOTnHd/VBjL4mY5A=
864 +github.com/libp2p/go-libp2p-peerstore v0.6.0/go.mod h1:DGEmKdXrcYpK9Jha3sS7MhqYdInxJy84bIPtSu65bKc=
865 github.com/libp2p/go-libp2p-pnet v0.2.0 h1:J6htxttBipJujEjz1y0a5+eYoiPcFHhSYHH6na5f0/k=
866 github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA=
867 github.com/libp2p/go-libp2p-protocol v0.0.1/go.mod h1:Af9n4PiruirSDjHycM1QuiMi/1VZNHYcK8cLgFJLZ4s=
@@ -851,13 +873,17 @@ github.com/libp2p/go-libp2p-pubsub-router v0.5.0/go.mod h1:TRJKskSem3C0aSb3CmRgP
873 github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA=
874 github.com/libp2p/go-libp2p-quic-transport v0.11.2/go.mod h1:wlanzKtIh6pHrq+0U3p3DY9PJfGqxMgPaGKaK5LifwQ=
875 github.com/libp2p/go-libp2p-quic-transport v0.13.0/go.mod h1:39/ZWJ1TW/jx1iFkKzzUg00W6tDJh73FC0xYudjr7Hc=
854 -github.com/libp2p/go-libp2p-quic-transport v0.15.0 h1:DR0mP6kcieowikBprWkcNtbquRKOPWb5dLZ4ahDZujk=
876 github.com/libp2p/go-libp2p-quic-transport v0.15.0/go.mod h1:wv4uGwjcqe8Mhjj7N/Ic0aKjA+/10UnMlSzLO0yRpYQ=
877 +github.com/libp2p/go-libp2p-quic-transport v0.16.0/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ=
878 +github.com/libp2p/go-libp2p-quic-transport v0.16.1 h1:N/XqYXHurphPLDfXYhll8NyqzdZYQqAF4GIr7+SmLV8=
879 +github.com/libp2p/go-libp2p-quic-transport v0.16.1/go.mod h1:1BXjVMzr+w7EkPfiHkKnwsWjPjtfaNT0q8RS3tGDvEQ=
880 github.com/libp2p/go-libp2p-record v0.0.1/go.mod h1:grzqg263Rug/sRex85QrDOLntdFAymLDLm7lxMgU79Q=
881 github.com/libp2p/go-libp2p-record v0.1.0/go.mod h1:ujNc8iuE5dlKWVy6wuL6dd58t0n7xI4hAIl8pE6wu5Q=
882 github.com/libp2p/go-libp2p-record v0.1.2/go.mod h1:pal0eNcT5nqZaTV7UGhqeGqxFgGdsU/9W//C8dqjQDk=
883 github.com/libp2p/go-libp2p-record v0.1.3 h1:R27hoScIhQf/A8XJZ8lYpnqh9LatJ5YbHs28kCIfql0=
884 github.com/libp2p/go-libp2p-record v0.1.3/go.mod h1:yNUff/adKIfPnYQXgp6FQmNu3gLJ6EMg7+/vv2+9pY4=
885 +github.com/libp2p/go-libp2p-resource-manager v0.1.5 h1:7J6t9KLFS0MxXDTfqA6rwfVCZl/yLQnXW5LpZjHAANI=
886 +github.com/libp2p/go-libp2p-resource-manager v0.1.5/go.mod h1:wJPNjeE4XQlxeidwqVY5G6DLOKqFK33u2n8blpl0I6Y=
887 github.com/libp2p/go-libp2p-routing v0.0.1/go.mod h1:N51q3yTr4Zdr7V8Jt2JIktVU+3xBBylx1MZeVA6t1Ys=
888 github.com/libp2p/go-libp2p-routing-helpers v0.2.3 h1:xY61alxJ6PurSi+MXbywZpelvuU4U4p/gPTxjqCqTzY=
889 github.com/libp2p/go-libp2p-routing-helpers v0.2.3/go.mod h1:795bh+9YeoFl99rMASoiVgHdi5bjack0N1+AFAdbvBw=
@@ -876,8 +902,10 @@ github.com/libp2p/go-libp2p-swarm v0.3.1/go.mod h1:hdv95GWCTmzkgeJpP+GK/9D9puJeg
902 github.com/libp2p/go-libp2p-swarm v0.4.0/go.mod h1:XVFcO52VoLoo0eitSxNQWYq4D6sydGOweTOAjJNraCw=
903 github.com/libp2p/go-libp2p-swarm v0.5.0/go.mod h1:sU9i6BoHE0Ve5SKz3y9WfKrh8dUat6JknzUehFx8xW4=
904 github.com/libp2p/go-libp2p-swarm v0.5.3/go.mod h1:NBn7eNW2lu568L7Ns9wdFrOhgRlkRnIDg0FLKbuu3i8=
879 -github.com/libp2p/go-libp2p-swarm v0.8.0 h1:nRHNRhi86L7jhka02N4MoV+PSFFPoJFkHNQwCTFxNhw=
905 github.com/libp2p/go-libp2p-swarm v0.8.0/go.mod h1:sOMp6dPuqco0r0GHTzfVheVBh6UEL0L1lXUZ5ot2Fvc=
906 +github.com/libp2p/go-libp2p-swarm v0.10.0/go.mod h1:71ceMcV6Rg/0rIQ97rsZWMzto1l9LnNquef+efcRbmA=
907 +github.com/libp2p/go-libp2p-swarm v0.10.2 h1:UaXf+CTq6Ns1N2V1EgqJ9Q3xaRsiN7ImVlDMpirMAWw=
908 +github.com/libp2p/go-libp2p-swarm v0.10.2/go.mod h1:Pdkq0QU5a+qu+oyqIV3bknMsnzk9lnNyKvB9acJ5aZs=
909 github.com/libp2p/go-libp2p-testing v0.0.1/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=
910 github.com/libp2p/go-libp2p-testing v0.0.2/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=
911 github.com/libp2p/go-libp2p-testing v0.0.3/go.mod h1:gvchhf3FQOtBdr+eFUABet5a4MBLK8jM3V4Zghvmi+E=
@@ -888,8 +916,10 @@ github.com/libp2p/go-libp2p-testing v0.1.2-0.20200422005655-8775583591d8/go.mod
916 github.com/libp2p/go-libp2p-testing v0.3.0/go.mod h1:efZkql4UZ7OVsEfaxNHZPzIehtsBXMrXnCfJIgDti5g=
917 github.com/libp2p/go-libp2p-testing v0.4.0/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0=
918 github.com/libp2p/go-libp2p-testing v0.4.2/go.mod h1:Q+PFXYoiYFN5CAEG2w3gLPEzotlKsNSbKQ/lImlOWF0=
891 -github.com/libp2p/go-libp2p-testing v0.5.0 h1:bTjC29TTQ/ODq0ld3+0KLq3irdA5cAH3OMbRi0/QsvE=
919 github.com/libp2p/go-libp2p-testing v0.5.0/go.mod h1:QBk8fqIL1XNcno/l3/hhaIEn4aLRijpYOR+zVjjlh+A=
920 +github.com/libp2p/go-libp2p-testing v0.7.0/go.mod h1:OLbdn9DbgdMwv00v+tlp1l3oe2Cl+FAjoWIA2pa0X6E=
921 +github.com/libp2p/go-libp2p-testing v0.8.0 h1:/te8SOIyj5sGH5Jr1Uoo+qYB00aK8O4+yHGzLgfE3kc=
922 +github.com/libp2p/go-libp2p-testing v0.8.0/go.mod h1:gRdsNxQSxAZowTgcLY7CC33xPmleZzoBpqSYbWenqPc=
923 github.com/libp2p/go-libp2p-tls v0.1.3/go.mod h1:wZfuewxOndz5RTnCAxFliGjvYSDA40sKitV4c50uI1M=
924 github.com/libp2p/go-libp2p-tls v0.3.0/go.mod h1:fwF5X6PWGxm6IDRwF3V8AVCCj/hOd5oFlg+wo2FxJDY=
925 github.com/libp2p/go-libp2p-tls v0.3.1 h1:lsE2zYte+rZCEOHF72J1Fg3XK3dGQyKvI6i5ehJfEp0=
@@ -904,8 +934,10 @@ github.com/libp2p/go-libp2p-transport-upgrader v0.4.0/go.mod h1:J4ko0ObtZSmgn5BX
934 github.com/libp2p/go-libp2p-transport-upgrader v0.4.2/go.mod h1:NR8ne1VwfreD5VIWIU62Agt/J18ekORFU/j1i2y8zvk=
935 github.com/libp2p/go-libp2p-transport-upgrader v0.4.3/go.mod h1:bpkldbOWXMrXhpZbSV1mQxTrefOg2Fi+k1ClDSA4ppw=
936 github.com/libp2p/go-libp2p-transport-upgrader v0.4.6/go.mod h1:JE0WQuQdy+uLZ5zOaI3Nw9dWGYJIA7mywEtP2lMvnyk=
907 -github.com/libp2p/go-libp2p-transport-upgrader v0.5.0 h1:7SDl3O2+AYOgfE40Mis83ClpfGNkNA6m4FwhbOHs+iI=
937 github.com/libp2p/go-libp2p-transport-upgrader v0.5.0/go.mod h1:Rc+XODlB3yce7dvFV4q/RmyJGsFcCZRkeZMu/Zdg0mo=
938 +github.com/libp2p/go-libp2p-transport-upgrader v0.7.0/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg=
939 +github.com/libp2p/go-libp2p-transport-upgrader v0.7.1 h1:MSMe+tUfxpC9GArTz7a4G5zQKQgGh00Vio87d3j3xIg=
940 +github.com/libp2p/go-libp2p-transport-upgrader v0.7.1/go.mod h1:GIR2aTRp1J5yjVlkUoFqMkdobfob6RnAwYg/RZPhrzg=
941 github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db h1:EDoDKW8ZAHd6SIDeo+thU51PyQppqLYkBxx0ObvFj/w=
942 github.com/libp2p/go-libp2p-xor v0.0.0-20210714161855-5c005aca55db/go.mod h1:LSTM5yRnjGZbWNTA/hRwq2gGFrvRIbQJscoIL/u6InY=
943 github.com/libp2p/go-libp2p-yamux v0.1.2/go.mod h1:xUoV/RmYkg6BW/qGxA9XJyg+HzXFYkeXbnhjmnYzKp8=
@@ -920,12 +952,14 @@ github.com/libp2p/go-libp2p-yamux v0.4.0/go.mod h1:+DWDjtFMzoAwYLVkNZftoucn7PelN
952 github.com/libp2p/go-libp2p-yamux v0.5.0/go.mod h1:AyR8k5EzyM2QN9Bbdg6X1SkVVuqLwTGf0L4DFq9g6po=
953 github.com/libp2p/go-libp2p-yamux v0.5.1/go.mod h1:dowuvDu8CRWmr0iqySMiSxK+W0iL5cMVO9S94Y6gkv4=
954 github.com/libp2p/go-libp2p-yamux v0.5.4/go.mod h1:tfrXbyaTqqSU654GTvK3ocnSZL3BuHoeTSqhcel1wsE=
923 -github.com/libp2p/go-libp2p-yamux v0.6.0 h1:TKayW983n92JhCGdCo7ej7eEb+DQ0VYfKNOxlN/1kNQ=
955 github.com/libp2p/go-libp2p-yamux v0.6.0/go.mod h1:MRhd6mAYnFRnSISp4M8i0ClV/j+mWHo2mYLifWGw33k=
956 +github.com/libp2p/go-libp2p-yamux v0.8.0/go.mod h1:yTkPgN2ib8FHyU1ZcVD7aelzyAqXXwEPbyx+aSKm9h8=
957 +github.com/libp2p/go-libp2p-yamux v0.8.1/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE=
958 +github.com/libp2p/go-libp2p-yamux v0.8.2 h1:6GKWntresp0TFxMP/oSoH96nV8XKJRdynXsdp43dn0Y=
959 +github.com/libp2p/go-libp2p-yamux v0.8.2/go.mod h1:rUozF8Jah2dL9LLGyBaBeTQeARdwhefMCTQVQt6QobE=
960 github.com/libp2p/go-maddr-filter v0.0.1/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q=
961 github.com/libp2p/go-maddr-filter v0.0.4/go.mod h1:6eT12kSQMA9x2pvFQa+xesMKUBlj9VImZbj3B9FBH/Q=
962 github.com/libp2p/go-maddr-filter v0.0.5/go.mod h1:Jk+36PMfIqCJhAnaASRH83bdAvfDRp/w6ENFaC9bG+M=
928 -github.com/libp2p/go-maddr-filter v0.1.0 h1:4ACqZKw8AqiuJfwFGq1CYDFugfXTOos+qQ3DETkhtCE=
963 github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU=
964 github.com/libp2p/go-mplex v0.0.3/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0=
965 github.com/libp2p/go-mplex v0.0.4/go.mod h1:pK5yMLmOoBR1pNCqDlA2GQrdAVTMkqFalaTWe7l4Yd0=
@@ -933,8 +967,10 @@ github.com/libp2p/go-mplex v0.1.0/go.mod h1:SXgmdki2kwCUlCCbfGLEgHjC4pFqhTp0ZoV6
967 github.com/libp2p/go-mplex v0.1.1/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk=
968 github.com/libp2p/go-mplex v0.1.2/go.mod h1:Xgz2RDCi3co0LeZfgjm4OgUF15+sVR8SRcu3SFXI1lk=
969 github.com/libp2p/go-mplex v0.2.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ=
936 -github.com/libp2p/go-mplex v0.3.0 h1:U1T+vmCYJaEoDJPV1aq31N56hS+lJgb397GsylNSgrU=
970 github.com/libp2p/go-mplex v0.3.0/go.mod h1:0Oy/A9PQlwBytDRp4wSkFnzHYDKcpLot35JQ6msjvYQ=
971 +github.com/libp2p/go-mplex v0.4.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E=
972 +github.com/libp2p/go-mplex v0.6.0 h1:5kKp029zrsLVJT5q6ASt4LwuZFxj3B13wXXaGmFrWg0=
973 +github.com/libp2p/go-mplex v0.6.0/go.mod h1:y26Lx+wNVtMYMaPu300Cbot5LkEZ4tJaNYeHeT9dh6E=
974 github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=
975 github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=
976 github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=
@@ -949,8 +985,9 @@ github.com/libp2p/go-nat v0.1.0/go.mod h1:X7teVkwRHNInVNWQiO/tAiAVRwSr5zoRz4YSTC
985 github.com/libp2p/go-netroute v0.1.2/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk=
986 github.com/libp2p/go-netroute v0.1.3/go.mod h1:jZLDV+1PE8y5XxBySEBgbuVAXbhtuHSdmLPL2n9MKbk=
987 github.com/libp2p/go-netroute v0.1.5/go.mod h1:V1SR3AaECRkEQCoFFzYwVYWvYIEtlxx89+O3qcpCl4A=
952 -github.com/libp2p/go-netroute v0.1.6 h1:ruPJStbYyXVYGQ81uzEDzuvbYRLKRrLvTYd33yomC38=
988 github.com/libp2p/go-netroute v0.1.6/go.mod h1:AqhkMh0VuWmfgtxKPp3Oc1LdU5QSWS7wl0QLhSZqXxQ=
989 +github.com/libp2p/go-netroute v0.2.0 h1:0FpsbsvuSnAhXFnCY0VLFbJOzaK0VnP0r1QT/o4nWRE=
990 +github.com/libp2p/go-netroute v0.2.0/go.mod h1:Vio7LTzZ+6hoT4CMZi5/6CpY3Snzh2vgZhWgxMNwlQI=
991 github.com/libp2p/go-openssl v0.0.2/go.mod h1:v8Zw2ijCSWBQi8Pq5GAixw6DbFfa9u6VIYDXnvOXkc0=
992 github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=
993 github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=
@@ -969,7 +1006,6 @@ github.com/libp2p/go-reuseport-transport v0.1.0 h1:C3PHeHjmnz8m6f0uydObj02tMEoi7
1006 github.com/libp2p/go-reuseport-transport v0.1.0/go.mod h1:vev0C0uMkzriDY59yFHD9v+ujJvYmDQVLowvAjEOmfw=
1007 github.com/libp2p/go-sockaddr v0.0.2/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k=
1008 github.com/libp2p/go-sockaddr v0.1.0/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k=
972 -github.com/libp2p/go-sockaddr v0.1.1 h1:yD80l2ZOdGksnOyHrhxDdTDFrf7Oy+v3FMVArIRgZxQ=
1009 github.com/libp2p/go-sockaddr v0.1.1/go.mod h1:syPvOmNs24S3dFVGJA1/mrqdeijPxLV2Le3BRLKd68k=
1010 github.com/libp2p/go-socket-activation v0.1.0 h1:OImQPhtbGlCNaF/KSTl6pBBy+chA5eBt5i9uMJNtEdY=
1011 github.com/libp2p/go-socket-activation v0.1.0/go.mod h1:gzda2dNkMG5Ti2OfWNNwW0FDIbj0g/aJJU320FcLfhk=
@@ -977,8 +1013,9 @@ github.com/libp2p/go-stream-muxer v0.0.1/go.mod h1:bAo8x7YkSpadMTbtTaxGVHWUQsR/l
1013 github.com/libp2p/go-stream-muxer v0.1.0/go.mod h1:8JAVsjeRBCWwPoZeH0W1imLOcriqXJyFvB0mR4A04sQ=
1014 github.com/libp2p/go-stream-muxer-multistream v0.1.1/go.mod h1:zmGdfkQ1AzOECIAcccoL8L//laqawOsO03zX8Sa+eGw=
1015 github.com/libp2p/go-stream-muxer-multistream v0.2.0/go.mod h1:j9eyPol/LLRqT+GPLSxvimPhNph4sfYfMoDPd7HkzIc=
980 -github.com/libp2p/go-stream-muxer-multistream v0.3.0 h1:TqnSHPJEIqDEO7h1wZZ0p3DXdvDSiLHQidKKUGZtiOY=
1016 github.com/libp2p/go-stream-muxer-multistream v0.3.0/go.mod h1:yDh8abSIzmZtqtOt64gFJUXEryejzNb0lisTt+fAMJA=
1017 +github.com/libp2p/go-stream-muxer-multistream v0.4.0 h1:HsM/9OdtqnIzjVXcxTXjmqKrj3gJ8kacaOJwJS1ipaY=
1018 +github.com/libp2p/go-stream-muxer-multistream v0.4.0/go.mod h1:nb+dGViZleRP4XcyHuZSVrJCBl55nRBOMmiSL/dyziw=
1019 github.com/libp2p/go-tcp-transport v0.0.4/go.mod h1:+E8HvC8ezEVOxIo3V5vCK9l1y/19K427vCzQ+xHKH/o=
1020 github.com/libp2p/go-tcp-transport v0.1.0/go.mod h1:oJ8I5VXryj493DEJ7OsBieu8fcg2nHGctwtInJVpipc=
1021 github.com/libp2p/go-tcp-transport v0.1.1/go.mod h1:3HzGvLbx6etZjnFlERyakbaYPdfjg2pWP97dFZworkY=
@@ -987,8 +1024,10 @@ github.com/libp2p/go-tcp-transport v0.2.1/go.mod h1:zskiJ70MEfWz2MKxvFB/Pv+tPIB1
1024 github.com/libp2p/go-tcp-transport v0.2.3/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU=
1025 github.com/libp2p/go-tcp-transport v0.2.4/go.mod h1:9dvr03yqrPyYGIEN6Dy5UvdJZjyPFvl1S/igQ5QD1SU=
1026 github.com/libp2p/go-tcp-transport v0.2.7/go.mod h1:lue9p1b3VmZj1MhhEGB/etmvF/nBQ0X9CW2DutBT3MM=
990 -github.com/libp2p/go-tcp-transport v0.4.0 h1:VDyg4j6en3OuXf90gfDQh5Sy9KowO9udnd0OU8PP6zg=
1027 github.com/libp2p/go-tcp-transport v0.4.0/go.mod h1:0y52Rwrn4076xdJYu/51/qJIdxz+EWDAOG2S45sV3VI=
1028 +github.com/libp2p/go-tcp-transport v0.5.0/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y=
1029 +github.com/libp2p/go-tcp-transport v0.5.1 h1:edOOs688VLZAozWC7Kj5/6HHXKNwi9M6wgRmmLa8M6Q=
1030 +github.com/libp2p/go-tcp-transport v0.5.1/go.mod h1:UPPL0DIjQqiWRwVAb+CEQlaAG0rp/mCqJfIhFcLHc4Y=
1031 github.com/libp2p/go-testutil v0.0.1/go.mod h1:iAcJc/DKJQanJ5ws2V+u5ywdL2n12X1WbbEG+Jjy69I=
1032 github.com/libp2p/go-testutil v0.1.0/go.mod h1:81b2n5HypcVyrCg/MJx4Wgfp/VHojytjVe/gLzZ2Ehc=
1033 github.com/libp2p/go-ws-transport v0.0.5/go.mod h1:Qbl4BxPfXXhhd/o0wcrgoaItHqA9tnZjoFZnxykuaXU=
@@ -997,8 +1036,9 @@ github.com/libp2p/go-ws-transport v0.2.0/go.mod h1:9BHJz/4Q5A9ludYWKoGCFC5gUElzl
1036 github.com/libp2p/go-ws-transport v0.3.0/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk=
1037 github.com/libp2p/go-ws-transport v0.3.1/go.mod h1:bpgTJmRZAvVHrgHybCVyqoBmyLQ1fiZuEaBYusP5zsk=
1038 github.com/libp2p/go-ws-transport v0.4.0/go.mod h1:EcIEKqf/7GDjth6ksuS/6p7R49V4CBY6/E7R/iyhYUA=
1000 -github.com/libp2p/go-ws-transport v0.5.0 h1:cO6x4P0v6PfxbKnxmf5cY2Ny4OPDGYkUqNvZzp/zdlo=
1039 github.com/libp2p/go-ws-transport v0.5.0/go.mod h1:I2juo1dNTbl8BKSBYo98XY85kU2xds1iamArLvl8kNg=
1040 +github.com/libp2p/go-ws-transport v0.6.0 h1:326XBL6Q+5CQ2KtjXz32+eGu02W/Kz2+Fm4SpXdr0q4=
1041 +github.com/libp2p/go-ws-transport v0.6.0/go.mod h1:dXqtI9e2JV9FtF1NOtWVZSKXh5zXvnuwPXfj8GPBbYU=
1042 github.com/libp2p/go-yamux v1.2.1/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
1043 github.com/libp2p/go-yamux v1.2.2/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
1044 github.com/libp2p/go-yamux v1.2.3/go.mod h1:FGTiPvoV/3DVdgWpX+tM0OW3tsM+W5bSE3gZwqQTcow=
@@ -1011,8 +1051,10 @@ github.com/libp2p/go-yamux v1.4.1 h1:P1Fe9vF4th5JOxxgQvfbOHkrGqIZniTLf+ddhZp8YTI
1051 github.com/libp2p/go-yamux v1.4.1/go.mod h1:fr7aVgmdNGJK+N1g+b6DW6VxzbRCjCOejR/hkmpooHE=
1052 github.com/libp2p/go-yamux/v2 v2.0.0/go.mod h1:NVWira5+sVUIU6tu1JWvaRn1dRnG+cawOJiflsAM+7U=
1053 github.com/libp2p/go-yamux/v2 v2.2.0/go.mod h1:3So6P6TV6r75R9jiBpiIKgU/66lOarCZjqROGxzPpPQ=
1014 -github.com/libp2p/go-yamux/v2 v2.3.0 h1:luRV68GS1vqqr6EFUjtu1kr51d+IbW0gSowu8emYWAI=
1054 github.com/libp2p/go-yamux/v2 v2.3.0/go.mod h1:iTU+lOIn/2h0AgKcL49clNTwfEw+WSfDYrXe05EyKIs=
1055 +github.com/libp2p/go-yamux/v3 v3.0.1/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo=
1056 +github.com/libp2p/go-yamux/v3 v3.0.2 h1:LW0q5+A1Wy0npEsPJP9wmare2NH4ohNluN5EWVwv2mE=
1057 +github.com/libp2p/go-yamux/v3 v3.0.2/go.mod h1:s2LsDhHbh+RfCsQoICSYt58U2f8ijtPANFD8BmE74Bo=
1058 github.com/libp2p/zeroconf/v2 v2.1.1 h1:XAuSczA96MYkVwH+LqqqCUZb2yH3krobMJ1YE+0hG2s=
1059 github.com/libp2p/zeroconf/v2 v2.1.1/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0DmyYyNO1Xs=
1060 github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
@@ -1020,8 +1062,9 @@ github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0U
1062 github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8=
1063 github.com/lucas-clemente/quic-go v0.21.2/go.mod h1:vF5M1XqhBAHgbjKcJOXY3JZz3GP0T3FQhz/uyOUS38Q=
1064 github.com/lucas-clemente/quic-go v0.23.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0=
1023 -github.com/lucas-clemente/quic-go v0.24.0 h1:ToR7SIIEdrgOhgVTHvPgdVRJfgVy+N0wQAagH7L4d5g=
1065 github.com/lucas-clemente/quic-go v0.24.0/go.mod h1:paZuzjXCE5mj6sikVLMvqXk8lJV2AsqtJ6bDhjEfxx0=
1066 +github.com/lucas-clemente/quic-go v0.25.0 h1:K+X9Gvd7JXsOHtU0N2icZ2Nw3rx82uBej3mP4CLgibc=
1067 +github.com/lucas-clemente/quic-go v0.25.0/go.mod h1:YtzP8bxRVCBlO77yRanE264+fY/T2U9ZlW1AaHOsMOg=
1068 github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
1069 github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
1070 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
@@ -1037,6 +1080,8 @@ github.com/marten-seemann/qtls-go1-16 v0.1.4/go.mod h1:gNpI2Ol+lRS3WwSOtIUUtRwZE
1080 github.com/marten-seemann/qtls-go1-17 v0.1.0-rc.1/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8=
1081 github.com/marten-seemann/qtls-go1-17 v0.1.0 h1:P9ggrs5xtwiqXv/FHNwntmuLMNq3KaSIG93AtAZ48xk=
1082 github.com/marten-seemann/qtls-go1-17 v0.1.0/go.mod h1:fz4HIxByo+LlWcreM4CZOYNuz3taBQ8rN2X6FqvaWo8=
1083 +github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1 h1:EnzzN9fPUkUck/1CuY1FlzBaIYMoiBsdwTNmNGkwUUM=
1084 +github.com/marten-seemann/qtls-go1-18 v0.1.0-beta.1/go.mod h1:PUhIQk19LoFt2174H4+an8TYvWOGjb/hHwphBeaDHwI=
1085 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk=
1086 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU=
1087 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
@@ -1049,8 +1094,9 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
1094 github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
1095 github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
1096 github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
1052 -github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA=
1097 github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
1098 +github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
1099 +github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
1100 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
1101 github.com/mattn/go-runewidth v0.0.4 h1:2BvfKmzob6Bmd4YsL0zygOqfdFnK7GR4QL06Do4/p7Y=
1102 github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
@@ -1116,8 +1162,9 @@ github.com/multiformats/go-multiaddr v0.3.0/go.mod h1:dF9kph9wfJ+3VLAaeBqo9Of8x4
1162 github.com/multiformats/go-multiaddr v0.3.1/go.mod h1:uPbspcUPd5AfaP6ql3ujFY+QWzmBD8uLLL4bXW0XfGc=
1163 github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0=
1164 github.com/multiformats/go-multiaddr v0.4.0/go.mod h1:YcpyLH8ZPudLxQlemYBPhSm0/oCXAT8Z4mzFpyoPyRc=
1119 -github.com/multiformats/go-multiaddr v0.4.1 h1:Pq37uLx3hsyNlTDir7FZyU8+cFCTqd5y1KiM2IzOutI=
1165 github.com/multiformats/go-multiaddr v0.4.1/go.mod h1:3afI9HfVW8csiF8UZqtpYRiDyew8pRX7qLIGHu9FLuM=
1166 +github.com/multiformats/go-multiaddr v0.5.0 h1:i/JuOoVg4szYQ4YEzDGtb2h0o8M7CG/Yq6cGlcjWZpM=
1167 +github.com/multiformats/go-multiaddr v0.5.0/go.mod h1:3KAxNkUqLTJ20AAwN4XVX4kZar+bR+gh4zgbfr3SNug=
1168 github.com/multiformats/go-multiaddr-dns v0.0.1/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q=
1169 github.com/multiformats/go-multiaddr-dns v0.0.2/go.mod h1:9kWcqw/Pj6FwxAwW38n/9403szc57zJPs45fmnznu3Q=
1170 github.com/multiformats/go-multiaddr-dns v0.2.0/go.mod h1:TJ5pr5bBO7Y1B18djPuRsVkduhQH2YqYSbxWJzYGdK0=
@@ -1140,7 +1187,6 @@ github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77
1187 github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc=
1188 github.com/multiformats/go-multicodec v0.2.0/go.mod h1:/y4YVwkfMyry5kFbMTbLJKErhycTIftytRV+llXdyS4=
1189 github.com/multiformats/go-multicodec v0.3.0/go.mod h1:qGGaQmioCDh+TeFOnxrbU0DaIPw8yFgAZgFG0V7p1qQ=
1143 -github.com/multiformats/go-multicodec v0.3.1-0.20210902112759-1539a079fd61 h1:ZrUuMKNgJ52qHPoQ+bx0h0uBfcWmN7Px+4uKSZeesiI=
1190 github.com/multiformats/go-multicodec v0.3.1-0.20210902112759-1539a079fd61/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ=
1191 github.com/multiformats/go-multicodec v0.4.0 h1:fbqb6ky7erjdD+/zaEBJgZWu1i8D6i/wmPywGK7sdow=
1192 github.com/multiformats/go-multicodec v0.4.0/go.mod h1:1Hj/eHRaVWSXiSNNfcEPcwZleTmdNP81xlxDLnWU9GQ=
@@ -1203,6 +1249,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
1249 github.com/onsi/gomega v1.13.0 h1:7lLHu94wT9Ij0o6EWWclhu0aOh32VxhkwEJvzuWPeak=
1250 github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY=
1251 github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
1252 +github.com/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0=
1253 +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
1254 github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
1255 github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
1256 github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
@@ -1216,6 +1264,8 @@ github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh
1264 github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
1265 github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
1266 github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
1267 +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
1268 +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
1269 github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
1270 github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
1271 github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
@@ -1279,6 +1329,10 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0
1329 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
1330 github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8=
1331 github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ=
1332 +github.com/raulk/clock v1.1.0 h1:dpb29+UKMbLqiU/jqIJptgLR1nn23HLgMY0sTCDza5Y=
1333 +github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmOeY0=
1334 +github.com/raulk/go-watchdog v1.2.0 h1:konN75pw2BMmZ+AfuAm5rtFsWcJpKF3m02rKituuXNo=
1335 +github.com/raulk/go-watchdog v1.2.0/go.mod h1:lzSbAl5sh4rtI8tYHU01BWIDzgzqaQLj6RcA1i4mlqI=
1336 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
1337 github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
1338 github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
@@ -1322,6 +1376,7 @@ github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5k
1376 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
1377 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
1378 github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
1379 +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
1380 github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
1381 github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
1382 github.com/smartystreets/assertions v1.0.0 h1:UVQPSSmc3qtTi+zPPkCXvZX9VvW/xT/NsRvKfwY81a8=
@@ -1374,6 +1429,7 @@ github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9
1429 github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
1430 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
1431 github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
1432 +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
1433 github.com/urfave/cli/v2 v2.0.0/go.mod h1:SE9GqnLQmjVa0iPEY0f1w3ygNIYcIJ0OKPMoW2caLfQ=
1434 github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
1435 github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
@@ -1475,6 +1531,7 @@ go.uber.org/fx v1.16.0 h1:N8i80+X1DCX+qMRiKzM+jPPZiIiyK/bVCysga3+B+1w=
1531 go.uber.org/fx v1.16.0/go.mod h1:OMoT5BnXcOaiexlpjtpE4vcAmzyDKyRs9TRYXCzamx8=
1532 go.uber.org/goleak v1.0.0/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
1533 go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
1534 +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
1535 go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
1536 go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
1537 go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
@@ -1491,6 +1548,7 @@ go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
1548 go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
1549 go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
1550 go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
1551 +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
1552 go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
1553 go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
1554 go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
@@ -1649,6 +1707,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
1707 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
1708 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
1709 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
1710 +golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
1711 golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
1712 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
1713 golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -1695,6 +1754,7 @@ golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7w
1754 golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1755 golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1756 golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1757 +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1758 golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1759 golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1760 golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
peering/peering_test.go
+9 -7
@@ -6,20 +6,22 @@ import (
6 "time"
7
8 "github.com/libp2p/go-libp2p"
9 - connmgr "github.com/libp2p/go-libp2p-connmgr"
9 "github.com/libp2p/go-libp2p-core/host"
10 "github.com/libp2p/go-libp2p-core/network"
11 "github.com/libp2p/go-libp2p-core/peer"
12 + "github.com/libp2p/go-libp2p/p2p/net/connmgr"
13
14 "github.com/stretchr/testify/require"
15 )
16
17 -func newNode(ctx context.Context, t *testing.T) host.Host {
17 +func newNode(t *testing.T) host.Host {
18 + cm, err := connmgr.NewConnManager(1, 100, connmgr.WithGracePeriod(0))
19 + require.NoError(t, err)
20 h, err := libp2p.New(
21 libp2p.ListenAddrStrings("/ip4/127.0.0.1/tcp/0"),
22 // We'd like to set the connection manager low water to 0, but
23 // that would disable the connection manager.
22 - libp2p.ConnectionManager(connmgr.NewConnManager(1, 100, 0)),
24 + libp2p.ConnectionManager(cm),
25 )
26 require.NoError(t, err)
27 return h
@@ -29,12 +31,12 @@ func TestPeeringService(t *testing.T) {
31 ctx, cancel := context.WithCancel(context.Background())
32 defer cancel()
33
32 - h1 := newNode(ctx, t)
34 + h1 := newNode(t)
35 ps1 := NewPeeringService(h1)
36
35 - h2 := newNode(ctx, t)
36 - h3 := newNode(ctx, t)
37 - h4 := newNode(ctx, t)
37 + h2 := newNode(t)
38 + h3 := newNode(t)
39 + h4 := newNode(t)
40
41 // peer 1 -> 2
42 ps1.AddPeer(peer.AddrInfo{ID: h2.ID(), Addrs: h2.Addrs()})
test/integration/addcat_test.go
+3 -3
@@ -18,8 +18,8 @@ import (
18 mock "github.com/ipfs/go-ipfs/core/mock"
19 "github.com/ipfs/go-ipfs/thirdparty/unit"
20 logging "github.com/ipfs/go-log"
21 - random "github.com/jbenet/go-random"
22 - peer "github.com/libp2p/go-libp2p-core/peer"
21 + "github.com/jbenet/go-random"
22 + "github.com/libp2p/go-libp2p-core/peer"
23 testutil "github.com/libp2p/go-libp2p-testing/net"
24 mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
25 )
@@ -97,7 +97,7 @@ func DirectAddCat(data []byte, conf testutil.LatencyConfig) error {
97 defer cancel()
98
99 // create network
100 - mn := mocknet.New(ctx)
100 + mn := mocknet.New()
101 mn.SetLinkDefaults(mocknet.LinkOptions{
102 Latency: conf.NetworkLatency,
103 // TODO add to conf. This is tricky because we want 0 values to be functional.
test/integration/bench_cat_test.go
+2 -2
@@ -14,7 +14,7 @@ import (
14 "github.com/ipfs/go-ipfs/core/coreapi"
15 mock "github.com/ipfs/go-ipfs/core/mock"
16 "github.com/ipfs/go-ipfs/thirdparty/unit"
17 - peer "github.com/libp2p/go-libp2p-core/peer"
17 + "github.com/libp2p/go-libp2p-core/peer"
18 testutil "github.com/libp2p/go-libp2p-testing/net"
19 mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
20 )
@@ -40,7 +40,7 @@ func benchCat(b *testing.B, data []byte, conf testutil.LatencyConfig) error {
40 defer cancel()
41
42 // create network
43 - mn := mocknet.New(ctx)
43 + mn := mocknet.New()
44 mn.SetLinkDefaults(mocknet.LinkOptions{
45 Latency: conf.NetworkLatency,
46 // TODO add to conf. This is tricky because we want 0 values to be functional.
test/integration/bitswap_wo_routing_test.go
+1 -1
@@ -19,7 +19,7 @@ func TestBitswapWithoutRouting(t *testing.T) {
19 const numPeers = 4
20
21 // create network
22 - mn := mocknet.New(ctx)
22 + mn := mocknet.New()
23
24 var nodes []*core.IpfsNode
25 for i := 0; i < numPeers; i++ {
test/integration/three_legged_cat_test.go
+2 -2
@@ -15,7 +15,7 @@ import (
15 "github.com/ipfs/go-ipfs/thirdparty/unit"
16
17 files "github.com/ipfs/go-ipfs-files"
18 - peer "github.com/libp2p/go-libp2p-core/peer"
18 + "github.com/libp2p/go-libp2p-core/peer"
19 testutil "github.com/libp2p/go-libp2p-testing/net"
20 mocknet "github.com/libp2p/go-libp2p/p2p/net/mock"
21 )
@@ -68,7 +68,7 @@ func RunThreeLeggedCat(data []byte, conf testutil.LatencyConfig) error {
68 defer cancel()
69
70 // create network
71 - mn := mocknet.New(ctx)
71 + mn := mocknet.New()
72 mn.SetLinkDefaults(mocknet.LinkOptions{
73 Latency: conf.NetworkLatency,
74 // TODO add to conf. This is tricky because we want 0 values to be functional.
test/integration/wan_lan_dht_test.go
+3 -3
@@ -72,7 +72,7 @@ func RunDHTConnectivity(conf testutil.LatencyConfig, numPeers int) error {
72 defer cancel()
73
74 // create network
75 - mn := mocknet.New(ctx)
75 + mn := mocknet.New()
76 mn.SetLinkDefaults(mocknet.LinkOptions{
77 Latency: conf.NetworkLatency,
78 Bandwidth: math.MaxInt32,
@@ -209,9 +209,9 @@ WanStartupWait:
209 for {
210 select {
211 case err := <-testPeer.DHT.WAN.RefreshRoutingTable():
212 - //if err != nil {
212 + // if err != nil {
213 // fmt.Printf("Error refreshing routing table: %v\n", err)
214 - //}
214 + // }
215 if testPeer.DHT.WAN.RoutingTable() == nil ||
216 testPeer.DHT.WAN.RoutingTable().Size() == 0 ||
217 err != nil {
test/sharness/t0139-swarm-rcmgr.sh new
+66
@@ -0,0 +1,66 @@
1 +#!/usr/bin/env bash
2 +#
3 +test_description="Test ipfs swarm ResourceMgr config and commands"
4 +
5 +. lib/test-lib.sh
6 +
7 +test_init_ipfs
8 +
9 +# swarm limit|stats should fail in offline mode
10 +
11 +test_expect_success 'disconnected: swarm limit requires running daemon' '
12 + test_expect_code 1 ipfs swarm limit system 2> actual &&
13 + test_should_contain "missing ResourceMgr" actual
14 +'
15 +test_expect_success 'disconnected: swarm stats requires running daemon' '
16 + test_expect_code 1 ipfs swarm stats all 2> actual &&
17 + test_should_contain "missing ResourceMgr" actual
18 +'
19 +
20 +# swarm limit|stats should fail in online mode by default
21 +# because Resource Manager is opt-in for now
22 +test_launch_ipfs_daemon
23 +
24 +test_expect_success 'ResourceMgr disabled by default: swarm limit requires Swarm.ResourceMgr.Enabled' '
25 + test_expect_code 1 ipfs swarm limit system 2> actual &&
26 + test_should_contain "missing ResourceMgr" actual
27 +'
28 +test_expect_success 'ResourceMgr disabled by default: swarm stats requires Swarm.ResourceMgr.Enabled' '
29 + test_expect_code 1 ipfs swarm stats all 2> actual &&
30 + test_should_contain "missing ResourceMgr" actual
31 +'
32 +
33 +# swarm limit|stat should work when Swarm.ResourceMgr.Enabled
34 +test_kill_ipfs_daemon
35 +test_expect_success "test_config_set succeeds" "
36 + ipfs config --json Swarm.ResourceMgr.Enabled true
37 +"
38 +test_launch_ipfs_daemon
39 +
40 +# every scope has the same fields, so we only inspect System
41 +test_expect_success 'ResourceMgr enabled: swarm limit' '
42 + ipfs swarm limit system --enc=json | tee json &&
43 + jq -e .Conns < json &&
44 + jq -e .ConnsInbound < json &&
45 + jq -e .ConnsOutbound < json &&
46 + jq -e .FD < json &&
47 + jq -e .Memory < json &&
48 + jq -e .Streams < json &&
49 + jq -e .StreamsInbound < json &&
50 + jq -e .StreamsOutbound < json
51 +'
52 +
53 +# every scope has the same fields, so we only inspect System
54 +test_expect_success 'ResourceMgr enabled: swarm stats' '
55 + ipfs swarm stats all --enc=json | tee json &&
56 + jq -e .System.Memory < json &&
57 + jq -e .System.NumConnsInbound < json &&
58 + jq -e .System.NumConnsOutbound < json &&
59 + jq -e .System.NumFD < json &&
60 + jq -e .System.NumStreamsInbound < json &&
61 + jq -e .System.NumStreamsOutbound < json &&
62 + jq -e .Transient.Memory < json
63 +'
64 +
65 +test_kill_ipfs_daemon
66 +test_done