Add steps for multisig app usage

This commit is contained in:
Shreerang Kale
2025-06-14 13:38:14 +05:30
parent 4b2821839f
commit cb1853f140
10 changed files with 246 additions and 43 deletions
+66 -8
View File
@@ -91,6 +91,11 @@
- 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)
```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>
```
## Setup TMKMS
- For integrating TMKMS with laconicd, follow steps below in the machine where the TMKMS service is to be setup (machine 4)
@@ -134,20 +139,25 @@
- The compressed zst file will be generated at `<absolute-path-to-testnet-deployment>/export/testnet-state.zst`
- Copy over the compressed `testnet-state.zst` file to the machine where the genesis file is to be generated (machine 3)
```bash
# Example command to transfer file from machine 1 to machine 3 (run on machine 1)
scp -C <absolute-path-to-testnet-deployment>/export/testnet-state.zst <user>@<machine-ip-address>:<absolute-path-to-desired-destination-directory>
```
## Generate mainnet genesis file
- Run the following steps in machine where [the genesis file is to be generated (machine 3)](#build-laconicd-to-generate-genesis-file)
- Copy over compressed `testnet-state.zst` file in previous steps from machine 1 to machine 3
- Set envs:
```bash
# Path where exported testnet state JSON file will be created
export EXPORTED_STATE_PATH=<absolute-path-to-be-exported-testnet-state-json>
# File path where exported testnet state JSON file will be created
export EXPORTED_STATE_PATH=<absolute/path/to/testnet-state.json>
# Path where LPS distribution JSON file will be created
export LPS_DISTRIBUTION_PATH=<absolute-path-to-be-generated-distribution-json>
# File path where LPS distribution JSON file will be created
export LPS_DISTRIBUTION_PATH=<absolute/path/to/distribution.json>
export EARLY_SUPPORTS_ACC_ADDR=<account-address-controlled-by-laconic-foundation>
@@ -328,7 +338,7 @@
```
- Query the early supports account balance:
```bash
# Set the early supports account address
export EARLY_SUPPORTS_ACC_ADDR=<account-address-controlled-by-laconic-foundation>
@@ -371,6 +381,54 @@
- Update `$DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/config.env` with required values
- Start the node deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR start
```
## Rebuild Images
- Follow these steps to rebuild the images for TMKMS and node in case of any code changes
### TMKMS
- Run these steps in the machine where the TMKMS service is setup (machine 4)
- Stop the TMKMS deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/tmkms-deployment stop
```
- Run ansible playbook to rebuild the TMKMS image:
```bash
BUILD_ONLY=true ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/tmkms/setup-tmkms.yml
```
- Start the TMKMS deployment:
```bash
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/tmkms/run-tmkms.yml
```
### Node
- Run these steps in the machine where the mainnet node is setup (machine 2)
- Stop the node deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR stop
```
- Run ansible playbook to rebuild the node image:
```bash
BUILD_ONLY=true ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/first-validator/setup-first-validator.yml
```
- Start the node deployment:
```bash
@@ -413,6 +471,6 @@
The following files should show up:
- node-addresses.yml
- config/mainnet-genesis.json
- config/staking-amount.json
- config/staking-amount.json
- Submit a PR with the genesis file, staking amount file and node address so that it is available to other validators
+54 -1
View File
@@ -102,7 +102,12 @@
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 from where the TMKMS service is to be setup (machine 4)
- 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)
```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>
```
## Setup TMKMS
@@ -288,6 +293,54 @@
- Update `$DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR/config.env` with required values
- Start the node deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR start
```
## Rebuild Images
- Follow these steps to rebuild the images for TMKMS and node in case of any code changes
### TMKMS
- Run these steps in the machine where the TMKMS service is setup (machine 4)
- Stop the TMKMS deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/tmkms-deployment stop
```
- Run ansible playbook to rebuild the TMKMS image:
```bash
BUILD_ONLY=true ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/tmkms/setup-tmkms.yml
```
- Start the TMKMS deployment:
```bash
ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/tmkms/run-tmkms.yml
```
### Node
- Run these steps in the machine where the mainnet node is setup (machine 2)
- Stop the node deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR stop
```
- Run ansible playbook to rebuild the node image:
```bash
BUILD_ONLY=true ansible-playbook -i localhost, -c local ~/cerc/laconicd-stack/playbooks/validator/setup-validator.yml
```
- Start the node deployment:
```bash