Add instructions for multisig app usage #21

Merged
nabarun merged 11 commits from ng-improve-instructions into main 2025-06-14 13:39:01 +00:00
14 changed files with 412 additions and 118 deletions

View File

@ -19,3 +19,41 @@
- **Run A Validator Node:** Follow steps in [run-validator.md](docs/run-validator.md) to run a mainnet validator node
- **Update Service Provider:** Follow steps in [update-service-provider.md](docs/update-service-provider.md) to migrate your service provider from SAPO testnet to mainnet
## Multisig App
- Usage guide is available at [multisig-usage.md](./playbooks/cosmos-multisig-app/multisig-usage.md)
## Configure Wallet for Mainnet
- To use <https://deploy.laconic.com>, you need to add `laconic-mainnet` network in your wallet
- Go to <https://wallet.laconic.com>
- If the wallet has not been initialized, click on `Create Wallet` and create a new wallet
- Click on `Add Network` and filling in required details:
```bash
# Set network type
Network Type: COSMOS
# Chain ID of the network
Chain ID: laconic-mainnet
# Name of the network
Network Name: Laconic Mainnet
# RPC endpoint of the mainnet node
New RPC URL: https://laconicd-mainnet.laconic.com
# Coin type
Coin Type: 118
# Address prefix
Address Prefix: laconic
# Native denom and gas price
Native denom: alnt
Gas Price: 0.001alnt
```

View File

@ -19,6 +19,11 @@
"coinDenom": "ALNT",
"coinMinimalDenom": "alnt",
"coinDecimals": 0
},
{
"coinDenom": "ALPS",
"coinMinimalDenom": "alps",
"coinDecimals": 0
}
],
"feeCurrencies": [
@ -39,7 +44,6 @@
"coinDecimals": 0
},
"features": [
"stargate",
"ibc-transfer"
"stargate"
]
}

View File

@ -15,4 +15,7 @@ Open port for TMKMS:
# Console app deployment already exists, point new domain to following port
https://console-mainnet.laconic.com -> 4001
# Cosmos Multisig App
https://multisig.laconic.com -> 7000
```

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)
@ -112,10 +117,16 @@
- Run the following steps in machine where the testnet node is already running (machine 1)
- Export the testnet deployment directory as environment variable:
```bash
export TESTNET_DEPLOYMENT_DIR=<absolute/path/to/testnet/deployment>
```
- Get your private key from testnet deployment:
```bash
laconic-so deployment --dir <testnet-deployment-dir> exec laconicd "laconicd keys export <key-name> --unarmored-hex --unsafe --keyring-backend test"
laconic-so deployment --dir $TESTNET_DEPLOYMENT_DIR exec laconicd "laconicd keys export <key-name> --unarmored-hex --unsafe --keyring-backend test"
```
NOTE: Store this key securely as it is needed in later steps
@ -123,31 +134,29 @@
- Stop the node for SAPO testnet:
```bash
laconic-so deployment --dir <testnet-deployment-dir> stop
laconic-so deployment --dir $TESTNET_DEPLOYMENT_DIR stop
```
- Run script to export state from testnet chain:
```bash
~/cerc/laconicd-stack/scripts/export-testnet-state.sh <absolute-path-to-testnet-deployment>
~/cerc/laconicd-stack/scripts/export-testnet-state.sh $TESTNET_DEPLOYMENT_DIR
```
- The compressed zst file will be generated at `<absolute-path-to-testnet-deployment>/export/testnet-state.zst`
- The compressed zst file will be generated at `$TESTNET_DEPLOYMENT_DIR/export/testnet-state.zst`
## 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 to target machine
- 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>
@ -155,13 +164,20 @@
export DATA_DIRECTORY=
```
- Copy over the compressed `testnet-state.zst` file:
```bash
# Example command to transfer file from machine 1 to machine 3
scp -C <user>@<machine-ip-address>:<absolute-path-to-testnet-deployment>/export/testnet-state.zst <absolute-path-to-compressed-file>
```
- Extract the testnet-state JSON file:
```bash
zstd -dc <path-to-compressed-file>/testnet-state.zst > $EXPORTED_STATE_PATH
zstd -dc <absolute-path-to-compressed-file>/testnet-state.zst > $EXPORTED_STATE_PATH
# Remove zst folder
rm -rf <path-to-compressed-file>/testnet-state.zst
rm -rf <absolute-path-to-compressed-file>/testnet-state.zst
```
- Generate LPS lockup distribution JSON file
@ -291,6 +307,8 @@
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR logs laconicd -f
```
NOTE: The node takes a long time to start generating blocks `~30 seconds`
- Verify that validator and TMKMS pubkeys match:
- Get validator pubkey on chain
@ -328,7 +346,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 +389,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 +479,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

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
@ -189,7 +194,7 @@
laconic-so deployment --dir $DATA_DIRECTORY/$MAINNET_DEPLOYMENT_DIR logs laconicd -f
```
NOTE: The node takes a long time to start syncing blocks `~40 seconds`.
NOTE: The node takes a long time to start syncing blocks `~30 seconds`
- Get the public key of your node:
@ -215,6 +220,7 @@
```bash
# Set the public IP address of the machine where your node is running
# NOTE: An https URL can also be used
node_url: "tcp://NODE_PUBLIC_IP_ADDRESS:26657"
# Make sure to wrap it with single quotes ('')
@ -288,6 +294,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

View File

@ -39,9 +39,6 @@ Instructions to reset / update the deployments
```bash
# URL for the deploy app so that wallet can work with it
CERC_ALLOWED_URLS=https://deploy.laconic.com,https://store.laconic.com
# RPC URL for the mainnet node
CERC_LACONICD_RPC_URL="https://laconicd-mainnet.laconic.com"
```
* Restart the deployment:
@ -57,46 +54,39 @@ Instructions to reset / update the deployments
* The web wallet can now be viewed at <https://wallet.laconic.com>
* Add `laconic-mainnet` network by clicking on `Add Network` and filling in required details
## laconic-console
* Deployment dir: `/srv/console/laconic-console-deployment`
* Deployment dir: `/srv/console/laconic-console-testnet2-deployment`
* If code has changed, fetch and build with updated source code:
* Set deployment directory in a variable:
```bash
# testnet-onboarding-app source
cd ~/cerc/laconic-console
# Pull latest changes
git pull
# Checkout to the latest tag (https://git.vdb.to/cerc-io/laconic-console/tags)
git checkout <tag>
# Rebuild the containers
cd /srv/console
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers --force-rebuild
CONSOLE_DEPLOYMENT=/srv/console/laconic-console-testnet2-deployment
```
* Update the configuration, if required in `laconic-console-deployment/config.env`:
* Update the configuration:
```bash
nano $CONSOLE_DEPLOYMENT/config.env
```
```bash
# Laconicd (hosted) GQL endpoint
LACONIC_HOSTED_ENDPOINT=https://laconicd-mainnet.laconic.com/graphql
LACONIC_HOSTED_ENDPOINT=https://laconicd-mainnet.laconic.com
# laconicd chain id
CERC_LACONICD_CHAIN_ID=laconic-mainnet
```
* Restart the deployment:
```bash
laconic-so deployment --dir laconic-console-deployment stop
laconic-so deployment --dir $CONSOLE_DEPLOYMENT stop
laconic-so deployment --dir laconic-console-deployment start
laconic-so deployment --dir $CONSOLE_DEPLOYMENT start
# Follow logs for console container
laconic-so deployment --dir laconic-console-deployment logs console -f
laconic-so deployment --dir $CONSOLE_DEPLOYMENT logs console -f
```
* The laconic console can now be viewed at <https://console-mainnet.laconic.com>
@ -126,6 +116,21 @@ Instructions to reset / update the deployments
CERC_LACONICD_CHAIN_ID=laconic-mainnet
```
* Update the code for shopify app in [theme/sections/main-product.liquid](https://git.vdb.to/cerc-io/shopify/pulls/13/files#diff-971bd0e0a616c3feaecf3205ac98a23296a5a0d7) to use the correct chain ID
```bash
...
<script>
// Function to send a message to the iframe to get or create wallet account
function requestWalletAddress(iframe) {
const message = {
type: 'REQUEST_CREATE_OR_GET_ACCOUNTS',
# Replace `laconic-testnet-2` with `laconic-mainnet`
chainId: 'laconic-testnet-2',
};
...
```
* Restart the deployment:
```bash
@ -138,50 +143,27 @@ Instructions to reset / update the deployments
## Webapp Deployer
* Fetch latest stack repos:
* Deployment dir: `/srv/service-provider/webapp-deployer` and `/srv/service-provider/webapp-ui`
* Set deployment directory in a variable:
```bash
# In directory where webapp-deployer deployment was created
laconic-so --stack webapp-deployer-backend setup-repositories --pull
# Confirm latest commit hash in the ~/cerc/webapp-deployment-status-api repo
SP_DEPLOYMENT=/srv/service-provider/webapp-deployer
SP_UI_DEPLOYMENT=/srv/service-provider/webapp-ui
```
* Rebuild container images if there are any changes:
* Stop the deployments:
```bash
laconic-so --stack webapp-deployer-backend build-containers --force-rebuild
laconic-so deployment --dir $SP_DEPLOYMENT stop
laconic-so deployment --dir $SP_UI_DEPLOYMENT stop
```
* Push stack images to the container registry:
* Update the laconic registry config with new endpoints:
* Login to the container registry:
```bash
# Set required variables
CONTAINER_REGISTRY_URL=container-registry.apps.vaasl.io
# For credentials: "cat /srv/service-provider/webapp-deployer/config.env | grep IMAGE_REGISTRY"
CONTAINER_REGISTRY_USERNAME=
CONTAINER_REGISTRY_PASSWORD=
# login to container registry
docker login $CONTAINER_REGISTRY_URL --username $CONTAINER_REGISTRY_USERNAME --password $CONTAINER_REGISTRY_PASSWORD
# WARNING! Using --password via the CLI is insecure. Use --password-stdin.
# WARNING! Your password will be stored unencrypted in /home/dev2/.docker/config.json.
# Configure a credential helper to remove this warning. See
# https://docs.docker.com/engine/reference/commandline/login/#credential-stores
# Login Succeeded
```
* Push images:
```bash
laconic-so deployment --dir webapp-deployer push-images
```
* Update deployer laconic registry config (`webapp-deployer/data/config/laconic.yml`) with new endpoints:
```bash
nano $SP_DEPLOYMENT/data/config/laconic.yml
```
```bash
services:
@ -201,7 +183,7 @@ Instructions to reset / update the deployments
* Start the webapp deployer:
```bash
laconic-so deployment --dir webapp-deployer start
laconic-so deployment --dir $SP_DEPLOYMENT start
```
* Get the webapp-deployer pod id:
@ -242,7 +224,11 @@ Instructions to reset / update the deployments
kubectl logs -f $POD_ID -c cerc-webapp-auction-handler
```
* Update deployer UI config (`webapp-ui/config.env`):
* Update deployer UI config:
```bash
nano $SP_UI_DEPLOYMENT/config.env
```
```bash
# URL of the laconic console
@ -252,19 +238,25 @@ Instructions to reset / update the deployments
* Start the webapp UI:
```bash
laconic-so deployment --dir webapp-ui start
laconic-so deployment --dir $SP_UI_DEPLOYMENT start
```
* Check logs
```bash
laconic-so deployment --dir webapp-ui logs webapp
laconic-so deployment --dir $SP_UI_DEPLOYMENT logs webapp
```
## Deploy Backend
* Deployment dir: `/srv/deploy-backend/laconic-backend-deployment`
* Stop the deployment:
```bash
laconic-so deployment --dir laconic-backend-deployment stop
```
* If code has changed, fetch and build with updated source code:
```bash
@ -312,11 +304,15 @@ Instructions to reset / update the deployments
* Restart the deployment:
```bash
laconic-so deployment --dir laconic-backend-deployment stop
laconic-so deployment --dir laconic-backend-deployment start
```
* Check logs:
```bash
laconic-so deployment --dir laconic-backend-deployment logs snowballtools-base-backend
```
## Deploy Frontend
* Source repo: <https://git.vdb.to/cerc-io/snowballtools-base>
@ -377,6 +373,12 @@ Instructions to reset / update the deployments
Note: The `userKey` account should own the authority `laconic-deploy`
* Update the `deploy-frontend.sh` script to use mainnet chain id:
```bash
sed -i 's/laconic-testnet-2/laconic-mainnet/g' ./deploy-frontend.sh
```
### Run
* Run frontend deployment script:
@ -388,3 +390,5 @@ Instructions to reset / update the deployments
Follow deployment logs on the deployer UI
* On a successful deployment, the frontend can be viewed at <https://deploy.laconic.com>
* **NOTE**: Update the CI and deployment scripts in deployer app once mainnet is launched ([PR](https://git.vdb.to/cerc-io/snowballtools-base/pulls/58))

View File

@ -153,7 +153,7 @@ A Laconic mainnet node (see [run-validator.md](./run-validator.md))
kubectl logs -f $POD_ID -c cerc-webapp-auction-handler
```
* Update deployer UI config (`webapp-ui/config.env`):
* Update deployer UI config (`webapp-ui/config.env`) if required:
```bash
# URL of the webapp deployer backend API
@ -161,7 +161,7 @@ A Laconic mainnet node (see [run-validator.md](./run-validator.md))
LACONIC_HOSTED_CONFIG_app_api_url=
# URL of the laconic console
# eg: https://console-mainnet.laconic.com
# eg: https://console-mainnet.laconic.com/console?...
LACONIC_HOSTED_CONFIG_app_console_link=
```

View File

@ -8,88 +8,134 @@ This playbook sets up the Cosmos Multisig application for managing multisig wall
- [ansible](../README.md#ansible-installation)
- If running playbook to setup deployment on remote machine, the following need to be installed in remote:
- [laconic-so](https://github.com/cerc-io/stack-orchestrator/?tab=readme-ov-file#install)
- [yq](https://github.com/mikefarah/yq?tab=readme-ov-file#wget)
- Check [domain port mappings](./domain-port-mappings.md) to ensure that required domain is pointing to correct port
## Configuration
* Fetch the stack:
- Fetch the stack:
```bash
laconic-so fetch-stack git.vdb.to/cerc-io/laconicd-stack --git-ssh --pull
```
* Copy the example variables file:
- Copy the example variables file:
```bash
cp ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.example.yml ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml
```
* Update `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml` with your node configuration:
- Update `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml` with your node configuration:
```yaml
# TODO: Update with example domains mapped to ports
next_public_node_addresses: '["https://laconicd-mainnet.laconic.com"]'
node_rest_endpoint: "https://api.laconicd-mainnet.laconic.com"
```
## Setup Steps
* Set common environment variables:
```bash
# Parent directory where the deployment directory will live
export DATA_DIRECTORY=<path/to/deployments/directory>
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
```
- Set common environment variables:
```bash
# Parent directory where the deployment directory will live
export DATA_DIRECTORY=<absolute/path/to/deployments/directory>
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
```
- Copy the inventory file:
```bash
cp ~/cerc/laconicd-stack/playbooks/hosts.ini.example ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini
```
### Local Setup
* Setup and start the multisig app:
- Setup and start the multisig app:
```bash
ansible-playbook -v -i hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit local
ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit local
```
* Access the app at <http://localhost:7000/laconic>
- Access the app at <https://multisig.laconic.com/laconic-mainnet>
### Remote Setup
* Create and configure hosts.ini:
* Copy the example file:
```bash
cp ~/cerc/laconicd-stack/playbooks/hosts.ini.example ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini
```
* Edit `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini` and update the remote host details:
- Create and configure hosts.ini:
- Edit `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini` and update the remote host details:
```ini
[remote]
# Replace with your actual remote host details
remote_host ansible_host=your.remote.host ansible_user=your_remote_user ansible_ssh_common_args='-o ForwardAgent=yes'
```
* Verify SSH connection using Ansible ping:
- Verify SSH connection using Ansible ping:
```bash
ansible all -m ping -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini --limit remote_host
```
* Run the playbook targeting the remote host:
- Run the playbook targeting the remote host:
```bash
ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit remote_host
```
* Access the app at <http://your.remote.host:7000/laconic>
- Access the app at <https://multisig.laconic.com/laconic-mainnet>
## Check Status
* Check app logs:
- Check app logs:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR logs -f cosmos-multisig-ui
```
## Update
- Set environment variables for the deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR logs -f cosmos-multisig-ui
# Parent directory where the deployment directory will live
export DATA_DIRECTORY=<absolute/path/to/deployments/directory>
export MULTISIG_DEPLOYMENT_DIR=cosmos-multisig-deployment
```
- Stop the deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR stop
```
- Update `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-vars.yml` with required values
- Run ansible playbook to deploy again:
- For local host
```bash
ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit local
```
- For remote host (check that remote is configured properly in `~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini`)
```bash
ansible-playbook -v -i ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/hosts.ini ~/cerc/laconicd-stack/playbooks/cosmos-multisig-app/cosmos-multisig-app-start.yml --limit remote_host
```
## Clean up
- To stop the deployment:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR stop
```
- To stop and delete all data:
```bash
laconic-so deployment --dir $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR stop --delete-volumes
sudo rm -rf $DATA_DIRECTORY/$MULTISIG_DEPLOYMENT_DIR
```
```

View File

@ -29,7 +29,7 @@ next_public_display_denom: "ALNT"
next_public_display_denom_exponent: 0
# JSON array of asset definitions, including denom units, base, name, display, and symbol
next_public_assets: '[{"denom_units":[{"denom":"alnt","exponent":0}],"base":"alnt","name":"Laconic Token","display":"ALNT","symbol":"alnt"}]'
next_public_assets: '[{"denom_units":[{"denom":"alnt","exponent":0}],"base":"alnt","name":"Laconic Token","display":"ALNT","symbol":"alnt"},{"denom_units":[{"denom":"alps","exponent":0}],"base":"alps","name":"Laconic Prepaid Service","display":"ALPS","symbol":"alps"}]'
# Default gas price for transactions
next_public_gas_price: "0.001alnt"

View File

@ -0,0 +1,61 @@
# Multisig Usage
## Create a Multisig
- On opening the app, a prompt will be shown to add Laconic Mainnet network to you Keplr wallet. Click on `Approve`
- Go to home and click on `I don't have a multisig`
- Add the addresses of accounts which have performed at least one tx on chain
- Set the threshold as required (if threshold is set to N out of N members then all the validators have to sign the tx)
- Click on `Submit` and `Create multisig`
## Import Accounts in Keplr
- Add the accounts in Keplr wallet for signing the transaction
- Open Keplr wallet and click on the user icon in the top right corner
- Click on `Add wallet`, then select `Import an existing wallet` and go to `Use recovery phrase or private key`
- Select the `Private key` tab and then paste the private key of the account and click on import
- Set a name for the wallet (used when connecting wallet to app for signing transaction) and click on next
- Search for `Laconic Mainnet` and select it, then click on `Save`
- Other accounts can be added in a similar manner
- Send funds to the generated multisig address using Keplr
- Open Keplr wallet and select the account from which you wish to transfer the funds to the multisig address
- Search for `Laconic Mainnet`, choose the token you wish to send and select the network
- Select `Send` and paste the multisig address and set desired amount
- Click on `Next` and approve the transaction
## Send Transaction From Multisig Address
- In the multisig app, Go to `home`, paste your multisig address and click on `Use this multisig`
- You will see the multisig members and holdings for the address
- Click on `Create new transaction` and then click on `Bank Send` under `Add New Msg`
- Enter the recipient address, amount to be transfered and memo (optional)
- You can either select `alnt` or `alps` as denom
- Click on create transaction
- Under Choose wallet to sign, click on `Connect Keplr`
- After connecting the wallet, click on `Sign transaction` and approve the transaction
- Repeat the above steps for other members of the multisig to sign the transaction
- Once the transaction is signed by required number of validators (as set in the threshold), click on `Broadcast Transaction`

View File

@ -9,6 +9,7 @@
spec_file: "{{data_directory}}/laconicd-spec.yml"
spec_template: "./templates/specs/spec-template.yml.j2"
build_args: "{{ '--force-rebuild' if (lookup('env', 'FORCE_REBUILD') | default(omit, true)) not in [ 'false', 'False', '0' ] else '' }}"
BUILD_ONLY: "{{ lookup('env', 'BUILD_ONLY') | default(false) | bool }}"
tasks:
- name: Include setup tasks
ansible.builtin.import_tasks: ../setup.yml
@ -18,7 +19,7 @@
msg: >-
Required environment variables are not set.
Please export both DATA_DIRECTORY and MAINNET_DEPLOYMENT_DIR before running the playbook.
when: lookup('env', 'DATA_DIRECTORY') == '' or lookup('env', 'MAINNET_DEPLOYMENT_DIR') == ''
when: not BUILD_ONLY and (lookup('env', 'DATA_DIRECTORY') == '' or lookup('env', 'MAINNET_DEPLOYMENT_DIR') == '')
- name: Setup required repositories
shell: >
@ -30,18 +31,22 @@
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers {{ build_args }}
- name: Create deployment spec file
when: not BUILD_ONLY
shell: |
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd deploy init --output {{ spec_file }}
- name: Replace network section in spec_file
when: not BUILD_ONLY
shell: >
{{ yq_path }} eval '(.network) = load("{{ spec_template }}").network' -i {{ spec_file }}
- name: Create deployment from spec file
when: not BUILD_ONLY
shell: |
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd deploy create --spec-file {{ spec_file }} --deployment-dir {{data_directory}}/{{ mainnet_deployment_dir }}
- name: Create config.env
when: not BUILD_ONLY
copy:
dest: "{{data_directory}}/{{ mainnet_deployment_dir }}/config.env"
content: |
@ -53,6 +58,7 @@
mode: '0777'
- name: Initialize laconicd node
when: not BUILD_ONLY
shell: |
docker run -i \
-v {{data_directory}}/{{ mainnet_deployment_dir }}/data/laconicd-data:/root/.laconicd \
@ -62,6 +68,7 @@
cerc/laconicd:local bash -c "/scripts/setup-laconicd.sh"
- name: Ensure tmp directory exists inside laconicd-data
when: not BUILD_ONLY
file:
path: "{{data_directory}}/{{ mainnet_deployment_dir }}/data/laconicd-data/tmp"
state: directory

View File

@ -6,13 +6,14 @@
tmkms_deployment_dir: "{{ lookup('env', 'TMKMS_DEPLOYMENT_DIR') | default('tmkms-deployment', true) }}"
tmkms_spec_file: "{{data_directory}}/tmkms-spec.yml"
build_args: "{{ '--force-rebuild' if (lookup('env', 'FORCE_REBUILD') | default(omit, true)) not in [ 'false', 'False', '0' ] else '' }}"
BUILD_ONLY: "{{ lookup('env', 'BUILD_ONLY') | default(false) | bool }}"
tasks:
- name: Fail if DATA_DIRECTORY env var is not set
fail:
msg: >-
Required environment variable DATA_DIRECTORY is not set.
Please export DATA_DIRECTORY before running the playbook.
when: lookup('env', 'DATA_DIRECTORY') == ''
when: not BUILD_ONLY and lookup('env', 'DATA_DIRECTORY') == ''
- name: Fetch tmkms stack
shell: |
@ -23,9 +24,11 @@
laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms build-containers {{ build_args }}
- name: Create tmkms deployment spec file
when: not BUILD_ONLY
shell: |
laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms deploy init --output {{ tmkms_spec_file }}
- name: Create tmkms deployment from spec file
when: not BUILD_ONLY
shell: |
laconic-so --stack ~/cerc/tmkms-stack/stack-orchestrator/stacks/tmkms deploy create --spec-file {{ tmkms_spec_file }} --deployment-dir {{data_directory}}/{{ tmkms_deployment_dir }}

View File

@ -9,6 +9,7 @@
spec_file: "{{data_directory}}/laconicd-validator-spec.yml"
spec_template: "./templates/specs/spec-template.yml.j2"
build_args: "{{ '--force-rebuild' if (lookup('env', 'FORCE_REBUILD') | default(omit, true)) not in [ 'false', 'False', '0' ] else '' }}"
BUILD_ONLY: "{{ lookup('env', 'BUILD_ONLY') | default(false) | bool }}"
tasks:
- name: Include setup tasks
ansible.builtin.import_tasks: ../setup.yml
@ -18,14 +19,14 @@
msg: >-
Required environment variables are not set.
Please export both DATA_DIRECTORY and MAINNET_DEPLOYMENT_DIR before running the playbook.
when: lookup('env', 'DATA_DIRECTORY') == '' or lookup('env', 'MAINNET_DEPLOYMENT_DIR') == ''
when: not BUILD_ONLY and (lookup('env', 'DATA_DIRECTORY') == '' or lookup('env', 'MAINNET_DEPLOYMENT_DIR') == '')
- name: Fail if required key files are not defined
fail:
msg: >-
Required key files are not defined.
Please set genesis_file and staking_amount_file in validator-vars.yml.
when: not genesis_file or not staking_amount_file
when: not BUILD_ONLY and (not genesis_file or not staking_amount_file)
- name: Setup required repositories
shell: >
@ -37,18 +38,22 @@
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd build-containers {{ build_args }}
- name: Create deployment spec file
when: not BUILD_ONLY
shell: |
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd deploy init --output {{ spec_file }}
- name: Replace network section in spec_file
when: not BUILD_ONLY
shell: >
{{ yq_path }} eval '(.network) = load("{{ spec_template }}").network' -i {{ spec_file }}
- name: Create deployment from spec file
when: not BUILD_ONLY
shell: |
laconic-so --stack ~/cerc/laconicd-stack/stack-orchestrator/stacks/mainnet-laconicd deploy create --spec-file {{ spec_file }} --deployment-dir {{data_directory}}/{{ mainnet_deployment_dir }}
- name: Create config.env
when: not BUILD_ONLY
copy:
dest: "{{data_directory}}/{{ mainnet_deployment_dir }}/config.env"
content: |
@ -61,18 +66,21 @@
mode: '0777'
- name: Ensure tmp directory exists inside laconicd-data
when: not BUILD_ONLY
file:
path: "{{data_directory}}/{{ mainnet_deployment_dir }}/data/laconicd-data/tmp"
state: directory
mode: '0755'
- name: Copy genesis file to laconicd-data tmp directory
when: not BUILD_ONLY
copy:
src: "{{ genesis_file }}"
dest: "{{data_directory}}/{{ mainnet_deployment_dir }}/data/laconicd-data/tmp/genesis.json"
mode: '0644'
- name: Initialize laconicd node
when: not BUILD_ONLY
shell: |
docker run -i \
-v {{data_directory}}/{{ mainnet_deployment_dir }}/data/laconicd-data:/root/.laconicd \

View File

@ -1,4 +1,4 @@
# The URL of the laconicd node's RPC endpoint (e.g., "tcp://NODE_PUBLIC_IP_ADDRESS:26657")
# The URL of the laconicd node's RPC endpoint (e.g., "tcp://NODE_PUBLIC_IP_ADDRESS:26657" or "https://<your-node-url>")
node_url: ""
# The public key of the validator node. This is required for creating the validator on chain