@cryptotaxi247 / kubo / commits / 0ff406170

fix: update rcmgr for go-libp2p v0.25

Jorropo committed Feb 14, 2023 at 10:42 UTC 0ff406170dd9fe010a5ff9d02a8776c47e4711a3
11 files changed +274 -366
config/swarm.go
+2 -2
@@ -141,8 +141,8 @@ type ConnMgr struct {
141 // <https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#readme>
142 type ResourceMgr struct {
143 // Enables the Network Resource Manager feature, default to on.
144 - Enabled Flag `json:",omitempty"`
145 - Limits *rcmgr.LimitConfig `json:",omitempty"`
144 + Enabled Flag `json:",omitempty"`
145 + Limits *rcmgr.PartialLimitConfig `json:",omitempty"`
146
147 MaxMemory *OptionalString `json:",omitempty"`
148 MaxFileDescriptors *OptionalInteger `json:",omitempty"`
core/commands/swarm.go
+11 -8
@@ -80,8 +80,8 @@ var swarmPeeringCmd = &cmds.Command{
80 Helptext: cmds.HelpText{
81 Tagline: "Modify the peering subsystem.",
82 ShortDescription: `
83 -'ipfs swarm peering' manages the peering subsystem.
84 -Peers in the peering subsystem are maintained to be connected, reconnected
83 +'ipfs swarm peering' manages the peering subsystem.
84 +Peers in the peering subsystem are maintained to be connected, reconnected
85 on disconnect with a back-off.
86 The changes are not saved to the config.
87 `,
@@ -430,7 +430,7 @@ Changes made via command line are persisted in the Swarm.ResourceMgr.Limits fiel
430
431 // set scope limit to new values (when limit.json is passed as a second arg)
432 if req.Files != nil {
433 - var newLimit rcmgr.BaseLimit
433 + var newLimit rcmgr.ResourceLimits
434 it := req.Files.Entries()
435 if it.Next() {
436 file := files.FileFromEntry(it)
@@ -451,20 +451,23 @@ Changes made via command line are persisted in the Swarm.ResourceMgr.Limits fiel
451 }
452
453 var result interface{}
454 - _, reset := req.Options[swarmResetLimitsOptionName]
455 - if reset {
454 + switch _, reset := req.Options[swarmResetLimitsOptionName]; {
455 + case reset:
456 result, err = libp2p.NetResetLimit(node.ResourceManager, node.Repo, scope)
457 - } else if scope == "all" {
457 + case scope == "all":
458 result, err = libp2p.NetLimitAll(node.ResourceManager)
459 - } else {
459 + default:
460 // get scope limit
461 result, err = libp2p.NetLimit(node.ResourceManager, scope)
462 }
463 -
463 if err != nil {
464 return err
465 }
466
467 + if base, ok := result.(rcmgr.BaseLimit); ok {
468 + result = base.ToResourceLimits()
469 + }
470 +
471 b := new(bytes.Buffer)
472 enc := json.NewEncoder(b)
473 err = enc.Encode(result)
core/node/libp2p/rcmgr.go
+141 -111
@@ -17,12 +17,15 @@ import (
17 rcmgrObs "github.com/libp2p/go-libp2p/p2p/host/resource-manager/obs"
18 "github.com/multiformats/go-multiaddr"
19 "go.uber.org/fx"
20 + "golang.org/x/exp/constraints"
21
22 "github.com/ipfs/kubo/config"
23 "github.com/ipfs/kubo/core/node/helpers"
24 "github.com/ipfs/kubo/repo"
25 )
26
27 +// FIXME(@Jorropo): for go-libp2p v0.26.0 use .MustConcrete and .MustBaseLimit instead of .Build(rcmgr.BaseLimit{}).
28 +
29 const NetLimitDefaultFilename = "limit.json"
30 const NetLimitTraceFilename = "rcmgr.json.gz"
31
@@ -51,7 +54,7 @@ func ResourceManager(cfg config.SwarmConfig) interface{} {
54 return nil, opts, fmt.Errorf("opening IPFS_PATH: %w", err)
55 }
56
54 - var limitConfig rcmgr.LimitConfig
57 + var limitConfig rcmgr.ConcreteLimitConfig
58 defaultComputedLimitConfig, err := createDefaultLimitConfig(cfg)
59 if err != nil {
60 return nil, opts, err
@@ -66,8 +69,7 @@ func ResourceManager(cfg config.SwarmConfig) interface{} {
69 // Because of how how Apply works, any 0 value for a user supplied override
70 // will be overriden with a computed default value.
71 // There currently isn't a way for a user to supply a 0-value override.
69 - userSuppliedOverrideLimitConfig.Apply(defaultComputedLimitConfig)
70 - limitConfig = userSuppliedOverrideLimitConfig
72 + limitConfig = userSuppliedOverrideLimitConfig.Build(defaultComputedLimitConfig)
73 } else {
74 limitConfig = defaultComputedLimitConfig
75 }
@@ -131,12 +133,36 @@ func ResourceManager(cfg config.SwarmConfig) interface{} {
133 }
134 }
135
136 +type notOmitEmptyResourceLimit struct {
137 + Streams rcmgr.LimitVal
138 + StreamsInbound rcmgr.LimitVal
139 + StreamsOutbound rcmgr.LimitVal
140 + Conns rcmgr.LimitVal
141 + ConnsInbound rcmgr.LimitVal
142 + ConnsOutbound rcmgr.LimitVal
143 + FD rcmgr.LimitVal
144 + Memory rcmgr.LimitVal64
145 +}
146 +
147 +func resourceLimitsToNotOmitEmpty(r rcmgr.ResourceLimits) notOmitEmptyResourceLimit {
148 + return notOmitEmptyResourceLimit{
149 + Streams: r.Streams,
150 + StreamsInbound: r.StreamsInbound,
151 + StreamsOutbound: r.StreamsOutbound,
152 + Conns: r.Conns,
153 + ConnsInbound: r.ConnsInbound,
154 + ConnsOutbound: r.ConnsOutbound,
155 + FD: r.FD,
156 + Memory: r.Memory,
157 + }
158 +}
159 +
160 type NetStatOut struct {
135 - System *rcmgr.BaseLimit `json:",omitempty"`
136 - Transient *rcmgr.BaseLimit `json:",omitempty"`
137 - Services map[string]rcmgr.BaseLimit `json:",omitempty"`
138 - Protocols map[string]rcmgr.BaseLimit `json:",omitempty"`
139 - Peers map[string]rcmgr.BaseLimit `json:",omitempty"`
161 + System *notOmitEmptyResourceLimit `json:",omitempty"`
162 + Transient *notOmitEmptyResourceLimit `json:",omitempty"`
163 + Services map[string]notOmitEmptyResourceLimit `json:",omitempty"`
164 + Protocols map[string]notOmitEmptyResourceLimit `json:",omitempty"`
165 + Peers map[string]notOmitEmptyResourceLimit `json:",omitempty"`
166 }
167
168 func NetStat(mgr network.ResourceManager, scope string, percentage int) (NetStatOut, error) {
@@ -155,35 +181,36 @@ func NetStat(mgr network.ResourceManager, scope string, percentage int) (NetStat
181 }
182
183 stat := rapi.Stat()
158 - result.System = compareLimits(scopeToLimit(&stat.System), limits.System, percentage)
159 - result.Transient = compareLimits(scopeToLimit(&stat.Transient), limits.Transient, percentage)
184 + if s := scopeToLimit(stat.System); compareLimits(s, *limits.System, percentage) {
185 + result.System = &s
186 + }
187 + if s := scopeToLimit(stat.Transient); compareLimits(s, *limits.Transient, percentage) {
188 + result.Transient = &s
189 + }
190 if len(stat.Services) > 0 {
161 - result.Services = make(map[string]rcmgr.BaseLimit, len(stat.Services))
162 - for srv, stat := range stat.Services {
191 + result.Services = make(map[string]notOmitEmptyResourceLimit, len(stat.Services))
192 + for srv, s := range stat.Services {
193 ls := limits.Services[srv]
164 - fstat := compareLimits(scopeToLimit(&stat), &ls, percentage)
165 - if fstat != nil {
166 - result.Services[srv] = *fstat
194 + if stat := scopeToLimit(s); compareLimits(stat, ls, percentage) {
195 + result.Services[srv] = stat
196 }
197 }
198 }
199 if len(stat.Protocols) > 0 {
171 - result.Protocols = make(map[string]rcmgr.BaseLimit, len(stat.Protocols))
172 - for proto, stat := range stat.Protocols {
200 + result.Protocols = make(map[string]notOmitEmptyResourceLimit, len(stat.Protocols))
201 + for proto, s := range stat.Protocols {
202 ls := limits.Protocols[string(proto)]
174 - fstat := compareLimits(scopeToLimit(&stat), &ls, percentage)
175 - if fstat != nil {
176 - result.Protocols[string(proto)] = *fstat
203 + if stat := scopeToLimit(s); compareLimits(stat, ls, percentage) {
204 + result.Protocols[string(proto)] = stat
205 }
206 }
207 }
208 if len(stat.Peers) > 0 {
181 - result.Peers = make(map[string]rcmgr.BaseLimit, len(stat.Peers))
182 - for p, stat := range stat.Peers {
209 + result.Peers = make(map[string]notOmitEmptyResourceLimit, len(stat.Peers))
210 + for p, s := range stat.Peers {
211 ls := limits.Peers[p.Pretty()]
184 - fstat := compareLimits(scopeToLimit(&stat), &ls, percentage)
185 - if fstat != nil {
186 - result.Peers[p.Pretty()] = *fstat
212 + if stat := scopeToLimit(s); compareLimits(stat, ls, percentage) {
213 + result.Peers[p.Pretty()] = stat
214 }
215 }
216 }
@@ -192,16 +219,16 @@ func NetStat(mgr network.ResourceManager, scope string, percentage int) (NetStat
219
220 case scope == config.ResourceMgrSystemScope:
221 err = mgr.ViewSystem(func(s network.ResourceScope) error {
195 - stat := s.Stat()
196 - result.System = scopeToLimit(&stat)
222 + stat := scopeToLimit(s.Stat())
223 + result.System = &stat
224 return nil
225 })
226 return result, err
227
228 case scope == config.ResourceMgrTransientScope:
229 err = mgr.ViewTransient(func(s network.ResourceScope) error {
203 - stat := s.Stat()
204 - result.Transient = scopeToLimit(&stat)
230 + stat := scopeToLimit(s.Stat())
231 + result.Transient = &stat
232 return nil
233 })
234 return result, err
@@ -209,9 +236,8 @@ func NetStat(mgr network.ResourceManager, scope string, percentage int) (NetStat
236 case strings.HasPrefix(scope, config.ResourceMgrServiceScopePrefix):
237 svc := strings.TrimPrefix(scope, config.ResourceMgrServiceScopePrefix)
238 err = mgr.ViewService(svc, func(s network.ServiceScope) error {
212 - stat := s.Stat()
213 - result.Services = map[string]rcmgr.BaseLimit{
214 - svc: *scopeToLimit(&stat),
239 + result.Services = map[string]notOmitEmptyResourceLimit{
240 + svc: scopeToLimit(s.Stat()),
241 }
242 return nil
243 })
@@ -220,9 +246,8 @@ func NetStat(mgr network.ResourceManager, scope string, percentage int) (NetStat
246 case strings.HasPrefix(scope, config.ResourceMgrProtocolScopePrefix):
247 proto := strings.TrimPrefix(scope, config.ResourceMgrProtocolScopePrefix)
248 err = mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error {
223 - stat := s.Stat()
224 - result.Protocols = map[string]rcmgr.BaseLimit{
225 - proto: *scopeToLimit(&stat),
249 + result.Protocols = map[string]notOmitEmptyResourceLimit{
250 + proto: scopeToLimit(s.Stat()),
251 }
252 return nil
253 })
@@ -235,9 +260,8 @@ func NetStat(mgr network.ResourceManager, scope string, percentage int) (NetStat
260 return result, fmt.Errorf("invalid peer ID: %q: %w", p, err)
261 }
262 err = mgr.ViewPeer(pid, func(s network.PeerScope) error {
238 - stat := s.Stat()
239 - result.Peers = map[string]rcmgr.BaseLimit{
240 - p: *scopeToLimit(&stat),
263 + result.Peers = map[string]notOmitEmptyResourceLimit{
264 + p: scopeToLimit(s.Stat()),
265 }
266 return nil
267 })
@@ -256,55 +280,52 @@ var scopes = []string{
280 config.ResourceMgrPeerScopePrefix,
281 }
282
259 -func scopeToLimit(s *network.ScopeStat) *rcmgr.BaseLimit {
260 - return &rcmgr.BaseLimit{
261 - Streams: s.NumStreamsInbound + s.NumStreamsOutbound,
262 - StreamsInbound: s.NumStreamsInbound,
263 - StreamsOutbound: s.NumStreamsOutbound,
264 - Conns: s.NumConnsInbound + s.NumConnsOutbound,
265 - ConnsInbound: s.NumConnsInbound,
266 - ConnsOutbound: s.NumConnsOutbound,
267 - FD: s.NumFD,
268 - Memory: s.Memory,
283 +func scopeToLimit(s network.ScopeStat) notOmitEmptyResourceLimit {
284 + return notOmitEmptyResourceLimit{
285 + Streams: rcmgr.LimitVal(s.NumStreamsInbound + s.NumStreamsOutbound),
286 + StreamsInbound: rcmgr.LimitVal(s.NumStreamsInbound),
287 + StreamsOutbound: rcmgr.LimitVal(s.NumStreamsOutbound),
288 + Conns: rcmgr.LimitVal(s.NumConnsInbound + s.NumConnsOutbound),
289 + ConnsInbound: rcmgr.LimitVal(s.NumConnsInbound),
290 + ConnsOutbound: rcmgr.LimitVal(s.NumConnsOutbound),
291 + FD: rcmgr.LimitVal(s.NumFD),
292 + Memory: rcmgr.LimitVal64(s.Memory),
293 }
294 }
295
296 // compareLimits compares stat and limit.
297 // If any of the stats value are equals or above the specified percentage,
274 -// stat object is returned.
275 -func compareLimits(stat, limit *rcmgr.BaseLimit, percentage int) *rcmgr.BaseLimit {
276 - if stat == nil || limit == nil {
277 - return nil
278 - }
298 +// it returns true.
299 +func compareLimits(stat, limit notOmitEmptyResourceLimit, percentage int) bool {
300 if abovePercentage(int(stat.Memory), int(limit.Memory), percentage) {
280 - return stat
301 + return true
302 }
303 if abovePercentage(stat.ConnsInbound, limit.ConnsInbound, percentage) {
283 - return stat
304 + return true
305 }
306 if abovePercentage(stat.ConnsOutbound, limit.ConnsOutbound, percentage) {
286 - return stat
307 + return true
308 }
309 if abovePercentage(stat.Conns, limit.Conns, percentage) {
289 - return stat
310 + return true
311 }
312 if abovePercentage(stat.FD, limit.FD, percentage) {
292 - return stat
313 + return true
314 }
315 if abovePercentage(stat.StreamsInbound, limit.StreamsInbound, percentage) {
295 - return stat
316 + return true
317 }
318 if abovePercentage(stat.StreamsOutbound, limit.StreamsOutbound, percentage) {
298 - return stat
319 + return true
320 }
321 if abovePercentage(stat.Streams, limit.Streams, percentage) {
301 - return stat
322 + return true
323 }
324
304 - return nil
325 + return false
326 }
327
307 -func abovePercentage(v1, v2, percentage int) bool {
328 +func abovePercentage[T constraints.Integer | constraints.Float](v1, v2 T, percentage int) bool {
329 if percentage == 0 {
330 return true
331 }
@@ -338,7 +359,7 @@ func NetLimitAll(mgr network.ResourceManager) (*NetStatOut, error) {
359 }
360 result.Transient = &s
361 case config.ResourceMgrServiceScopePrefix:
341 - result.Services = make(map[string]rcmgr.BaseLimit)
362 + result.Services = make(map[string]notOmitEmptyResourceLimit)
363 for _, serv := range lister.ListServices() {
364 s, err := NetLimit(mgr, config.ResourceMgrServiceScopePrefix+serv)
365 if err != nil {
@@ -347,7 +368,7 @@ func NetLimitAll(mgr network.ResourceManager) (*NetStatOut, error) {
368 result.Services[serv] = s
369 }
370 case config.ResourceMgrProtocolScopePrefix:
350 - result.Protocols = make(map[string]rcmgr.BaseLimit)
371 + result.Protocols = make(map[string]notOmitEmptyResourceLimit)
372 for _, prot := range lister.ListProtocols() {
373 ps := string(prot)
374 s, err := NetLimit(mgr, config.ResourceMgrProtocolScopePrefix+ps)
@@ -357,7 +378,7 @@ func NetLimitAll(mgr network.ResourceManager) (*NetStatOut, error) {
378 result.Protocols[ps] = s
379 }
380 case config.ResourceMgrPeerScopePrefix:
360 - result.Peers = make(map[string]rcmgr.BaseLimit)
381 + result.Peers = make(map[string]notOmitEmptyResourceLimit)
382 for _, peer := range lister.ListPeers() {
383 ps := peer.Pretty()
384 s, err := NetLimit(mgr, config.ResourceMgrPeerScopePrefix+ps)
@@ -372,24 +393,19 @@ func NetLimitAll(mgr network.ResourceManager) (*NetStatOut, error) {
393 return result, nil
394 }
395
375 -func NetLimit(mgr network.ResourceManager, scope string) (rcmgr.BaseLimit, error) {
376 - var result rcmgr.BaseLimit
396 +func NetLimit(mgr network.ResourceManager, scope string) (notOmitEmptyResourceLimit, error) {
397 + var result rcmgr.ResourceLimits
398 getLimit := func(s network.ResourceScope) error {
399 limiter, ok := s.(rcmgr.ResourceScopeLimiter)
400 if !ok { // NullResourceManager
401 return ErrNoResourceMgr
402 }
382 - limit := limiter.Limit()
383 - switch l := limit.(type) {
403 +
404 + switch limit := limiter.Limit(); l := limit.(type) {
405 case *rcmgr.BaseLimit:
385 - result.Memory = l.Memory
386 - result.Streams = l.Streams
387 - result.StreamsInbound = l.StreamsInbound
388 - result.StreamsOutbound = l.StreamsOutbound
389 - result.Conns = l.Conns
390 - result.ConnsInbound = l.ConnsInbound
391 - result.ConnsOutbound = l.ConnsOutbound
392 - result.FD = l.FD
406 + result = l.ToResourceLimits()
407 + case rcmgr.BaseLimit:
408 + result = l.ToResourceLimits()
409 default:
410 return fmt.Errorf("unknown limit type %T", limit)
411 }
@@ -397,38 +413,42 @@ func NetLimit(mgr network.ResourceManager, scope string) (rcmgr.BaseLimit, error
413 return nil
414 }
415
416 + var err error
417 switch {
418 case scope == config.ResourceMgrSystemScope:
402 - return result, mgr.ViewSystem(func(s network.ResourceScope) error { return getLimit(s) })
419 + err = mgr.ViewSystem(func(s network.ResourceScope) error { return getLimit(s) })
420 case scope == config.ResourceMgrTransientScope:
404 - return result, mgr.ViewTransient(func(s network.ResourceScope) error { return getLimit(s) })
421 + err = mgr.ViewTransient(func(s network.ResourceScope) error { return getLimit(s) })
422 case strings.HasPrefix(scope, config.ResourceMgrServiceScopePrefix):
423 svc := strings.TrimPrefix(scope, config.ResourceMgrServiceScopePrefix)
407 - return result, mgr.ViewService(svc, func(s network.ServiceScope) error { return getLimit(s) })
424 + err = mgr.ViewService(svc, func(s network.ServiceScope) error { return getLimit(s) })
425 case strings.HasPrefix(scope, config.ResourceMgrProtocolScopePrefix):
426 proto := strings.TrimPrefix(scope, config.ResourceMgrProtocolScopePrefix)
410 - return result, mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error { return getLimit(s) })
427 + err = mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error { return getLimit(s) })
428 case strings.HasPrefix(scope, config.ResourceMgrPeerScopePrefix):
429 p := strings.TrimPrefix(scope, config.ResourceMgrPeerScopePrefix)
413 - pid, err := peer.Decode(p)
430 + var pid peer.ID
431 + pid, err = peer.Decode(p)
432 if err != nil {
415 - return result, fmt.Errorf("invalid peer ID: %q: %w", p, err)
433 + return notOmitEmptyResourceLimit{}, fmt.Errorf("invalid peer ID: %q: %w", p, err)
434 }
417 - return result, mgr.ViewPeer(pid, func(s network.PeerScope) error { return getLimit(s) })
435 + err = mgr.ViewPeer(pid, func(s network.PeerScope) error { return getLimit(s) })
436 default:
419 - return result, fmt.Errorf("invalid scope %q", scope)
437 + err = fmt.Errorf("invalid scope %q", scope)
438 }
439 + return resourceLimitsToNotOmitEmpty(result), err
440 }
441
442 // NetSetLimit sets new ResourceManager limits for the given scope. The limits take effect immediately, and are also persisted to the repo config.
424 -func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limit rcmgr.BaseLimit) error {
443 +func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limit rcmgr.ResourceLimits) error {
444 setLimit := func(s network.ResourceScope) error {
445 limiter, ok := s.(rcmgr.ResourceScopeLimiter)
446 if !ok { // NullResourceManager
447 return ErrNoResourceMgr
448 }
449
431 - limiter.SetLimit(&limit)
450 + l := rcmgr.InfiniteLimits.ToPartialLimitConfig().System
451 + limiter.SetLimit(limit.Build(l.Build(rcmgr.BaseLimit{})))
452 return nil
453 }
454
@@ -438,7 +458,7 @@ func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limi
458 }
459
460 if cfg.Swarm.ResourceMgr.Limits == nil {
441 - cfg.Swarm.ResourceMgr.Limits = &rcmgr.LimitConfig{}
461 + cfg.Swarm.ResourceMgr.Limits = &rcmgr.PartialLimitConfig{}
462 }
463 configLimits := cfg.Swarm.ResourceMgr.Limits
464
@@ -455,7 +475,7 @@ func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limi
475 err = mgr.ViewService(svc, func(s network.ServiceScope) error { return setLimit(s) })
476 setConfigFunc = func() {
477 if configLimits.Service == nil {
458 - configLimits.Service = map[string]rcmgr.BaseLimit{}
478 + configLimits.Service = map[string]rcmgr.ResourceLimits{}
479 }
480 configLimits.Service[svc] = limit
481 }
@@ -464,7 +484,7 @@ func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limi
484 err = mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error { return setLimit(s) })
485 setConfigFunc = func() {
486 if configLimits.Protocol == nil {
467 - configLimits.Protocol = map[protocol.ID]rcmgr.BaseLimit{}
487 + configLimits.Protocol = map[protocol.ID]rcmgr.ResourceLimits{}
488 }
489 configLimits.Protocol[protocol.ID(proto)] = limit
490 }
@@ -478,7 +498,7 @@ func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limi
498 err = mgr.ViewPeer(pid, func(s network.PeerScope) error { return setLimit(s) })
499 setConfigFunc = func() {
500 if configLimits.Peer == nil {
481 - configLimits.Peer = map[peer.ID]rcmgr.BaseLimit{}
501 + configLimits.Peer = map[peer.ID]rcmgr.ResourceLimits{}
502 }
503 configLimits.Peer[pid] = limit
504 }
@@ -491,7 +511,7 @@ func NetSetLimit(mgr network.ResourceManager, repo repo.Repo, scope string, limi
511 }
512
513 if cfg.Swarm.ResourceMgr.Limits == nil {
494 - cfg.Swarm.ResourceMgr.Limits = &rcmgr.LimitConfig{}
514 + cfg.Swarm.ResourceMgr.Limits = &rcmgr.PartialLimitConfig{}
515 }
516 setConfigFunc()
517
@@ -518,55 +538,62 @@ func NetResetLimit(mgr network.ResourceManager, repo repo.Repo, scope string) (r
538
539 cfg, err := repo.Config()
540 if err != nil {
521 - return result, fmt.Errorf("reading config to reset limit: %w", err)
541 + return rcmgr.BaseLimit{}, fmt.Errorf("reading config to reset limit: %w", err)
542 }
543
524 - defaults, err := createDefaultLimitConfig(cfg.Swarm)
544 + defaultsOrig, err := createDefaultLimitConfig(cfg.Swarm)
545 if err != nil {
526 - return result, fmt.Errorf("creating default limit config: %w", err)
546 + return rcmgr.BaseLimit{}, fmt.Errorf("creating default limit config: %w", err)
547 }
548 + defaults := defaultsOrig.ToPartialLimitConfig()
549 +
550 + // INVESTIGATE(@Jorropo): Why do we save scaled configs in the repo ?
551
552 if cfg.Swarm.ResourceMgr.Limits == nil {
530 - cfg.Swarm.ResourceMgr.Limits = &rcmgr.LimitConfig{}
553 + cfg.Swarm.ResourceMgr.Limits = &rcmgr.PartialLimitConfig{}
554 }
555 configLimits := cfg.Swarm.ResourceMgr.Limits
556
557 var setConfigFunc func() rcmgr.BaseLimit
558 switch {
559 case scope == config.ResourceMgrSystemScope:
537 - err = mgr.ViewSystem(func(s network.ResourceScope) error { return setLimit(s, &defaults.System) })
560 + err = mgr.ViewSystem(func(s network.ResourceScope) error { return setLimit(s, defaults.System.Build(rcmgr.BaseLimit{})) })
561 setConfigFunc = func() rcmgr.BaseLimit {
562 configLimits.System = defaults.System
540 - return defaults.System
563 + return defaults.System.Build(rcmgr.BaseLimit{})
564 }
565 case scope == config.ResourceMgrTransientScope:
543 - err = mgr.ViewTransient(func(s network.ResourceScope) error { return setLimit(s, &defaults.Transient) })
566 + err = mgr.ViewTransient(func(s network.ResourceScope) error { return setLimit(s, defaults.Transient.Build(rcmgr.BaseLimit{})) })
567 setConfigFunc = func() rcmgr.BaseLimit {
568 configLimits.Transient = defaults.Transient
546 - return defaults.Transient
569 + return defaults.Transient.Build(rcmgr.BaseLimit{})
570 }
571 case strings.HasPrefix(scope, config.ResourceMgrServiceScopePrefix):
572 svc := strings.TrimPrefix(scope, config.ResourceMgrServiceScopePrefix)
573
551 - err = mgr.ViewService(svc, func(s network.ServiceScope) error { return setLimit(s, &defaults.ServiceDefault) })
574 + err = mgr.ViewService(svc, func(s network.ServiceScope) error {
575 + return setLimit(s, defaults.ServiceDefault.Build(rcmgr.BaseLimit{}))
576 + })
577 setConfigFunc = func() rcmgr.BaseLimit {
578 if configLimits.Service == nil {
554 - configLimits.Service = map[string]rcmgr.BaseLimit{}
579 + configLimits.Service = map[string]rcmgr.ResourceLimits{}
580 }
581 configLimits.Service[svc] = defaults.ServiceDefault
557 - return defaults.ServiceDefault
582 + return defaults.ServiceDefault.Build(rcmgr.BaseLimit{})
583 }
584 case strings.HasPrefix(scope, config.ResourceMgrProtocolScopePrefix):
585 proto := strings.TrimPrefix(scope, config.ResourceMgrProtocolScopePrefix)
586
562 - err = mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error { return setLimit(s, &defaults.ProtocolDefault) })
587 + err = mgr.ViewProtocol(protocol.ID(proto), func(s network.ProtocolScope) error {
588 + return setLimit(s, defaults.ProtocolDefault.Build(rcmgr.BaseLimit{}))
589 + })
590 setConfigFunc = func() rcmgr.BaseLimit {
591 if configLimits.Protocol == nil {
565 - configLimits.Protocol = map[protocol.ID]rcmgr.BaseLimit{}
592 + configLimits.Protocol = map[protocol.ID]rcmgr.ResourceLimits{}
593 }
594 configLimits.Protocol[protocol.ID(proto)] = defaults.ProtocolDefault
595
569 - return defaults.ProtocolDefault
596 + return defaults.ProtocolDefault.Build(rcmgr.BaseLimit{})
597 }
598 case strings.HasPrefix(scope, config.ResourceMgrPeerScopePrefix):
599 p := strings.TrimPrefix(scope, config.ResourceMgrPeerScopePrefix)
@@ -577,14 +604,14 @@ func NetResetLimit(mgr network.ResourceManager, repo repo.Repo, scope string) (r
604 return result, fmt.Errorf("invalid peer ID: %q: %w", p, err)
605 }
606
580 - err = mgr.ViewPeer(pid, func(s network.PeerScope) error { return setLimit(s, &defaults.PeerDefault) })
607 + err = mgr.ViewPeer(pid, func(s network.PeerScope) error { return setLimit(s, defaults.PeerDefault.Build(rcmgr.BaseLimit{})) })
608 setConfigFunc = func() rcmgr.BaseLimit {
609 if configLimits.Peer == nil {
583 - configLimits.Peer = map[peer.ID]rcmgr.BaseLimit{}
610 + configLimits.Peer = map[peer.ID]rcmgr.ResourceLimits{}
611 }
612 configLimits.Peer[pid] = defaults.PeerDefault
613
587 - return defaults.PeerDefault
614 + return defaults.PeerDefault.Build(rcmgr.BaseLimit{})
615 }
616 default:
617 return result, fmt.Errorf("invalid scope %q", scope)
@@ -603,10 +630,13 @@ func NetResetLimit(mgr network.ResourceManager, repo repo.Repo, scope string) (r
630 return result, nil
631 }
632
606 -func ensureConnMgrMakeSenseVsResourceMgr(rcm rcmgr.LimitConfig, cmgr config.ConnMgr) error {
633 +func ensureConnMgrMakeSenseVsResourceMgr(orig rcmgr.ConcreteLimitConfig, cmgr config.ConnMgr) error {
634 if cmgr.Type.WithDefault(config.DefaultConnMgrType) == "none" {
635 return nil // none connmgr, no checks to do
636 }
637 +
638 + rcm := orig.ToPartialLimitConfig()
639 +
640 highWater := cmgr.HighWater.WithDefault(config.DefaultConnMgrHighWater)
641 if rcm.System.ConnsInbound <= rcm.System.Conns {
642 if int64(rcm.System.ConnsInbound) <= highWater {
core/node/libp2p/rcmgr_defaults.go
+7 -6
@@ -46,12 +46,12 @@ var noLimitIncrease = rcmgr.BaseLimitIncrease{
46 // createDefaultLimitConfig creates LimitConfig to pass to libp2p's resource manager.
47 // The defaults follow the documentation in docs/libp2p-resource-management.md.
48 // Any changes in the logic here should be reflected there.
49 -func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.LimitConfig, error) {
49 +func createDefaultLimitConfig(cfg config.SwarmConfig) (rcmgr.ConcreteLimitConfig, error) {
50 maxMemoryDefaultString := humanize.Bytes(uint64(memory.TotalMemory()) / 2)
51 maxMemoryString := cfg.ResourceMgr.MaxMemory.WithDefault(maxMemoryDefaultString)
52 maxMemory, err := humanize.ParseBytes(maxMemoryString)
53 if err != nil {
54 - return rcmgr.LimitConfig{}, err
54 + return rcmgr.ConcreteLimitConfig{}, err
55 }
56
57 maxMemoryMB := maxMemory / (1024 * 1024)
@@ -173,7 +173,8 @@ Run 'ipfs swarm limit all' to see the resulting limits.
173 // Whatever limits libp2p has specifically tuned for its protocols/services we'll apply.
174 libp2p.SetDefaultServiceLimits(&scalingLimitConfig)
175
176 - defaultLimitConfig := scalingLimitConfig.Scale(int64(maxMemory), maxFD)
176 + orig := scalingLimitConfig.Scale(int64(maxMemory), maxFD)
177 + defaultLimitConfig := orig.ToPartialLimitConfig()
178
179 // Simple checks to overide autoscaling ensuring limits make sense versus the connmgr values.
180 // There are ways to break this, but this should catch most problems already.
@@ -190,9 +191,9 @@ Run 'ipfs swarm limit all' to see the resulting limits.
191 }
192
193 // Scale System.StreamsInbound as well, but use the existing ratio of StreamsInbound to ConnsInbound
193 - defaultLimitConfig.System.StreamsInbound = int(maxInboundConns * int64(defaultLimitConfig.System.StreamsInbound) / int64(defaultLimitConfig.System.ConnsInbound))
194 - defaultLimitConfig.System.ConnsInbound = int(maxInboundConns)
194 + defaultLimitConfig.System.StreamsInbound = rcmgr.LimitVal(maxInboundConns * int64(defaultLimitConfig.System.StreamsInbound) / int64(defaultLimitConfig.System.ConnsInbound))
195 + defaultLimitConfig.System.ConnsInbound = rcmgr.LimitVal(maxInboundConns)
196 }
197
197 - return defaultLimitConfig, nil
198 + return defaultLimitConfig.Build(orig), nil
199 }
core/node/libp2p/rcmgr_logging_test.go
+3 -2
@@ -16,11 +16,12 @@ import (
16
17 func TestLoggingResourceManager(t *testing.T) {
18 clock := clock.NewMock()
19 - limits := rcmgr.DefaultLimits.AutoScale()
19 + orig := rcmgr.DefaultLimits.AutoScale()
20 + limits := orig.ToPartialLimitConfig()
21 limits.System.Conns = 1
22 limits.System.ConnsInbound = 1
23 limits.System.ConnsOutbound = 1
23 - limiter := rcmgr.NewFixedLimiter(limits)
24 + limiter := rcmgr.NewFixedLimiter(limits.Build(orig))
25 rm, err := rcmgr.NewResourceManager(limiter)
26 if err != nil {
27 t.Fatal(err)
docs/examples/kubo-as-a-library/go.mod
+16 -17
@@ -7,10 +7,10 @@ go 1.18
7 replace github.com/ipfs/kubo => ./../../..
8
9 require (
10 - github.com/ipfs/go-libipfs v0.4.1-0.20230208022905-378aaf777cf9
10 + github.com/ipfs/go-libipfs v0.5.0
11 github.com/ipfs/interface-go-ipfs-core v0.11.0
12 github.com/ipfs/kubo v0.0.0-00010101000000-000000000000
13 - github.com/libp2p/go-libp2p v0.24.2
13 + github.com/libp2p/go-libp2p v0.25.2-0.20230214091718-aef956be688d
14 github.com/multiformats/go-multiaddr v0.8.0
15 )
16
@@ -54,12 +54,12 @@ require (
54 github.com/google/pprof v0.0.0-20221203041831-ce31453925ec // indirect
55 github.com/google/uuid v1.3.0 // indirect
56 github.com/gorilla/mux v1.8.0 // indirect
57 - github.com/gorilla/websocket v1.5.0 // indirect
57 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
58 github.com/hannahhoward/go-pubsub v0.0.0-20200423002714-8d62886cc36e // indirect
59 github.com/hashicorp/errwrap v1.1.0 // indirect
60 github.com/hashicorp/go-multierror v1.1.1 // indirect
61 github.com/hashicorp/golang-lru v0.5.4 // indirect
62 + github.com/hashicorp/golang-lru/v2 v2.0.1 // indirect
63 github.com/huin/goupnp v1.0.3 // indirect
64 github.com/ipfs/bbloom v0.0.4 // indirect
65 github.com/ipfs/go-bitfield v1.0.0 // indirect
@@ -120,29 +120,22 @@ require (
120 github.com/libp2p/go-doh-resolver v0.4.0 // indirect
121 github.com/libp2p/go-flow-metrics v0.1.0 // indirect
122 github.com/libp2p/go-libp2p-asn-util v0.2.0 // indirect
123 - github.com/libp2p/go-libp2p-kad-dht v0.20.0 // indirect
123 + github.com/libp2p/go-libp2p-kad-dht v0.21.0 // indirect
124 github.com/libp2p/go-libp2p-kbucket v0.5.0 // indirect
125 - github.com/libp2p/go-libp2p-pubsub v0.8.3 // indirect
125 + github.com/libp2p/go-libp2p-pubsub v0.9.0 // indirect
126 github.com/libp2p/go-libp2p-pubsub-router v0.6.0 // indirect
127 github.com/libp2p/go-libp2p-record v0.2.0 // indirect
128 github.com/libp2p/go-libp2p-routing-helpers v0.6.1 // indirect
129 github.com/libp2p/go-libp2p-xor v0.1.0 // indirect
130 github.com/libp2p/go-mplex v0.7.0 // indirect
131 - github.com/libp2p/go-msgio v0.2.0 // indirect
131 + github.com/libp2p/go-msgio v0.3.0 // indirect
132 github.com/libp2p/go-nat v0.1.0 // indirect
133 github.com/libp2p/go-netroute v0.2.1 // indirect
134 - github.com/libp2p/go-openssl v0.1.0 // indirect
134 github.com/libp2p/go-reuseport v0.2.0 // indirect
135 github.com/libp2p/go-yamux/v4 v4.0.0 // indirect
136 github.com/libp2p/zeroconf/v2 v2.2.0 // indirect
138 - github.com/lucas-clemente/quic-go v0.31.1 // indirect
139 - github.com/marten-seemann/qpack v0.3.0 // indirect
140 - github.com/marten-seemann/qtls-go1-18 v0.1.3 // indirect
141 - github.com/marten-seemann/qtls-go1-19 v0.1.1 // indirect
137 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
143 - github.com/marten-seemann/webtransport-go v0.4.3 // indirect
138 github.com/mattn/go-isatty v0.0.17 // indirect
145 - github.com/mattn/go-pointer v0.0.1 // indirect
139 github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
140 github.com/miekg/dns v1.1.50 // indirect
141 github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
@@ -157,7 +150,7 @@ require (
150 github.com/multiformats/go-multibase v0.1.1 // indirect
151 github.com/multiformats/go-multicodec v0.7.0 // indirect
152 github.com/multiformats/go-multihash v0.2.1 // indirect
160 - github.com/multiformats/go-multistream v0.3.3 // indirect
153 + github.com/multiformats/go-multistream v0.4.1 // indirect
154 github.com/multiformats/go-varint v0.0.7 // indirect
155 github.com/onsi/ginkgo/v2 v2.5.1 // indirect
156 github.com/opencontainers/runtime-spec v1.0.2 // indirect
@@ -170,9 +163,14 @@ require (
163 github.com/prometheus/client_model v0.3.0 // indirect
164 github.com/prometheus/common v0.37.0 // indirect
165 github.com/prometheus/procfs v0.8.0 // indirect
166 + github.com/quic-go/qpack v0.4.0 // indirect
167 + github.com/quic-go/qtls-go1-18 v0.2.0 // indirect
168 + github.com/quic-go/qtls-go1-19 v0.2.0 // indirect
169 + github.com/quic-go/qtls-go1-20 v0.1.0 // indirect
170 + github.com/quic-go/quic-go v0.32.0 // indirect
171 + github.com/quic-go/webtransport-go v0.5.1 // indirect
172 github.com/raulk/go-watchdog v1.3.0 // indirect
173 github.com/samber/lo v1.36.0 // indirect
175 - github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 // indirect
174 github.com/spaolacci/murmur3 v1.1.0 // indirect
175 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
176 github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect
@@ -198,10 +196,10 @@ require (
196 go.uber.org/multierr v1.9.0 // indirect
197 go.uber.org/zap v1.24.0 // indirect
198 go4.org v0.0.0-20200411211856-f5505b9728dd // indirect
201 - golang.org/x/crypto v0.3.0 // indirect
199 + golang.org/x/crypto v0.4.0 // indirect
200 golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
201 golang.org/x/mod v0.7.0 // indirect
204 - golang.org/x/net v0.3.0 // indirect
202 + golang.org/x/net v0.4.0 // indirect
203 golang.org/x/sync v0.1.0 // indirect
204 golang.org/x/sys v0.4.0 // indirect
205 golang.org/x/text v0.5.0 // indirect
@@ -212,4 +210,5 @@ require (
210 google.golang.org/protobuf v1.28.1 // indirect
211 gopkg.in/square/go-jose.v2 v2.5.1 // indirect
212 lukechampine.com/blake3 v1.1.7 // indirect
213 + nhooyr.io/websocket v1.8.7 // indirect
214 )
docs/examples/kubo-as-a-library/go.sum
+61 -32
@@ -227,6 +227,10 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
227 github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
228 github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
229 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
230 +github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
231 +github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
232 +github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
233 +github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
234 github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
235 github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
236 github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
@@ -247,10 +251,23 @@ github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
251 github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
252 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
253 github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
254 +github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
255 +github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
256 +github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
257 +github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
258 +github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
259 +github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
260 +github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
261 github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
262 github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
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/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
266 +github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
267 +github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
268 +github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
269 +github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
270 +github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
271 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
272 github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
273 github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
@@ -362,7 +379,6 @@ github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoA
379 github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
380 github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
381 github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
365 -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
382 github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
383 github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
384 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
@@ -398,6 +414,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
414 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
415 github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
416 github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
417 +github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4=
418 +github.com/hashicorp/golang-lru/v2 v2.0.1/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
419 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
420 github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
421 github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
@@ -548,8 +566,8 @@ github.com/ipfs/go-ipld-legacy v0.1.1 h1:BvD8PEuqwBHLTKqlGFTHSwrwFOMkVESEvwIYwR2
566 github.com/ipfs/go-ipld-legacy v0.1.1/go.mod h1:8AyKFCjgRPsQFf15ZQgDB8Din4DML/fOmKZkkFkrIEg=
567 github.com/ipfs/go-ipns v0.3.0 h1:ai791nTgVo+zTuq2bLvEGmWP1M0A6kGTXUsgv/Yq67A=
568 github.com/ipfs/go-ipns v0.3.0/go.mod h1:3cLT2rbvgPZGkHJoPO1YMJeh6LtkxopCkKFcio/wE24=
551 -github.com/ipfs/go-libipfs v0.4.1-0.20230208022905-378aaf777cf9 h1:m3h1qk9cuH2aqiILynVqF69UmmdOiNTSq6CnHK9GVuQ=
552 -github.com/ipfs/go-libipfs v0.4.1-0.20230208022905-378aaf777cf9/go.mod h1:XKRXmSlJ32qlpxGN+mdGJJXUl/Z055etN1xpMEaANQ8=
569 +github.com/ipfs/go-libipfs v0.5.0 h1:gtvzeoTdUHPUN4B5izzyBS3Cxtpvi+l7hd2mmjN+teM=
570 +github.com/ipfs/go-libipfs v0.5.0/go.mod h1:iZ9QyhzNr3AkxRXrbQYb//rv7iLyvZJX0GNuc3lJDiQ=
571 github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=
572 github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk=
573 github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A=
@@ -638,8 +656,10 @@ github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlT
656 github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
657 github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
658 github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
659 +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
660 github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
661 github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
662 +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
663 github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
664 github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
665 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
@@ -654,6 +674,7 @@ github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQL
674 github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
675 github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
676 github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4=
677 +github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
678 github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
679 github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
680 github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
@@ -678,6 +699,8 @@ github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
699 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
700 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
701 github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
702 +github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
703 +github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
704 github.com/libp2p/go-addr-util v0.0.1/go.mod h1:4ac6O7n9rIAKB1dnd+s8IbbMXkt+oBpzX4/+RACcnlQ=
705 github.com/libp2p/go-addr-util v0.0.2/go.mod h1:Ecd6Fb3yIuLzq4bD7VcywcVSBtefcAwnUISBM3WG15E=
706 github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ=
@@ -704,8 +727,8 @@ github.com/libp2p/go-libp2p v0.7.0/go.mod h1:hZJf8txWeCduQRDC/WSqBGMxaTHCOYHt2xS
727 github.com/libp2p/go-libp2p v0.7.4/go.mod h1:oXsBlTLF1q7pxr+9w6lqzS1ILpyHsaBPniVO7zIHGMw=
728 github.com/libp2p/go-libp2p v0.8.1/go.mod h1:QRNH9pwdbEBpx5DTJYg+qxcVaDMAz3Ee/qDKwXujH5o=
729 github.com/libp2p/go-libp2p v0.14.3/go.mod h1:d12V4PdKbpL0T1/gsUNN8DfgMuRPDX8bS2QxCZlwRH0=
707 -github.com/libp2p/go-libp2p v0.24.2 h1:iMViPIcLY0D6zr/f+1Yq9EavCZu2i7eDstsr1nEwSAk=
708 -github.com/libp2p/go-libp2p v0.24.2/go.mod h1:WuxtL2V8yGjam03D93ZBC19tvOUiPpewYv1xdFGWu1k=
730 +github.com/libp2p/go-libp2p v0.25.2-0.20230214091718-aef956be688d h1:OeFN5DlT447jgmKB9LnzUkpykEw8FMuy7wWTL0rAK30=
731 +github.com/libp2p/go-libp2p v0.25.2-0.20230214091718-aef956be688d/go.mod h1:xnK9/1d9+jeQCVvi/f1g12KqtVi/jP/SijtKV1hML3g=
732 github.com/libp2p/go-libp2p-asn-util v0.2.0 h1:rg3+Os8jbnO5DxkC7K/Utdi+DkY3q/d1/1q+8WeNAsw=
733 github.com/libp2p/go-libp2p-asn-util v0.2.0/go.mod h1:WoaWxbHKBymSN41hWSq/lGKJEca7TNm58+gGJi2WsLI=
734 github.com/libp2p/go-libp2p-autonat v0.1.0/go.mod h1:1tLf2yXxiE/oKGtDwPYWTSYG3PtvYlJmg7NeVtPRqH8=
@@ -748,8 +771,8 @@ github.com/libp2p/go-libp2p-discovery v0.1.0/go.mod h1:4F/x+aldVHjHDHuX85x1zWoFT
771 github.com/libp2p/go-libp2p-discovery v0.2.0/go.mod h1:s4VGaxYMbw4+4+tsoQTqh7wfxg97AEdo4GYBt6BadWg=
772 github.com/libp2p/go-libp2p-discovery v0.3.0/go.mod h1:o03drFnz9BVAZdzC/QUQ+NeQOu38Fu7LJGEOK2gQltw=
773 github.com/libp2p/go-libp2p-discovery v0.5.0/go.mod h1:+srtPIU9gDaBNu//UHvcdliKBIcr4SfDcm0/PfPJLug=
751 -github.com/libp2p/go-libp2p-kad-dht v0.20.0 h1:1bcMa74JFwExCHZMFEmjtHzxX5DovhJ07EtR6UOTEpc=
752 -github.com/libp2p/go-libp2p-kad-dht v0.20.0/go.mod h1:qPIXdiZsLczhV4/+4EO1jE8ae0YCW4ZOogc4WVIyTEU=
774 +github.com/libp2p/go-libp2p-kad-dht v0.21.0 h1:J0Yd22VA+sk0CJRGMgtfHvLVIkZDyJ3AJGiljywIw5U=
775 +github.com/libp2p/go-libp2p-kad-dht v0.21.0/go.mod h1:Bhm9diAFmc6qcWAr084bHNL159srVZRKADdp96Qqd1I=
776 github.com/libp2p/go-libp2p-kbucket v0.3.1/go.mod h1:oyjT5O7tS9CQurok++ERgc46YLwEpuGoFq9ubvoUOio=
777 github.com/libp2p/go-libp2p-kbucket v0.5.0 h1:g/7tVm8ACHDxH29BGrpsQlnNeu+6OF1A9bno/4/U1oA=
778 github.com/libp2p/go-libp2p-kbucket v0.5.0/go.mod h1:zGzGCpQd78b5BNTDGHNDLaTt9aDK/A02xeZp9QeFC4U=
@@ -775,8 +798,8 @@ github.com/libp2p/go-libp2p-peerstore v0.2.2/go.mod h1:NQxhNjWxf1d4w6PihR8btWIRj
798 github.com/libp2p/go-libp2p-peerstore v0.2.6/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s=
799 github.com/libp2p/go-libp2p-peerstore v0.2.7/go.mod h1:ss/TWTgHZTMpsU/oKVVPQCGuDHItOpf2W8RxAi50P2s=
800 github.com/libp2p/go-libp2p-pnet v0.2.0/go.mod h1:Qqvq6JH/oMZGwqs3N1Fqhv8NVhrdYcO0BW4wssv21LA=
778 -github.com/libp2p/go-libp2p-pubsub v0.8.3 h1:T4+pcfcFm1K2v5oFyk68peSjVroaoM8zFygf6Y5WOww=
779 -github.com/libp2p/go-libp2p-pubsub v0.8.3/go.mod h1:eje970FXxjhtFbVEoiae+VUw24ZoSlk67BsiZPLRzlw=
801 +github.com/libp2p/go-libp2p-pubsub v0.9.0 h1:mcLb4WzwhUG4OKb0rp1/bYMd/DYhvMyzJheQH3LMd1s=
802 +github.com/libp2p/go-libp2p-pubsub v0.9.0/go.mod h1:OEsj0Cc/BpkqikXRTrVspWU/Hx7bMZwHP+6vNMd+c7I=
803 github.com/libp2p/go-libp2p-pubsub-router v0.6.0 h1:D30iKdlqDt5ZmLEYhHELCMRj8b4sFAqrUcshIUvVP/s=
804 github.com/libp2p/go-libp2p-pubsub-router v0.6.0/go.mod h1:FY/q0/RBTKsLA7l4vqC2cbRbOvyDotg8PJQ7j8FDudE=
805 github.com/libp2p/go-libp2p-quic-transport v0.10.0/go.mod h1:RfJbZ8IqXIhxBRm5hqUEJqjiiY8xmEuq3HUDS993MkA=
@@ -835,8 +858,8 @@ github.com/libp2p/go-msgio v0.0.2/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+
858 github.com/libp2p/go-msgio v0.0.3/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=
859 github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ=
860 github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA=
838 -github.com/libp2p/go-msgio v0.2.0 h1:W6shmB+FeynDrUVl2dgFQvzfBZcXiyqY4VmpQLu9FqU=
839 -github.com/libp2p/go-msgio v0.2.0/go.mod h1:dBVM1gW3Jk9XqHkU4eKdGvVHdLa51hoGfll6jMJMSlY=
861 +github.com/libp2p/go-msgio v0.3.0 h1:mf3Z8B1xcFN314sWX+2vOTShIE0Mmn2TXn3YCUQGNj0=
862 +github.com/libp2p/go-msgio v0.3.0/go.mod h1:nyRM819GmVaF9LX3l03RMh10QdOroF++NBbxAb0mmDM=
863 github.com/libp2p/go-nat v0.0.3/go.mod h1:88nUEt0k0JD45Bk93NIwDqjlhiOwOoV36GchpcVc1yI=
864 github.com/libp2p/go-nat v0.0.4/go.mod h1:Nmw50VAvKuk38jUBcmNh6p9lUJLoODbJRvYAa/+KSDo=
865 github.com/libp2p/go-nat v0.0.5/go.mod h1:B7NxsVNPZmRLvMOwiEO1scOSyjA56zxYAGv1yQgRkEU=
@@ -853,8 +876,6 @@ github.com/libp2p/go-openssl v0.0.3/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO
876 github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=
877 github.com/libp2p/go-openssl v0.0.5/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=
878 github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc=
856 -github.com/libp2p/go-openssl v0.1.0 h1:LBkKEcUv6vtZIQLVTegAil8jbNpJErQ9AnT+bWV+Ooo=
857 -github.com/libp2p/go-openssl v0.1.0/go.mod h1:OiOxwPpL3n4xlenjx2h7AwSGaFSC/KZvf6gNdOBQMtc=
879 github.com/libp2p/go-reuseport v0.0.1/go.mod h1:jn6RmB1ufnQwl0Q1f+YxAj8isJgDCQzaaxIFYDhcYEA=
880 github.com/libp2p/go-reuseport v0.0.2/go.mod h1:SPD+5RwGC7rcnzngoYC86GjPzjSywuQyMVAheVBD9nQ=
881 github.com/libp2p/go-reuseport v0.2.0 h1:18PRvIMlpY6ZK85nIAicSBuXXvrYoSw3dsBAR7zc560=
@@ -893,26 +914,16 @@ github.com/libp2p/zeroconf/v2 v2.2.0/go.mod h1:fuJqLnUwZTshS3U/bMRJ3+ow/v9oid1n0
914 github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
915 github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
916 github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8=
896 -github.com/lucas-clemente/quic-go v0.31.1 h1:O8Od7hfioqq0PMYHDyBkxU2aA7iZ2W9pjbrWuja2YR4=
897 -github.com/lucas-clemente/quic-go v0.31.1/go.mod h1:0wFbizLgYzqHqtlyxyCaJKlE7bYgE6JQ+54TLd/Dq2g=
917 github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
918 github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
919 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
920 github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
921 github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
922 github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc=
904 -github.com/marten-seemann/qpack v0.3.0 h1:UiWstOgT8+znlkDPOg2+3rIuYXJ2CnGDkGUXN6ki6hE=
905 -github.com/marten-seemann/qpack v0.3.0/go.mod h1:cGfKPBiP4a9EQdxCwEwI/GEeWAsjSekBvx/X8mh58+g=
923 github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs=
924 github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I=
908 -github.com/marten-seemann/qtls-go1-18 v0.1.3 h1:R4H2Ks8P6pAtUagjFty2p7BVHn3XiwDAl7TTQf5h7TI=
909 -github.com/marten-seemann/qtls-go1-18 v0.1.3/go.mod h1:mJttiymBAByA49mhlNZZGrH5u1uXYZJ+RW28Py7f4m4=
910 -github.com/marten-seemann/qtls-go1-19 v0.1.1 h1:mnbxeq3oEyQxQXwI4ReCgW9DPoPR94sNlqWoDZnjRIE=
911 -github.com/marten-seemann/qtls-go1-19 v0.1.1/go.mod h1:5HTDWtVudo/WFsHKRNuOhWlbdjrfs5JHrYb0wIJqGpI=
925 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk=
926 github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd/go.mod h1:QuCEs1Nt24+FYQEqAAncTDPJIuGs+LxK1MCiFL25pMU=
914 -github.com/marten-seemann/webtransport-go v0.4.3 h1:vkt5o/Ci+luknRteWdYGYH1KcB7ziup+J+1PzZJIvmg=
915 -github.com/marten-seemann/webtransport-go v0.4.3/go.mod h1:4xcfySgZMLP4aG5GBGj1egP7NlpfwgYJ1WJMvPPiVMU=
927 github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
928 github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
929 github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
@@ -920,12 +931,11 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
931 github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
932 github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
933 github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
934 +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
935 github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
936 github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
937 github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
938 github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
927 -github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o0=
928 -github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
939 github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
940 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
941 github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
@@ -963,9 +973,11 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
973 github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
974 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
975 github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
976 +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
977 github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
978 github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
979 github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
980 +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
981 github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
982 github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
983 github.com/mr-tron/base58 v1.1.1/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8=
@@ -1030,8 +1042,8 @@ github.com/multiformats/go-multistream v0.1.0/go.mod h1:fJTiDfXJVmItycydCnNx4+wS
1042 github.com/multiformats/go-multistream v0.1.1/go.mod h1:KmHZ40hzVxiaiwlj3MEbYgK9JFk2/9UktWZAF54Du38=
1043 github.com/multiformats/go-multistream v0.2.1/go.mod h1:5GZPQZbkWOLOn3J2y4Y99vVW7vOfsAflxARk3x14o6k=
1044 github.com/multiformats/go-multistream v0.2.2/go.mod h1:UIcnm7Zuo8HKG+HkWgfQsGL+/MIEhyTqbODbIUwSXKs=
1033 -github.com/multiformats/go-multistream v0.3.3 h1:d5PZpjwRgVlbwfdTDjife7XszfZd8KYWfROYFlGcR8o=
1034 -github.com/multiformats/go-multistream v0.3.3/go.mod h1:ODRoqamLUsETKS9BNcII4gcRsJBU5VAwRIv7O39cEXg=
1045 +github.com/multiformats/go-multistream v0.4.1 h1:rFy0Iiyn3YT0asivDUIR05leAdwZq3de4741sbiSdfo=
1046 +github.com/multiformats/go-multistream v0.4.1/go.mod h1:Mz5eykRVAjJWckE2U78c6xqdtyNUEhKSM0Lwar2p77Q=
1047 github.com/multiformats/go-varint v0.0.1/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
1048 github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
1049 github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE=
@@ -1153,6 +1165,18 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
1165 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
1166 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
1167 github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
1168 +github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
1169 +github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
1170 +github.com/quic-go/qtls-go1-18 v0.2.0 h1:5ViXqBZ90wpUcZS0ge79rf029yx0dYB0McyPJwqqj7U=
1171 +github.com/quic-go/qtls-go1-18 v0.2.0/go.mod h1:moGulGHK7o6O8lSPSZNoOwcLvJKJ85vVNc7oJFD65bc=
1172 +github.com/quic-go/qtls-go1-19 v0.2.0 h1:Cvn2WdhyViFUHoOqK52i51k4nDX8EwIh5VJiVM4nttk=
1173 +github.com/quic-go/qtls-go1-19 v0.2.0/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI=
1174 +github.com/quic-go/qtls-go1-20 v0.1.0 h1:d1PK3ErFy9t7zxKsG3NXBJXZjp/kMLoIb3y/kV54oAI=
1175 +github.com/quic-go/qtls-go1-20 v0.1.0/go.mod h1:JKtK6mjbAVcUTN/9jZpvLbGxvdWIKS8uT7EiStoU1SM=
1176 +github.com/quic-go/quic-go v0.32.0 h1:lY02md31s1JgPiiyfqJijpu/UX/Iun304FI3yUqX7tA=
1177 +github.com/quic-go/quic-go v0.32.0/go.mod h1:/fCsKANhQIeD5l76c2JFU+07gVE3KaA0FP+0zMWwfwo=
1178 +github.com/quic-go/webtransport-go v0.5.1 h1:1eVb7WDWCRoaeTtFHpFBJ6WDN1bSrPrRoW6tZgSw0Ow=
1179 +github.com/quic-go/webtransport-go v0.5.1/go.mod h1:OhmmgJIzTTqXK5xvtuX0oBpLV2GkLWNDA+UeTGJXErU=
1180 github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM=
1181 github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk=
1182 github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU=
@@ -1213,7 +1237,6 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ
1237 github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
1238 github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
1239 github.com/spacemonkeygo/openssl v0.0.0-20181017203307-c2dcc5cca94a/go.mod h1:7AyxJNCJ7SBZ1MfVQCWD6Uqo2oubI2Eq2y2eqf+A5r0=
1216 -github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
1240 github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=
1241 github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
1242 github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
@@ -1253,7 +1276,11 @@ github.com/thoas/go-funk v0.9.1 h1:O549iLZqPpTUQ10ykd26sZhzD+rmR5pWhuElrhbC20M=
1276 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
1277 github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ=
1278 github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM=
1279 +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
1280 +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
1281 github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
1282 +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
1283 +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
1284 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
1285 github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
1286 github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
@@ -1397,8 +1424,8 @@ golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWP
1424 golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
1425 golang.org/x/crypto v0.0.0-20210506145944-38f3c27a63bf/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
1426 golang.org/x/crypto v0.0.0-20210920023735-84f357641f63/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
1400 -golang.org/x/crypto v0.3.0 h1:a06MkbcxBrEFc0w0QIZWXrH/9cCX6KJyWbBOIwAn+7A=
1401 -golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4=
1427 +golang.org/x/crypto v0.4.0 h1:UVQgzMY87xqpKNgb+kDsll2Igd33HszWHFLmpaRMq/8=
1428 +golang.org/x/crypto v0.4.0/go.mod h1:3quD/ATkf6oY+rnes5c3ExXTbLc8mueNue5/DoinL80=
1429 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
1430 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
1431 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -1493,8 +1520,8 @@ golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qx
1520 golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
1521 golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
1522 golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
1496 -golang.org/x/net v0.3.0 h1:VWL6FNY2bEEmsGVKabSlHu5Irp34xmMRoqb/9lF9lxk=
1497 -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
1523 +golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
1524 +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
1525 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
1526 golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
1527 golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
@@ -1841,6 +1868,8 @@ honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
1868 lukechampine.com/blake3 v1.1.6/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=
1869 lukechampine.com/blake3 v1.1.7 h1:GgRMhmdsuK8+ii6UZFDL8Nb+VyMwadAgcJyfYHxG6n0=
1870 lukechampine.com/blake3 v1.1.7/go.mod h1:tkKEOtDkNtklkXtLNEOGNq5tcV90tJiA1vAA12R78LA=
1871 +nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
1872 +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
1873 pgregory.net/rapid v0.4.7 h1:MTNRktPuv5FNqOO151TM9mDTa+XHcX6ypYeISDVD14g=
1874 pgregory.net/rapid v0.4.7/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
1875 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
go.mod
+2 -2
@@ -45,7 +45,7 @@ require (
45 github.com/ipfs/go-ipld-git v0.1.1
46 github.com/ipfs/go-ipld-legacy v0.1.1
47 github.com/ipfs/go-ipns v0.3.0
48 - github.com/ipfs/go-libipfs v0.4.1-0.20230201214832-687c0b0f1531
48 + github.com/ipfs/go-libipfs v0.5.0
49 github.com/ipfs/go-log v1.0.5
50 github.com/ipfs/go-log/v2 v2.5.1
51 github.com/ipfs/go-merkledag v0.9.0
@@ -106,6 +106,7 @@ require (
106 go.uber.org/fx v1.18.2
107 go.uber.org/zap v1.24.0
108 golang.org/x/crypto v0.4.0
109 + golang.org/x/exp v0.0.0-20221205204356-47842c84f3db
110 golang.org/x/mod v0.7.0
111 golang.org/x/sync v0.1.0
112 golang.org/x/sys v0.4.0
@@ -228,7 +229,6 @@ require (
229 go.uber.org/atomic v1.10.0 // indirect
230 go.uber.org/multierr v1.9.0 // indirect
231 go4.org v0.0.0-20200411211856-f5505b9728dd // indirect
231 - golang.org/x/exp v0.0.0-20221205204356-47842c84f3db // indirect
232 golang.org/x/net v0.4.0 // indirect
233 golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
234 golang.org/x/term v0.4.0 // indirect
go.sum
+2 -2
@@ -588,8 +588,8 @@ github.com/ipfs/go-ipld-legacy v0.1.1 h1:BvD8PEuqwBHLTKqlGFTHSwrwFOMkVESEvwIYwR2
588 github.com/ipfs/go-ipld-legacy v0.1.1/go.mod h1:8AyKFCjgRPsQFf15ZQgDB8Din4DML/fOmKZkkFkrIEg=
589 github.com/ipfs/go-ipns v0.3.0 h1:ai791nTgVo+zTuq2bLvEGmWP1M0A6kGTXUsgv/Yq67A=
590 github.com/ipfs/go-ipns v0.3.0/go.mod h1:3cLT2rbvgPZGkHJoPO1YMJeh6LtkxopCkKFcio/wE24=
591 -github.com/ipfs/go-libipfs v0.4.1-0.20230201214832-687c0b0f1531 h1:uDnDGKAuoOiNROG4yoWT39Xsjzvf3Z65fJRfG1caruo=
592 -github.com/ipfs/go-libipfs v0.4.1-0.20230201214832-687c0b0f1531/go.mod h1:97CmQJmnJUSQwTSDZEXlKCNOCDD6HDKCGwKaJzHkc+U=
591 +github.com/ipfs/go-libipfs v0.5.0 h1:gtvzeoTdUHPUN4B5izzyBS3Cxtpvi+l7hd2mmjN+teM=
592 +github.com/ipfs/go-libipfs v0.5.0/go.mod h1:iZ9QyhzNr3AkxRXrbQYb//rv7iLyvZJX0GNuc3lJDiQ=
593 github.com/ipfs/go-log v0.0.1/go.mod h1:kL1d2/hzSpI0thNYjiKfjanbVNU+IIGA/WnNESY9leM=
594 github.com/ipfs/go-log v1.0.2/go.mod h1:1MNjMxe0u6xvJZgeqbJ8vdo2TKaGwZ1a0Bpza+sr2Sk=
595 github.com/ipfs/go-log v1.0.3/go.mod h1:OsLySYkwIbiSUR/yBTdv1qPtcE4FW3WPWk/ewz9Ru+A=
test/sharness/t0116-prometheus-data/prometheus_metrics
+19 -174
@@ -576,6 +576,25 @@ leveldb_datastore_sync_latency_seconds_bucket
576 leveldb_datastore_sync_latency_seconds_count
577 leveldb_datastore_sync_latency_seconds_sum
578 leveldb_datastore_sync_total
579 +libp2p_eventbus_events_emitted_total
580 +libp2p_eventbus_events_emitted_total
581 +libp2p_eventbus_subscriber_event_queued
582 +libp2p_eventbus_subscriber_event_queued
583 +libp2p_eventbus_subscriber_event_queued
584 +libp2p_eventbus_subscriber_queue_full
585 +libp2p_eventbus_subscriber_queue_full
586 +libp2p_eventbus_subscriber_queue_full
587 +libp2p_eventbus_subscriber_queue_length
588 +libp2p_eventbus_subscriber_queue_length
589 +libp2p_eventbus_subscriber_queue_length
590 +libp2p_eventbus_subscribers_total
591 +libp2p_eventbus_subscribers_total
592 +libp2p_eventbus_subscribers_total
593 +libp2p_eventbus_subscribers_total
594 +libp2p_eventbus_subscribers_total
595 +libp2p_eventbus_subscribers_total
596 +libp2p_identify_identify_pushes_triggered_total
597 +libp2p_identify_identify_pushes_triggered_total
598 process_cpu_seconds_total
599 process_max_fds
600 process_open_fds
@@ -583,177 +602,3 @@ process_resident_memory_bytes
602 process_start_time_seconds
603 process_virtual_memory_bytes
604 process_virtual_memory_max_bytes
586 -quic_connection_duration_bucket
587 -quic_connection_duration_bucket
588 -quic_connection_duration_bucket
589 -quic_connection_duration_bucket
590 -quic_connection_duration_bucket
591 -quic_connection_duration_bucket
592 -quic_connection_duration_bucket
593 -quic_connection_duration_bucket
594 -quic_connection_duration_bucket
595 -quic_connection_duration_bucket
596 -quic_connection_duration_bucket
597 -quic_connection_duration_bucket
598 -quic_connection_duration_bucket
599 -quic_connection_duration_bucket
600 -quic_connection_duration_bucket
601 -quic_connection_duration_bucket
602 -quic_connection_duration_bucket
603 -quic_connection_duration_bucket
604 -quic_connection_duration_bucket
605 -quic_connection_duration_bucket
606 -quic_connection_duration_bucket
607 -quic_connection_duration_bucket
608 -quic_connection_duration_bucket
609 -quic_connection_duration_bucket
610 -quic_connection_duration_bucket
611 -quic_connection_duration_bucket
612 -quic_connection_duration_bucket
613 -quic_connection_duration_bucket
614 -quic_connection_duration_bucket
615 -quic_connection_duration_bucket
616 -quic_connection_duration_bucket
617 -quic_connection_duration_bucket
618 -quic_connection_duration_bucket
619 -quic_connection_duration_bucket
620 -quic_connection_duration_bucket
621 -quic_connection_duration_bucket
622 -quic_connection_duration_bucket
623 -quic_connection_duration_bucket
624 -quic_connection_duration_bucket
625 -quic_connection_duration_bucket
626 -quic_connection_duration_bucket
627 -quic_connection_duration_count
628 -quic_connection_duration_sum
629 -quic_smoothed_rtt_bucket
630 -quic_smoothed_rtt_bucket
631 -quic_smoothed_rtt_bucket
632 -quic_smoothed_rtt_bucket
633 -quic_smoothed_rtt_bucket
634 -quic_smoothed_rtt_bucket
635 -quic_smoothed_rtt_bucket
636 -quic_smoothed_rtt_bucket
637 -quic_smoothed_rtt_bucket
638 -quic_smoothed_rtt_bucket
639 -quic_smoothed_rtt_bucket
640 -quic_smoothed_rtt_bucket
641 -quic_smoothed_rtt_bucket
642 -quic_smoothed_rtt_bucket
643 -quic_smoothed_rtt_bucket
644 -quic_smoothed_rtt_bucket
645 -quic_smoothed_rtt_bucket
646 -quic_smoothed_rtt_bucket
647 -quic_smoothed_rtt_bucket
648 -quic_smoothed_rtt_bucket
649 -quic_smoothed_rtt_bucket
650 -quic_smoothed_rtt_bucket
651 -quic_smoothed_rtt_bucket
652 -quic_smoothed_rtt_bucket
653 -quic_smoothed_rtt_bucket
654 -quic_smoothed_rtt_bucket
655 -quic_smoothed_rtt_bucket
656 -quic_smoothed_rtt_bucket
657 -quic_smoothed_rtt_bucket
658 -quic_smoothed_rtt_bucket
659 -quic_smoothed_rtt_bucket
660 -quic_smoothed_rtt_bucket
661 -quic_smoothed_rtt_bucket
662 -quic_smoothed_rtt_bucket
663 -quic_smoothed_rtt_bucket
664 -quic_smoothed_rtt_bucket
665 -quic_smoothed_rtt_bucket
666 -quic_smoothed_rtt_bucket
667 -quic_smoothed_rtt_bucket
668 -quic_smoothed_rtt_bucket
669 -quic_smoothed_rtt_bucket
670 -quic_smoothed_rtt_count
671 -quic_smoothed_rtt_sum
672 -tcp_connection_duration_bucket
673 -tcp_connection_duration_bucket
674 -tcp_connection_duration_bucket
675 -tcp_connection_duration_bucket
676 -tcp_connection_duration_bucket
677 -tcp_connection_duration_bucket
678 -tcp_connection_duration_bucket
679 -tcp_connection_duration_bucket
680 -tcp_connection_duration_bucket
681 -tcp_connection_duration_bucket
682 -tcp_connection_duration_bucket
683 -tcp_connection_duration_bucket
684 -tcp_connection_duration_bucket
685 -tcp_connection_duration_bucket
686 -tcp_connection_duration_bucket
687 -tcp_connection_duration_bucket
688 -tcp_connection_duration_bucket
689 -tcp_connection_duration_bucket
690 -tcp_connection_duration_bucket
691 -tcp_connection_duration_bucket
692 -tcp_connection_duration_bucket
693 -tcp_connection_duration_bucket
694 -tcp_connection_duration_bucket
695 -tcp_connection_duration_bucket
696 -tcp_connection_duration_bucket
697 -tcp_connection_duration_bucket
698 -tcp_connection_duration_bucket
699 -tcp_connection_duration_bucket
700 -tcp_connection_duration_bucket
701 -tcp_connection_duration_bucket
702 -tcp_connection_duration_bucket
703 -tcp_connection_duration_bucket
704 -tcp_connection_duration_bucket
705 -tcp_connection_duration_bucket
706 -tcp_connection_duration_bucket
707 -tcp_connection_duration_bucket
708 -tcp_connection_duration_bucket
709 -tcp_connection_duration_bucket
710 -tcp_connection_duration_bucket
711 -tcp_connection_duration_bucket
712 -tcp_connection_duration_bucket
713 -tcp_connection_duration_count
714 -tcp_connection_duration_sum
715 -tcp_rcvd_segments_total
716 -tcp_rtt_bucket
717 -tcp_rtt_bucket
718 -tcp_rtt_bucket
719 -tcp_rtt_bucket
720 -tcp_rtt_bucket
721 -tcp_rtt_bucket
722 -tcp_rtt_bucket
723 -tcp_rtt_bucket
724 -tcp_rtt_bucket
725 -tcp_rtt_bucket
726 -tcp_rtt_bucket
727 -tcp_rtt_bucket
728 -tcp_rtt_bucket
729 -tcp_rtt_bucket
730 -tcp_rtt_bucket
731 -tcp_rtt_bucket
732 -tcp_rtt_bucket
733 -tcp_rtt_bucket
734 -tcp_rtt_bucket
735 -tcp_rtt_bucket
736 -tcp_rtt_bucket
737 -tcp_rtt_bucket
738 -tcp_rtt_bucket
739 -tcp_rtt_bucket
740 -tcp_rtt_bucket
741 -tcp_rtt_bucket
742 -tcp_rtt_bucket
743 -tcp_rtt_bucket
744 -tcp_rtt_bucket
745 -tcp_rtt_bucket
746 -tcp_rtt_bucket
747 -tcp_rtt_bucket
748 -tcp_rtt_bucket
749 -tcp_rtt_bucket
750 -tcp_rtt_bucket
751 -tcp_rtt_bucket
752 -tcp_rtt_bucket
753 -tcp_rtt_bucket
754 -tcp_rtt_bucket
755 -tcp_rtt_bucket
756 -tcp_rtt_bucket
757 -tcp_rtt_count
758 -tcp_rtt_sum
759 -tcp_sent_segments_total
test/sharness/t0139-swarm-rcmgr.sh
+10 -10
@@ -147,36 +147,36 @@ test_expect_success 'Set system memory limit while the daemon is running' '
147 '
148
149 test_expect_success 'The new system limits were written to the config' '
150 - jq -e ".Swarm.ResourceMgr.Limits.System.Memory == 99998" < "$IPFS_PATH/config"
150 + jq -e ".Swarm.ResourceMgr.Limits.System.Memory == \"99998\"" < "$IPFS_PATH/config"
151 '
152
153 test_expect_success 'The new system limits are in the swarm limit output' '
154 - ipfs swarm limit system --enc=json | jq -e ".Memory == 99998"
154 + ipfs swarm limit system --enc=json | jq -e ".Memory == \"99998\""
155 '
156
157 # now test all the other scopes
158 test_expect_success 'Set limit on transient scope' '
159 ipfs swarm limit transient | jq ".Memory = 88888" > transient.json &&
160 ipfs swarm limit transient transient.json &&
161 - jq -e ".Swarm.ResourceMgr.Limits.Transient.Memory == 88888" < "$IPFS_PATH/config" &&
161 + jq -e ".Swarm.ResourceMgr.Limits.Transient.Memory == \"88888\"" < "$IPFS_PATH/config" &&
162 ipfs swarm limit transient --enc=json | tee limits &&
163 - jq -e ".Memory == 88888" < limits
163 + jq -e ".Memory == \"88888\"" < limits
164 '
165
166 test_expect_success 'Set limit on service scope' '
167 ipfs swarm limit svc:foo | jq ".Memory = 77777" > service-foo.json &&
168 ipfs swarm limit svc:foo service-foo.json --enc=json &&
169 - jq -e ".Swarm.ResourceMgr.Limits.Service.foo.Memory == 77777" < "$IPFS_PATH/config" &&
169 + jq -e ".Swarm.ResourceMgr.Limits.Service.foo.Memory == \"77777\"" < "$IPFS_PATH/config" &&
170 ipfs swarm limit svc:foo --enc=json | tee limits &&
171 - jq -e ".Memory == 77777" < limits
171 + jq -e ".Memory == \"77777\"" < limits
172 '
173
174 test_expect_success 'Set limit on protocol scope' '
175 ipfs swarm limit proto:foo | jq ".Memory = 66666" > proto-foo.json &&
176 ipfs swarm limit proto:foo proto-foo.json --enc=json &&
177 - jq -e ".Swarm.ResourceMgr.Limits.Protocol.foo.Memory == 66666" < "$IPFS_PATH/config" &&
177 + jq -e ".Swarm.ResourceMgr.Limits.Protocol.foo.Memory == \"66666\"" < "$IPFS_PATH/config" &&
178 ipfs swarm limit proto:foo --enc=json | tee limits &&
179 - jq -e ".Memory == 66666" < limits
179 + jq -e ".Memory == \"66666\"" < limits
180 '
181
182 # any valid peer id
@@ -185,9 +185,9 @@ PEER_ID=QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN
185 test_expect_success 'Set limit on peer scope' '
186 ipfs swarm limit peer:$PEER_ID | jq ".Memory = 66666" > peer-$PEER_ID.json &&
187 ipfs swarm limit peer:$PEER_ID peer-$PEER_ID.json --enc=json &&
188 - jq -e ".Swarm.ResourceMgr.Limits.Peer.${PEER_ID}.Memory == 66666" < "$IPFS_PATH/config" &&
188 + jq -e ".Swarm.ResourceMgr.Limits.Peer.${PEER_ID}.Memory == \"66666\"" < "$IPFS_PATH/config" &&
189 ipfs swarm limit peer:$PEER_ID --enc=json | tee limits &&
190 - jq -e ".Memory == 66666" < limits
190 + jq -e ".Memory == \"66666\"" < limits
191 '
192
193 test_expect_success 'Get limit for peer scope with an invalid peer ID' '