Skip to content

Commit

Permalink
Remove other init scripts and improve init script comments
Browse files Browse the repository at this point in the history
  • Loading branch information
udpatil committed Apr 24, 2023
1 parent c4d111b commit a4ab40e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 137 deletions.
42 changes: 0 additions & 42 deletions scripts/initialize_local.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,33 +1,22 @@


#!/bin/bash
# require success for commands
set -e

# set key name
keyname=admin
#docker stop jaeger
#docker rm jaeger
#docker run -d --name jaeger \
# -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
# -p 5775:5775/udp \
# -p 6831:6831/udp \
# -p 6832:6832/udp \
# -p 5778:5778 \
# -p 16686:16686 \
# -p 14250:14250 \
# -p 14268:14268 \
# -p 14269:14269 \
# -p 9411:9411 \
# jaegertracing/all-in-one:1.33

# clean up old sei directory
rm -rf ~/.sei
echo "Building..."
#install seid
make install
#echo $password | sudo -S rm -r ~/.sei/
#echo $password | sudo -S rm -r ~/test_accounts/
# initialize chain with chain ID and add the first key
~/go/bin/seid init demo --chain-id sei-chain
~/go/bin/seid keys add $keyname --keyring-backend test
#yes | ~/go/bin/seid keys add faucet
# add the key as a genesis account with massive balances of several different tokens
~/go/bin/seid add-genesis-account $(~/go/bin/seid keys show $keyname -a --keyring-backend test) 100000000000000000000usei,100000000000000000000uusdc,100000000000000000000uatom
# gentx for account
~/go/bin/seid gentx $keyname 70000000000000000000usei --chain-id sei-chain --keyring-backend test
# update config to run as a validator, add validator information to genesis file
sed -i '' 's/mode = "full"/mode = "validator"/g' $HOME/.sei/config/config.toml
sed -i '' 's/indexer = \["null"\]/indexer = \["kv"\]/g' $HOME/.sei/config/config.toml
KEY=$(jq '.pub_key' ~/.sei/config/priv_validator_key.json -c)
Expand All @@ -37,13 +26,15 @@ jq '.validators[0] += {"pub_key":'$KEY'}' ~/.sei/config/tmp_genesis_2.json > ~/.
mv ~/.sei/config/tmp_genesis_3.json ~/.sei/config/genesis.json && rm ~/.sei/config/tmp_genesis.json && rm ~/.sei/config/tmp_genesis_2.json

echo "Creating Accounts"
python3 loadtest/scripts/populate_genesis_accounts.py 50 loc
# create 10 test accounts + fund them
python3 loadtest/scripts/populate_genesis_accounts.py 10 loc

~/go/bin/seid collect-gentxs
# update some params in genesis file for easier use of the chain localls (make gov props faster)
cat ~/.sei/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["max_deposit_period"]="300s"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="5s"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq '.app_state["gov"]["voting_params"]["voting_period"]="30s"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq --arg release_date "$(date +"%Y-%m-%d")" '.app_state["mint"]["params"]["token_release_schedule"]=[{"date": $release_date, "token_release_amount": "999999999999"}]' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq '.app_state["gov"]["voting_params"]["expedited_voting_period"]="4s"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq '.app_state["gov"]["voting_params"]["expedited_voting_period"]="10s"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq '.app_state["oracle"]["params"]["vote_period"]="1"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json
cat ~/.sei/config/genesis.json | jq '.app_state["distribution"]["params"]["community_tax"]="0.000000000000000000"' > ~/.sei/config/tmp_genesis.json && mv ~/.sei/config/tmp_genesis.json ~/.sei/config/genesis.json

Expand Down
72 changes: 0 additions & 72 deletions scripts/initialize_local_test_node.sh

This file was deleted.

0 comments on commit a4ab40e

Please sign in to comment.