Update playbook to generate genesis output in CWD
This commit is contained in:
parent
a8f6a8f73f
commit
c9eb1099fc
@ -22,7 +22,8 @@
|
||||
- block:
|
||||
- name: Run script to generate genesis file
|
||||
ansible.builtin.shell:
|
||||
cmd: "CHAIN_ID={{ cerc_chain_id }} EARLY_SUPPORTS_ACC_ADDRESS={{ early_supports_acc_address }} ~/cerc/laconicd-stack/scripts/generate-mainnet-genesis.sh ~/cerc/laconicd-stack/testnet-state.json"
|
||||
cmd: "CHAIN_ID={{ cerc_chain_id }} EARLY_SUPPORTS_ACC_ADDRESS={{ early_supports_acc_address }} {{ ansible_env.HOME }}/cerc/laconicd-stack/scripts/generate-mainnet-genesis.sh {{ ansible_env.HOME }}/cerc/laconicd-stack/testnet-state.json"
|
||||
chdir: "{{ lookup('env', 'PWD') }}"
|
||||
always:
|
||||
- name: Clean up temporary genesis directory
|
||||
ansible.builtin.file:
|
||||
|
@ -38,11 +38,13 @@
|
||||
- Run playbook to use exported state for generating mainnet genesis
|
||||
|
||||
```bash
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/generate-genesis.yml -e "exported_state_path=$EXPORTED_STATE_PATH" -e "early_supports_acc_address=$EARLY_SUPPORTS_ACC_ADDR" --ask-become-pass
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/generate-genesis.yml -e "exported_state_path=$EXPORTED_STATE_PATH" -e "early_supports_acc_address=$EARLY_SUPPORTS_ACC_ADDR"
|
||||
```
|
||||
|
||||
## Run node
|
||||
|
||||
<!-- TODO: Add steps to get private key of validator account from laconic testnet -->
|
||||
|
||||
- Update [run-first-validator-vars.yml](playbooks/first-validator/run-first-validator-vars.yml) with required values:
|
||||
|
||||
```bash
|
||||
|
@ -38,7 +38,7 @@ docker run \
|
||||
|
||||
# Install required bech32 dependency
|
||||
# TODO: Avoid installing bech32 system-wide
|
||||
python -m pip install bech32 --break-system-packages
|
||||
python3 -m pip install bech32 --break-system-packages
|
||||
|
||||
# Carry over state from testnet to mainnet
|
||||
echo "Carrying over state from testnet state to mainnet genesis..."
|
||||
|
@ -53,6 +53,7 @@ if [ -z "$account_address" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# TODO: Use staking amount from output/staking-amount.json
|
||||
# Get balance of account
|
||||
stake_amount=$(jq -r --arg address "$account_address" --arg denom "$DENOM" '.app_state.bank.balances[] | select(.address == $address) | .coins[] | select(.denom == $denom) | .amount' $genesis_file_path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user