Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7adddacc72 | ||
|
|
3bee6e4941 |
@@ -1,12 +1,5 @@
|
||||
# testnet-laconicd-stack
|
||||
|
||||
Stacks to run a node for laconic testnet
|
||||
|
||||
- [testnet-laconicd stack documentation](stack-orchestrator/stacks/testnet-laconicd/README.md)
|
||||
- [laconic-console stack documentation](stack-orchestrator/stacks/laconic-console/README.md) (to run laconic registry CLI and console standalone)
|
||||
- [laconic-faucet stack documentation](stack-orchestrator/stacks/laconic-faucet/README.md)
|
||||
|
||||
## Testnet onboarding demo
|
||||
|
||||
Follow steps in [testnet-onboarding-demo.md](./testnet-onboarding-demo.md) to run demo for onboarding testnet participants in laconicd chain
|
||||
Stacks to run nodes for laconic-testnet
|
||||
|
||||
- [Full node stack documentation](stack-orchestrator/stacks/laconicd-full-node/README.md)
|
||||
|
||||
@@ -1,32 +1,9 @@
|
||||
services:
|
||||
cli:
|
||||
image: cerc/laconic-registry-cli:local
|
||||
command: ["bash", "-c", "/app/create-config.sh && tail -f /dev/null"]
|
||||
environment:
|
||||
CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657}
|
||||
CERC_LACONICD_GQL_ENDPOINT: ${CERC_LACONICD_GQL_ENDPOINT:-http://laconicd:9473/api}
|
||||
CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic_9000-1}
|
||||
CERC_LACONICD_USER_KEY: ${CERC_LACONICD_USER_KEY}
|
||||
CERC_LACONICD_BOND_ID: ${CERC_LACONICD_BOND_ID}
|
||||
CERC_LACONICD_GAS: ${CERC_LACONICD_GAS:-200000}
|
||||
CERC_LACONICD_FEES: ${CERC_LACONICD_FEES:-200000alnt}
|
||||
volumes:
|
||||
- ../config/laconic-console/cli/create-config.sh:/app/create-config.sh
|
||||
- laconic-registry-data:/laconic-registry-data
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
console:
|
||||
laconic-console:
|
||||
restart: unless-stopped
|
||||
image: cerc/laconic-console-host:local
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_WEBAPP_FILES_DIR: ${CERC_WEBAPP_FILES_DIR:-/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production}
|
||||
LACONIC_HOSTED_ENDPOINT: ${LACONIC_HOSTED_ENDPOINT:-http://localhost:9473}
|
||||
volumes:
|
||||
- ../config/laconic-console/console/config.yml:/config/config.yml
|
||||
- CERC_WEBAPP_FILES_DIR=${CERC_WEBAPP_FILES_DIR:-/usr/local/share/.config/yarn/global/node_modules/@cerc-io/console-app/dist/production}
|
||||
- LACONIC_HOSTED_ENDPOINT=${LACONIC_HOSTED_ENDPOINT:-http://localhost:9473}
|
||||
ports:
|
||||
- "80"
|
||||
|
||||
volumes:
|
||||
laconic-registry-data:
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
services:
|
||||
faucet:
|
||||
restart: unless-stopped
|
||||
image: cerc/laconic-faucet:local
|
||||
command: ["bash", "-c", "./start-faucet.sh"]
|
||||
environment:
|
||||
CERC_SCRIPT_DEBUG: ${CERC_SCRIPT_DEBUG}
|
||||
CERC_LACONICD_RPC_ENDPOINT: ${CERC_LACONICD_RPC_ENDPOINT:-http://laconicd:26657}
|
||||
CERC_FAUCET_KEY: ${CERC_FAUCET_KEY}
|
||||
CERC_LACONICD_CHAIN_ID: ${CERC_LACONICD_CHAIN_ID:-laconic_9000-1}
|
||||
CERC_TRANSFER_AMOUNT: ${CERC_TRANSFER_AMOUNT:-10000000000}
|
||||
CERC_PERIOD_TRANSFER_LIMIT: ${CERC_PERIOD_TRANSFER_LIMIT:-30000000000}
|
||||
volumes:
|
||||
- faucet-data:/app/db
|
||||
- ../config/laconic-faucet/start-faucet.sh:/app/start-faucet.sh
|
||||
- ../config/laconic-faucet/config-template.toml:/app/environments/config-template.toml
|
||||
ports:
|
||||
- 3000
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "127.0.0.1", "3000"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
start_period: 5s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
faucet-data:
|
||||
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
laconicd:
|
||||
restart: no
|
||||
image: cerc/laconic2d:local
|
||||
command: ["/bin/sh", "-c", "/opt/run-laconicd.sh"]
|
||||
volumes:
|
||||
- laconicd-data:/root/.laconicd/data
|
||||
- laconicd-config:/root/.laconicd/config
|
||||
- laconicd-keyring:/root/.laconicd/keyring-test
|
||||
- ../config/laconicd/scripts/run-laconicd.sh:/opt/run-laconicd.sh
|
||||
- ../config/laconicd/scripts/export-mykey.sh:/docker-entrypoint-scripts.d/export-mykey.sh
|
||||
- ../config/laconicd/scripts/export-myaddress.sh:/docker-entrypoint-scripts.d/export-myaddress.sh
|
||||
# TODO: determine which of the ports below is really needed
|
||||
ports:
|
||||
- "6060"
|
||||
- "26657"
|
||||
- "26656"
|
||||
- "9473"
|
||||
- "9090"
|
||||
- "9091"
|
||||
- "1317"
|
||||
cli:
|
||||
image: cerc/laconic-registry-cli:local
|
||||
volumes:
|
||||
- ../config/laconicd/registry-cli-config-template.yml:/registry-cli-config-template.yml
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
laconicd-config:
|
||||
laconicd-keyring:
|
||||
@@ -1,31 +0,0 @@
|
||||
services:
|
||||
laconicd:
|
||||
restart: unless-stopped
|
||||
image: cerc/laconicd:local
|
||||
command: ["bash", "-c", "/opt/run-laconicd.sh"]
|
||||
environment:
|
||||
CERC_MONIKER: ${CERC_MONIKER:-TestnetNode}
|
||||
CERC_CHAIN_ID: ${CERC_CHAIN_ID:-laconic_9000-1}
|
||||
CERC_PEERS: ${CERC_PEERS}
|
||||
CERC_LOGLEVEL: ${CERC_LOGLEVEL:-info}
|
||||
volumes:
|
||||
- laconicd-data:/root/.laconicd
|
||||
- ../config/laconicd/run-laconicd.sh:/opt/run-laconicd.sh
|
||||
ports:
|
||||
- "6060"
|
||||
- "26657"
|
||||
- "26656"
|
||||
- "9473"
|
||||
- "9090"
|
||||
- "1317"
|
||||
healthcheck:
|
||||
test: ["CMD", "nc", "-vz", "127.0.0.1", "26657"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
start_period: 10s
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
# Create the required config file
|
||||
config_file="/app/config.yml"
|
||||
cat <<EOF > $config_file
|
||||
services:
|
||||
registry:
|
||||
rpcEndpoint: ${CERC_LACONICD_RPC_ENDPOINT}
|
||||
gqlEndpoint: ${CERC_LACONICD_GQL_ENDPOINT}
|
||||
userKey: ${CERC_LACONICD_USER_KEY}
|
||||
bondId: ${CERC_LACONICD_BOND_ID}
|
||||
chainId: ${CERC_LACONICD_CHAIN_ID}
|
||||
gas: ${CERC_LACONICD_GAS}
|
||||
fees: ${CERC_LACONICD_FEES}
|
||||
EOF
|
||||
|
||||
echo "Exported config to $config_file"
|
||||
@@ -1,13 +0,0 @@
|
||||
[upstream]
|
||||
rpcEndpoint = "REPLACE_WITH_CERC_LACONICD_RPC_ENDPOINT"
|
||||
chainId = "laconic_9000-1"
|
||||
denom = "alnt"
|
||||
prefix = "laconic"
|
||||
gasPrice = "1"
|
||||
faucetKey = "REPLACE_WITH_CERC_FAUCET_KEY"
|
||||
|
||||
[server]
|
||||
port=3000
|
||||
transferAmount = "REPLACE_WITH_CERC_TRANSFER_AMOUNT"
|
||||
periodTransferLimit = "REPLACE_WITH_CERC_PERIOD_TRANSFER_LIMIT"
|
||||
dbDir = "db"
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
config_template=$(cat environments/config-template.toml)
|
||||
target_config="./environments/local.toml"
|
||||
|
||||
# Check if faucet key is set
|
||||
if [ -z "${CERC_FAUCET_KEY:-}" ]; then
|
||||
echo "Error: CERC_FAUCET_KEY is not set. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Using laconicd RPC endpoint: $CERC_LACONICD_RPC_ENDPOINT"
|
||||
echo "Transfer amount per request: $CERC_TRANSFER_AMOUNT"
|
||||
echo "Transfer limit for an address within a period: $CERC_PERIOD_TRANSFER_LIMIT"
|
||||
|
||||
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_PERIOD_TRANSFER_LIMIT|${CERC_PERIOD_TRANSFER_LIMIT}|; ")
|
||||
|
||||
echo "$FAUCET_CONFIG" > $target_config
|
||||
echo "Starting faucet..."
|
||||
node dist/index.js
|
||||
@@ -0,0 +1,9 @@
|
||||
services:
|
||||
cns:
|
||||
restEndpoint: 'http://laconicd:1317'
|
||||
gqlEndpoint: 'http://laconicd:9473/api'
|
||||
userKey: REPLACE_WITH_MYKEY
|
||||
bondId:
|
||||
chainId: laconic_9000-1
|
||||
gas: 250000
|
||||
fees: 200000aphoton
|
||||
@@ -1,52 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
input_genesis_file=/root/.laconicd/tmp/genesis.json
|
||||
if [ ! -f ${input_genesis_file} ]; then
|
||||
echo "Genesis file not provided, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$CERC_PEERS" ]; then
|
||||
echo "Persistent peers not provided, exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Env:"
|
||||
echo "Moniker: $CERC_MONIKER"
|
||||
echo "Chain Id: $CERC_CHAIN_ID"
|
||||
echo "Persistent peers: $CERC_PEERS"
|
||||
echo "Log level: $CERC_LOGLEVEL"
|
||||
|
||||
NODE_HOME=/root/.laconicd
|
||||
|
||||
# Set chain id in config
|
||||
laconicd config set client chain-id $CERC_CHAIN_ID --home $NODE_HOME
|
||||
|
||||
# Check if node data dir already exists
|
||||
if [ -z "$(ls -A "$NODE_HOME/data")" ]; then
|
||||
# Init node
|
||||
echo "Initializing a new laconicd node with moniker $CERC_MONIKER and chain id $CERC_CHAIN_ID"
|
||||
laconicd init $CERC_MONIKER --chain-id=$CERC_CHAIN_ID --home $NODE_HOME
|
||||
|
||||
# Use provided genesis config
|
||||
cp $input_genesis_file $NODE_HOME/config/genesis.json
|
||||
else
|
||||
echo "Node data dir $NODE_HOME/data already exists, skipping initialization..."
|
||||
fi
|
||||
|
||||
# Update config with persistent peers
|
||||
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$CERC_PEERS\"/g" $NODE_HOME/config/config.toml
|
||||
|
||||
echo "Starting laconicd node..."
|
||||
laconicd start \
|
||||
--api.enable \
|
||||
--rpc.laddr="tcp://0.0.0.0:26657" \
|
||||
--gql-playground --gql-server \
|
||||
--log_level $CERC_LOGLEVEL \
|
||||
--home $NODE_HOME
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
laconicd keys show mykey | grep address | cut -d ' ' -f 3
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo y | laconicd keys export mykey --unarmored-hex --unsafe
|
||||
@@ -0,0 +1,47 @@
|
||||
#!/bin/sh
|
||||
if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
# TODO: Read from env
|
||||
MONIKER=MyNode
|
||||
CHAIN_ID=laconic_9000-1
|
||||
GENESIS_FILE_URL="/root/.laconicd/config/genesis.json"
|
||||
PEERS=""
|
||||
LOGLEVEL="info"
|
||||
|
||||
if [ -z "$PEERS" ]; then
|
||||
echo "Persistent peers not provided, exiting..."
|
||||
exit 1
|
||||
else
|
||||
echo "Using persistent peers $PEERS"
|
||||
fi
|
||||
|
||||
echo "Env:"
|
||||
echo "Moniker: $MONIKER"
|
||||
echo "Chain Id: $CHAIN_ID"
|
||||
echo "Genesis file: $GENESIS_FILE_URL"
|
||||
echo "Persistent peers: $PEERS"
|
||||
|
||||
NODE_HOME=/root/.laconicd
|
||||
|
||||
# Set chain id in config
|
||||
laconicd config set client chain-id $CHAIN_ID --home $NODE_HOME
|
||||
|
||||
# Check if node data dir already exists
|
||||
if [ -z "$(ls -A "$NODE_HOME/data")" ]; then
|
||||
# Init node
|
||||
echo "Initializing a new laconicd node with moniker $MONIKER and chain id $CHAIN_ID"
|
||||
laconicd init $MONIKER --chain-id=$CHAIN_ID --home $NODE_HOME
|
||||
|
||||
# Fetch genesis config
|
||||
echo "Fetching genesis file from $GENESIS_FILE_URL"
|
||||
curl -o $NODE_HOME/config/genesis.json $GENESIS_FILE_URL
|
||||
else
|
||||
echo "Node data dir $NODE_HOME/data already exists, skipping initialization..."
|
||||
fi
|
||||
|
||||
# Update config with persistent peers
|
||||
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/g" $NODE_HOME/config/config.toml
|
||||
|
||||
laconicd start --gql-playground --gql-server --log_level $LOGLEVEL --home $NODE_HOME
|
||||
@@ -1,16 +1,15 @@
|
||||
FROM cerc/webapp-base:local
|
||||
|
||||
# Configure the cerc-io npm registry
|
||||
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||
RUN npm config set @lirewine:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||
# This container pulls npm packages from a local registry configured via these env vars
|
||||
ARG CERC_NPM_REGISTRY_URL
|
||||
ARG CERC_NPM_AUTH_TOKEN
|
||||
|
||||
WORKDIR /app
|
||||
# Configure the local npm registry
|
||||
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \
|
||||
&& npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \
|
||||
&& npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
||||
|
||||
COPY . .
|
||||
# Globally install the payload web app package
|
||||
RUN yarn global add @cerc-io/console-app
|
||||
|
||||
RUN echo "Installing dependencies" && yarn
|
||||
RUN echo "Building" && LACONIC_HOSTED_CONFIG_FILE=config-hosted.yml yarn dist
|
||||
|
||||
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||
|
||||
RUN yarn global add file:$PWD
|
||||
COPY ./config.yml /config
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build cerc/laconic-console-host
|
||||
# Build cerc/laconic-registry-cli
|
||||
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
|
||||
# See: https://stackoverflow.com/a/246128/1701505
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/laconic-console
|
||||
docker build -t cerc/laconic-console-host:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
||||
--add-host gitea.local:host-gateway \
|
||||
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Config for laconic-console
|
||||
# Config for laconic-console running in a fixturenet with laconicd
|
||||
|
||||
services:
|
||||
wns:
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build cerc/laconic-faucet
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/laconic-faucet:local ${build_command_args} ${CERC_REPO_BASE_DIR}/laconic-faucet
|
||||
@@ -1,20 +1,65 @@
|
||||
# Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
|
||||
# Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile
|
||||
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
|
||||
ARG VARIANT=18-bullseye
|
||||
FROM node:${VARIANT}
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install --no-install-recommends python3 jq bash curl nano
|
||||
ARG USERNAME=node
|
||||
ARG NPM_GLOBAL=/usr/local/share/npm-global
|
||||
|
||||
WORKDIR /app
|
||||
# This container pulls npm packages from a local registry configured via these env vars
|
||||
ARG CERC_NPM_REGISTRY_URL
|
||||
ARG CERC_NPM_AUTH_TOKEN
|
||||
|
||||
COPY . .
|
||||
# Add NPM global to PATH.
|
||||
ENV PATH=${NPM_GLOBAL}/bin:${PATH}
|
||||
# Prevents npm from printing version warnings
|
||||
ENV NPM_CONFIG_UPDATE_NOTIFIER=false
|
||||
|
||||
RUN echo "Installing dependencies and building laconic-registry-cli" && \
|
||||
yarn && yarn build
|
||||
RUN \
|
||||
# Configure global npm install location, use group to adapt to UID/GID changes
|
||||
if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \
|
||||
&& usermod -a -G npm ${USERNAME} \
|
||||
&& umask 0002 \
|
||||
&& mkdir -p ${NPM_GLOBAL} \
|
||||
&& touch /usr/local/etc/npmrc \
|
||||
&& chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc \
|
||||
&& chmod g+s ${NPM_GLOBAL} \
|
||||
&& npm config -g set prefix ${NPM_GLOBAL} \
|
||||
&& su ${USERNAME} -c "npm config -g set prefix ${NPM_GLOBAL}" \
|
||||
# Install eslint
|
||||
&& su ${USERNAME} -c "umask 0002 && npm install -g eslint" \
|
||||
&& npm cache clean --force > /dev/null 2>&1
|
||||
|
||||
# Globally install the cli binary
|
||||
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||
RUN yarn global add file:$PWD
|
||||
# [Optional] Uncomment this section to install additional OS packages.
|
||||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt-get -y install --no-install-recommends jq
|
||||
|
||||
# [Optional] Uncomment if you want to install an additional version of node using nvm
|
||||
# ARG EXTRA_NODE_VERSION=10
|
||||
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
|
||||
|
||||
# [Optional] Uncomment if you want to install more global node modules
|
||||
# RUN su node -c "npm install -g <your-package-list-here>"
|
||||
|
||||
# Configure the local npm registry
|
||||
RUN npm config set @cerc-io:registry ${CERC_NPM_REGISTRY_URL} \
|
||||
&& npm config set @lirewine:registry ${CERC_NPM_REGISTRY_URL} \
|
||||
&& npm config set -- ${CERC_NPM_REGISTRY_URL}:_authToken ${CERC_NPM_AUTH_TOKEN}
|
||||
|
||||
# TODO: the image at this point could be made a base image for several different CLI images
|
||||
# that install different Node-based CLI commands
|
||||
|
||||
# Globally install the cli package
|
||||
RUN yarn global add @cerc-io/laconic-registry-cli
|
||||
|
||||
# Add scripts
|
||||
RUN mkdir /scripts
|
||||
RUN mkdir /scripts/demo-records
|
||||
ENV PATH="${PATH}:/scripts"
|
||||
COPY ./create-demo-records.sh /scripts
|
||||
COPY ./demo-records /scripts/demo-records
|
||||
COPY ./import-key.sh /scripts
|
||||
COPY ./import-address.sh /scripts
|
||||
|
||||
# Default command sleeps forever so docker doesn't kill it
|
||||
CMD ["bash", "-c", "while :; do sleep 600; done"]
|
||||
CMD ["sh", "-c", "while :; do sleep 600; done"]
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Build cerc/laconic-registry-cli
|
||||
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
|
||||
# See: https://stackoverflow.com/a/246128/1701505
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
docker build -t cerc/laconic-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile ${CERC_REPO_BASE_DIR}/laconic-registry-cli
|
||||
docker build -t cerc/laconic-registry-cli:local ${build_command_args} -f ${SCRIPT_DIR}/Dockerfile \
|
||||
--add-host gitea.local:host-gateway \
|
||||
--build-arg CERC_NPM_AUTH_TOKEN --build-arg CERC_NPM_REGISTRY_URL ${SCRIPT_DIR}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
echo ${1} > my-address.txt
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
sed 's/REPLACE_WITH_MYKEY/'${1}'/' registry-cli-config-template.yml > config.yml
|
||||
+1
-1
@@ -2,4 +2,4 @@
|
||||
|
||||
# Build cerc/laconicd
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/laconicd:local ${build_command_args} ${CERC_REPO_BASE_DIR}/laconicd
|
||||
docker build -t cerc/laconic2d:local ${build_command_args} ${CERC_REPO_BASE_DIR}/laconic2d
|
||||
@@ -8,27 +8,21 @@ CERC_WEBAPP_FILES_DIR="${CERC_WEBAPP_FILES_DIR:-/data}"
|
||||
CERC_ENABLE_CORS="${CERC_ENABLE_CORS:-false}"
|
||||
CERC_SINGLE_PAGE_APP="${CERC_SINGLE_PAGE_APP}"
|
||||
|
||||
if [ -z "${CERC_SINGLE_PAGE_APP}" ]; then
|
||||
# If there is only one HTML file, assume an SPA.
|
||||
if [ 1 -eq $(find "${CERC_WEBAPP_FILES_DIR}" -name '*.html' | wc -l) ]; then
|
||||
if [ -z "${CERC_SINGLE_PAGE_APP}" ]; then
|
||||
if [ 1 -eq $(find "${CERC_WEBAPP_FILES_DIR}" -name '*.html' | wc -l) ] && [ -d "${CERC_WEBAPP_FILES_DIR}/static" ]; then
|
||||
CERC_SINGLE_PAGE_APP=true
|
||||
else
|
||||
CERC_SINGLE_PAGE_APP=false
|
||||
fi
|
||||
fi
|
||||
|
||||
# ${var,,} is a lower-case comparison
|
||||
if [ "true" == "${CERC_ENABLE_CORS,,}" ]; then
|
||||
if [ "true" == "$CERC_ENABLE_CORS" ]; then
|
||||
CERC_HTTP_EXTRA_ARGS="$CERC_HTTP_EXTRA_ARGS --cors"
|
||||
fi
|
||||
|
||||
# ${var,,} is a lower-case comparison
|
||||
if [ "true" == "${CERC_SINGLE_PAGE_APP,,}" ]; then
|
||||
echo "Serving content as single-page app. If this is wrong, set 'CERC_SINGLE_PAGE_APP=false'"
|
||||
if [ "true" == "$CERC_SINGLE_PAGE_APP" ]; then
|
||||
# Create a catchall redirect back to /
|
||||
CERC_HTTP_EXTRA_ARGS="$CERC_HTTP_EXTRA_ARGS --proxy http://localhost:${CERC_LISTEN_PORT}?"
|
||||
else
|
||||
echo "Serving content normally. If this is a single-page app, set 'CERC_SINGLE_PAGE_APP=true'"
|
||||
fi
|
||||
|
||||
LACONIC_HOSTED_CONFIG_FILE=${LACONIC_HOSTED_CONFIG_FILE}
|
||||
@@ -45,4 +39,4 @@ if [ -f "${LACONIC_HOSTED_CONFIG_FILE}" ]; then
|
||||
fi
|
||||
|
||||
/scripts/apply-runtime-env.sh ${CERC_WEBAPP_FILES_DIR}
|
||||
http-server $CERC_HTTP_EXTRA_ARGS -p ${CERC_LISTEN_PORT} "${CERC_WEBAPP_FILES_DIR}"
|
||||
http-server $CERC_HTTP_EXTRA_ARGS -p ${CERC_LISTEN_PORT} "${CERC_WEBAPP_FILES_DIR}"
|
||||
@@ -1,141 +0,0 @@
|
||||
# laconic-console
|
||||
|
||||
Instructions for running laconic registry CLI and console
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* laconicd RPC and GQL endpoints
|
||||
|
||||
## Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console setup-repositories
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console build-containers
|
||||
```
|
||||
|
||||
This should create the following docker images locally:
|
||||
|
||||
* `cerc/laconic-registry-cli`
|
||||
* `cerc/webapp-base`
|
||||
* `cerc/laconic-console-host`
|
||||
|
||||
## Create a deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-console deploy init --output laconic-console-spec.yml
|
||||
```
|
||||
|
||||
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||
|
||||
```bash
|
||||
...
|
||||
network:
|
||||
ports:
|
||||
laconic-console:
|
||||
- '8080:80'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
* Inside the deployment directory, open `config.env` file and set following env variables:
|
||||
|
||||
```bash
|
||||
# All optional
|
||||
|
||||
# CLI configuration
|
||||
|
||||
# laconicd RPC endpoint (default: http://laconicd:26657)
|
||||
CERC_LACONICD_RPC_ENDPOINT=
|
||||
|
||||
# laconicd GQL endpoint (default: http://laconicd:9473/api)
|
||||
CERC_LACONICD_GQL_ENDPOINT=
|
||||
|
||||
# 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=
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
* Start the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-console-deployment start
|
||||
```
|
||||
|
||||
* 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"
|
||||
```
|
||||
|
||||
## Check status
|
||||
|
||||
* To list down and monitor the running containers:
|
||||
|
||||
```bash
|
||||
# With status
|
||||
docker ps -a
|
||||
|
||||
# Follow logs for console container
|
||||
laconic-so deployment --dir laconic-console-deployment logs console -f
|
||||
```
|
||||
|
||||
## Clean up
|
||||
|
||||
* Stop all services running in the background:
|
||||
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir laconic-console-deployment stop
|
||||
```
|
||||
|
||||
* To stop all services and also delete data:
|
||||
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir laconic-console-deployment stop --delete-volumes
|
||||
|
||||
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
||||
rm -r laconic-console-deployment
|
||||
```
|
||||
@@ -1,12 +0,0 @@
|
||||
version: "1.0"
|
||||
name: laconic-console
|
||||
description: "Laconic registry CLI and console"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/laconic-registry-cli
|
||||
- git.vdb.to/cerc-io/laconic-console
|
||||
containers:
|
||||
- cerc/laconic-registry-cli
|
||||
- cerc/webapp-base
|
||||
- cerc/laconic-console-host
|
||||
pods:
|
||||
- laconic-console
|
||||
@@ -1,121 +0,0 @@
|
||||
# laconic-faucet
|
||||
|
||||
Instructions for running the laconic faucet
|
||||
|
||||
## Setup
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
||||
```
|
||||
|
||||
* Clone the laconic-faucet respository:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet setup-repositories
|
||||
```
|
||||
|
||||
* Build the container image:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet build-containers
|
||||
```
|
||||
|
||||
This should create the `cerc/laconic-faucet` image locally
|
||||
|
||||
## Create a deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet deploy init --output laconic-faucet-spec.yml
|
||||
```
|
||||
|
||||
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||
|
||||
```bash
|
||||
network:
|
||||
ports:
|
||||
faucet:
|
||||
- '3000:3000'
|
||||
```
|
||||
|
||||
* Create a deployment from the spec file:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet deploy create --spec-file laconic-faucet-spec.yml --deployment-dir laconic-faucet-deployment
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
* Inside the `laconic-faucet-deployment` deployment directory, open `config.env` file and set following env variables:
|
||||
|
||||
```bash
|
||||
# Private key of a funded faucet account
|
||||
CERC_FAUCET_KEY=
|
||||
|
||||
# Optional
|
||||
|
||||
# laconicd RPC endpoint (default: http://laconicd:26657)
|
||||
CERC_LACONICD_RPC_ENDPOINT=
|
||||
|
||||
# laconicd chain id (default: laconic_9000-1)
|
||||
CERC_LACONICD_CHAIN_ID=
|
||||
|
||||
# Amount of tokens to transfer on a single request (default: 1000000)
|
||||
CERC_TRANSFER_AMOUNT=
|
||||
|
||||
# Transfer limit for an address within a period (default: 3000000)
|
||||
CERC_PERIOD_TRANSFER_LIMIT=
|
||||
```
|
||||
|
||||
## Start the deployment
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir laconic-faucet-deployment start
|
||||
```
|
||||
|
||||
## Check status
|
||||
|
||||
* To list down and monitor the running container:
|
||||
|
||||
```bash
|
||||
# With status
|
||||
docker ps
|
||||
|
||||
# Check logs for a container
|
||||
docker logs -f <CONTAINER_ID>
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
* Request tokens from the faucet for an account:
|
||||
|
||||
```bash
|
||||
curl -X POST http://localhost:3000/faucet \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"address": "<laconicd_address>"}'
|
||||
|
||||
# Expected output:
|
||||
# {"success":true,"txHash":"<tx_hash>"}
|
||||
```
|
||||
|
||||
## Clean up
|
||||
|
||||
* Stop the `laconic-faucet` service running in the background:
|
||||
|
||||
```bash
|
||||
# Stop the docker container
|
||||
laconic-so deployment --dir laconic-faucet-deployment stop
|
||||
```
|
||||
|
||||
* To stop the service and also delete data:
|
||||
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir laconic-faucet-deployment stop --delete-volumes
|
||||
|
||||
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
||||
rm -r laconic-faucet-deployment
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
version: "1.0"
|
||||
name: laconic-faucet
|
||||
description: "Faucet for laconicd"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/laconic-faucet
|
||||
containers:
|
||||
- cerc/laconic-faucet
|
||||
pods:
|
||||
- laconic-faucet
|
||||
@@ -0,0 +1,62 @@
|
||||
# laconicd-full-node
|
||||
|
||||
Instructions for deploying a laconicd full node along with steps to join testnet as a validator post genesis
|
||||
|
||||
Minimum hardware requirements:
|
||||
|
||||
- RAM: 8-16GB
|
||||
- Disk space: 200GB
|
||||
- CPU: 2 cores
|
||||
|
||||
## Clone the stack repo
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
||||
```
|
||||
|
||||
## Clone required repositories
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node setup-repositories
|
||||
```
|
||||
|
||||
## Build the fixturenet-eth containers
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node build-containers
|
||||
```
|
||||
|
||||
This should create several container images in the local image registry:
|
||||
|
||||
* cerc/laconic2d
|
||||
* cerc/laconic-registry-cli
|
||||
* cerc/webapp-base
|
||||
* cerc/laconic-console-host
|
||||
|
||||
## Deploy the stack
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy up
|
||||
```
|
||||
|
||||
## Check status
|
||||
|
||||
<!-- TODO -->
|
||||
|
||||
## Join as testnet validator
|
||||
|
||||
<!-- TODO import a funded account / create an account and get it funded -->
|
||||
|
||||
<!-- TODO create a validator-->
|
||||
|
||||
## Clean up
|
||||
|
||||
Stop all services running in the background:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconicd-full-node deploy down
|
||||
```
|
||||
|
||||
Clear volumes created by this stack:
|
||||
|
||||
<!-- TODO -->
|
||||
@@ -0,0 +1,19 @@
|
||||
version: "1.1"
|
||||
name: laconicd-full-node
|
||||
description: "Laconicd full node"
|
||||
repos:
|
||||
- cerc-io/laconic2d
|
||||
- cerc-io/laconic-registry-cli@laconic2
|
||||
- cerc-io/laconic-console@laconic2
|
||||
containers:
|
||||
- cerc/laconic2d
|
||||
- cerc/laconic-registry-cli
|
||||
- cerc/webapp-base
|
||||
- cerc/laconic-console-host
|
||||
pods:
|
||||
- laconicd-full-node
|
||||
- laconic-console
|
||||
config:
|
||||
cli:
|
||||
key: laconicd.mykey
|
||||
address: laconicd.myaddress
|
||||
@@ -1,229 +0,0 @@
|
||||
# testnet-laconicd
|
||||
|
||||
Instructions for running a laconicd testnet full node and joining as a validator
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* Minimum hardware requirements:
|
||||
|
||||
```bash
|
||||
RAM: 8-16GB
|
||||
Disk space: 200GB
|
||||
CPU: 2 cores
|
||||
```
|
||||
|
||||
* Testnet genesis file and peer node address
|
||||
|
||||
* Mnemonic from the [wallet](https://wallet.laconic.com)
|
||||
|
||||
### Participant Onboarded
|
||||
|
||||
* Visit <https://wallet.laconic.com/> 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/)
|
||||
|
||||
* 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 your nitro and laconicd account to onboard
|
||||
|
||||
* Sign using the nitro key
|
||||
|
||||
* Approve sign request on Wallet
|
||||
|
||||
* 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
|
||||
|
||||
* Clone the stack repo:
|
||||
|
||||
```bash
|
||||
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
|
||||
```
|
||||
|
||||
* Clone required repositories:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd 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
|
||||
```
|
||||
|
||||
* Build the container images:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd build-containers
|
||||
|
||||
This should create the following docker images locally:
|
||||
|
||||
* `cerc/laconicd`
|
||||
|
||||
## Create a deployment
|
||||
|
||||
* Create a spec file for the deployment:
|
||||
|
||||
```bash
|
||||
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/testnet-laconicd deploy init --output testnet-laconicd-spec.yml
|
||||
```
|
||||
|
||||
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||
|
||||
```bash
|
||||
# testnet-laconicd-spec.yml
|
||||
...
|
||||
network:
|
||||
ports:
|
||||
laconicd:
|
||||
- '6060:6060'
|
||||
- '26657:26657'
|
||||
- '26656:26656'
|
||||
- '9473:9473'
|
||||
- '9090:9090'
|
||||
- '1317:1317'
|
||||
```
|
||||
|
||||
* Create the deployment from the spec file:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
* Copy over the published testnet genesis file (`.json`) to data directory in deployment (`testnet-laconicd-deployment/data/laconicd-data/tmp`):
|
||||
|
||||
```bash
|
||||
# Example
|
||||
mkdir -p testnet-laconicd-deployment/data/laconicd-data/tmp
|
||||
cp genesis.json testnet-laconicd-deployment/data/laconicd-data/tmp/genesis.json
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
* Inside the `testnet-laconicd-deployment` 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@laconicd.laconic.com:26656"
|
||||
# Use the provided node id
|
||||
CERC_PEERS=""
|
||||
|
||||
# A custom human readable name for this node (default: TestnetNode)
|
||||
CERC_MONIKER=
|
||||
```
|
||||
|
||||
## Start the deployment
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment start
|
||||
```
|
||||
|
||||
## Check status
|
||||
|
||||
* To list down and monitor the running containers:
|
||||
|
||||
```bash
|
||||
# With status
|
||||
docker ps -a
|
||||
|
||||
# Follow logs for laconicd container
|
||||
laconic-so deployment --dir testnet-laconicd-deployment logs laconicd -f
|
||||
```
|
||||
|
||||
* Check the sync status of your node:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd status | jq .sync_info"
|
||||
|
||||
# `catching_up: false` indicates that node is completely synced
|
||||
```
|
||||
|
||||
## Join as testnet validator
|
||||
|
||||
* Import a key pair:
|
||||
|
||||
```bash
|
||||
KEY_NAME=alice
|
||||
|
||||
# Restore existing key with mnemonic seed phrase
|
||||
# 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"
|
||||
```
|
||||
|
||||
* Check balance for your account:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query bank balances <account-address>"
|
||||
```
|
||||
|
||||
* Create required validator configuration:
|
||||
|
||||
```bash
|
||||
# Replace <your-node-moniker> with your node's moniker
|
||||
NODE_MONIKER=<your-node-moniker>
|
||||
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd 'cat <<EOF > $NODE_MONIKER-validator.json
|
||||
{
|
||||
"pubkey": $(laconicd cometbft show-validator),
|
||||
"amount": "1000000000000000alnt",
|
||||
"moniker": "$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 $NODE_MONIKER-validator.json \
|
||||
--fees 500000alnt \
|
||||
--chain-id=laconic_9000-1 \
|
||||
--from $KEY_NAME'
|
||||
```
|
||||
|
||||
* View staking validators:
|
||||
|
||||
```bash
|
||||
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validators"
|
||||
```
|
||||
|
||||
* Check that in the list of validators `<your-node-moniker>` exists
|
||||
|
||||
## Clean up
|
||||
|
||||
* Stop all `testnet-laconicd` services running in the background:
|
||||
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir testnet-laconicd-deployment stop
|
||||
```
|
||||
|
||||
* To stop all services and also delete data:
|
||||
|
||||
```bash
|
||||
# Stop the docker containers
|
||||
laconic-so deployment --dir testnet-laconicd-deployment stop --delete-volumes
|
||||
|
||||
# Remove deployment directory (deployment will have to be recreated for a re-run)
|
||||
rm -r testnet-laconicd-deployment
|
||||
```
|
||||
@@ -1,9 +0,0 @@
|
||||
version: "1.0"
|
||||
name: testnet-laconicd
|
||||
description: "Laconicd full node"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/laconicd
|
||||
containers:
|
||||
- cerc/laconicd
|
||||
pods:
|
||||
- testnet-laconicd
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user