Skip to content

Commit

Permalink
Merge pull request #1 from tzdybal/tzdybal/fix_init
Browse files Browse the repository at this point in the history
fix: ensure init.sh adds validator to genesis.json
  • Loading branch information
dumbeng authored Sep 13, 2024
2 parents f0fa8a9 + 2274a2d commit d52a134
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 d52a134

Please sign in to comment.