Add scripts for onboarding testnet participants from stage 0 to 1 laconicd chain #2
@ -6,8 +6,10 @@ services:
|
||||
environment:
|
||||
TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false}
|
||||
TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false}
|
||||
ONBOARDING_ENABLED: ${ONBOARDING_ENABLED:-false}
|
||||
volumes:
|
||||
- laconicd-data:/root/.laconicd
|
||||
- genesis-config:/var/tmp
|
||||
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||
ports:
|
||||
- "6060"
|
||||
@ -25,3 +27,4 @@ services:
|
||||
|
||||
volumes:
|
||||
laconicd-data:
|
||||
genesis-config:
|
||||
|
@ -6,6 +6,8 @@ MONIKER="localtestnet"
|
||||
KEYRING="test"
|
||||
LOGLEVEL="${LOGLEVEL:-info}"
|
||||
|
||||
input_genesis_file=/var/tmp/genesis.json
|
||||
|
||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
# validate dependencies are installed
|
||||
command -v jq > /dev/null 2>&1 || {
|
||||
@ -29,6 +31,11 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||
laconicd init $MONIKER --chain-id $CHAINID --default-denom photon
|
||||
|
||||
if [ -f ${input_genesis_file} ]; then
|
||||
# Use provided genesis config
|
||||
cp $input_genesis_file $HOME/.laconicd/config/genesis.json
|
||||
fi
|
||||
|
||||
update_genesis() {
|
||||
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
|
||||
mv $HOME/.laconicd/config/tmp_genesis.json $HOME/.laconicd/config/genesis.json
|
||||
@ -52,6 +59,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
update_genesis '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"'
|
||||
fi
|
||||
|
||||
if [[ "$ONBOARDING_ENABLED" == "true" ]]; then
|
||||
echo "Enabling validator onboarding."
|
||||
|
||||
update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true'
|
||||
fi
|
||||
|
||||
# increase block time (?)
|
||||
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
||||
|
||||
|
@ -51,7 +51,7 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso
|
||||
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||
|
||||
```bash
|
||||
# testnet-laconicd-spec.yml
|
||||
# fixturenet-laconicd-spec.yml
|
||||
...
|
||||
network:
|
||||
ports:
|
||||
@ -82,8 +82,24 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso
|
||||
cp fixturenet-laconicd-deployment/deployment.yml laconic-console-deployment/deployment.yml
|
||||
```
|
||||
|
||||
* (Optional) Copy over the genesis file (`.json`) containing the onboarding module state with funded participants to data directory in deployment (`fixturenet-laconicd-deployment/data/genesis-config`):
|
||||
|
||||
```bash
|
||||
# Example
|
||||
cp genesis.json fixturenet-laconicd-deployment/data/genesis-config/genesis.json
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
* Inside the `fixturenet-laconicd-deployment` deployment directory, open `config.env` file and set the following env variable:
|
||||
|
||||
```bash
|
||||
# Optional
|
||||
|
||||
# Set to true to enable adding participants functionality of the onboarding module
|
||||
ONBOARDING_ENABLED=
|
||||
```
|
||||
|
||||
* Inside the `laconic-console-deployment` deployment directory, open `config.env` file and set following env variables:
|
||||
|
||||
```bash
|
||||
|
@ -2,7 +2,7 @@ version: "1.0"
|
||||
name: fixturenet-laconicd
|
||||
description: "A laconicd fixturenet"
|
||||
repos:
|
||||
- git.vdb.to/cerc-io/laconic2d
|
||||
- github.com/deep-stack/laconic2d@testnet-onboarding
|
||||
containers:
|
||||
- cerc/laconic2d
|
||||
pods:
|
||||
|
Loading…
Reference in New Issue
Block a user