2024-05-20 11:27:41 +00:00
|
|
|
# laconicd-full-node
|
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
Instructions for running a laconicd testnet full node and joining as a validator
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
## Prerequisites
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Minimum hardware requirements:
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
RAM: 8-16GB
|
|
|
|
Disk space: 200GB
|
|
|
|
CPU: 2 cores
|
|
|
|
```
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Testnet genesis file (file or an URL) and peer node addresses
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
## Setup
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Clone the stack repo:
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
|
|
|
```
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Clone required repositories:
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
laconic-so --stack /home/prathamesh/deepstack/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node setup-repositories
|
|
|
|
```
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Build the container images:
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
laconic-so --stack /home/prathamesh/deepstack/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node build-containers
|
|
|
|
```
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
This should create the following docker images locally:
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* `cerc/laconic2d`
|
|
|
|
* `cerc/laconic-registry-cli`
|
|
|
|
* `cerc/webapp-base`
|
|
|
|
* `cerc/laconic-console-host`
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
## Create a deployment
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Create a spec file for the deployment:
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy init --output laconic-full-node-spec.yml
|
|
|
|
```
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Edit `network` in the spec file to map container ports to host ports as required:
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
...
|
|
|
|
network:
|
|
|
|
# TODO: UPDATE
|
|
|
|
ports:
|
|
|
|
laconicd:
|
|
|
|
- '6060:6060'
|
|
|
|
- '26657:26657'
|
|
|
|
- '26656:26656'
|
|
|
|
- '9473:9473'
|
|
|
|
- '9090:9090'
|
|
|
|
- '1317:1317'
|
|
|
|
```
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Create a deployment from the spec file:
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy create --spec-file laconic-full-node-spec.yml --deployment-dir laconic-full-node-deployment
|
|
|
|
```
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* (Optional) Copy over the genesis file (`.json`) to config data directory in deployment (`laconic-full-node-deployment/data/laconicd-data/config`):
|
2024-06-18 05:16:09 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
# Example
|
|
|
|
mkdir -p laconic-full-node-deployment/data/laconicd-data/config
|
|
|
|
cp genesis.json laconic-full-node-deployment/data/laconicd-config/genesis.json
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
* Inside the deployment directory, open `config.env` file and set following env variables:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# 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"
|
|
|
|
CERC_PEERS=""
|
|
|
|
|
|
|
|
# Optional
|
|
|
|
|
|
|
|
# A custom human readable name for this node (default: TestnetNode)
|
|
|
|
CERC_MONIKER=
|
|
|
|
|
|
|
|
# Network chain ID (default: laconic_9000-1)
|
|
|
|
CERC_CHAIN_ID=
|
|
|
|
|
|
|
|
# Genesis file URL
|
|
|
|
# Not required if a genesis file is placed in the config data directory in previous steps
|
|
|
|
CERC_GENESIS_FILE_URL=
|
|
|
|
|
|
|
|
# Output log level (default: info)
|
|
|
|
CERC_LOGLEVEL=
|
|
|
|
```
|
2024-06-18 05:16:09 +00:00
|
|
|
|
|
|
|
## Start the deployment
|
|
|
|
|
|
|
|
```bash
|
|
|
|
laconic-so deployment --dir laconic-full-node-deployment start
|
2024-05-20 11:27:41 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Check status
|
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* To list down and monitor the running containers:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# With status
|
|
|
|
docker ps -a
|
|
|
|
|
|
|
|
# Check logs for a container
|
|
|
|
docker logs -f <CONTAINER_ID>
|
|
|
|
```
|
|
|
|
|
|
|
|
* Check the sync status of your node:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
docker exec -it <LACONICD_CONTAINER_ID> status | jq .sync_info
|
|
|
|
```
|
2024-05-20 11:27:41 +00:00
|
|
|
|
|
|
|
## Join as testnet validator
|
|
|
|
|
2024-06-17 13:46:19 +00:00
|
|
|
<!-- TODO import a funded account / create an account and get it funded -->
|
|
|
|
|
|
|
|
<!-- TODO create a validator-->
|
2024-05-20 11:27:41 +00:00
|
|
|
|
|
|
|
## Clean up
|
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
* Stop all services running in the background:
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
# Stop the docker containers
|
|
|
|
laconic-so deployment --dir laconic-full-node-deployment stop
|
|
|
|
```
|
|
|
|
|
|
|
|
* To stop all services and also delete data:
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
```bash
|
|
|
|
# Stop the docker containers
|
|
|
|
laconic-so deployment --dir laconic-full-node-deployment stop --delete-volumes
|
2024-05-20 11:27:41 +00:00
|
|
|
|
2024-06-18 06:38:10 +00:00
|
|
|
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
|
|
|
rm -r laconic-full-node-deployment
|
|
|
|
```
|