forked from cerc-io/laconicd-deprecated
Enable metrics on init.sh script (#1574)
This commit is contained in:
@@ -38,8 +38,20 @@ ethermintd init $MONIKER --chain-id $CHAINID
|
||||
# Set gas limit in genesis
|
||||
cat $HOME/.ethermintd/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME/.ethermintd/config/tmp_genesis.json && mv $HOME/.ethermintd/config/tmp_genesis.json $HOME/.ethermintd/config/genesis.json
|
||||
|
||||
# Reduce the block time to 1s
|
||||
sed -i -e '/^timeout_commit =/ s/= .*/= "850ms"/' $HOME/.ethermintd/config/config.toml
|
||||
# modified default configs
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i '' 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.ethermintd/config/config.toml
|
||||
sed -i '' 's/prometheus-retention-time = 0/prometheus-retention-time = 1000000000000/g' $HOME/.ethermintd/config/app.toml
|
||||
sed -i '' 's/enabled = false/enabled = true/g' $HOME/.ethermintd/config/app.toml
|
||||
sed -i '' 's/prometheus = false/prometheus = true/' $HOME/.ethermintd/config/config.toml
|
||||
sed -i '' 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $HOME/.ethermintd/config/config.toml
|
||||
else
|
||||
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.ethermintd/config/config.toml
|
||||
sed -i 's/prometheus-retention-time = "0"/prometheus-retention-time = "1000000000000"/g' $HOME/.ethermintd/config/app.toml
|
||||
sed -i 's/enabled = false/enabled = true/g' $HOME/.ethermintd/config/app.toml
|
||||
sed -i 's/prometheus = false/prometheus = true/' $HOME/.ethermintd/config/config.toml
|
||||
sed -i 's/timeout_commit = "5s"/timeout_commit = "1s"/g' $HOME/.ethermintd/config/config.toml
|
||||
fi
|
||||
|
||||
# Allocate genesis accounts (cosmos formatted addresses)
|
||||
ethermintd add-genesis-account "$(ethermintd keys show $VAL_KEY -a --keyring-backend test)" 1000000000000000000000aphoton,1000000000000000000stake --keyring-backend test
|
||||
@@ -58,4 +70,4 @@ ethermintd collect-gentxs
|
||||
ethermintd validate-genesis
|
||||
|
||||
# Start the node (remove the --pruning=nothing flag if historical queries are not needed)
|
||||
ethermintd start --pruning=nothing --rpc.unsafe --keyring-backend test --log_level info --json-rpc.api eth,txpool,personal,net,debug,web3 --api.enable
|
||||
ethermintd start --metrics --pruning=nothing --rpc.unsafe --keyring-backend test --log_level info --json-rpc.api eth,txpool,personal,net,debug,web3 --api.enable
|
||||
|
||||
Reference in New Issue
Block a user