fix: multiple typos of different importance (#25188)

Co-authored-by: Alex | Interchain Labs <alex@interchainlabs.io>
This commit is contained in:
Sebastian 2025-08-19 19:57:27 +02:00 committed by GitHub
parent 97c0bd8cb2
commit ee5eabb63d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 25 additions and 25 deletions

View File

@ -40,7 +40,7 @@ An implementation example can be found in `simapp`.
The command will be available as `simd config`.
:::tip
Using confix directly in the application can have less features than using it standalone.
Using confix directly in the application can have fewer features than using it standalone.
This is because confix is versioned with the SDK, while `latest` is the standalone version.
:::
@ -126,7 +126,7 @@ confix diff v0.47 ~/.simapp/config/client.toml --client # gets the diff between
### View
View a configuration file, e.g:
View a configuration file, e.g.:
```shell
simd config view client # views the current app client config

View File

@ -44,7 +44,7 @@ func Upgrade(ctx context.Context, plan transform.Plan, doc *tomledit.Document, c
// allow to skip validation
if !skipValidate {
// verify that file is valid after applying fixes
// verify that the file is valid after applying fixes
if err := CheckValid(configPath, buf.Bytes()); err != nil {
return fmt.Errorf("updated config is invalid: %w", err)
}

View File

@ -45,7 +45,7 @@ Versions prior to v1.0.0 have a vulnerability that could lead to a DOS. Please u
## Contributing
Cosmovisor is part of the Cosmos SDK monorepo, but it's a separate module with it's own release schedule.
Cosmovisor is part of the Cosmos SDK monorepo, but it's a separate module with its own release schedule.
Release branches have the following format `release/cosmovisor/vA.B.x`, where A and B are a number (e.g. `release/cosmovisor/v1.3.x`). Releases are tagged using the following format: `cosmovisor/vA.B.C`.
@ -84,7 +84,7 @@ The first argument passed to `cosmovisor` is the action for `cosmovisor` to take
* `run` - Run the configured binary using the rest of the provided arguments.
* `version` - Output the `cosmovisor` version and also run the binary with the `version` argument.
* `config` - Display the current `cosmovisor` configuration, that means displaying the environment variables value that `cosmovisor` is using.
* `add-upgrade` - Add an upgrade manually to `cosmovisor`. This command allow you to easily add the binary corresponding to an upgrade in cosmovisor.
* `add-upgrade` - Add an upgrade manually to `cosmovisor`. This command allows you to easily add the binary corresponding to an upgrade in cosmovisor.
All arguments passed to `cosmovisor run` will be passed to the application binary (as a subprocess). `cosmovisor` will return `/dev/stdout` and `/dev/stderr` of the subprocess as its own. For this reason, `cosmovisor run` cannot accept any command-line arguments other than those available to the application binary.
@ -105,7 +105,7 @@ All arguments passed to `cosmovisor run` will be passed to the application binar
* `COSMOVISOR_COLOR_LOGS` (defaults to `true`). If set to true, this will colorise Cosmovisor logs (but not the underlying process).
* `COSMOVISOR_TIMEFORMAT_LOGS` (defaults to `kitchen`). If set to a value (`layout|ansic|unixdate|rubydate|rfc822|rfc822z|rfc850|rfc1123|rfc1123z|rfc3339|rfc3339nano|kitchen`), this will add timestamp prefix to Cosmovisor logs (but not the underlying process).
* `COSMOVISOR_CUSTOM_PREUPGRADE` (defaults to ``). If set, this will run $DAEMON_HOME/cosmovisor/$COSMOVISOR_CUSTOM_PREUPGRADE prior to upgrade with the arguments [ upgrade.Name, upgrade.Height ]. Executes a custom script (separate and prior to the chain daemon pre-upgrade command)
* `COSMOVISOR_DISABLE_RECASE` (defaults to `false`). If set to true, the upgrade directory will expected to match the upgrade plan name without any case changes
* `COSMOVISOR_DISABLE_RECASE` (defaults to `false`). If set to true, the upgrade directory will be expected to match the upgrade plan name without any case changes
### Folder Layout
@ -200,9 +200,9 @@ Take this into consideration when using `--upgrade-height`.
Generally, `cosmovisor` requires that the system administrator place all relevant binaries on disk before the upgrade happens. However, for people who don't need such control and want an automated setup (maybe they are syncing a non-validating fullnode and want to do little maintenance), there is another option.
**NOTE: we don't recommend using auto-download** because it doesn't verify in advance if a binary is available. If there will be any issue with downloading a binary, the cosmovisor will stop and won't restart an App (which could lead to a chain halt).
**NOTE: we don't recommend using auto-download** because it doesn't verify in advance if a binary is available. If there will be any issue with downloading a binary, the cosmovisor will stop and won't restart the app (which could lead to a chain halt).
If `DAEMON_ALLOW_DOWNLOAD_BINARIES` is set to `true`, and no local binary can be found when an upgrade is triggered, `cosmovisor` will attempt to download and install the binary itself based on the instructions in the `info` attribute in the `data/upgrade-info.json` file. The files is constructed by the x/upgrade module and contains data from the upgrade `Plan` object. The `Plan` has an info field that is expected to have one of the following two valid formats to specify a download:
If `DAEMON_ALLOW_DOWNLOAD_BINARIES` is set to `true`, and no local binary can be found when an upgrade is triggered, `cosmovisor` will attempt to download and install the binary itself based on the instructions in the `info` attribute in the `data/upgrade-info.json` file. The file is constructed by the x/upgrade module and contains data from the upgrade `Plan` object. The `Plan` has an info field that is expected to have one of the following two valid formats to specify a download:
1. Store an os/architecture -> binary URI map in the upgrade plan info field as JSON under the `"binaries"` key. For example:

View File

@ -174,7 +174,7 @@ func GetConfigFromFile(filePath string) (*Config, error) {
return GetConfigFromEnv(false)
}
// ensure the file exist
// ensure the file exists
if _, err := os.Stat(filePath); err != nil {
return nil, fmt.Errorf("config not found: at %s : %w", filePath, err)
}
@ -455,7 +455,7 @@ returnError:
return cfg.currentUpgrade, fmt.Errorf("failed to read %q: %w", filename, err)
}
// BooleanOption checks and validate env option
// BooleanOption checks and validates env option
func BooleanOption(name string, defaultVal bool) (bool, error) {
p := strings.ToLower(os.Getenv(name))
switch p {

View File

@ -192,7 +192,7 @@ func (s *argsTestSuite) TestConfigPaths() {
}
// Test validate
// add more test in test validate
// add more tests to test validate
func (s *argsTestSuite) TestValidate() {
relPath := filepath.Join("testdata", "validate")
absPath, err := filepath.Abs(relPath)

View File

@ -14,7 +14,7 @@ Cosmovisor is a wrapper for a Cosmos SDK based App (set using the required %s en
It starts the App by passing all provided arguments and monitors the %s/data/upgrade-info.json
file to perform an update. The upgrade-info.json file is created by the App x/upgrade module
when the blockchain height reaches an approved upgrade proposal. The file includes data from
the proposal. Cosmovisor interprets that data to perform an update: switch a current binary
the proposal. Cosmovisor interprets that data to perform an update: switch the current binary
and restart the App.
Configuration of Cosmovisor is done through environment variables, which are

View File

@ -52,7 +52,7 @@ func InitializeCosmovisor(logger log.Logger, args []string) error {
return err
}
// process to minimal validation
// proceed to minimal validation
if err := minConfigValidate(cfg); err != nil {
return err
}

View File

@ -53,14 +53,14 @@ func run(cfgPath string, args []string, options ...RunOption) error {
}
doUpgrade, err := launcher.Run(args, runCfg.StdIn, runCfg.StdOut, runCfg.StdErr)
// if RestartAfterUpgrade, we launch after a successful upgrade (given that condition launcher.Run returns nil)
// if RestartAfterUpgrade is enabled, we launch after a successful upgrade (given that the launcher.Run returns nil)
for cfg.RestartAfterUpgrade && err == nil && doUpgrade {
logger.Info("upgrade detected, relaunching", "app", cfg.Name)
doUpgrade, err = launcher.Run(args, runCfg.StdIn, runCfg.StdOut, runCfg.StdErr)
}
if doUpgrade && err == nil {
logger.Info("upgrade detected, DAEMON_RESTART_AFTER_UPGRADE is off. Verify new upgrade and start cosmovisor again.")
logger.Info("upgrade detected, DAEMON_RESTART_AFTER_UPGRADE is off. Please verify the new upgrade and start cosmovisor again.")
}
return err

View File

@ -183,7 +183,7 @@ pollLoop:
}
// Run launches the app in a subprocess and returns when the subprocess (app)
// exits (either when it dies, or *after* a successful upgrade.) and upgrade finished.
// exits (either when it dies, or *after* a successful upgrade.) and the upgrade is finished.
// Returns true if the upgrade request was detected and the upgrade process started.
func (l Launcher) Run(args []string, stdin io.Reader, stdout, stderr io.Writer) (bool, error) {
bin, err := l.cfg.CurrentBin()
@ -351,7 +351,7 @@ func (l Launcher) doBackup() error {
return fmt.Errorf("error while taking data backup: %w", err)
}
// backup is done, lets check endtime to calculate total time taken for backup process
// backup is done, lets check endtime to calculate total time taken for the backup process
et := time.Now()
l.logger.Info("backup completed", "backup saved at", dst, "backup completion time", et, "time taken to complete backup", et.Sub(st))
}
@ -468,7 +468,7 @@ func (l *Launcher) executePreUpgradeCmd() error {
return nil
}
// IsSkipUpgradeHeight checks if pre-upgrade script must be run.
// IsSkipUpgradeHeight checks if the pre-upgrade script must be run.
// If the height in the upgrade plan matches any of the heights provided in --unsafe-skip-upgrades, the script is not run.
func IsSkipUpgradeHeight(args []string, upgradeInfo upgradetypes.Plan) bool {
skipUpgradeHeights := UpgradeSkipHeights(args)

View File

@ -194,7 +194,7 @@ func TestLaunchProcessWithRestartDelay(t *testing.T) {
}
}
// TestPlanShutdownGrace will test upgrades without lower case plan names
// TestPlanShutdownGrace will test the shutdown grace period functionality
func TestPlanShutdownGrace(t *testing.T) {
// binaries from testdata/validate directory
cfg := prepareConfig(
@ -466,7 +466,7 @@ func TestLaunchProcessWithDownloadsAndPreupgrade(t *testing.T) {
require.Equal(t, rPath, currentBin)
}
// TestSkipUpgrade tests heights that are identified to be skipped and return if upgrade height matches the skip heights
// TestSkipUpgrade tests heights that are identified to be skipped and returns whether the upgrade height matches the skip heights
func TestSkipUpgrade(t *testing.T) {
cases := []struct {
args []string

View File

@ -27,7 +27,7 @@ type Addressable interface {
func Hash(typ string, key []byte) []byte {
hasher := sha256.New()
_, err := hasher.Write(conv.UnsafeStrToBytes(typ))
// the error always nil, it's here only to satisfy the io.Writer interface
// the error is always nil, it's here only to satisfy the io.Writer interface
errors.AssertNil(err)
th := hasher.Sum(nil)
@ -67,7 +67,7 @@ func Compose(typ string, subAddresses []Addressable) ([]byte, error) {
// is constructed from a module name and a sequence of derivation keys (at least one
// derivation key must be provided). The derivation keys must be unique
// in the module scope, and is usually constructed from some object id. Example, let's
// a x/dao module, and a new DAO object, it's address would be:
// a x/dao module, and a new DAO object, its address would be:
//
// address.Module(dao.ModuleName, newDAO.ID)
func Module(moduleName string, derivationKeys ...[]byte) []byte {
@ -86,7 +86,7 @@ func Module(moduleName string, derivationKeys ...[]byte) []byte {
}
// Derive derives a new address from the main `address` and a derivation `key`.
// This function is used to create a sub accounts. To create a module accounts use the
// This function is used to create sub accounts. To create a module accounts use the
// `Module` function.
func Derive(address, key []byte) []byte {
return Hash(conv.UnsafeBytesToStr(address), key)

View File

@ -6,7 +6,7 @@ import (
"github.com/cosmos/btcutil/bech32"
)
// ConvertAndEncode converts from a base256 encoded byte string to base32 encoded byte string and then to bech32.
// ConvertAndEncode converts from a base256 encoded byte string to a base32 encoded byte string and then to bech32.
func ConvertAndEncode(hrp string, data []byte) (string, error) {
converted, err := bech32.ConvertBits(data, 8, 5, true)
if err != nil {

View File

@ -131,7 +131,7 @@ var (
// non-DB domain errors).
ErrIO = errorsmod.Register(RootCodespace, 39, "internal IO error")
// ErrAppConfig defines an error occurred if application configuration is
// ErrAppConfig defines an error that occurs if application configuration is
// misconfigured.
ErrAppConfig = errorsmod.Register(RootCodespace, 40, "error in app.toml")