diff --git a/README.md b/README.md index 00e1a9c6..85899010 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # b7s daemon -b7s is a peer-to-peer networking daemon for the bless network. +b7s is a peer-to-peer networking daemon for the Bless network. It is supported on Windows, Linux, and MacOS platforms for both x64 and arm64 architectures. ## Installation diff --git a/api/b7s-swagger.yaml b/api/b7s-swagger.yaml index d77afef5..38f8f2c3 100644 --- a/api/b7s-swagger.yaml +++ b/api/b7s-swagger.yaml @@ -109,7 +109,7 @@ paths: # Schema notes: -# - all fields have a x-go-type-skip-optional-pointer - this is because otherwise all fields which arent required are generated as *string instead of a string +# - all fields have a x-go-type-skip-optional-pointer - this is because otherwise all fields which aren't required are generated as *string instead of a string # - all types have a Go name explicitly set - this is to avoid inlined structs in certain scenarios components: diff --git a/api/server.gen.go b/api/server.gen.go index 8421b909..160de35b 100644 --- a/api/server.gen.go +++ b/api/server.gen.go @@ -176,7 +176,7 @@ func decodeSpec() ([]byte, error) { var rawSpec = decodeSpecCached() -// a naive cached of a decoded swagger spec +// a naive cache of a decoded swagger spec func decodeSpecCached() func() ([]byte, error) { data, err := decodeSpec() return func() ([]byte, error) { diff --git a/cmd/bootstrap-limiter/README.md b/cmd/bootstrap-limiter/README.md index 24d9b22e..240b060b 100644 --- a/cmd/bootstrap-limiter/README.md +++ b/cmd/bootstrap-limiter/README.md @@ -3,7 +3,7 @@ ## Description This utility is aimed to provide an easy way to setup the system so that a non-privileged user can set resource limits for Bless Functions. -This tool is designed to be run a single time, before runing the Bless Worker Node. +This tool is designed to be run a single time, before running the Bless Worker Node. If the user has no intention of using cgroups to set resource limits, there is no need in running this tool. ## Workaround diff --git a/cmd/bootstrap-limiter/main.go b/cmd/bootstrap-limiter/main.go index 842e6a6c..5dc2bd45 100644 --- a/cmd/bootstrap-limiter/main.go +++ b/cmd/bootstrap-limiter/main.go @@ -55,7 +55,7 @@ func run() int { log.Default().SetFlags(0) - // We'll only target linux, though potentially cgroups may exist on some other systems. + // We'll only target Linux, though potentially cgroups may exist on some other systems. if runtime.GOOS != "linux" { log.Printf("OS not supported") return failure @@ -128,7 +128,7 @@ func run() int { // Set permissions for required files. for _, file := range requiredFiles { - // Make sure group has write permissions. + // Make sure the group has write permissions. err = os.Chmod(file, rootCgroupFilePermissions) if err != nil { log.Printf("could not set permissions to group writable for %v", file) diff --git a/cmd/manager/README.md b/cmd/manager/README.md index f7b96fe4..32f1bcb4 100644 --- a/cmd/manager/README.md +++ b/cmd/manager/README.md @@ -1,6 +1,6 @@ # b7s-manager -This is a libp2p agent that runs along side the main b7s assembly. +This is a libp2p agent that runs alongside the main b7s assembly. ### Access Control diff --git a/cmd/node/README.md b/cmd/node/README.md index 4c0565d2..80b22563 100644 --- a/cmd/node/README.md +++ b/cmd/node/README.md @@ -115,7 +115,7 @@ $ ./node --db /tmp/db --log-level debug --port 9000 --role worker --runtime ~/.l ``` The created `node` will listen on all addresses on TCP port 9000. -Database used to persist Node data between runs will be created in the `/tmp/db` subdirectory. +The database used to persist Node data between runs will be created in the `/tmp/db` subdirectory. Bless Runtime path is given as `/home/user/.local/bin`. At startup, node will check if the Bless Runtime is actually found there, namely the [bls-runtime](https://Bless.network/docs/protocol/runtime). @@ -131,7 +131,7 @@ $ ./node --db /var/tmp/b7s/db --log-level debug --port 9002 -r head --workspace ``` The created `node` will listen on all addresses on TCP port 9002. -Database used to persist Node peer and function data between runs will be created at `/var/tmp/b7s/db`. +The database used to persist Node peer and function data between runs will be created at `/var/tmp/b7s/db`. Any transient files needed for node operation will be created in the `/var/tmp/b7s/workspace` directory. diff --git a/cmd/node/main.go b/cmd/node/main.go index e5e4c938..7ab6397b 100644 --- a/cmd/node/main.go +++ b/cmd/node/main.go @@ -66,7 +66,7 @@ func run() int { // HTTP server will be created in two scenarios: // - node is a head node (head node always has a REST API) - // - node has prometheus metrics enabled + // - node has Prometheus metrics enabled needHTTPServer = nodeRole == bls.HeadNode || cfg.Telemetry.Metrics.Enable server *echo.Echo diff --git a/config/config.go b/config/config.go index 57e835e0..0acbdf38 100644 --- a/config/config.go +++ b/config/config.go @@ -109,7 +109,7 @@ type Metrics struct { PrometheusAddress string `koanf:"prometheus-address" flag:"prometheus-address"` } -// ConfigOptionInfo describes a specific configuration option, it's location in the config file and +// ConfigOptionInfo describes a specific configuration option, its location in the config file and // corresponding CLI flags and environment variables. It can be used to generate documentation for the b7s node. type ConfigOptionInfo struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` @@ -182,7 +182,7 @@ func getFlagDescription(flag string) string { case "tracing-http-endpoint": return "tracing exporter HTTP endpoint" case "prometheus-address": - return "address where prometheus metrics will be served" + return "address where Prometheus metrics will be served" default: return "" } diff --git a/config/flags.go b/config/flags.go index b091c4a5..a97a9550 100644 --- a/config/flags.go +++ b/config/flags.go @@ -77,7 +77,7 @@ func getFlagFromTag(tag string) (string, string) { } // return mapping of CLI flag to the config path used by koanf. E.g. address => connectivity.address. -// We don't have to enfore uniqueness of CLI flags as pflag does that for us. +// We don't have to enforce uniqueness of CLI flags as pflag does that for us. func mapCLIFlagsToConfig(fields []ConfigOption) (map[string]string, error) { flags := make(map[string]string) diff --git a/config/load.go b/config/load.go index abc6774a..00b760c3 100644 --- a/config/load.go +++ b/config/load.go @@ -98,7 +98,7 @@ func cliFlagTranslate(mapping map[string]string, fs *pflag.FlagSet) func(*pflag. // - lowercase parts ("Dialback-Address" => "dialback-address") // - join back parts using the environment variable delimiter (underscore) ("Connectivity_DialbackAddress" => "connectivity_dialback-address") // -// Koanf then uses the underscore to determine structure and in which section the config option belongs. +// Koanf then uses the underscore to determine the structure and in which section the config option belongs. func envClean(key string, value string) (string, any) { key = strings.TrimPrefix(key, bls.EnvPrefix)