Update stack with testnet onboarding changes (#1)
* Add enable onboarding flag in fixturenet script * Use genesis file if present * Modify setup repos link * Update readme steps to run fixturenet stack using s0 genesis file * Update genesis file mount path * Update instructions for onboarding module flag
This commit is contained in:
parent
57f4648be1
commit
9e9bd3019f
@ -6,8 +6,10 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false}
|
TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false}
|
||||||
TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false}
|
TEST_REGISTRY_EXPIRY: ${TEST_REGISTRY_EXPIRY:-false}
|
||||||
|
ONBOARDING_ENABLED: ${ONBOARDING_ENABLED:-false}
|
||||||
volumes:
|
volumes:
|
||||||
- laconicd-data:/root/.laconicd
|
- laconicd-data:/root/.laconicd
|
||||||
|
- genesis-config:/var/tmp
|
||||||
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
- ../config/fixturenet-laconicd/create-fixturenet.sh:/docker-entrypoint-scripts.d/create-fixturenet.sh
|
||||||
ports:
|
ports:
|
||||||
- "6060"
|
- "6060"
|
||||||
@ -25,3 +27,4 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
laconicd-data:
|
laconicd-data:
|
||||||
|
genesis-config:
|
||||||
|
@ -6,6 +6,8 @@ MONIKER="localtestnet"
|
|||||||
KEYRING="test"
|
KEYRING="test"
|
||||||
LOGLEVEL="${LOGLEVEL:-info}"
|
LOGLEVEL="${LOGLEVEL:-info}"
|
||||||
|
|
||||||
|
input_genesis_file=/var/tmp/genesis.json
|
||||||
|
|
||||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||||
# validate dependencies are installed
|
# validate dependencies are installed
|
||||||
command -v jq > /dev/null 2>&1 || {
|
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)
|
# 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
|
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() {
|
update_genesis() {
|
||||||
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
|
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
|
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"'
|
update_genesis '.app_state["registry"]["params"]["authority_auction_reveals_duration"]="60s"'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$ONBOARDING_ENABLED" == "true" ]]; then
|
||||||
|
echo "Enabling validator onboarding."
|
||||||
|
|
||||||
|
update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true'
|
||||||
|
fi
|
||||||
|
|
||||||
# increase block time (?)
|
# increase block time (?)
|
||||||
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
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:
|
* Edit `network` in the spec file to map container ports to host ports as required:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# testnet-laconicd-spec.yml
|
# fixturenet-laconicd-spec.yml
|
||||||
...
|
...
|
||||||
network:
|
network:
|
||||||
ports:
|
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
|
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
|
## 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:
|
* Inside the `laconic-console-deployment` deployment directory, open `config.env` file and set following env variables:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -2,7 +2,7 @@ version: "1.0"
|
|||||||
name: fixturenet-laconicd
|
name: fixturenet-laconicd
|
||||||
description: "A laconicd fixturenet"
|
description: "A laconicd fixturenet"
|
||||||
repos:
|
repos:
|
||||||
- git.vdb.to/cerc-io/laconic2d
|
- github.com/deep-stack/laconic2d@testnet-onboarding
|
||||||
containers:
|
containers:
|
||||||
- cerc/laconic2d
|
- cerc/laconic2d
|
||||||
pods:
|
pods:
|
||||||
|
Loading…
Reference in New Issue
Block a user