diff --git a/cosmovisor/README.md b/cosmovisor/README.md index b6e3b3e8ef..a87a7693d6 100644 --- a/cosmovisor/README.md +++ b/cosmovisor/README.md @@ -30,6 +30,29 @@ To install the latest version of `cosmovisor`, run the following command: go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest ``` +To install a previous version, you can specify the version. IMPORTANT: Chains that use Cosmos-SDK v0.42.x and want to use auto-download feature MUST use Cosmovisor v0.1.0 + +``` +go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v0.1.0 +``` + +It is possible to confirm the version of cosmovisor when using Cosmovisor v1.0.0, but it is not possible to do so with `v0.1.0`. + +You can also install from source by pulling the cosmos-sdk repository and switching to the correct version and building as follows: + +``` +git clone git@github.com:cosmos/cosmos-sdk +cd cosmos-sdk +git checkout cosmovisor/vx.x.x +cd cosmovisor +make +``` +This will build cosmovisor in your current directory. Afterwards you may want to put it into your machine's PATH like as follows: + +``` +cp cosmovisor ~/go/bin/cosmovisor +``` + *Note: If you are using go `v1.15` or earlier, you will need to use `go get`, and you may want to run the command outside a project directory.* ### Command Line Arguments And Environment Variables @@ -128,6 +151,35 @@ If `DAEMON_ALLOW_DOWNLOAD_BINARIES` is set to `true`, and no local binary can be } ``` +You can include multiple binaries at once to ensure more than one environment will receive the correct binaries: + +```json +{ + "binaries": { + "linux/amd64":"https://example.com/gaia.zip?checksum=sha256:aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f", + "linux/arm64":"https://example.com/gaia.zip?checksum=sha256:aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f", + "darwin/amd64":"https://example.com/gaia.zip?checksum=sha256:aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f" + } +} +``` + +When submitting this as a proposal ensure there are no spaces. An example command using `gaiad` could look like: + +``` +> gaiad tx gov submit-proposal software-upgrade Vega \ +--title Vega \ +--deposit 100uatom \ +--upgrade-height 7368420 \ +--upgrade-info '{"binaries":{"linux/amd64":"https://github.com/cosmos/gaia/releases/download/v6.0.0-rc1/gaiad-v6.0.0-rc1-linux-amd64","linux/arm64":"https://github.com/cosmos/gaia/releases/download/v6.0.0-rc1/gaiad-v6.0.0-rc1-linux-arm64","darwin/amd64":"https://github.com/cosmos/gaia/releases/download/v6.0.0-rc1/gaiad-v6.0.0-rc1-darwin-amd64"}}' \ +--description "upgrade to Vega" \ +--gas 400000 \ +--from user \ +--chain-id test \ +--home test/val2 \ +--node tcp://localhost:36657 \ +--yes +``` + 2. Store a link to a file that contains all information in the above format (e.g. if you want to specify lots of binaries, changelog info, etc. without filling up the blockchain). For example: ```