Update docs to setup TMKMS optionally for subsequent validator nodes (#25)
Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e - Use laconicd mainnet release `v1.0.0` in stack Reviewed-on: #25 Co-authored-by: Nabarun <nabarun@deepstacksoft.com> Co-committed-by: Nabarun <nabarun@deepstacksoft.com>
This commit is contained in:
parent
f8ae70dd02
commit
3cf8d7a9da
@ -194,7 +194,7 @@
|
||||
|
||||
### Start TMKMS
|
||||
|
||||
- Run these steps in the machine where [the TMKMS service is setup (machine 1)](#setup-tmkms)
|
||||
- Run these steps in the machine where [the TMKMS service is setup (machine 1)](#setup-tmkms-deployment)
|
||||
|
||||
- Copy the example variables file:
|
||||
|
||||
@ -204,7 +204,7 @@
|
||||
|
||||
- Update `~/cerc/laconicd-stack/playbooks/tmkms/tmkms-vars.yml` with required values:
|
||||
|
||||
NOTE: Use the `priv_validator_key.json` file copied from the node setup machine (Machine 2) in [previous step](#setup-node)
|
||||
NOTE: Use the `priv_validator_key.json` file copied from the node setup machine (Machine 2) in [previous step](#setup-bootstrap-node-deployment)
|
||||
|
||||
```yaml
|
||||
# Absolute path to the node's private validator key file
|
||||
@ -244,7 +244,7 @@
|
||||
|
||||
### Start laconicd node
|
||||
|
||||
- Run the following steps in the machine where [the mainnet node is setup (machine 2)](#setup-node)
|
||||
- Run the following steps in the machine where [the mainnet node is setup (machine 2)](#setup-bootstrap-node-deployment)
|
||||
|
||||
- Remove the validator key from node deployment as it is no longer required:
|
||||
|
||||
|
@ -2,13 +2,15 @@
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install) is required in all machines listed below
|
||||
|
||||
- To fetch laconicd-stack:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
|
||||
```
|
||||
|
||||
- Machine 1: Where the SAPO testnet node is already running
|
||||
- Machine 1: Where your SAPO testnet node is already running
|
||||
|
||||
- Machine 2: Where the mainnet validator node is to be setup
|
||||
|
||||
@ -24,19 +26,16 @@
|
||||
|
||||
- [ansible](playbooks/README.md#ansible-installation)
|
||||
|
||||
- Staking amount file in [config](./config) folder
|
||||
|
||||
- Machine 4: Where the TMKMS service is to be setup
|
||||
- Machine 4: Where the TMKMS service is to be setup (Optional)
|
||||
|
||||
- laconicd-stack
|
||||
|
||||
- [ansible](playbooks/README.md#ansible-installation)
|
||||
|
||||
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install) is required in all machines
|
||||
|
||||
## Stop SAPO testnet node
|
||||
|
||||
- Run the following steps in machine where the testnet node is already running (machine 1)
|
||||
- Run the following steps in machine where your SAPO testnet validator node is already running (machine 1)
|
||||
|
||||
- Get your private key from testnet deployment:
|
||||
|
||||
@ -44,7 +43,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](#create-validator)
|
||||
NOTE: Store this key securely as it is needed in [later steps](#create-validator). It should be the private key of the account that was used to create validator in SAPO testnet.
|
||||
|
||||
- Stop the node for SAPO testnet:
|
||||
|
||||
@ -62,9 +61,26 @@
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/build-laconicd.yml
|
||||
```
|
||||
|
||||
## Setup Node
|
||||
## Setup TMKMS (Optional)
|
||||
|
||||
- Run the following steps in the machine where the validator node is to be setup (machine 2)
|
||||
- For integrating TMKMS with laconicd, follow steps below in the machine where the TMKMS service is to be setup (machine 4)
|
||||
|
||||
- Export the data directory as environment variable:
|
||||
|
||||
```bash
|
||||
# Parent directory where the deployment directory will live
|
||||
export DATA_DIRECTORY=
|
||||
```
|
||||
|
||||
- Run ansible playbook to setup the TMKMS service:
|
||||
|
||||
```bash
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/tmkms/setup-tmkms.yml
|
||||
```
|
||||
|
||||
## Setup laconicd Node
|
||||
|
||||
- Run the following steps in the machine where the validator node is to be setup for mainnet (machine 2)
|
||||
|
||||
- Copy the example variables file:
|
||||
|
||||
@ -82,8 +98,9 @@
|
||||
# You can find the list of available peers in https://git.vdb.to/cerc-io/laconicd-stack/src/branch/main/node-addresses.yml
|
||||
cerc_peers: "<node-id>@<node-host>:26656,<node-id>@<node-host>:26656"
|
||||
|
||||
# Enable TMKMS
|
||||
tmkms_enabled: true
|
||||
# Enable TMKMS (Set to true or false)
|
||||
# NOTE: Enabling TMKMS is optional and can be set to `true` if you are following the optional steps to setup TMKMS
|
||||
tmkms_enabled:
|
||||
```
|
||||
|
||||
- Export the data directory and mainnet deployment directory as environment variables:
|
||||
@ -102,36 +119,25 @@
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/setup-validator.yml
|
||||
```
|
||||
|
||||
- Copy over the `priv_validator_key.json` located at `$DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json` to the machine where the TMKMS service is to be setup (machine 4)
|
||||
|
||||
- To get path to the deployment
|
||||
|
||||
```bash
|
||||
# Example command to transfer file from machine 2 to machine 4 (run on machine 2)
|
||||
scp -C $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json <user>@<machine-ip-address>:<absolute-path-to-desired-destination-directory>
|
||||
echo $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR
|
||||
```
|
||||
|
||||
## Setup TMKMS
|
||||
## Start Deployments
|
||||
|
||||
- For integrating TMKMS with laconicd, follow steps below in the machine where the TMKMS service is to be setup (machine 4)
|
||||
|
||||
- Export the data directory as environment variable:
|
||||
|
||||
```bash
|
||||
# Parent directory where the deployment directory will live
|
||||
export DATA_DIRECTORY=
|
||||
```
|
||||
|
||||
- Run ansible playbook to setup the TMKMS service:
|
||||
|
||||
```bash
|
||||
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/tmkms/setup-tmkms.yml
|
||||
```
|
||||
|
||||
## Run Node
|
||||
|
||||
### Start TMKMS
|
||||
### Start TMKMS (Optional)
|
||||
|
||||
- Run the following steps in the machine where [the TMKMS service is setup (Machine 4)](#setup-tmkms)
|
||||
|
||||
- Copy over the `priv_validator_key.json` from the machine where [mainnet laconicd node was setup](#setup-laconicd-node) (machine 2) to a suitable place in the TMKMS machine (path to file needs to be specified in playbook vars in next step)
|
||||
|
||||
```bash
|
||||
# Example command to transfer file from machine 2 (run on machine 2)
|
||||
scp -C <user>@<machine-2-ip-address>:<path_to_laconicd_deployment_dir>/data/laconicd-data/config/priv_validator_key.json <absolute-path-to-desired-destination-directory>
|
||||
```
|
||||
|
||||
- Copy the example variables file:
|
||||
|
||||
```bash
|
||||
@ -140,10 +146,9 @@
|
||||
|
||||
- Update `~/cerc/laconicd-stack/playbooks/tmkms/tmkms-vars.yml` with required values:
|
||||
|
||||
NOTE: Use the `priv_validator_key.json` file copied from the node setup machine (Machine 2) in [previous step](#setup-node)
|
||||
|
||||
```yaml
|
||||
# Absolute path to the node's private validator key file
|
||||
# Use the priv_validator_key.json file copied from the node setup machine (Machine 2) in previous step
|
||||
priv_validator_key_file_path: "<absolute/path/to/priv_validator_key.json>"
|
||||
|
||||
# Set the IP address of the machine where the laconicd node is setup
|
||||
@ -178,9 +183,9 @@
|
||||
|
||||
- Note the pubkey logged at start for comparing later with validator pubkey on chain
|
||||
|
||||
### Start Node
|
||||
### Start laconicd Node
|
||||
|
||||
- Run the following steps in the machine where [the validator node is setup (machine 2)](#setup-node)
|
||||
- Run the following steps in the machine where [the laconicd node is setup (machine 2)](#setup-node)
|
||||
|
||||
- Start the laconicd node:
|
||||
|
||||
@ -216,7 +221,7 @@
|
||||
|
||||
- Update `~/cerc/laconicd-stack/playbooks/validator/validator-vars.yml` with required values:
|
||||
|
||||
NOTE: Use the public key exported in [previous step](#start-node)
|
||||
NOTE: Use the public key exported in [previous step](#start-laconicd-node)
|
||||
|
||||
```bash
|
||||
# Set the public IP address of the machine where your node is running
|
||||
@ -226,7 +231,7 @@
|
||||
# Make sure to wrap it with single quotes ('')
|
||||
validator_pub_key: '<public-key-of-your-node>'
|
||||
|
||||
# Same moniker as set above
|
||||
# Same moniker as set during setup of laconicd node
|
||||
cerc_moniker: "<your-moniker>"
|
||||
```
|
||||
|
||||
@ -252,7 +257,7 @@
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR exec laconicd 'laconicd query staking validators'
|
||||
```
|
||||
|
||||
- Remove the validator key from node deployment as TMKMS is configured:
|
||||
- (Optional) If TMKMS is configured and running, remove the validator key from node deployment:
|
||||
|
||||
NOTE: Store it safely offline in case of an emergency
|
||||
|
||||
@ -260,6 +265,20 @@
|
||||
rm -rf $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/data/laconicd-data/config/priv_validator_key.json
|
||||
```
|
||||
|
||||
## Register Your Node
|
||||
|
||||
- Run the following steps in the machine where the mainnet node is setup (machine 2)
|
||||
|
||||
- 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 [node-addresses.yml](../node-addresses.yml) file
|
||||
|
||||
- Submit a PR to add your node address to the [laconicd-stack repository](https://git.vdb.to/cerc-io/laconicd-stack)
|
||||
|
||||
## Update config
|
||||
|
||||
- Run following steps to update the config for TMKMS and node
|
||||
@ -347,17 +366,3 @@
|
||||
```bash
|
||||
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR start
|
||||
```
|
||||
|
||||
## Register Your Node
|
||||
|
||||
- Run the following steps in the machine where the mainnet node is setup (machine 2)
|
||||
|
||||
- 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 [node-addresses.yml](../node-addresses.yml) file
|
||||
|
||||
- Submit a PR to add your node address to the repository
|
||||
|
@ -2,7 +2,7 @@ version: "1.0"
|
||||
name: mainnet-laconicd
|
||||
description: "Laconicd full node"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/laconicd@mainnet # TODO: Use a release
|
||||
- git.vdb.to/cerc-io/laconicd@v1.0.0
|
||||
containers:
|
||||
- cerc/laconicd
|
||||
pods:
|
||||
|
Loading…
Reference in New Issue
Block a user