Compare commits

..
8 changed files with 48 additions and 32 deletions
+11 -2
View File
@@ -99,9 +99,12 @@
cat <<EOF > stage0-deployment/config.env
# Set to true to enable adding participants functionality of the onboarding module
ONBOARDING_ENABLED=true
# A custom human readable name for this node
MONIKER=LaconicStage0
# Chain ID of the network
CHAINID=loro-testnet-0
EOF
```
@@ -227,6 +230,8 @@
cat <<EOF > laconic-faucet-deployment/config.env
CERC_FAUCET_KEY=$FAUCET_ACCOUNT_PK
CERC_LACONICD_CHAIN_ID=loro-testnet-0
EOF
```
@@ -352,6 +357,8 @@
CERC_FAUCET_ENDPOINT="https://faucet.laconic.com"
CERC_WALLET_META_URL="https://loro-signup.laconic.com"
CERC_LACONICD_CHAIN_ID=loro-testnet-0
EOF
```
@@ -547,6 +554,8 @@
AUTHORITY_GRACE_PERIOD=7200
MONIKER=LaconicStage1
CHAINID=loro-testnet-1
EOF
```
@@ -625,7 +634,7 @@
```bash
network:
ports:
console:
laconic-console:
- '127.0.0.1:4001:80'
```
+7 -23
View File
@@ -49,7 +49,7 @@ Once all the participants have completed their onboarding, stage0 laconicd chain
# 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
CHAINID=loro-testnet-1 MONIKER=LaconicStage1 ./scripts/generate-stage1-genesis-using-allocations.sh $DEPLOYMENTS_DIR/stage0-deployment 1000000000000 2000000000000000
# Expected output:
# Genesis file for stage1 written to output/genesis.json
@@ -69,32 +69,16 @@ Once all the participants have completed their onboarding, stage0 laconicd chain
cp ~/cerc/fixturenet-laconicd-stack/stack-orchestrator/stacks/fixturenet-laconicd/output/genesis.json stage1-deployment/data/genesis-config/genesis.json
```
* Republish records in stage1:
* Create bond
* Update testnet-onboarding-app deployment
* Change chain ID in `/srv/app/onboarding-app-deployment/config.env`
```bash
ALICE_PK=$(echo y | laconic-so deployment --dir /srv/laconicd/stage1-deployment exec laconicd "laconicd keys export alice --unarmored-hex --unsafe")
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type alnt --quantity 1000000000000 --user-key $ALICE_PK" | jq -r '.bondId'
CERC_LACONICD_CHAIN_ID=loro-testnet-1
```
* Update CLI config
```bash
BOND_ID=c5ce12710a0ba7bf01f085a24b23dc78936e8d63ba3ce9d4b9d8f789e5b2f265
laconic-so deployment --dir laconic-console-deployment exec cli "CERC_LACONICD_USER_KEY=${ALICE_PK} CERC_LACONICD_BOND_ID=${BOND_ID} CERC_LACONICD_GAS=500000 CERC_LACONICD_FEES=500000alnt /app/create-config.sh"
* Restart the container
```
laconic-so deployment --dir onboarding-app-deployment stop
* Copy records
```bash
cp -r /srv/laconicd/testnet-repo-records laconic-console-deployment/data/laconic-registry-data/testnet-repo-records
```
* Publish
```bash
laconic-so deployment --dir laconic-console-deployment exec cli "yarn ts-node demo/scripts/publish-records.ts --config config.yml --records /laconic-registry-data/testnet-repo-records"
laconic-so deployment --dir onboarding-app-deployment start
```
* Start the stage1 deployment:
+2
View File
@@ -63,6 +63,8 @@ Instructions to reset / update the deployments
cat <<EOF > laconic-faucet-deployment/config.env
CERC_FAUCET_KEY=$FAUCET_ACCOUNT_PK
CERC_LACONICD_CHAIN_ID=loro-testnet-0
EOF
# Stop the deployment
@@ -13,7 +13,7 @@ services:
registry:
rpcEndpoint: ${CERC_LACONICD_RPC_ENDPOINT}
gqlEndpoint: ${CERC_LACONICD_GQL_ENDPOINT}
userKey: "${CERC_LACONICD_USER_KEY}"
userKey: ${CERC_LACONICD_USER_KEY}
bondId: ${CERC_LACONICD_BOND_ID}
chainId: ${CERC_LACONICD_CHAIN_ID}
gas: ${CERC_LACONICD_GAS}
@@ -1,6 +1,6 @@
[upstream]
rpcEndpoint = "REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT"
chainId = "laconic_9000-1"
chainId = "REPLACE_WITH_CERC_LACONICD_CHAIN_ID"
denom = "alnt"
prefix = "laconic"
gasPrice = "1"
@@ -23,6 +23,7 @@ FAUCET_CONFIG=$(echo "$config_template" | \
sed -E "s|REPLACE_WITH_CERC_FAUCET_KEY|${CERC_FAUCET_KEY}|g; \
s|REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT|${CERC_LACONICD_RPC_ENDPOINT}|g; \
s|REPLACE_WITH_CERC_TRANSFER_AMOUNT|${CERC_TRANSFER_AMOUNT}|g; \
s|REPLACE_WITH_CERC_LACONICD_CHAIN_ID|${CERC_LACONICD_CHAIN_ID}|g; \
s|REPLACE_WITH_CERC_PERIOD_TRANSFER_LIMIT|${CERC_PERIOD_TRANSFER_LIMIT}|; ")
echo "$FAUCET_CONFIG" > $target_config
@@ -266,7 +266,7 @@ laconic-so deployment --dir laconic-console-deployment start
# services:
# registry:
# ...
# userKey: "<your-private-key>"
# userKey: <your-private-key>
# ...
# Note: any changes made to the config will be lost when the cli Docker container is brought down
@@ -277,7 +277,7 @@ laconic-so deployment --dir laconic-console-deployment start
```bash
# Example
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type alnt --quantity 1000000000000"
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type photon --quantity 1000000000000"
```
## Clean up
+23 -3
View File
@@ -5,6 +5,16 @@
* Visit <https://wallet.laconic.com/> and click on `Create wallet`
* Save the mnemonic for further usage
* Add a new network for stage0 laconicd by clicking on `Add Network`
* Change network type to `COSMOS`
* Set Chain ID to `loro-testnet-0`
* Set Network Name to `LOROTestnet0`
* Set New RPC URL to `https://laconcid.laconic.com`
* Set Coin Type to `118`
* Set Native Denom to `alnt`
* Set Address Prefix to `laconic`
* Set Gas Price to `1`
* Register your laconic address as a participant using the [Onboarding App](https://loro-signup.laconic.com)
* Read and accept the `Terms and Conditions`
@@ -171,13 +181,23 @@ laconic-so deployment --dir testnet-laconicd-deployment start
### Join as testnet validator
* Open the wallet: <https://wallet.laconic.com/>
* Create a validator from the onboarding app:
* Open the wallet: <https://wallet.laconic.com/>
* Add a new network for stage1 laconicd by clicking on `Add Network`
* Change network type to `COSMOS`
* Set Chain ID to `loro-testnet-1`
* Set Network Name to `LOROTestnet1`
* Set New RPC URL to `https://laconcid.laconic.com`
* Set Coin Type to `118`
* Set Native Denom to `alnt`
* Set Address Prefix to `laconic`
* Set Gas Price to `1`
* Visit the [validator creation](https://loro-signup.laconic.com/validator) page
* If required, connect testnet-onboarding app to the wallet with which onboarding was done on stage0
* Click on `DISCONNECT` if wallet is already connected and then connect again to pair using the stage1 chain ID
* Select the Laconic account (same as the one used while onboarding) using which you wish to send the create validator request
@@ -243,7 +263,7 @@ laconic-so deployment --dir testnet-laconicd-deployment start
```bash
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd tx staking create-validator my-validator.json \
--fees 500000alnt \
--chain-id=laconic_9000-1 \
--chain-id=loro-testnet-1 \
--from $KEY_NAME"
```