Add instructions for performing txs to the testnet stack

This commit is contained in:
Prathamesh Musale 2024-06-20 15:56:55 +05:30
parent 5497d385e1
commit 8b28a3303c
4 changed files with 36 additions and 8 deletions

View File

@ -44,4 +44,9 @@ fi
sed -i "s/^persistent_peers *=.*/persistent_peers = \"$CERC_PEERS\"/g" $NODE_HOME/config/config.toml
echo "Starting laconicd node..."
laconicd start --gql-playground --gql-server --log_level $CERC_LOGLEVEL --home $NODE_HOME
laconicd start \
--api.enable \
--rpc.laddr="tcp://0.0.0.0:26657" \
--gql-playground --gql-server \
--log_level $CERC_LOGLEVEL \
--home $NODE_HOME

View File

@ -3,7 +3,7 @@ ARG VARIANT=18-bullseye
FROM node:${VARIANT}
RUN apt-get update \
&& apt-get -y install --no-install-recommends python3 jq bash curl
&& apt-get -y install --no-install-recommends python3 jq bash curl nano
WORKDIR /app

View File

@ -53,7 +53,7 @@ Instructions for running laconic registry CLI and console
* 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
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
@ -106,7 +106,7 @@ Instructions for running laconic registry CLI and console
```bash
# Example
laconic-so deployment --dir laconic-console-deployment deploy exec cli "laconic registry status"
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status"
```
## Check status

View File

@ -78,16 +78,16 @@ Instructions for running a laconicd testnet full node and joining as a validator
...
network:
ports:
laconic-console:
console:
- '8080:80'
```
* Create deployments from the spec files:
```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
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
@ -142,6 +142,8 @@ Instructions for running a laconicd testnet full node and joining as a validator
LACONIC_HOSTED_ENDPOINT=
```
Note: Use `host.docker.internal` as host to access ports on the host machine
## Start the deployments
```bash
@ -175,7 +177,7 @@ laconic-so deployment --dir laconic-console-deployment start
```bash
# Example
laconic-so deployment --dir laconic-console-deployment deploy exec cli "laconic registry status"
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry status"
```
## Join as testnet validator
@ -235,6 +237,27 @@ laconic-so deployment --dir laconic-console-deployment start
laconic-so deployment --dir testnet-laconicd-deployment exec laconicd "laconicd query staking validator <key-name>"
```
## 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"
# Note: any changes made to the config will be lost when the cli Docker container is brought down
```
* 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 100000000000"
```
## Clean up
* Stop all `testnet-laconicd` services running in the background: