Replace laconic2 with laconic and update genesis generation script #5
@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
laconicd:
|
laconicd:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: cerc/laconic2d:local
|
image: cerc/laconicd:local
|
||||||
command: ["bash", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
command: ["bash", "/docker-entrypoint-scripts.d/create-fixturenet.sh"]
|
||||||
environment:
|
environment:
|
||||||
TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false}
|
TEST_AUCTION_ENABLED: ${TEST_AUCTION_ENABLED:-false}
|
||||||
|
@ -89,6 +89,9 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
sed -i 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml
|
sed -i 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Run this to allow requests from any origin
|
||||||
|
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
||||||
|
|
||||||
# Allocate genesis accounts (cosmos formatted addresses)
|
# Allocate genesis accounts (cosmos formatted addresses)
|
||||||
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING
|
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING
|
||||||
|
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Build cerc/laconic2d
|
|
||||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
|
||||||
docker build -t cerc/laconic2d:local ${build_command_args} ${CERC_REPO_BASE_DIR}/laconic2d
|
|
5
stack-orchestrator/container-build/cerc-laconicd/build.sh
Executable file
5
stack-orchestrator/container-build/cerc-laconicd/build.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# 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
|
@ -33,10 +33,10 @@ Instructions for running a laconicd fixturenet along with registry CLI and conso
|
|||||||
|
|
||||||
This should create the following docker images locally:
|
This should create the following docker images locally:
|
||||||
|
|
||||||
* `cerc/laconic2d`
|
* `cerc/laconicd`
|
||||||
* `cerc/laconic2-registry-cli`
|
* `cerc/laconic-registry-cli`
|
||||||
* `cerc/webapp-base`
|
* `cerc/webapp-base`
|
||||||
* `cerc/laconic2-console-host`
|
* `cerc/laconic-console-host`
|
||||||
|
|
||||||
## Create a deployment
|
## Create a deployment
|
||||||
|
|
||||||
|
@ -2,17 +2,16 @@
|
|||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
set -u
|
||||||
# Prerequisite: nitro-rpc-client package installed globally
|
|
||||||
# https://github.com/cerc-io/go-nitro/blob/main/packages/nitro-rpc-client/readme.md#global-install
|
|
||||||
|
|
||||||
# Check args
|
# Check args
|
||||||
if [ "$#" -ne 1 ]; then
|
if [ "$#" -ne 2 ]; then
|
||||||
echo "Usage: $0 <stage0-deployment-dir-absolute>"
|
echo "Usage: $0 <bridge-deployment-dir-absolute> <stage0-deployment-dir-absolute>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STAGE0_DEPLOYMENT_DIR="$1"
|
BRIDGE_DEPLOYMENT_DIR="$1"
|
||||||
|
STAGE0_DEPLOYMENT_DIR="$2"
|
||||||
STAGE1_GENESIS_DIR=stage1-genesis
|
STAGE1_GENESIS_DIR=stage1-genesis
|
||||||
|
|
||||||
# Create a temporary target directory
|
# Create a temporary target directory
|
||||||
@ -22,11 +21,8 @@ mkdir -p $STAGE1_GENESIS_DIR
|
|||||||
|
|
||||||
# Fetch ETH account holdings from the bridge node
|
# Fetch ETH account holdings from the bridge node
|
||||||
|
|
||||||
# Trust locally-trusted development certificates created by mkcert
|
|
||||||
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"
|
|
||||||
|
|
||||||
# Run the nitro-rpc-client command and process the output with jq
|
# Run the nitro-rpc-client command and process the output with jq
|
||||||
eth_account_holdings=$(nitro-rpc-client get-all-l2-channels -p 4006 | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]')
|
eth_account_holdings=$(laconic-so deployment --dir $BRIDGE_DEPLOYMENT_DIR exec nitro-rpc-client "nitro-rpc-client get-all-l2-channels -p 4006 -h nitro-bridge" | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]')
|
||||||
|
|
||||||
echo "Fetched Ethereum account holdings"
|
echo "Fetched Ethereum account holdings"
|
||||||
|
|
||||||
@ -37,7 +33,7 @@ echo "Fetched Ethereum account holdings"
|
|||||||
onboarding_state_file="$STAGE1_GENESIS_DIR/stage0-onboarding-state.json"
|
onboarding_state_file="$STAGE1_GENESIS_DIR/stage0-onboarding-state.json"
|
||||||
docker run -it \
|
docker run -it \
|
||||||
-v ${STAGE0_DEPLOYMENT_DIR}/data/laconicd-data:/root/stage0-deployment/.laconicd \
|
-v ${STAGE0_DEPLOYMENT_DIR}/data/laconicd-data:/root/stage0-deployment/.laconicd \
|
||||||
cerc/laconic2d:local bash -c "laconicd export --home /root/stage0-deployment/.laconicd" \
|
cerc/laconicd:local bash -c "laconicd export --home /root/stage0-deployment/.laconicd" \
|
||||||
| jq .app_state.onboarding > "$onboarding_state_file"
|
| jq .app_state.onboarding > "$onboarding_state_file"
|
||||||
|
|
||||||
stage0_participants=$(cat "$onboarding_state_file" | jq .participants)
|
stage0_participants=$(cat "$onboarding_state_file" | jq .participants)
|
||||||
@ -64,12 +60,12 @@ echo "Calculated allocations for stage 1 chain"
|
|||||||
|
|
||||||
# --------
|
# --------
|
||||||
|
|
||||||
# Run a script with cerc/laconic2d:local to generate the genesis file
|
# Run a script with cerc/laconicd:local to generate the genesis file
|
||||||
# with onboarding module state and given allocations
|
# with onboarding module state and given allocations
|
||||||
docker run -it \
|
docker run -it \
|
||||||
-v ./stage1-genesis:/root/.laconicd \
|
-v ./stage1-genesis:/root/.laconicd \
|
||||||
-v ./scripts:/scripts \
|
-v ./scripts:/scripts \
|
||||||
cerc/laconic2d:local bash -c "/scripts/genesis.sh"
|
cerc/laconicd:local bash -c "/scripts/genesis.sh"
|
||||||
|
|
||||||
# Copy over the genesis file to output folder
|
# Copy over the genesis file to output folder
|
||||||
OUTPUT_DIR=output
|
OUTPUT_DIR=output
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
# Note: Needs to be run in a docker container with image cerc/laconic2d:local
|
# Note: Needs to be run in a docker container with image cerc/laconicd:local
|
||||||
|
|
||||||
CHAINID="laconic_9000-1"
|
CHAINID="laconic_9000-1"
|
||||||
STAGE1_MONIKER=localtestnet-stage-1
|
STAGE1_MONIKER=localtestnet-stage-1
|
||||||
|
@ -2,8 +2,8 @@ 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
|
- git.vdb.to/cerc-io/laconicd
|
||||||
containers:
|
containers:
|
||||||
- cerc/laconic2d
|
- cerc/laconicd
|
||||||
pods:
|
pods:
|
||||||
- fixturenet-laconicd
|
- fixturenet-laconicd
|
||||||
|
Loading…
Reference in New Issue
Block a user