From cbb84ede8f20d4f9082457fc69a1b0ae145c7ecb Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Fri, 9 Aug 2024 14:22:04 +0530 Subject: [PATCH] Add instructions to setup and start stage1 deployment --- ops/stage0-to-stage1.md | 107 ++++++++++++++++++++++++++++++++ testnet-onboarding-validator.md | 10 ++- 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/ops/stage0-to-stage1.md b/ops/stage0-to-stage1.md index 6a4a6b6..4569fe8 100644 --- a/ops/stage0-to-stage1.md +++ b/ops/stage0-to-stage1.md @@ -1 +1,108 @@ # stage0-to-stage1 + +Once all the participants have completed their onboarding, stage0 laconicd chain can be halted and stage1 chain can be initialized and started + +## Login + +* Log in as `dev` user on the deployments VM + +* All the deployments are placed in the `/srv` directory: + + ```bash + cd /srv + ``` + +## Halt stage0 + +* Confirm the the currently running node is for stage0 chain: + + ```bash + cd /srv/laconicd + + laconic-so deployment --dir stage0-deployment logs laconicd -f --tail 30 + ``` + +* List the participants on stage0: + + ```bash + laconic-so deployment --dir stage0-deployment exec laconicd "laconicd query onboarding list" + ``` + +* Stop the stage0 deployment: + + ```bash + laconic-so deployment --dir stage0-deployment stop + ``` + +## Start stage1 + +* Use the scripts in fixturenet-laconicd stack to generate genesis file for stage1 using onboarding participants from stage0 chain with token allocations: + + ```bash + cd /srv/laconicd + + # Set current working dir path in a variable + DEPLOYMENTS_DIR=$(pwd) + + cd ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd + + # Generate the genesis file + # Participant allocation: 1000000000000 (10^12) + # Validator allocation: 2000000000000000 (10^15) + ./scripts/generate-stage1-genesis-using-allocations.sh $DEPLOYMENTS_DIR/stage0-deployment 1000000000000 2000000000000000 + + # Expected output: + # Genesis file for stage1 written to output/genesis.json + + # Remove the temporary data directory + sudo rm -rf stage1-genesis + + # Go back to the directory where deployments are created + cd $DEPLOYMENTS_DIR + ``` + +* Copy over the generated genesis file (`.json`) containing the onboarding module state with funded participants to data directory in stage1 deployment (`stage1-deployment/data/genesis-config`): + + ```bash + cp ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd/output/genesis.json stage1-deployment/data/genesis-config/genesis.json + ``` + +* Start the stage1 deployment: + + ```bash + laconic-so deployment --dir stage1-deployment start + ``` + +* Check status of stage1 laconicd: + + ```bash + # List down the container and check health status + docker ps -a | grep laconicd + + # Follow logs for laconicd container, check that new blocks are getting created + laconic-so deployment --dir stage1-deployment logs laconicd -f + ``` + +* Query the list of registered participants in stage1 laconicd: + + ```bash + laconic-so deployment --dir stage1-deployment exec laconicd "laconicd query onboarding list" + + # Confirm that all onboarded participants on stage0 appear in the list + ``` + +* Get the node's peer adddress and stage1 genesis file to share with the participants: + + * Get the node id: + + ```bash + echo $(laconic-so deployment --dir stage1-deployment exec laconicd "laconicd cometbft show-node-id")@laconicd.laconic.com:26656 + ``` + + * Get the genesis file: + + ```bash + scp dev@:/srv/laconicd/stage1-deployment/data/laconicd-data/config/genesis.json + ``` + +* Now users can follow the steps to [Join as a validator on stage1](https://git.vdb.to/cerc-io/testnet-laconicd-stack/src/branch/main/testnet-onboarding-validator.md#join-as-a-validator-on-stage1) diff --git a/testnet-onboarding-validator.md b/testnet-onboarding-validator.md index 65be8b6..3f0b5de 100644 --- a/testnet-onboarding-validator.md +++ b/testnet-onboarding-validator.md @@ -5,10 +5,18 @@ * Visit and click on `Create wallet` * Save the mnemonic for further usage -* Register your laconic address as a participant using the [Onboarding App](https://loro-signup.laconic.com/) +* Register your laconic address as a participant using the [Onboarding App](https://loro-signup.laconic.com) * Read and accept the `Terms and Conditions` + * On next page, enter your email to register to join the LORO testnet + + * Visit the confirmation link sent on the registered email (email delivery might take a few minutes) + + * It should take you to the `Testnet Onboarding` page + + * Note: The confirmation link will only work the first time, visit for further attempts if required + * Connect testnet-onboarding app to the wallet: * Click on `CONNECT WALLET` button on the testnet-onboarding app