-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create pre-upgrade command. Fix minimum-gas-prices repacking unset. (#…
…1594) * Create a new pre_upgrade command that updates the config files. Make it also set the commit timeout if needed. Make it so that stuff that uses the global viper also gets everything that's needed. * Force the timeout commit to 5s in all cases. Add some comments and info about what cosmovisor expects. * Undo the PersistentPreRunE extraction change since I ended up not needing it for the unit tests. * Fix the existing LogIfError functions. * Tweak errors returned from pre-upgrade to contain more context and still be indicate the desired exit code. * Allow creation of the root command that won't seal the app config so we can run it multiple times, e.g. from unit tests. Also, add extra handling of ErrorCodes to main since it's sometimes a pointer and sometimes not. * Add unit tests on the pre-upgrade command. * Add a unit test for when the config can't be written. * Add newline to end of success message. * Move the global min-gas-prices setting stuff into the interceptor so that it happens before the config files are loaded or any defaults are requested. * For the init cmd test, don't seal the config (so other things that might need to can do so), and use a temp directory instead of the default. * Update some tests that started failing because the default timeout_commit changed. * Just pass sealConfig into the SetConfig function instead of optionally calling it. * For the pre-unpgrade tests, just add the home dir as a flag for the command. * Add temporary changelog entries. * Remove some lines added just for debugging. * When starting a node with a timeout_commit of less than 4 seconds, output a message stating that it should be set to 5s. * Update the initialization script to put the timeout_commit back to 1s so that make run cuts blocks faster. * Only issue low timeout_commit warning on mainnet. * Replace some deprecated stuff and fix some receivers. * During pre-upgrae Only update the configured value if it's lower than half the default. * Only log the warning on mainnet and only if it's less than half the default. * Add the --timeout-commit flag to the init command. If provided, use that. Otherwise, if something other than mainnet or testnet, use 1s. Otherwise, use whatever was previously in their config or the default if it's brand new. * Update the initialize script to provide the --timeout-commit to init instead of setting it using the config command at the end. * Upper-case the first letter of all commmand and flag usage strings. Fix the debug pubkey-raw command that had a conflicting shorthand flag being added. * Fix the --help flag capitalization. * Undo the usage capitalization stuff. That's a bit too off-topic for this PR. * In the pre-upgrade command only change the timeout_commit for mainnet nodes. * Get rid of the global ChainID variable (in cmd/root.go) since it wasn't used before this PR and it wasn't really worthwhile even after setting it due to the package it's in.
- Loading branch information
1 parent
fd3c877
commit 968f15b
Showing
15 changed files
with
852 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.