Skip to content

Commit

Permalink
fix single-node script (#3169)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke authored Jun 25, 2024
1 parent dbc93a9 commit 318cea8
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions contrib/single-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@ CHAINID="test-gaia"
USER_COINS="100000000000stake"
STAKE="100000000stake"
MONIKER="gaia-test-node"
GAIAD="gaiad"


echo "Using home dir: $HOME_DIR"
gaiad init --chain-id $CHAINID $MONIKER --home "$HOME_DIR/.gaia"
rm -rf $HOME_DIR/.gaia
$GAIAD init --chain-id $CHAINID $MONIKER --home "$HOME_DIR/.gaia"

echo "Setting up genesis file"
jq ".app_state.gov.params.voting_period = \"20s\" | .app_state.gov.params.expedited_voting_period = \"10s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \
"${HOME_DIR}/gaia/config/genesis.json" > \
"${HOME_DIR}/edited_genesis.json" && mv "${HOME_DIR}/edited_genesis.json" "${HOME_DIR}/config/genesis.json"
"${HOME_DIR}/.gaia/config/genesis.json" > \
"${HOME_DIR}/edited_genesis.json" && mv "${HOME_DIR}/edited_genesis.json" "${HOME_DIR}/.gaia/config/genesis.json"


gaiad keys add validator --keyring-backend="test"
gaiad genesis add-genesis-account $(gaiad keys show validator -a --keyring-backend="test") $USER_COINS
gaiad genesis gentx validator $STAKE --keyring-backend="test" --chain-id $CHAINID
gaiad genesis collect-gentxs
$GAIAD keys add validator --keyring-backend="test"
$GAIAD genesis add-genesis-account $("${GAIAD}" keys show validator -a --keyring-backend="test") $USER_COINS
$GAIAD genesis gentx validator $STAKE --keyring-backend="test" --chain-id $CHAINID
$GAIAD genesis collect-gentxs

# Set proper defaults and change ports
echo "Setting up node configs"
Expand All @@ -33,4 +34,4 @@ sed -i -r 's/index_all_keys = false/index_all_keys = true/g' ~/.gaia/config/conf
sed -i -r 's/minimum-gas-prices = ""/minimum-gas-prices = "0stake"/g' ~/.gaia/config/app.toml

# Start the gaia
gaiad start --api.enable=true
$GAIAD start --api.enable=true

0 comments on commit 318cea8

Please sign in to comment.