Add instructions to run subsequent validator nodes
This commit is contained in:
parent
2fe2623c62
commit
f194d93645
2
.gitignore
vendored
2
.gitignore
vendored
@ -2,4 +2,4 @@
|
||||
*-spec.yml
|
||||
|
||||
# Playbook vars
|
||||
playbooks/first-validator/first-validator-vars.yml
|
||||
*-vars.yml
|
||||
|
@ -1,3 +1,4 @@
|
||||
# laconicd-stack
|
||||
|
||||
- Follow [run-first-validator.md](run-first-validator.md) to run the first validator node
|
||||
- Follow [run-validator.md](run-validator.md) to run subsequent validator nodes
|
||||
|
@ -6,7 +6,7 @@
|
||||
vars:
|
||||
data_directory: "{{ lookup('env', 'DATA_DIRECTORY') }}"
|
||||
mainnet_deployment_dir: "{{ lookup('env', 'MAINNET_DEPLOYMENT_DIR') }}"
|
||||
spec_file: "{{data_directory}}/laconicd-spec.yml"
|
||||
spec_file: "{{data_directory}}/laconicd-validator-spec.yml"
|
||||
spec_template: "./templates/specs/spec-template.yml.j2"
|
||||
tasks:
|
||||
- name: Fail if DATA_DIRECTORY or MAINNET_DEPLOYMENT_DIR env vars are not set
|
||||
|
6
playbooks/validator/validator-vars.example.yml
Normal file
6
playbooks/validator/validator-vars.example.yml
Normal file
@ -0,0 +1,6 @@
|
||||
cerc_moniker: "LaconicMainnetNode"
|
||||
cerc_chain_id: "laconic-mainnet"
|
||||
min_gas_price: 0.001
|
||||
cerc_loglevel: "info"
|
||||
genesis_file: "~/cerc/laconicd-stack/genesis/mainnet-genesis.json"
|
||||
cerc_peers: ""
|
@ -1,6 +0,0 @@
|
||||
cerc_moniker: "MainnetNode"
|
||||
cerc_chain_id: "laconic-mainnet"
|
||||
min_gas_price: 0.001
|
||||
cerc_loglevel: "info"
|
||||
genesis_file: ""
|
||||
cerc_peers: ""
|
@ -89,7 +89,7 @@
|
||||
- Run ansible playbook to submit the gentx and run the node:
|
||||
|
||||
```bash
|
||||
ansible-playbook -i localhost, -c local playbooks/first-validator/run-first-validator.yml
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/run-first-validator.yml
|
||||
```
|
||||
|
||||
- Check logs to ensure that node is running:
|
||||
|
80
run-validator.md
Normal file
80
run-validator.md
Normal file
@ -0,0 +1,80 @@
|
||||
# Run Validator Node
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [ansible](playbooks/README.md#ansible-installation)
|
||||
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
|
||||
|
||||
## Run node
|
||||
|
||||
- Fetch the stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
This command clones the entire repository into the `~/cerc` folder, which includes the genesis file published by the first validator.
|
||||
|
||||
- Copy the example variables file:
|
||||
|
||||
```bash
|
||||
cp ~/cerc/laconicd-stack/playbooks/validator/validator-vars.example.yml ~/cerc/laconicd-stack/playbooks/validator/validator-vars.yml
|
||||
```
|
||||
|
||||
- Update `~/cerc/laconicd-stack/playbooks/validator/validator-vars.yml` with required values:
|
||||
|
||||
```bash
|
||||
# Path to the genesis file published by the first validator
|
||||
genesis_file: "~/cerc/laconicd-stack/genesis/mainnet-genesis.json"
|
||||
|
||||
# Set custom moniker for the node
|
||||
cerc_moniker: "LaconicMainnetNode"
|
||||
|
||||
# Set chain ID (should match the one in the genesis file)
|
||||
cerc_chain_id: "laconic-mainnet"
|
||||
|
||||
# Set minimum gas price
|
||||
min_gas_price: 0.001
|
||||
|
||||
# Set log level
|
||||
cerc_loglevel: "info"
|
||||
|
||||
# Set persistent peers (comma-separated list of node IDs and addresses)
|
||||
# You can find the list of available peers in node-addresses.yml
|
||||
cerc_peers: "<node-id>@<node-host>:26656,<node-id>@<node-host>:26656"
|
||||
```
|
||||
|
||||
- Export the data directory and mainnet deployment directory as environment variables:
|
||||
|
||||
```bash
|
||||
# Parent directory where the deployment directory will live
|
||||
export DATA_DIRECTORY=
|
||||
|
||||
# Set mainnet deployment directory
|
||||
# for eg: mainnet-laconicd-deployment
|
||||
export MAINNET_DEPLOYMENT_DIR=
|
||||
```
|
||||
|
||||
- Run ansible playbook to set up and start your validator node:
|
||||
|
||||
```bash
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/run-validator.yml
|
||||
```
|
||||
|
||||
- Check logs to ensure that node is running:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR logs laconicd -f
|
||||
```
|
||||
|
||||
## Register Your Node
|
||||
|
||||
- Get your node's address:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'echo $(laconicd cometbft show-node-id)@YOUR_PUBLIC_IP_ADDRESS:26656'
|
||||
```
|
||||
|
||||
- Add your node's address to the `~/cerc/laconicd-stack/node-addresses.yml` file
|
||||
|
||||
- Submit a PR to add your node address to the repository
|
Loading…
Reference in New Issue
Block a user