diff --git a/README.md b/README.md index 93bc676..91d8036 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,18 @@ - It allows you to export SAPO testnet state and start mainnet nodes +## Mainnet OPS + - 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) - - To migrate existing deployments from SAPO testnet to mainnet, refer to [update-deployments.md](docs/update-deployments.md) + +## Join Mainnet + +- **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 diff --git a/docs/update-service-provider.md b/docs/update-service-provider.md new file mode 100644 index 0000000..7bdd62b --- /dev/null +++ b/docs/update-service-provider.md @@ -0,0 +1,184 @@ +# Update Service Provider + +## Prerequisites + +A Laconic mainnet node (see [run-validator.md](./run-validator.md)) + +## Stop services + +* Stop a laconic-console deployment: + + ```bash + # In directory where laconic-console deployment was created + laconic-so deployment --dir laconic-console-deployment stop --delete-volumes + ``` + +* Stop webapp deployer: + + ```bash + # In directory where webapp-deployer deployment was created + laconic-so deployment --dir webapp-deployer stop + laconic-so deployment --dir webapp-ui stop + ``` + +## Update laconic console + +* Remove an existing console deployment: + + ```bash + # In directory where laconic-console deployment was created + # Backup the config if required + rm -rf laconic-console-deployment + ``` + +* Follow [laconic-console](stack-orchestrator/stacks/laconic-console/README.md) stack instructions to setup a new laconic-console deployment + +* Example configuration: + + ```bash + # CLI configuration + + # laconicd RPC endpoint (can be pointed to your node) + CERC_LACONICD_RPC_ENDPOINT=https://laconicd-sapo.laconic.com + + # laconicd GQL endpoint (can be pointed to your node) + CERC_LACONICD_GQL_ENDPOINT=https://laconicd-sapo.laconic.com/api + + CERC_LACONICD_CHAIN_ID=laconic-testnet-2 + + # your private key + CERC_LACONICD_USER_KEY= + + # your bond id (optional) + CERC_LACONICD_BOND_ID= + + # Gas price to use for txs (default: 0.001alnt) + # Use for auto fees calculation, gas and fees not required to be set in that case + # Reference: https://git.vdb.to/cerc-io/laconic-registry-cli#gas-and-fees + CERC_LACONICD_GASPRICE= + + # Console configuration + + # Laconicd (hosted) GQL endpoint (can be pointed to your node) + LACONIC_HOSTED_ENDPOINT=https://laconicd-sapo.laconic.com + ``` + +## Check authority and deployer record + +* The state has been carried over from SAPO testnet to the mainnet, if you had authority and records on the SAPO testnet, they should be present on mainnet as well + +* Check authority: + + ```bash + # In directory where laconic-console deployment was created + AUTHORITY= + laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry authority whois $AUTHORITY" + ``` + +* Check deployer record: + + ```bash + PAYMENT_ADDRESS= + laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry record list --all --type WebappDeployer --paymentAddress $PAYMENT_ADDRESS" + ``` + +## Update webapp deployer + +* Update deployer laconic registry config (`webapp-deployer/data/config/laconic.yml`) with new endpoints: + + ```bash + services: + registry: + rpcEndpoint: "" # Eg. https://laconicd-mainnet.laconic.com + gqlEndpoint: "" # Eg. https://laconicd-mainnet.laconic.com/api + userKey: "" + bondId: "9555 + + # Set pod id + export POD_ID= + + # Example: + # export POD_ID=laconic-096fed46af974a47-deployment-644db859c7-snbq6 + ``` + +* Copy over GPG keys files to the webapp-deployer container: + + ```bash + kubie ctx default + + # Copy the GPG key files to the pod + kubectl cp $POD_ID:/app + kubectl cp $POD_ID:/app + + # Required everytime you stop and start the deployer + ``` + +* Check logs: + + ```bash + # Deployer + kubectl logs -f $POD_ID + + # Deployer auction handler + kubectl logs -f $POD_ID -c cerc-webapp-auction-handler + ``` + +* Update deployer UI config (`webapp-ui/config.env`): + + ```bash + # URL of the webapp deployer backend API + # eg: https://webapp-deployer-api.pwa.laconic.com + LACONIC_HOSTED_CONFIG_app_api_url= + + # URL of the laconic console + # eg: https://console-mainnet.laconic.com + LACONIC_HOSTED_CONFIG_app_console_link= + ``` + +* Start the webapp UI: + + ```bash + laconic-so deployment --dir webapp-ui start + ``` + +* Check logs + + ```bash + laconic-so deployment --dir webapp-ui logs webapp + ```