diff --git a/contrib/generate_release_note/main.go b/contrib/generate_release_note/main.go deleted file mode 100644 index 6bcdfedf67c..00000000000 --- a/contrib/generate_release_note/main.go +++ /dev/null @@ -1,70 +0,0 @@ -//go:build exclude -// +build exclude - -package main - -import ( - "errors" - "fmt" - "os" - "strings" -) - -func main() { - args := os.Args - if len(args) != 4 { - fmt.Println("please add os.Args release version, build_report path and CHANGELOG.md path, example: go run main.go v7.0.0 ../../artifacts/build_report ../../CHANGELOG.md") - } - - buildReportPath := args[2] - changelogPath := args[3] - - buildReport, err := os.ReadFile(buildReportPath) - if err != nil { - fmt.Printf("file error: %s\n", err) - } - - changelog, err := FindChangelog(changelogPath, args[1]) - if err != nil { - fmt.Printf("cannot find changelog: %s\n", err) - } - - note := strings.Builder{} - note.WriteString(fmt.Sprintf("# Gaia %s Release Notes\n", args[1])) - note.WriteString(changelog) - note.WriteString("```\n") - note.Write(buildReport) - note.WriteString("```\n") - - f, err := os.Create("./releasenote") - if err != nil { - fmt.Printf("cannot create a release note: %s\n", err) - } - defer f.Close() - - _, err = f.WriteString(note.String()) - if err != nil { - fmt.Printf("cannot write to releasenote: %s\n", err) - } -} - -func FindChangelog(file, version string) (string, error) { - data, err := os.ReadFile(file) - if err != nil { - return "", errors.New("read changelog file failed") - } - - changelogs := string(data) - i := strings.Index(changelogs, "["+version) - if i == -1 { - // -1 means not found - return "", fmt.Errorf("cannot find version %s", version) - } - j := strings.Index(changelogs[i:], "##") - if j == -1 { - // -1 means not found - return "", fmt.Errorf("cannot find the end of %s's changelog", version) - } - - return changelogs[i : i+j], nil -} diff --git a/contrib/githooks/README.md b/contrib/githooks/README.md deleted file mode 100644 index 4bbaab31484..00000000000 --- a/contrib/githooks/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Git hooks - -Installation: - -``` -git config core.hooksPath contrib/githooks -``` - -## pre-commit - -The hook automatically runs `gofmt`, `goimports`, and `misspell` -to correctly format the `.go` files included in the commit, provided -that all the aforementioned commands are installed and available -in the user's search `$PATH` environment variable: - -``` -go install golang.org/x/tools/cmd/goimports -go install github.com/golangci/misspell/cmd/misspell@master -``` - -It also runs `go mod tidy` and `golangci-lint` if available. diff --git a/contrib/githooks/pre-commit b/contrib/githooks/pre-commit deleted file mode 100755 index 99eca6eb99f..00000000000 --- a/contrib/githooks/pre-commit +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -set -e - -CMDS='git go gofmt goimports misspell' -STAGED_GO_FILES=$(git diff --cached --name-only -- '*.go') - -f_echo_stderr() { - echo $@ >&2 -} - -f_exit_success() { - [ x"$@" != "x" ] && f_echo_stderr $@ || exit 0 -} -trap f_exit_success EXIT - -f_check_cmds() { - for cmd in ${CMDS}; do - which ${cmd} &>/dev/null || f_exit_success "couldn't find ${cmd}, skipping" - done -} - -f_check_cmds - -if [[ $STAGED_GO_FILES != "" ]]; then - f_echo_stderr "[pre-commit] fmt'ing staged files..." - for file in $STAGED_GO_FILES; do - if [[ $file =~ vendor/ ]] || [[ $file =~ client/lcd/statik/ ]] || [[ $file =~ tests/mocks/ ]] || [[ $file =~ \.pb\.go ]]; then - continue - fi - - gofmt -w -s $file - misspell -w $file - goimports -w -local github.com/cosmos/gaia $file - git add $file - - done -fi - -# Run go mod tidy -go mod tidy && git add go.mod go.sum diff --git a/contrib/githooks/precommit b/contrib/githooks/precommit deleted file mode 100644 index 99eca6eb99f..00000000000 --- a/contrib/githooks/precommit +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -set -e - -CMDS='git go gofmt goimports misspell' -STAGED_GO_FILES=$(git diff --cached --name-only -- '*.go') - -f_echo_stderr() { - echo $@ >&2 -} - -f_exit_success() { - [ x"$@" != "x" ] && f_echo_stderr $@ || exit 0 -} -trap f_exit_success EXIT - -f_check_cmds() { - for cmd in ${CMDS}; do - which ${cmd} &>/dev/null || f_exit_success "couldn't find ${cmd}, skipping" - done -} - -f_check_cmds - -if [[ $STAGED_GO_FILES != "" ]]; then - f_echo_stderr "[pre-commit] fmt'ing staged files..." - for file in $STAGED_GO_FILES; do - if [[ $file =~ vendor/ ]] || [[ $file =~ client/lcd/statik/ ]] || [[ $file =~ tests/mocks/ ]] || [[ $file =~ \.pb\.go ]]; then - continue - fi - - gofmt -w -s $file - misspell -w $file - goimports -w -local github.com/cosmos/gaia $file - git add $file - - done -fi - -# Run go mod tidy -go mod tidy && git add go.mod go.sum diff --git a/contrib/scripts/upgrade_test_scripts/v10/run_gaia_v9.sh b/contrib/scripts/upgrade_test_scripts/v10/run_gaia_v9.sh deleted file mode 100644 index df666d2cd9f..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v10/run_gaia_v9.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" -CHAINID=cosmoshub-4 - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" - -if ! test -f "./build/gaiad9"; then - echo "gaiad v9 does not exist" - exit -fi - - -rm -rf ./build/.gaia - -mkdir -p "$NODE_HOME"/cosmovisor/genesis/bin -cp ./build/gaiad9 "$NODE_HOME"/cosmovisor/genesis/bin/gaiad -$BINARY init upgrader --chain-id $CHAINID --home "$NODE_HOME" - - -if ! test -f "./build/gaiad10"; then - echo "gaiad v10 does not exist" - exit -fi - -mkdir -p "$NODE_HOME"/cosmovisor/upgrades/v10/bin -cp ./build/gaiad10 "$NODE_HOME"/cosmovisor/upgrades/v10/bin/gaiad - -GOPATH=$(go env GOPATH) - -export DAEMON_NAME=gaiad -export DAEMON_HOME=$NODE_HOME -COSMOVISOR=$GOPATH/bin/cosmovisor - - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -tmp=$(mktemp) - -# add bank part of genesis -jq --argjson foo "$(jq -c '.' contrib/denom.json)" '.app_state.bank.denom_metadata = $foo' $NODE_HOME/config/genesis.json > "$tmp" && mv "$tmp" $NODE_HOME/config/genesis.json - -# replace default stake token with uatom -sed -i -e 's/stake/uatom/g' $NODE_HOME/config/genesis.json -# min deposition amount (this one isn't working) -sed -i -e 's%"amount": "10000000",%"amount": "1",%g' $NODE_HOME/config/genesis.json -# min voting power that a proposal requires in order to be a valid proposal -sed -i -e 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# the minimum proportion of "yes" votes requires for the proposal to pass -sed -i -e 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# voting period to 30s -sed -i -e 's%"voting_period": "172800s"%"voting_period": "30s"%g' $NODE_HOME/config/genesis.json - -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -$BINARY add-genesis-account val 10000000000000000000000000uatom --home $NODE_HOME --keyring-backend test -$BINARY gentx val 1000000000uatom --home $NODE_HOME --chain-id $CHAINID -$BINARY collect-gentxs --home $NODE_HOME - -sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' $NODE_HOME/config/app.toml - -perl -i~ -0777 -pe 's/# Enable defines if the API server should be enabled. -enable = false/# Enable defines if the API server should be enabled. -enable = true/g' $NODE_HOME/config/app.toml - -pwd -ls $NODE_HOME - -$COSMOVISOR run start --home $NODE_HOME --x-crisis-skip-assert-invariants > v9.out 2>&1 & diff --git a/contrib/scripts/upgrade_test_scripts/v10/run_upgrade_commands_v10.sh b/contrib/scripts/upgrade_test_scripts/v10/run_upgrade_commands_v10.sh deleted file mode 100644 index ceaa4fd7a06..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v10/run_upgrade_commands_v10.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -UPGRADE_HEIGHT=$1 - -if [ -z "$1" ]; then -echo "Need to add an upgrade height" -exit 1 -fi - -NODE_HOME=$(realpath ./build/.gaia) - -echo "NODE_HOME = ${NODE_HOME}" - -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" - -$BINARY version - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" -CHAINID=cosmoshub-4 - -if test -f "$BINARY"; then - -echo "wait 10 seconds for blockchain to start" -sleep 10 - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config output json --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -$BINARY config --home $NODE_HOME - - -key=$($BINARY keys show val --home $NODE_HOME) -if [ -z "$key" ]; then -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -fi - - -echo "\n" -echo "Submitting proposal... \n" -$BINARY tx gov submit-proposal software-upgrade v10 \ ---title v10 \ ---deposit 10000000uatom \ ---upgrade-height $UPGRADE_HEIGHT \ ---upgrade-info "upgrade to v10" \ ---description "upgrade to v10" \ ---gas auto \ ---fees 400uatom \ ---from val \ ---keyring-backend test \ ---chain-id $CHAINID \ ---home $NODE_HOME \ ---node tcp://localhost:26657 \ ---yes -echo "Done \n" - -sleep 6 -echo "Casting vote... \n" - -$BINARY tx gov vote 1 yes \ ---from val \ ---keyring-backend test \ ---chain-id $CHAINID \ ---home $NODE_HOME \ ---gas auto \ ---fees 400uatom \ ---node tcp://localhost:26657 \ ---yes - -echo "Done \n" - -else -echo "Please build gaia v9 and move to ./build/gaiad9" -fi diff --git a/contrib/scripts/upgrade_test_scripts/v11/run_gaia_v10.sh b/contrib/scripts/upgrade_test_scripts/v11/run_gaia_v10.sh deleted file mode 100755 index 69b183e9cdc..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v11/run_gaia_v10.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" -CHAINID=cosmoshub-4 - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" - -if ! test -f "./build/gaiad10"; then - echo "gaiad v10 does not exist" - exit -fi - - -rm -rf ./build/.gaia - -mkdir -p "$NODE_HOME"/cosmovisor/genesis/bin -cp ./build/gaiad10 "$NODE_HOME"/cosmovisor/genesis/bin/gaiad -$BINARY init upgrader --chain-id $CHAINID --home "$NODE_HOME" - - -if ! test -f "./build/gaiad11"; then - echo "gaiad v11 does not exist" - exit -fi - -mkdir -p "$NODE_HOME"/cosmovisor/upgrades/v11/bin -cp ./build/gaiad11 "$NODE_HOME"/cosmovisor/upgrades/v11/bin/gaiad - -GOPATH=$(go env GOPATH) - -export DAEMON_NAME=gaiad -export DAEMON_HOME=$NODE_HOME -COSMOVISOR=$GOPATH/bin/cosmovisor - - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -tmp=$(mktemp) - -# add bank part of genesis -jq --argjson foo "$(jq -c '.' contrib/denom.json)" '.app_state.bank.denom_metadata = $foo' $NODE_HOME/config/genesis.json > "$tmp" && mv "$tmp" $NODE_HOME/config/genesis.json - -# replace default stake token with uatom -sed -i -e 's/stake/uatom/g' $NODE_HOME/config/genesis.json -# min deposition amount (this one isn't working) -sed -i -e 's%"amount": "10000000",%"amount": "1",%g' $NODE_HOME/config/genesis.json -# min voting power that a proposal requires in order to be a valid proposal -sed -i -e 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# the minimum proportion of "yes" votes requires for the proposal to pass -sed -i -e 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# voting period to 30s -sed -i -e 's%"voting_period": "172800s"%"voting_period": "30s"%g' $NODE_HOME/config/genesis.json - -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -$BINARY add-genesis-account val 10000000000000000000000000uatom --home $NODE_HOME --keyring-backend test -$BINARY gentx val 1000000000uatom --home $NODE_HOME --chain-id $CHAINID -$BINARY collect-gentxs --home $NODE_HOME - -sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' $NODE_HOME/config/app.toml - -perl -i~ -0777 -pe 's/# Enable defines if the API server should be enabled. -enable = false/# Enable defines if the API server should be enabled. -enable = true/g' $NODE_HOME/config/app.toml - -pwd -ls $NODE_HOME - -$COSMOVISOR run start --home $NODE_HOME --x-crisis-skip-assert-invariants > v10.out 2>&1 & - diff --git a/contrib/scripts/upgrade_test_scripts/v11/run_upgrade_commands_v11.sh b/contrib/scripts/upgrade_test_scripts/v11/run_upgrade_commands_v11.sh deleted file mode 100755 index 8170378e574..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v11/run_upgrade_commands_v11.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -UPGRADE_HEIGHT=$1 - -if [ -z "$1" ]; then - echo "Need to add an upgrade height" - exit 1 -fi - -NODE_HOME=$(realpath ./build/.gaia) - -echo "NODE_HOME = ${NODE_HOME}" - -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" - -$BINARY version - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" -CHAINID=cosmoshub-4 - -if test -f "$BINARY"; then - - echo "wait 10 seconds for blockchain to start" - sleep 10 - - $BINARY config chain-id $CHAINID --home $NODE_HOME - $BINARY config output json --home $NODE_HOME - $BINARY config keyring-backend test --home $NODE_HOME - $BINARY config --home $NODE_HOME - - - key=$($BINARY keys show val --home $NODE_HOME) - if [ -z "$key" ]; then - echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test - fi - - - echo "\n" - echo "Submitting proposal... \n" - $BINARY tx gov submit-proposal software-upgrade v11 \ - --title v11 \ - --deposit 10000000uatom \ - --upgrade-height $UPGRADE_HEIGHT \ - --upgrade-info "upgrade to v11" \ - --description "upgrade to v11" \ - --gas auto \ - --fees 400uatom \ - --from val \ - --keyring-backend test \ - --chain-id $CHAINID \ - --home $NODE_HOME \ - --node tcp://localhost:26657 \ - --yes - echo "Done \n" - - sleep 6 - echo "Casting vote... \n" - - $BINARY tx gov vote 1 yes \ - --from val \ - --keyring-backend test \ - --chain-id $CHAINID \ - --home $NODE_HOME \ - --gas auto \ - --fees 400uatom \ - --node tcp://localhost:26657 \ - --yes - - echo "Done \n" - -else - echo "Please build gaia v9 and move to ./build/gaiad9" -fi diff --git a/contrib/scripts/upgrade_test_scripts/v11/test_migration_v11.sh b/contrib/scripts/upgrade_test_scripts/v11/test_migration_v11.sh deleted file mode 100755 index 60ad12304d1..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v11/test_migration_v11.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -NODEADDR=$1 - -# Define default global fee module's params -# according to gaia/x/globalfee/types/params.go -default_globalfee_params=' -{ - "params": { - "minimum_gas_prices": [], - "bypass_min_fee_msg_types": [ - "/ibc.core.channel.v1.MsgRecvPacket", - "/ibc.core.channel.v1.MsgAcknowledgement", - "/ibc.core.client.v1.MsgUpdateClient", - "/ibc.core.channel.v1.MsgTimeout", - "/ibc.core.channel.v1.MsgTimeoutOnClose" - ], - "max_total_bypass_min_fee_msg_gas_usage": "1000000" - } -}' - -# Get current global fee default params -curr_params=$(curl -s $NODEADDR:1317/gaia/globalfee/v1beta1/params) - -# Check if retrieved params are equal to expected default params -DIFF=$(diff <(echo ${default_globalfee_params} | jq --sort-keys .) <(echo ${curr_params} | jq --sort-keys .)) - -if [ "$DIFF" != "" ] -then - printf "expected default global fee params:\n${DIFF}" - exit 1 -fi diff --git a/contrib/scripts/upgrade_test_scripts/v12/run_gaia_v11.sh b/contrib/scripts/upgrade_test_scripts/v12/run_gaia_v11.sh deleted file mode 100755 index 38040780807..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v12/run_gaia_v11.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" -CHAINID=cosmoshub-4 - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" - -if ! test -f "./build/gaiad11"; then - echo "gaiad v11 does not exist" - exit -fi - - -rm -rf ./build/.gaia - -mkdir -p "$NODE_HOME"/cosmovisor/genesis/bin -cp ./build/gaiad11 "$NODE_HOME"/cosmovisor/genesis/bin/gaiad -$BINARY init upgrader --chain-id $CHAINID --home "$NODE_HOME" - - -if ! test -f "./build/gaiad12"; then - echo "gaiad v12 does not exist" - exit -fi - -mkdir -p "$NODE_HOME"/cosmovisor/upgrades/v12/bin -cp ./build/gaiad12 "$NODE_HOME"/cosmovisor/upgrades/v12/bin/gaiad - -GOPATH=$(go env GOPATH) - -export DAEMON_NAME=gaiad -export DAEMON_HOME=$NODE_HOME -COSMOVISOR=$GOPATH/bin/cosmovisor - - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -tmp=$(mktemp) - -# add bank part of genesis -jq --argjson foo "$(jq -c '.' contrib/denom.json)" '.app_state.bank.denom_metadata = $foo' $NODE_HOME/config/genesis.json > "$tmp" && mv "$tmp" $NODE_HOME/config/genesis.json - -# replace default stake token with uatom -sed -i -e 's/stake/uatom/g' $NODE_HOME/config/genesis.json -# min deposition amount (this one isn't working) -sed -i -e 's%"amount": "10000000",%"amount": "1",%g' $NODE_HOME/config/genesis.json -# min voting power that a proposal requires in order to be a valid proposal -sed -i -e 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# the minimum proportion of "yes" votes requires for the proposal to pass -sed -i -e 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# voting period to 30s -sed -i -e 's%"voting_period": "172800s"%"voting_period": "30s"%g' $NODE_HOME/config/genesis.json - -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -$BINARY add-genesis-account val 10000000000000000000000000uatom --home $NODE_HOME --keyring-backend test -$BINARY gentx val 1000000000uatom --home $NODE_HOME --chain-id $CHAINID -$BINARY collect-gentxs --home $NODE_HOME - -sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' $NODE_HOME/config/app.toml - -perl -i~ -0777 -pe 's/# Enable defines if the API server should be enabled. -enable = false/# Enable defines if the API server should be enabled. -enable = true/g' $NODE_HOME/config/app.toml - -pwd -ls $NODE_HOME - -$COSMOVISOR run start --home $NODE_HOME --x-crisis-skip-assert-invariants > v11.out 2>&1 & diff --git a/contrib/scripts/upgrade_test_scripts/v12/run_upgrade_commands_v12.sh b/contrib/scripts/upgrade_test_scripts/v12/run_upgrade_commands_v12.sh deleted file mode 100755 index 12c110f02d6..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v12/run_upgrade_commands_v12.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -UPGRADE_HEIGHT=$1 - -if [ -z "$1" ]; then -echo "Need to add an upgrade height" -exit 1 -fi - -NODE_HOME=$(realpath ./build/.gaia) - -echo "NODE_HOME = ${NODE_HOME}" - -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" - -$BINARY version - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" -CHAINID=cosmoshub-4 - -if test -f "$BINARY"; then - -echo "wait 10 seconds for blockchain to start" -sleep 10 - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config output json --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -$BINARY config --home $NODE_HOME - -key=$($BINARY keys show val --home $NODE_HOME) -if [ -z "$key" ]; then -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -fi - - -echo "\n" -echo "Submitting proposal... \n" -$BINARY tx gov submit-proposal software-upgrade v12 \ ---title v12 \ ---deposit 10000000uatom \ ---upgrade-height $UPGRADE_HEIGHT \ ---upgrade-info "upgrade to v12" \ ---description "upgrade to v12" \ ---fees 400uatom \ ---from val \ ---keyring-backend test \ ---chain-id $CHAINID \ ---home $NODE_HOME \ ---node tcp://localhost:26657 \ ---yes -echo "Done \n" - -sleep 6 -echo "Casting vote... \n" - -$BINARY tx gov vote 1 yes \ ---from val \ ---keyring-backend test \ ---chain-id $CHAINID \ ---home $NODE_HOME \ ---fees 400uatom \ ---node tcp://localhost:26657 \ ---yes - -echo "Done \n" - -else -echo "Please build gaia v11 and move to ./build/gaiad11" -fi diff --git a/contrib/scripts/upgrade_test_scripts/v8/run-gaia-v7.sh b/contrib/scripts/upgrade_test_scripts/v8/run-gaia-v7.sh deleted file mode 100755 index b91ee0ad00a..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v8/run-gaia-v7.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" -CHAINID=cosmoshub-4 - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" - -if ! test -f "./build/gaiad7"; then - echo "gaiad v7 does not exist" - exit -fi - - -rm -rf ./build/.gaia - -mkdir -p "$NODE_HOME"/cosmovisor/genesis/bin -cp ./build/gaiad7 "$NODE_HOME"/cosmovisor/genesis/bin/gaiad -$BINARY init upgrader --chain-id $CHAINID --home "$NODE_HOME" - - -if ! test -f "./build/gaiad8"; then - echo "gaiad v8 does not exist" - exit -fi - -mkdir -p "$NODE_HOME"/cosmovisor/upgrades/v8-Rho/bin -cp ./build/gaiad8 "$NODE_HOME"/cosmovisor/upgrades/v8-Rho/bin/gaiad - -GOPATH=$(go env GOPATH) - -export DAEMON_NAME=gaiad -export DAEMON_HOME=$NODE_HOME -COSMOVISOR=$GOPATH/bin/cosmovisor - - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -tmp=$(mktemp) - -# add bank part of genesis -jq --argjson foo "$(jq -c '.' contrib/denom.json)" '.app_state.bank.denom_metadata = $foo' $NODE_HOME/config/genesis.json > "$tmp" && mv "$tmp" $NODE_HOME/config/genesis.json - -# replace default stake token with uatom -sed -i -e 's/stake/uatom/g' $NODE_HOME/config/genesis.json -# min deposition amount (this one isn't working) -sed -i -e 's%"amount": "10000000",%"amount": "1",%g' $NODE_HOME/config/genesis.json -# min voting power that a proposal requires in order to be a valid proposal -sed -i -e 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# the minimum proportion of "yes" votes requires for the proposal to pass -sed -i -e 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# voting period to 30s -sed -i -e 's%"voting_period": "172800s"%"voting_period": "30s"%g' $NODE_HOME/config/genesis.json - -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -$BINARY add-genesis-account val 10000000000000000000000000uatom --home $NODE_HOME --keyring-backend test -$BINARY gentx val 1000000000uatom --home $NODE_HOME --chain-id $CHAINID -$BINARY collect-gentxs --home $NODE_HOME - -sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' $NODE_HOME/config/app.toml - -perl -i~ -0777 -pe 's/# Enable defines if the API server should be enabled. -enable = false/# Enable defines if the API server should be enabled. -enable = true/g' $NODE_HOME/config/app.toml - -$COSMOVISOR start --home $NODE_HOME --x-crisis-skip-assert-invariants - diff --git a/contrib/scripts/upgrade_test_scripts/v8/run-upgrade-commands-v8-rho.sh b/contrib/scripts/upgrade_test_scripts/v8/run-upgrade-commands-v8-rho.sh deleted file mode 100755 index a0419c6c41e..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v8/run-upgrade-commands-v8-rho.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -UPGRADE_HEIGHT=$1 - -if [ -z "$1" ]; then - echo "Need to add an upgrade height" - exit 1 -fi - -# NODE_HOME=./build/.gaia -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" - -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" -CHAINID=cosmoshub-4 - -if test -f "$BINARY"; then - - echo "wait 10 seconds for blockchain to start" - sleep 10 - - $BINARY config chain-id $CHAINID --home $NODE_HOME - $BINARY config output json --home $NODE_HOME - $BINARY config keyring-backend test --home $NODE_HOME - $BINARY config --home $NODE_HOME - - - key=$($BINARY keys show val --home $NODE_HOME) - if [ key == "" ]; then - echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test - fi - - # $BINARY keys list --home $NODE_HOME - - echo "\n" - echo "Submitting proposal... \n" - $BINARY tx gov submit-proposal software-upgrade v8-Rho \ - --title v8-Rho \ - --deposit 10000000uatom \ - --upgrade-height $UPGRADE_HEIGHT \ - --upgrade-info "upgrade to v8-Rho" \ - --description "upgrade to v8-Rho" \ - --gas auto \ - --fees 400uatom \ - --from val \ - --keyring-backend test \ - --chain-id $CHAINID \ - --home $NODE_HOME \ - --node tcp://localhost:26657 \ - --yes - echo "Done \n" - - sleep 6 - echo "Casting vote... \n" - - $BINARY tx gov vote 1 yes \ - --from val \ - --keyring-backend test \ - --chain-id $CHAINID \ - --home $NODE_HOME \ - --gas auto \ - --fees 400uatom \ - --node tcp://localhost:26657 \ - --yes - - echo "Done \n" - -else - echo "Please build gaia v7 and move to ./build/gaiad7" -fi \ No newline at end of file diff --git a/contrib/scripts/upgrade_test_scripts/v9/run-gaia-v8.sh b/contrib/scripts/upgrade_test_scripts/v9/run-gaia-v8.sh deleted file mode 100755 index 83c0cab1c55..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v9/run-gaia-v8.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" -CHAINID=cosmoshub-4 - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" - -if ! test -f "./build/gaiad8"; then - echo "gaiad v8 does not exist" - exit -fi - - -rm -rf ./build/.gaia - -mkdir -p "$NODE_HOME"/cosmovisor/genesis/bin -cp ./build/gaiad8 "$NODE_HOME"/cosmovisor/genesis/bin/gaiad -$BINARY init upgrader --chain-id $CHAINID --home "$NODE_HOME" - - -if ! test -f "./build/gaiad9"; then - echo "gaiad v9 does not exist" - exit -fi - -mkdir -p "$NODE_HOME"/cosmovisor/upgrades/v9-lambda/bin -cp ./build/gaiad9 "$NODE_HOME"/cosmovisor/upgrades/v9-lambda/bin/gaiad - -GOPATH=$(go env GOPATH) - -export DAEMON_NAME=gaiad -export DAEMON_HOME=$NODE_HOME -COSMOVISOR=$GOPATH/bin/cosmovisor - - -$BINARY config chain-id $CHAINID --home $NODE_HOME -$BINARY config keyring-backend test --home $NODE_HOME -tmp=$(mktemp) - -# add bank part of genesis -jq --argjson foo "$(jq -c '.' contrib/denom.json)" '.app_state.bank.denom_metadata = $foo' $NODE_HOME/config/genesis.json > "$tmp" && mv "$tmp" $NODE_HOME/config/genesis.json - -# replace default stake token with uatom -sed -i -e 's/stake/uatom/g' $NODE_HOME/config/genesis.json -# min deposition amount (this one isn't working) -sed -i -e 's%"amount": "10000000",%"amount": "1",%g' $NODE_HOME/config/genesis.json -# min voting power that a proposal requires in order to be a valid proposal -sed -i -e 's%"quorum": "0.334000000000000000",%"quorum": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# the minimum proportion of "yes" votes requires for the proposal to pass -sed -i -e 's%"threshold": "0.500000000000000000",%"threshold": "0.000000000000000001",%g' $NODE_HOME/config/genesis.json -# voting period to 30s -sed -i -e 's%"voting_period": "172800s"%"voting_period": "30s"%g' $NODE_HOME/config/genesis.json - -echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test -$BINARY add-genesis-account val 10000000000000000000000000uatom --home $NODE_HOME --keyring-backend test -$BINARY gentx val 1000000000uatom --home $NODE_HOME --chain-id $CHAINID -$BINARY collect-gentxs --home $NODE_HOME - -sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' $NODE_HOME/config/app.toml - -perl -i~ -0777 -pe 's/# Enable defines if the API server should be enabled. -enable = false/# Enable defines if the API server should be enabled. -enable = true/g' $NODE_HOME/config/app.toml - -$COSMOVISOR run start --home $NODE_HOME --x-crisis-skip-assert-invariants - diff --git a/contrib/scripts/upgrade_test_scripts/v9/run-upgrade-commands.sh b/contrib/scripts/upgrade_test_scripts/v9/run-upgrade-commands.sh deleted file mode 100755 index fa8b5922cab..00000000000 --- a/contrib/scripts/upgrade_test_scripts/v9/run-upgrade-commands.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -set -o errexit -o nounset - -UPGRADE_HEIGHT=$1 - -if [ -z "$1" ]; then - echo "Need to add an upgrade height" - exit 1 -fi - -# NODE_HOME=./build/.gaia -NODE_HOME=$(realpath ./build/.gaia) -echo "NODE_HOME = ${NODE_HOME}" - -BINARY=$NODE_HOME/cosmovisor/genesis/bin/gaiad -echo "BINARY = ${BINARY}" - -USER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art" -CHAINID=cosmoshub-4 - -if test -f "$BINARY"; then - - echo "wait 10 seconds for blockchain to start" - sleep 10 - - $BINARY config chain-id $CHAINID --home $NODE_HOME - $BINARY config output json --home $NODE_HOME - $BINARY config keyring-backend test --home $NODE_HOME - $BINARY config --home $NODE_HOME - - - key=$($BINARY keys show val --home $NODE_HOME) - if [ -z "$key" ]; then - echo $USER_MNEMONIC | $BINARY --home $NODE_HOME keys add val --recover --keyring-backend=test - fi - - - echo "\n" - echo "Submitting proposal... \n" - $BINARY tx gov submit-proposal software-upgrade v9-Lambda \ - --title v9-Lambda \ - --deposit 10000000uatom \ - --upgrade-height $UPGRADE_HEIGHT \ - --upgrade-info "upgrade to v9-Lambda" \ - --description "upgrade to v9-Lambda" \ - --gas auto \ - --fees 400uatom \ - --from val \ - --keyring-backend test \ - --chain-id $CHAINID \ - --home $NODE_HOME \ - --node tcp://localhost:26657 \ - --yes - echo "Done \n" - - sleep 6 - echo "Casting vote... \n" - - $BINARY tx gov vote 1 yes \ - --from val \ - --keyring-backend test \ - --chain-id $CHAINID \ - --home $NODE_HOME \ - --gas auto \ - --fees 400uatom \ - --node tcp://localhost:26657 \ - --yes - - echo "Done \n" - -else - echo "Please build gaia v8 and move to ./build/gaiad8" -fi