Update compose file for using crate validor script

This commit is contained in:
Shreerang Kale 2025-05-15 19:55:14 +05:30
parent 1331fb5fd2
commit b844e66718
7 changed files with 15 additions and 6 deletions

View File

@ -93,6 +93,7 @@
- Run ansible playbook to create validator on running chain:
<!-- TODO: Use OS keyring -->
```bash
ansible-playbook -i localhost, -c local playbooks/validator/create-validator.yml
```

View File

@ -65,7 +65,14 @@
## Run node
<!-- TODO: Add steps to get private key of validator account from laconic testnet -->
- Get your private key from testnet deployment:
```bash
# Replace <testnet-deployment-dir> with the absolute path to the testnet deployment directory and <key-name> with the name of your key
docker run -it \
-v <testnet-deployment-dir>/data/laconicd-data:/root/.laconicd \
cerc/laconicd:local bash -c "laconicd keys export <key-name> --unarmored-hex --unsafe"
```
- Copy the example variables file if not already done:

View File

@ -101,6 +101,7 @@
- Run ansible playbook to create validator on running chain:
<!-- TODO: Use OS keyring -->
```bash
ansible-playbook -i localhost, -c local playbooks/validator/create-validator.yml
```

View File

@ -23,8 +23,8 @@
- name: Import private key in laconicd
shell: |
laconic-so deployment --dir {{ data_directory }}/{{ deployment_dir }} exec laconicd "laconicd keys import-hex {{ key_name }} {{ pvt_key }}"
laconic-so deployment --dir {{ data_directory }}/{{ deployment_dir }} exec laconicd "laconicd keys import-hex {{ key_name }} {{ pvt_key }} --keyring-backend test"
- name: Run create-validator script
shell: |
laconic-so deployment --dir {{ data_directory }}/{{ deployment_dir }} exec laconicd "export KEY_NAME={{ key_name }} /scripts/create-validator.sh"
laconic-so deployment --dir {{ data_directory }}/{{ deployment_dir }} exec laconicd "export KEY_NAME={{ key_name }} ~/cerc/laconicd-stack/scripts/create-validator.sh"

View File

@ -12,7 +12,7 @@ if [ ! -f "$staking_amount_file" ]; then
fi
# Set staking amount
stake_amount=$(jq -r '.amount' "$staking_amount_file")
stake_amount=$(jq -r '.common_staking_amount' "$staking_amount_file")
# Create validator with fixed parameters
laconicd tx staking create-validator \

View File

@ -12,7 +12,7 @@ services:
volumes:
- laconicd-data:/root/.laconicd
- ../config/mainnet-laconicd/run-laconicd.sh:/opt/run-laconicd.sh
- ../config/mainnet-laconicd/create-validator.sh:/scripts/create-validator.sh
- ../../scripts/create-validator.sh:/scripts/create-validator.sh
ports:
- "6060"
- "26657"

View File

@ -61,7 +61,7 @@ if [ -z "$account_address" ]; then
fi
# Set staking amount
stake_amount=$(jq -r '.amount' "$staking_amount_file")
stake_amount=$(jq -r '.common_staking_amount' "$staking_amount_file")
# Create gentx with staked amount equal to allocated balance
laconicd genesis gentx $KEY_NAME $stake_amount$DENOM --chain-id $CHAIN_ID --keyring-backend $KEYRING