-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CURR_HEIGHT=$(bandd query block | jq -r '.block.header.height') | ||
|
||
UPGRADE_HEIGHT=$(($CURR_HEIGHT+60)) | ||
|
||
TX_HASH=$(bandd tx gov submit-proposal software-upgrade $1 \ | ||
--title upgrade --upgrade-info upgrade \ | ||
--description upgrade \ | ||
--upgrade-height $UPGRADE_HEIGHT --deposit 1000000000uband \ | ||
--from requester --chain-id bandchain \ | ||
-y --keyring-backend test --gas-prices 0.0025uband -b sync --output json| jq '.txhash'| tr -d '"') | ||
|
||
sleep 3 | ||
|
||
PROPOSAL_ID=$(bandd query tx $TX_HASH --output=json | jq -r '.raw_log | fromjson | .[] | .events[] | select(.type=="submit_proposal") | .attributes[] | select(.key=="proposal_id") | .value') | ||
|
||
bandd tx gov vote $PROPOSAL_ID VOTE_OPTION_YES --from validator --keyring-backend test --gas-prices 0.0025uband -y -b sync --chain-id bandchain |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
git checkout v2.4.1 | ||
make install | ||
|
||
./scripts/generate_genesis.sh | ||
./scripts/test_script/setup_voting_period.sh 60s | ||
|
||
./scripts/test_script/setup_chains.sh /Users/ongart/Development/band/chain v2.4.1 v2.5.4 v2_5 | ||
|
||
./scripts/test_script/start_cosmovisor.sh | ||
|
||
# then run the open_vote_proposal_25.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
git checkout v2.5.4 | ||
make install | ||
|
||
./scripts/generate_genesis.sh | ||
./scripts/test_script/setup_voting_period.sh 60s | ||
|
||
sed -i -e \ | ||
"s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025uband\"/" \ | ||
~/.band/config/app.toml | ||
|
||
sed -i -e \ | ||
'/\[api\]/,+10 s/enable = .*/enable = true/' \ | ||
~/.band/config/app.toml | ||
|
||
sed -i -e \ | ||
'/\[mempool\]/,+10 s/version = .*/version = \"v1\"/' \ | ||
~/.band/config/config.toml | ||
|
||
./scripts/test_script/setup_chains.sh /Users/ongart/Development/band/chain v2.5.4 cosmos-sdk-v0.47 v2_6 | ||
|
||
./scripts/test_script/start_cosmovisor.sh | ||
|
||
# then run the open_vote_proposal_25.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# make new version binary | ||
cd $1 | ||
git checkout $3 | ||
make install | ||
|
||
# setup cosmovisor for upgrade version | ||
mkdir -p $HOME/.band/cosmovisor/upgrades/$4/bin | ||
cp $HOME/go/bin/bandd $HOME/.band/cosmovisor/upgrades/$4/bin | ||
|
||
# make old version binary | ||
git checkout $2 | ||
make install | ||
|
||
# setup cosmovisor for genesis version | ||
mkdir -p $HOME/.band/cosmovisor/genesis/bin | ||
mkdir -p $HOME/.band/cosmovisor/upgrades | ||
cp $HOME/go/bin/bandd $HOME/.band/cosmovisor/genesis/bin | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
new_voting_period=$1 | ||
genesis_file="$HOME/.band/config/genesis.json" | ||
|
||
# update voting period for testing | ||
voting_period_value=$(jq -r '.app_state.gov.params.voting_period' $genesis_file) | ||
if [ "$voting_period_value" != "null" ]; then | ||
cat <<< $(jq --arg new_voting_period "$new_voting_period" '.app_state.gov.params.voting_period = $new_voting_period' $genesis_file) > $genesis_file | ||
fi | ||
|
||
voting_period_value=$(jq -r '.app_state.gov.voting_params.voting_period' $genesis_file) | ||
if [ "$voting_period_value" != "null" ]; then | ||
cat <<< $(jq --arg new_voting_period "$new_voting_period" '.app_state.gov.voting_params.voting_period = $new_voting_period' $genesis_file) > $genesis_file | ||
fi | ||
|
||
voting_period_value=$(jq -r '.app_state.council.params.voting_period' $genesis_file) | ||
if [ "$voting_period_value" != "null" ]; then | ||
cat <<< $(jq --arg new_voting_period "$new_voting_period" '.app_state.council.params.voting_period = $new_voting_period' $genesis_file) > $genesis_file | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
echo "export DAEMON_NAME=bandd" >> ~/.profile | ||
echo "export DAEMON_HOME=$HOME/.band" >> ~/.profile | ||
source ~/.profile | ||
|
||
cosmovisor run start |