Update README instructions for running validator nodes

This commit is contained in:
Shreerang Kale 2025-06-10 11:31:58 +05:30
parent f27b1eb619
commit 6e9a82d6d2
4 changed files with 85 additions and 53 deletions

View File

@ -1,5 +1,13 @@
# laconicd-stack
- Follow [run-first-validator.md](docs/run-first-validator.md) to run the first validator node
- Follow [cosmos-multisig-app playbook](./playbooks/cosmos-multisig-app/README.md) to run the Cosmos Multisig app
- Follow [run-validator.md](docs/run-validator.md) to run subsequent validator nodes
- This stack is used for running nodes to launch Laconic mainnet chain
- It allows you to export SAPO testnet state and start mainnet nodes
- To launch Laconic mainnet, follow these steps:
- **Run the First Validator Node:** Begin by setting up and running the initial validator node as detailed in [run-first-validator.md](docs/run-first-validator.md)
- **Deploy Cosmos Multisig App:** Integrate and run the Cosmos Multisig app using the playbook available at [cosmos-multisig-app playbook](./playbooks/cosmos-multisig-app/README.md)
- **Run Subsequent Validator Nodes:** Run subsequent validator nodes by following the instructions in [run-validator.md](docs/run-validator.md)

View File

@ -2,14 +2,37 @@
## Prerequisites
- [ansible](playbooks/README.md#ansible-installation)
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
- LPS distribution Google spreadsheet URL or CSV file path
- Install `zstd` using `sudo apt install zstd`
- laconicd-stack
- Machine 1: Where the SAPO testnet is running
- Install `zstd` using `sudo apt install zstd`
- Machine 2: Where the genesis file is to be generated
- Install `zstd` using `sudo apt install zstd`
- LPS distribution Google spreadsheet URL or CSV file path
- Machine 3: Where the first validator node is to be setup
- Following tools are required in all machines:
- [ansible](playbooks/README.md#ansible-installation)
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
- laconicd-stack
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
```
## Build laconicd to generate genesis file
- Run the following steps in a secure machine separate from the one where the node is to be setup
- Run playbook to build laconicd container:
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/build-laconicd.yml
```
## Setup node
@ -58,16 +81,6 @@
NOTE: This public key is required in next step to generate the genesis file
## Build Laconicd to generate genesis file
- Run the following steps in the machine where genesis file is to be generated
- Run playbook to build laconicd container:
```bash
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/build-laconicd.yml
```
## Export testnet state
- Run the following steps in machine where the testnet node is running
@ -96,7 +109,7 @@
## Generate mainnet genesis file
- Run the following steps in secure machine separate from the one where the node is setup
- Run the following steps in machine where [the genesis file is to be generated](#build-laconicd-to-generate-genesis-file)
- Copy over compressed `testnet-state.zst` file to target machine
@ -140,8 +153,10 @@
- Edit `~/cerc/laconicd-stack/playbooks/first-validator/first-validator-vars.yml` with required values:
NOTE: Use the public key exported in [previous step](#setup-node)
```bash
# Use the public key exported in previous step (make sure to wrap it with single quotes [''])
# Make sure to wrap it with single quotes ('')
validator_pub_key: '<public-key-of-your-node>'
```

View File

@ -2,17 +2,33 @@
## Prerequisites
- [ansible](playbooks/README.md#ansible-installation)
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
- laconicd-stack
- Machine 1: Where the SAPO testnet is running
- Machine 2: Where the validator node is to be setup
- Fetch laconicd-stack:
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
```
## Setup Node
- Machine 3: Where the create-validator transaction is to be signed
- Run the following steps in the machine where the validator node is to be setup
- Fetch laconicd-stack:
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
```
- Following tools are required in all machines:
- [ansible](playbooks/README.md#ansible-installation)
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
## Stop SAPO testnet node
- Run the following steps in machine where the testnet node is running
- Get your private key from testnet deployment:
@ -20,7 +36,7 @@
laconic-so deployment --dir <testnet-deployment-dir> exec laconicd "laconicd keys export <key-name> --unarmored-hex --unsafe"
```
NOTE: Store this key securely as it is needed in later steps
NOTE: Store this key securely as it is needed in [later steps](#create-validator)
- Stop the node for SAPO testnet:
@ -28,7 +44,19 @@
laconic-so deployment --dir <testnet-deployment-dir> stop
```
This command clones the entire repository into the `~/cerc` folder, which includes the genesis file published by the first validator.
## Build laconicd to create validator
- Run the following steps in a secure machine separate from the one where the node is to be setup
- Run playbook to build laconicd container:
```bash
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/build-laconicd.yml
```
## Setup Node
- Run the following steps in the machine where the validator node is to be setup
- Copy the example variables file:
@ -136,16 +164,6 @@
echo "TMKMS_ENABLED=true" >> $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/config.env
```
## Build Laconicd to create validator
- Run the following steps in the machine from where the create-validator transaction is to be signed
- Run playbook to build laconicd container:
```bash
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/build-laconicd.yml
```
## Start Node
- Start the laconicd node:
@ -170,7 +188,7 @@
## Create Validator
- Run these steps in a secure machine separate from the one where the node is setup
- Run these steps in a machine from where [the create-validator transaction is to be signed](#build-laconicd-to-create-validator)
This command clones the entire repository into the `~/cerc` folder, which includes the genesis file published by the first validator.
@ -182,11 +200,13 @@
- Update `~/cerc/laconicd-stack/playbooks/validator/validator-vars.yml` with required values:
NOTE: Use the public key exported in [previous step](#start-node)
```bash
# Same moniker as set above
cerc_moniker: "<your-moniker>"
# Use the public key exported in previous step (make sure to wrap it with single quotes [''])
# Make sure to wrap it with single quotes ('')
validator_pub_key: '<public-key-of-your-node>'
# Set the public IP address of the machine where your node is running
@ -206,7 +226,7 @@
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/create-validator.yml
```
- Input private key of the existing account that was exported in previous steps when prompted
- Input private key of the existing account that was exported in [previous steps](#stop-sapo-testnet-node) when prompted
- Run the following commands in the machine where the validator node is setup

View File

@ -16,16 +16,10 @@
Please export both DATA_DIRECTORY before running the playbook.
when: lookup('env', 'DATA_DIRECTORY') == ''
- name: Copy exported testnet state file
ansible.builtin.copy:
src: "{{ exported_state_path }}"
dest: "~/cerc/laconicd-stack/testnet-state.json"
remote_src: true # Set to true if exported_state_path is on the target host
- 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 }} {{ ansible_env.HOME }}/cerc/laconicd-stack/scripts/generate-mainnet-genesis.sh {{ ansible_env.HOME }}/cerc/laconicd-stack/testnet-state.json {{ lps_distribution_path }}"
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 {{ exported_state_path }} {{ lps_distribution_path }}"
chdir: "{{ lookup('env', 'PWD') }}"
always:
- name: Clean up temporary genesis directory
@ -33,11 +27,6 @@
path: "{{ ansible_env.HOME }}/cerc/laconicd-stack/playbooks/first-validator/mainnet-genesis"
state: absent
- name: Remove temporary copied state file
ansible.builtin.file:
path: "~/cerc/laconicd-stack/testnet-state.json"
state: absent
- name: Display genesis file location
ansible.builtin.debug:
msg: "Mainnet genesis file generated at output/genesis.json"