Skip to content

Commit

Permalink
fix: ensure init.sh adds validator to genesis.json
Browse files Browse the repository at this point in the history
  • Loading branch information
tzdybal committed Sep 13, 2024
1 parent f0fa8a9 commit 2274a2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ artela-rollkitd add-genesis-account $KEY4 100000000000000000000000000aart --keyr
echo gentx $KEY 1000000000000000000000aart --keyring-backend $KEYRING --chain-id $CHAINID
artela-rollkitd gentx $KEY 1000000000000000000000aart --keyring-backend $KEYRING --chain-id $CHAINID --fees 4000000000000000aart

ADDRESS=$(jq -r '.address' ~/.artroll/config/priv_validator_key.json)
PUB_KEY=$(jq -r '.pub_key' ~/.artroll/config/priv_validator_key.json)
jq --argjson pubKey "$PUB_KEY" '.consensus["validators"]=[{"address": "'$ADDRESS'", "pub_key": $pubKey, "power": "1000000000000000", "name": "Rollkit Sequencer"}]' ~/.artroll/config/genesis.json > temp.json && mv temp.json ~/.artroll/config/genesis.json

# Collect genesis tx
artela-rollkitd collect-gentxs

Expand Down Expand Up @@ -145,4 +149,4 @@ if [[ $1 == "pending" ]]; then
sed -i 's/timeout_commit = "5s"/timeout_commit = "150s"/g' $HOME/.artroll/config/config.toml
sed -i 's/timeout_broadcast_tx_commit = "10s"/timeout_broadcast_tx_commit = "150s"/g' $HOME/.artroll/config/config.toml
fi
fi
fi

0 comments on commit 2274a2d

Please sign in to comment.