Add instructions for testnet validator onboarding #17
@ -12,7 +12,39 @@ Instructions for running a laconicd testnet full node and joining as a validator
|
|||||||
CPU: 2 cores
|
CPU: 2 cores
|
||||||
```
|
```
|
||||||
|
|
||||||
* Testnet genesis file (file or an URL) and peer node addresses
|
* Testnet genesis file and peer node address
|
||||||
|
|
||||||
|
* Register your laconic address as a participant on the `Laconic network` using the [Onboarding App](https://loro-signup.laconic.com/)
|
||||||
|
|
||||||
|
* Read and accept the `Terms and Conditions`
|
||||||
|
|
||||||
|
* Connect testnet-onboarding app to the wallet:
|
||||||
|
|
||||||
|
* Click on `CONNECT WALLET` button on the testnet-onboarding app
|
||||||
|
|
||||||
|
* Click on the WalletConnect icon on the top right corner in the wallet
|
||||||
|
|
||||||
|
* If using the wallet Android app, scan the QR code from the onboarding app
|
||||||
|
|
||||||
|
* If using the wallet website, enter WalletConnect URI for pairing
|
||||||
|
|
||||||
|
* In the onboarding app, choose Alice's nitro and laconicd account to onboard
|
||||||
|
|
||||||
|
* Use nitro accounts for which ledger channels have been created on L2
|
||||||
|
|
||||||
|
* Sign using the nitro key
|
||||||
|
|
||||||
|
* Approve sign request on Wallet
|
||||||
|
|
||||||
|
* Perform the user verification steps
|
||||||
|
|
||||||
|
* Select the desired participant role (`Validator` or `Participant`) and accept the onboarding terms and conditions
|
||||||
|
|
||||||
|
* In the next step, fund your laconic account by clicking on the `REQUEST TOKENS FROM FAUCET` button; ensure that the displayed balance is updated
|
||||||
|
|
||||||
|
* Send transaction request to the wallet
|
||||||
|
|
||||||
|
* From wallet, approve and send transaction to laconicd chain
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@ -25,31 +57,19 @@ Instructions for running a laconicd testnet full node and joining as a validator
|
|||||||
* Clone required repositories:
|
* Clone required repositories:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# laconicd
|
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd setup-repositories --pull
|
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd setup-repositories --pull
|
||||||
|
|
||||||
# laconic cli and console
|
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console setup-repositories --pull
|
|
||||||
|
|
||||||
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories and re-run the command
|
# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories and re-run the command
|
||||||
```
|
```
|
||||||
|
|
||||||
* Build the container images:
|
* Build the container images:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# laconicd
|
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd build-containers
|
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd build-containers
|
||||||
|
|
||||||
# laconic cli and console
|
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers
|
|
||||||
```
|
|
||||||
|
|
||||||
This should create the following docker images locally:
|
This should create the following docker images locally:
|
||||||
|
|
||||||
* `cerc/laconicd`
|
* `cerc/laconicd`
|
||||||
* `cerc/laconic-registry-cli`
|
|
||||||
* `cerc/webapp-base`
|
|
||||||
* `cerc/laconic-console-host`
|
|
||||||
|
|
||||||
## Create a deployment
|
## Create a deployment
|
||||||
|
|
||||||
@ -57,11 +77,9 @@ Instructions for running a laconicd testnet full node and joining as a validator
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy init --output testnet-laconicd-spec.yml
|
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy init --output testnet-laconicd-spec.yml
|
||||||
|
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Edit `network` in both the spec files to map container ports to host ports as required:
|
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# testnet-laconicd-spec.yml
|
# testnet-laconicd-spec.yml
|
||||||
@ -75,24 +93,12 @@ Instructions for running a laconicd testnet full node and joining as a validator
|
|||||||
- '9473:9473'
|
- '9473:9473'
|
||||||
- '9090:9090'
|
- '9090:9090'
|
||||||
- '1317:1317'
|
- '1317:1317'
|
||||||
|
|
||||||
# laconic-console-spec.yml
|
|
||||||
...
|
|
||||||
network:
|
|
||||||
ports:
|
|
||||||
console:
|
|
||||||
- '8080:80'
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Create deployments from the spec files:
|
* Create the deployment from the spec file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy create --spec-file testnet-laconicd-spec.yml --deployment-dir testnet-laconicd-deployment
|
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy create --spec-file testnet-laconicd-spec.yml --deployment-dir testnet-laconicd-deployment
|
||||||
|
|
||||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy create --spec-file laconic-console-spec.yml --deployment-dir laconic-console-deployment
|
|
||||||
|
|
||||||
# Place them both in the same namespace (cluster)
|
|
||||||
cp testnet-laconicd-deployment/deployment.yml laconic-console-deployment/deployment.yml
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Copy over the published testnet genesis file (`.json`) to data directory in deployment (`testnet-laconicd-deployment/data/laconicd-data/tmp`):
|
* Copy over the published testnet genesis file (`.json`) to data directory in deployment (`testnet-laconicd-deployment/data/laconicd-data/tmp`):
|
||||||
@ -109,56 +115,18 @@ Instructions for running a laconicd testnet full node and joining as a validator
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Comma separated list of nodes to keep persistent connections to
|
# Comma separated list of nodes to keep persistent connections to
|
||||||
# Example: "node-1-id@node-1-host:26656,node-2-id@node-2-host:26656"
|
# Example: "node-1-id@laconicd.laconic.com:26656"
|
||||||
|
# Use the provided node id
|
||||||
CERC_PEERS=""
|
CERC_PEERS=""
|
||||||
|
|
||||||
# Optional
|
|
||||||
|
|
||||||
# A custom human readable name for this node (default: TestnetNode)
|
# A custom human readable name for this node (default: TestnetNode)
|
||||||
CERC_MONIKER=
|
CERC_MONIKER=
|
||||||
|
|
||||||
# Network chain ID (default: laconic_9000-1)
|
|
||||||
CERC_CHAIN_ID=
|
|
||||||
|
|
||||||
# Output log level (default: info)
|
|
||||||
CERC_LOGLEVEL=
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Inside the `laconic-console-deployment` deployment directory, open `config.env` file and set following env variables:
|
## Start the deployment
|
||||||
|
|
||||||
```bash
|
|
||||||
# All optional
|
|
||||||
|
|
||||||
# CLI configuration
|
|
||||||
|
|
||||||
# laconicd chain id (default: laconic_9000-1)
|
|
||||||
CERC_LACONICD_CHAIN_ID=
|
|
||||||
|
|
||||||
# laconicd user private key for txs
|
|
||||||
CERC_LACONICD_USER_KEY=
|
|
||||||
|
|
||||||
# laconicd bond id for txs
|
|
||||||
CERC_LACONICD_BOND_ID=
|
|
||||||
|
|
||||||
# Gas limit for txs (default: 200000)
|
|
||||||
CERC_LACONICD_GAS=
|
|
||||||
|
|
||||||
# Max fees for txs (default: 200000alnt)
|
|
||||||
CERC_LACONICD_FEES=
|
|
||||||
|
|
||||||
# Console configuration
|
|
||||||
|
|
||||||
# Laconicd (hosted) GQL endpoint (default: http://localhost:9473)
|
|
||||||
LACONIC_HOSTED_ENDPOINT=
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: Use `host.docker.internal` as host to access ports on the host machine
|
|
||||||
|
|
||||||
## Start the deployments
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment start
|
laconic-so deployment --dir testnet-laconicd-deployment start
|
||||||
laconic-so deployment --dir laconic-console-deployment start
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Check status
|
## Check status
|
||||||
@ -181,104 +149,36 @@ laconic-so deployment --dir laconic-console-deployment start
|
|||||||
# `catching_up: false` indicates that node is completely synced
|
# `catching_up: false` indicates that node is completely synced
|
||||||
```
|
```
|
||||||
|
|
||||||
* View the laconic console at <http://localhost:8080>
|
|
||||||
|
|
||||||
* Use the cli service for registry CLI operations:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Example
|
|
||||||
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Join as testnet validator
|
## Join as testnet validator
|
||||||
|
|
||||||
* Create / import a new key pair:
|
* Open the onboarding app : <https://loro-signup.laconic.com/validator>
|
||||||
|
|
||||||
|
* Select your laconic address
|
||||||
|
|
||||||
|
* Get your validator node's public key:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create new keypair
|
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd 'laconicd cometbft show-validator' | jq '.key'
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd keys add <key-name>"
|
|
||||||
|
|
||||||
# OR
|
# Example response
|
||||||
# Restore existing key with mnemonic seed phrase
|
# "av1WrE11aXWdmv1umCzzM03r0/VwTHNaWH+Fw7kRnIw="
|
||||||
# You will be prompted to enter mnemonic seed
|
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd keys add <key-name> --recover"
|
|
||||||
|
|
||||||
# Query the keystore for your account's address
|
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd keys show <key-name> -a"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
* Request tokens from the testnet faucet for your account if required
|
* Paste the public key in the `Validator Public Key` field in the onboarding app.
|
||||||
|
|
||||||
* Check balance for your account:
|
* Set the node moniker in the `Moniker` field in the onboarding app.
|
||||||
|
|
||||||
```bash
|
* Check the transaction details
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query bank balances <account-address>"
|
|
||||||
```
|
|
||||||
|
|
||||||
* Create required validator configuration:
|
* Click on `SEND TRANSACTION` to approve it. Sign the transaction using the wallet.
|
||||||
|
|
||||||
```bash
|
* After successful transaction, view the staking validators:
|
||||||
# Note:
|
|
||||||
# Edit the staking amount and other fields as required
|
|
||||||
# Replace <your-node-moniker> with your node's moniker in command below
|
|
||||||
|
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd 'cat <<EOF > <your-node-moniker>-validator.json
|
|
||||||
{
|
|
||||||
"pubkey": $(laconicd cometbft show-validator),
|
|
||||||
"amount": "900000000alnt",
|
|
||||||
"moniker": "<your-node-moniker>",
|
|
||||||
"commission-rate": "0.1",
|
|
||||||
"commission-max-rate": "0.2",
|
|
||||||
"commission-max-change-rate": "0.01",
|
|
||||||
"min-self-delegation": "1"
|
|
||||||
}
|
|
||||||
EOF'
|
|
||||||
```
|
|
||||||
|
|
||||||
* Create a validator:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd 'laconicd tx staking create-validator <your-node-moniker>-validator.json \
|
|
||||||
--fees 500000alnt \
|
|
||||||
--chain-id=laconic_9000-1 \
|
|
||||||
--from <key-name>'
|
|
||||||
```
|
|
||||||
|
|
||||||
* View staking validators:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
|
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
|
||||||
```
|
```
|
||||||
|
|
||||||
* Check that in the list of validators `<your-node-moniker>` exists
|
* Check that in the list of validators, your node moniker exists
|
||||||
|
|
||||||
## Perform operations
|
|
||||||
|
|
||||||
* To perform txs against the chain using registry CLI, set your private key in config in the CLI container:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# (Optional) Get the PK from your node
|
|
||||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd keys export <key-name> --unarmored-hex --unsafe"
|
|
||||||
|
|
||||||
# Set your PK as 'userKey' in the config file
|
|
||||||
laconic-so deployment --dir laconic-console-deployment exec cli "nano config.yml"
|
|
||||||
|
|
||||||
# services:
|
|
||||||
# registry:
|
|
||||||
# ...
|
|
||||||
# userKey: <your-private-key>
|
|
||||||
# ...
|
|
||||||
|
|
||||||
# Note: any changes made to the config will be lost when the cli Docker container is brought down
|
|
||||||
# So set / update the values in 'laconic-console-deployment/config.env' accordingly before restarting
|
|
||||||
```
|
|
||||||
|
|
||||||
* Adjust / set other config values (`bondId`, `gas`, `fees`) as required and perform txs:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Example
|
|
||||||
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry bond create --type photon --quantity 1000000000000"
|
|
||||||
```
|
|
||||||
|
|
||||||
## Clean up
|
## Clean up
|
||||||
|
|
||||||
@ -298,5 +198,3 @@ laconic-so deployment --dir laconic-console-deployment start
|
|||||||
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
||||||
rm -r testnet-laconicd-deployment
|
rm -r testnet-laconicd-deployment
|
||||||
```
|
```
|
||||||
|
|
||||||
* For `laconic-console`, see [laconic-console clean up](../laconic-console/README.md#clean-up)
|
|
||||||
|
@ -985,7 +985,7 @@
|
|||||||
- Send transaction request to the wallet
|
- Send transaction request to the wallet
|
||||||
- From wallet, approve and send transaction to laconicd chain
|
- From wallet, approve and send transaction to laconicd chain
|
||||||
- Repeat onboarding for other (Charlies's) account by clicking on the web app header "Testnet Onboarding"
|
- Repeat onboarding for other (Charlies's) account by clicking on the web app header "Testnet Onboarding"
|
||||||
- List the participants on stage 1 (run in the directory where laconicd deployment was created):
|
- List the participants on stage 0 (run in the directory where laconicd deployment was created):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd query onboarding list"
|
laconic-so deployment --dir stage0-deployment exec laconicd "laconicd query onboarding list"
|
||||||
|
Loading…
Reference in New Issue
Block a user