cosmos-sdk/scripts
Amaury b49f948b36
feat: Add proto annotations for Amino JSON (#13501)
* add legacy_amino_name

* make-proto-gen

* remove useless omitempty

* add annotations

* Add proto annotations

* Add more annotations

* update cosmos-proto

* Add message scalar?

* Add comments

* Fix comment

* lint proto files

* proto-gen

* go mod tidy

* Add multisig encoding

* Add field name

* Format proto

* proto-gen

* Update proto/cosmos/msg/v1/msg.proto

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Add dont_omitempty whenever we have nullable=false

* proto-gen

* Remove problematic annotations

* put legacy_amino in subpackage

* proto-gen

* Fixes

* legacy_amino.v1

* add non-working proto

* Generate in separate package

* Remove `cosmos.msg` prefix

* make proto-gen

* remove v1 too

* make proto-format

* Add field option

* format

* proto-gen

* Use underscores

* update legacy_amino -> amino

* update to `key_field`

* make proto-format

* make proto-gen

Co-authored-by: Aaron Craelius <aaron@regen.network>
2022-11-07 22:51:51 +00:00
..
dep-assert.sh refactor: create go.mod for simapp (#13130) 2022-09-07 18:14:22 +00:00
go-mod-tidy-all.sh build: add scripts to update all go.mod's at once (#10901) 2022-01-07 17:05:07 +00:00
go-update-dep-all.sh build(deps): Bump cosmossdk.io/api from v0.1.0-alpha9 to v0.2.0 (#13206) 2022-09-08 20:36:54 +00:00
linkify_changelog.py Merge PR #4902: Changelog Flow Updates 2019-08-13 16:00:28 -04:00
mockgen.sh fix: nil pointer when quitting simd start (#13743) 2022-11-03 12:00:00 +00:00
module-tests.sh build: add go.work in gitignore (#13100) 2022-08-30 21:08:04 +00:00
protoc-swagger-gen.sh chore: fix and regenerate swagger yaml #12109 2022-06-01 09:38:29 -04:00
protocgen-pulsar.sh chore: downgrade to tendermint v0.34.x (#12958) 2022-08-20 02:33:07 +02:00
protocgen.sh feat: Add proto annotations for Amino JSON (#13501) 2022-11-07 22:51:51 +00:00
README.md docs: Code blocks in SDK docs are broken (#11189) 2022-02-14 23:39:35 +01:00
update-swagger-ui-statik.sh disable url parameter in swagger-ui page (#11202) 2022-02-16 14:58:36 +01:00
validate-gentxs.sh feat: bump Go version to 1.17 (#9987) 2021-09-17 13:31:46 +02:00

Scripts

Generally we should avoid shell scripting and write tests purely in Golang. However, some libraries are not Goroutine-safe (e.g. app simulations cannot be run safely in parallel), and OS-native threading may be more efficient for many parallel simulations, so we use shell scripts here.

Validate Gentxs

A custom utility script is available to validate gentxs. Though we have ValidateBasic() for validating gentx data, it cannot validate signatures. This custom script helps to validate all the gentxs by collecting them one by one and starting a local network. It requires the following env settings.

export DAEMON=gaiad
export CHAIN_ID=cosmoshub-1
export DENOM=uatom
export GH_URL=https://github.com/cosmos/gaia
export BINARY_VERSION=v1.0.0
export GO_VERSION=1.17
export PRELAUNCH_GENESIS_URL=https://raw.githubusercontent.com/cosmos/mainnet/main/cosmoshub-1/genesis-prelaunch.json
export GENTXS_DIR=~/go/src/github.com/cosmos/mainnet/$CHAIN_ID/gentxs

Though this script is handy for verifying the gentxs locally, it is advised to use Github Action to validate gentxs. An example can be found here: 0bcd387671/.github/workflows/validate-gentx.yml