Skip to content

Commit 1eda1c7

Browse files
authored
Merge branch 'main' into am/group-amino-2
2 parents a2d29ea + 0dbae70 commit 1eda1c7

File tree

24 files changed

+200
-184
lines changed

24 files changed

+200
-184
lines changed

contrib/githooks/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Installation:
44

5-
```sh
5+
```shell
66
git config core.hooksPath contrib/githooks
77
```
88

@@ -13,7 +13,7 @@ to correctly format the `.go` files included in the commit, provided
1313
that all the aforementioned commands are installed and available
1414
in the user's search `$PATH` environment variable:
1515

16-
```sh
16+
```shell
1717
go get golang.org/x/tools/cmd/goimports
1818
go get github.com/golangci/misspell/cmd/misspell@master
1919
```

cosmovisor/README.md

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 1
33
---
44

55
# Cosmovisor
66

77
`cosmovisor` is a small process manager for Cosmos SDK application binaries that monitors the governance module for incoming chain upgrade proposals. If it sees a proposal that gets approved, `cosmovisor` can automatically download the new binary, stop the current binary, switch from the old binary to the new one, and finally restart the node with the new binary.
88

9-
<!-- TOC -->
109
* [Design](#design)
1110
* [Contributing](#contributing)
1211
* [Setup](#setup)
@@ -49,21 +48,21 @@ You can download Cosmovisor from the [GitHub releases](https://github.com/cosmos
4948

5049
To install the latest version of `cosmovisor`, run the following command:
5150

52-
```sh
51+
```shell
5352
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
5453
```
5554

5655
To install a previous version, you can specify the version. IMPORTANT: Chains that use Cosmos-SDK v0.44.3 or earlier (eg v0.44.2) and want to use auto-download feature MUST use `cosmovisor v0.1.0`
5756

58-
```sh
57+
```shell
5958
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v0.1.0
6059
```
6160

6261
Run `cosmovisor version` to check the cosmovisor version.
6362

6463
You can also install from source by pulling the cosmos-sdk repository and switching to the correct version and building as follows:
6564

66-
```sh
65+
```shell
6766
git clone git@github.com:cosmos/cosmos-sdk
6867
cd cosmos-sdk
6968
git checkout cosmovisor/vx.x.x
@@ -72,7 +71,7 @@ make cosmovisor
7271

7372
This will build cosmovisor in `/cosmovisor` directory. Afterwards you may want to put it into your machine's PATH like as follows:
7473

75-
```sh
74+
```shell
7675
cp cosmovisor/cosmovisor ~/go/bin/cosmovisor
7776
```
7877

@@ -210,7 +209,7 @@ If `DAEMON_ALLOW_DOWNLOAD_BINARIES` is set to `true`, and no local binary can be
210209

211210
When submitting this as a proposal ensure there are no spaces. An example command using `gaiad` could look like:
212211

213-
```sh
212+
```shell
214213
> gaiad tx gov submit-proposal software-upgrade Vega \
215214
--title Vega \
216215
--deposit 100uatom \
@@ -237,7 +236,7 @@ Note that for this mechanism to provide strong security guarantees, all URLs sho
237236

238237
To properly create a sha256 checksum on linux, you can use the `sha256sum` utility. For example:
239238

240-
```sh
239+
```shell
241240
sha256sum ./testdata/repo/zip_directory/autod.zip
242241
```
243242

@@ -253,20 +252,20 @@ The following instructions provide a demonstration of `cosmovisor` using the sim
253252

254253
Let's create a new chain using the `v0.44` version of simapp (the Cosmos SDK demo app):
255254

256-
```sh
255+
```shell
257256
git checkout v0.44.6
258257
make build
259258
```
260259

261260
Clean `~/.simapp` (never do this in a production environment):
262261

263-
```sh
262+
```shell
264263
./build/simd unsafe-reset-all
265264
```
266265

267266
Set up app config:
268267

269-
```sh
268+
```shell
270269
./build/simd config chain-id test
271270
./build/simd config keyring-backend test
272271
./build/simd config broadcast-mode sync
@@ -276,19 +275,19 @@ Initialize the node and overwrite any previous genesis file (never do this in a
276275

277276
<!-- TODO: init does not read chain-id from config -->
278277

279-
```sh
278+
```shell
280279
./build/simd init test --chain-id test --overwrite
281280
```
282281

283282
Set the minimum gas price to `0stake` in `~/.simapp/config/app.toml`:
284283

285-
```sh
284+
```shell
286285
minimum-gas-prices = "0stake"
287286
```
288287

289288
For the sake of this demonstration, amend `voting_period` in `genesis.json` to a reduced time of 20 seconds (`20s`):
290289

291-
```sh
290+
```shell
292291
cat <<< $(jq '.app_state.gov.voting_params.voting_period = "20s"' $HOME/.simapp/config/genesis.json) > $HOME/.simapp/config/genesis.json
293292
```
294293

@@ -297,7 +296,7 @@ Create a validator, and setup genesis transaction:
297296
<!-- TODO: add-genesis-account does not read keyring-backend from config -->
298297
<!-- TODO: gentx does not read chain-id from config -->
299298

300-
```sh
299+
```shell
301300
./build/simd keys add validator
302301
./build/simd add-genesis-account validator 1000000000stake --keyring-backend test
303302
./build/simd gentx validator 1000000stake --chain-id test
@@ -308,27 +307,27 @@ Create a validator, and setup genesis transaction:
308307

309308
Set the required environment variables:
310309

311-
```sh
310+
```shell
312311
export DAEMON_NAME=simd
313312
export DAEMON_HOME=$HOME/.simapp
314313
```
315314

316315
Set the optional environment variable to trigger an automatic app restart:
317316

318-
```sh
317+
```shell
319318
export DAEMON_RESTART_AFTER_UPGRADE=true
320319
```
321320

322321
Create the folder for the genesis binary and copy the `simd` binary:
323322

324-
```sh
323+
```shell
325324
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
326325
cp ./build/simd $DAEMON_HOME/cosmovisor/genesis/bin
327326
```
328327

329328
Now you can run cosmovisor with simapp v0.44:
330329

331-
```sh
330+
```shell
332331
cosmovisor run start
333332
```
334333

@@ -340,21 +339,21 @@ Next, we can add a migration - which is defined using `x/upgrade` [upgrade plan]
340339

341340
Build the new version `simd` binary:
342341

343-
```sh
342+
```shell
344343
make build
345344
```
346345

347346
Create the folder for the upgrade binary and copy the `simd` binary:
348347

349-
```sh
348+
```shell
350349
mkdir -p $DAEMON_HOME/cosmovisor/upgrades/test1/bin
351350
cp ./build/simd $DAEMON_HOME/cosmovisor/upgrades/test1/bin
352351
```
353352

354353
Open a new terminal window and submit an upgrade proposal along with a deposit and a vote (these commands must be run within 20 seconds of each other):
355354
Note, when using a `v0.46+` chain, replace `submit-proposal` by `submit-legacy-proposal`.
356355

357-
```sh
356+
```shell
358357
./build/simd tx gov submit-proposal software-upgrade test1 --title upgrade --description upgrade --upgrade-height 200 --from validator --yes
359358
./build/simd tx gov deposit 1 10000000stake --from validator --yes
360359
./build/simd tx gov vote 1 yes --from validator --yes

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ to send users to the GitHub.
3232

3333
Make sure you are in the `docs` directory and run the following commands:
3434

35-
```sh
35+
```shell
3636
rm -rf node_modules
3737
```
3838

3939
This command will remove old version of the visual theme and required packages. This step is optional.
4040

41-
```sh
41+
```shell
4242
npm install
4343
```
4444

4545
Install the theme and all dependencies.
4646

47-
```sh
47+
```shell
4848
npm start
4949
```
5050

docs/architecture/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"label": "ADRs",
33
"position": 10,
44
"link": null
5-
}
5+
}

docs/architecture/adr-027-deterministic-protobuf-serialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ must result in the serialization
238238
When inspecting the serialized document, you see that every second field is
239239
omitted:
240240

241-
```sh
241+
```shell
242242
$ echo 0a1b54686520776f726c64206e65656473206368616e676520f09f8cb318e8bebec8bc2e280138024a084e696365206f6e654a095468616e6b20796f75 | xxd -r -p | protoc --decode_raw
243243
1: "The world needs change \360\237\214\263"
244244
3: 1596806111080

docs/architecture/adr-037-gov-split-vote.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ tally() {
7272

7373
The CLI command for creating a multi-option vote would be as such:
7474

75-
```sh
75+
```shell
7676
simd tx gov vote 1 "yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05" --from mykey
7777
```
7878

7979
To create a single-option vote a user can do either
8080

81-
```sh
81+
```shell
8282
simd tx gov vote 1 "yes=1" --from mykey
8383
```
8484

8585
or
8686

87-
```sh
87+
```shell
8888
simd tx gov vote 1 yes --from mykey
8989
```
9090

docs/docs/core/07-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.46.0/simapp/simd/cmd/root.go#L210-L
142142

143143
Each flag is bound to it's respecteve named environment variable. Then name of the environment variable consist of two parts - capital case `basename` followed by flag name of the flag. `-` must be substituted with `_`. For example flag `--home` for application with basename `GAIA` is bound to `GAIA_HOME`. It allows reducing the amount of flags typed for routine operations. For example instead of:
144144

145-
```sh
145+
```shell
146146
gaia --home=./ --node=<node address> --chain-id="testchain-1" --keyring-backend=test tx ... --from=<key name>
147147
```
148148

149149
this will be more convenient:
150150

151-
```sh
151+
```shell
152152
# define env variables in .env, .envrc etc
153153
GAIA_HOME=<path to home>
154154
GAIA_NODE=<node address>

docs/docs/ecosystem/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ Read more about writing smart contracts with CosmWasm at their [documentation si
2222

2323
Read more about writing smart contracts with solidity at the official [`evm` documentation page](https://docs.evmos.org/modules/evm/).
2424

25+
## Explore Further
2526

27+
:::tip
28+
For non Cosmos SDK related tooling, you can have a look at the [Awesome Cosmos](https://github.com/cosmos/awesome-cosmos) GitHub repository.
29+
:::
2630

27-
> Note: If you would like to add your tooling to this section, please make a pr to the cosmos-sdk, we will gladly accept it.
31+
:::note
32+
If you would like to add your tooling to this section, please make a [PR to the Cosmos SDK](https://github.com/cosmos/cosmos-sdk/edit/main/docs/docs/ecosystem/README.md).
33+
:::

docs/docs/ecosystem/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"label": "Ecosystem",
33
"position": 8,
44
"link": null
5-
}
5+
}

docs/docs/run-node/00-keyring.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ times in a single command resulting in repeated password prompts. If using bash
5151
to execute commands using the `file` option you may want to utilize the following format
5252
for multiple prompts:
5353

54-
```sh
54+
```shell
5555
# assuming that KEYPASSWD is set in the environment
5656
$ gaiacli config keyring-backend file # use file backend
5757
$ (echo $KEYPASSWD; echo $KEYPASSWD) | gaiacli keys add me # multiple prompts
@@ -79,7 +79,7 @@ passphrase expiration.
7979

8080
The password store must be set up prior to first use:
8181

82-
```sh
82+
```shell
8383
pass init <GPG_KEY_ID>
8484
```
8585

0 commit comments

Comments
 (0)