diff --git a/core/commands/block.go b/core/commands/block.go index 45b8f2a72..4ad191554 100644 --- a/core/commands/block.go +++ b/core/commands/block.go @@ -169,7 +169,7 @@ only for backward compatibility when a legacy CIDv0 is required (--format=v0). cidCodec, _ := req.Options[blockCidCodecOptionName].(string) format, _ := req.Options[blockFormatOptionName].(string) // deprecated - // use of legacy 'format' needs to supress 'cid-codec' + // use of legacy 'format' needs to suppress 'cid-codec' if format != "" { if cidCodec != "" && cidCodec != "raw" { return fmt.Errorf("unable to use %q (deprecated) and a custom %q at the same time", blockFormatOptionName, blockCidCodecOptionName) diff --git a/core/node/libp2p/rcmgr.go b/core/node/libp2p/rcmgr.go index f545126c4..8ec83601b 100644 --- a/core/node/libp2p/rcmgr.go +++ b/core/node/libp2p/rcmgr.go @@ -181,7 +181,7 @@ func LimitConfig(cfg config.SwarmConfig, userResourceOverrides rcmgr.PartialLimi // This effectively overrides the computed default LimitConfig with any non-"useDefault" values from the userResourceOverrides file. // Because of how how Build works, any rcmgr.Default value in userResourceOverrides - // will be overriden with a computed default value. + // will be overridden with a computed default value. limitConfig = userResourceOverrides.Build(limitConfig) return limitConfig, msg, nil diff --git a/core/node/libp2p/rcmgr_defaults.go b/core/node/libp2p/rcmgr_defaults.go index 7a0e5a282..98fdccb99 100644 --- a/core/node/libp2p/rcmgr_defaults.go +++ b/core/node/libp2p/rcmgr_defaults.go @@ -32,7 +32,7 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (limitConfig rcmgr.Concret // At least as of 2023-01-25, it's possible to open a connection that // doesn't ask for any memory usage with the libp2p Resource Manager/Accountant // (see https://github.com/libp2p/go-libp2p/issues/2010#issuecomment-1404280736). - // As a result, we can't curretly rely on Memory limits to full protect us. + // As a result, we can't currently rely on Memory limits to full protect us. // Until https://github.com/libp2p/go-libp2p/issues/2010 is addressed, // we take a proxy now of restricting to 1 inbound connection per MB. // Note: this is more generous than go-libp2p's default autoscaled limits which do @@ -114,7 +114,7 @@ func createDefaultLimitConfig(cfg config.SwarmConfig) (limitConfig rcmgr.Concret // Anything in scalingLimitConfig that wasn't defined in partialLimits above will be added (e.g., libp2p's default service limits). partialLimits = partialLimits.Build(scalingLimitConfig.Scale(int64(maxMemory), maxFD)).ToPartialLimitConfig() - // Simple checks to overide autoscaling ensuring limits make sense versus the connmgr values. + // Simple checks to override autoscaling ensuring limits make sense versus the connmgr values. // There are ways to break this, but this should catch most problems already. // We might improve this in the future. // See: https://github.com/ipfs/kubo/issues/9545 @@ -140,7 +140,7 @@ Computed default go-libp2p Resource Manager limits based on: - 'Swarm.ResourceMgr.MaxMemory': %q - 'Swarm.ResourceMgr.MaxFileDescriptors': %d -Theses can be inspected with 'ipfs swarm resources'. +These can be inspected with 'ipfs swarm resources'. `, maxMemoryString, maxFD) diff --git a/docs/config.md b/docs/config.md index 849af4f36..e70b54b3a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1450,7 +1450,7 @@ However the latency of individual read/write operations should be ~10x faster and the provide throughput up to 6 million times faster on larger datasets! This is not compatible with `Routing.Type` `custom`. If you are using composable routers -you can configure this individualy on each router. +you can configure this individually on each router. When it is enabled: - Client DHT operations (reads and writes) should complete much faster @@ -2146,7 +2146,7 @@ Type: `priority` Mplex is deprecated, this is because it is unreliable and randomly drop streams when sending data *too fast*. -New pieces of code rely on backpressure, that means the stream will dynamicaly +New pieces of code rely on backpressure, that means the stream will dynamically slow down the sending rate if data is getting backed up. Backpressure is provided by **Yamux** and **QUIC**. diff --git a/docs/libp2p-resource-management.md b/docs/libp2p-resource-management.md index b7dbf4bae..410982dab 100644 --- a/docs/libp2p-resource-management.md +++ b/docs/libp2p-resource-management.md @@ -83,7 +83,7 @@ since we assume libp2p knows best here. Source: [core/node/libp2p/rcmgr_defaults.go](https://github.com/ipfs/kubo/blob/master/core/node/libp2p/rcmgr_defaults.go) ### User Supplied Override Limits -A user who wants fine control over the limits used by the go-libp2p resoure manager can specify overrides to the [computed default limits](#computed-default-limits). +A user who wants fine control over the limits used by the go-libp2p resource manager can specify overrides to the [computed default limits](#computed-default-limits). This is done by defining limits in ``$IPFS_PATH/libp2p-resource-limit-overrides.json``. These values trump anything else and are parsed directly by go-libp2p. (See the [go-libp2p Resource Manager README](https://github.com/libp2p/go-libp2p/blob/master/p2p/host/resource-manager/README.md) for formatting.) @@ -98,7 +98,7 @@ As an example: > Protected from exceeding resource limits 2 times: "system: cannot reserve inbound connection: resource limit exceeded" This means that there were 2 recent occurrences where the libp2p resource manager prevented an inbound connection at the "system" [scope](https://github.com/libp2p/go-libp2p/tree/master/p2p/host/resource-manager#resource-scopes). -Specificaly the ``System.ConnsInbound`` limit was hit. +Specifically the ``System.ConnsInbound`` limit was hit. This can be analyzed by viewing the limit and current usage with `ipfs swarm resources`. `System.ConnsInbound` is likely close or at the limit value. @@ -136,7 +136,7 @@ If `Swarm.ConnMgr.HighWater` is greater than resource manager's `System.ConnsInb existing low priority idle connections can prevent new high priority connections from being established. The ResourceMgr doesn't know that the new connection is high priority and simply blocks it because of the limit its enforcing. -To ensure the ConnMgr and ResourceMgr are congruent, the ResourceMgr [computed default limts](#computed-default-limits) are adjusted such that: +To ensure the ConnMgr and ResourceMgr are congruent, the ResourceMgr [computed default limits](#computed-default-limits) are adjusted such that: 1. `System.ConnsInbound` >= `max(Swarm.ConnMgr.HighWater * 2, DefaultResourceMgrMinInboundConns)` AND 2. `System.StreamsInbound` is greater than any new/adjusted `Swarm.ResourceMgr.Limits.System.ConnsInbound` value so that there's enough streams per connection. diff --git a/peering/peering.go b/peering/peering.go index 291d9491c..34647d63c 100644 --- a/peering/peering.go +++ b/peering/peering.go @@ -44,7 +44,7 @@ func (s State) String() string { case StateStopped: return "stopped" default: - return "unkown peering state: " + strconv.FormatUint(uint64(s), 10) + return "unknown peering state: " + strconv.FormatUint(uint64(s), 10) } }