diff --git a/README.md b/README.md index 91d8036..e65bffa 100644 --- a/README.md +++ b/README.md @@ -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 , you need to add `laconic-mainnet` network in your wallet + +- Go to + +- 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 + ``` diff --git a/config/network.json b/config/network.json index ce66559..f49a594 100644 --- a/config/network.json +++ b/config/network.json @@ -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" ] } diff --git a/docs/domain-port-mappings.md b/docs/domain-port-mappings.md index cae28b2..da6c64d 100644 --- a/docs/domain-port-mappings.md +++ b/docs/domain-port-mappings.md @@ -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 ``` diff --git a/docs/run-first-validator.md b/docs/run-first-validator.md index 8429312..8686548 100644 --- a/docs/run-first-validator.md +++ b/docs/run-first-validator.md @@ -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 @: + ``` + ## 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= + ``` + - Get your private key from testnet deployment: ```bash - laconic-so deployment --dir exec laconicd "laconicd keys export --unarmored-hex --unsafe --keyring-backend test" + laconic-so deployment --dir $TESTNET_DEPLOYMENT_DIR exec laconicd "laconicd keys export --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 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 + ~/cerc/laconicd-stack/scripts/export-testnet-state.sh $TESTNET_DEPLOYMENT_DIR ``` - - The compressed zst file will be generated at `/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= + # File path where exported testnet state JSON file will be created + export EXPORTED_STATE_PATH= - # Path where LPS distribution JSON file will be created - export LPS_DISTRIBUTION_PATH= + # File path where LPS distribution JSON file will be created + export LPS_DISTRIBUTION_PATH= export EARLY_SUPPORTS_ACC_ADDR= @@ -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 @:/export/testnet-state.zst + ``` + - Extract the testnet-state JSON file: ```bash - zstd -dc /testnet-state.zst > $EXPORTED_STATE_PATH + zstd -dc /testnet-state.zst > $EXPORTED_STATE_PATH # Remove zst folder - rm -rf /testnet-state.zst + rm -rf /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= @@ -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 diff --git a/docs/run-validator.md b/docs/run-validator.md index fc1f7b8..38b928d 100644 --- a/docs/run-validator.md +++ b/docs/run-validator.md @@ -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 @: + ``` ## 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 diff --git a/docs/update-deployments.md b/docs/update-deployments.md index 0a6aa42..4659a46 100644 --- a/docs/update-deployments.md +++ b/docs/update-deployments.md @@ -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 -* 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 - - # 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 @@ -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 + ... +