Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions client-cmds/qlean-cmd.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
#!/bin/bash

#-----------------------qlean setup----------------------
node_binary=
node_docker=
# expects "qlean" submodule or symlink inside "lean-quickstart" root directory
# https://github.com/qdrvm/qlean-mini
node_binary="$scriptDir/qlean/build/src/executable/qlean \
--modules-dir $scriptDir/qlean/build/src/modules \
--genesis $configDir/config.yaml \
--validator-registry-path $configDir/validators.yaml \
--bootnodes $configDir/nodes.yaml \
--data-dir $dataDir/$item \
--node-id $item --node-key $configDir/$privKeyPath \
--listen-addr /ip4/0.0.0.0/udp/$quicPort/quic-v1"

node_docker="--platform linux/amd64 qdrvm/qlean-mini:3f121fc \
--genesis /config/config.yaml \
--validator-registry-path /config/validators.yaml \
--bootnodes /config/nodes.yaml \
--data-dir /data \
--node-id $item --node-key /config/$privKeyPath \
--listen-addr /ip4/0.0.0.0/udp/$quicPort/quic-v1"

# choose either binary or docker
node_setup="docker"
node_setup="docker"
14 changes: 7 additions & 7 deletions spin-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

currentDir=$(pwd)
scriptDir=$(dirname $0)
if [ "$scriptDir" == "." ]; then
scriptDir="$currentDir"
fi

# 0. parse env and args
source "$(dirname $0)/parse-env.sh"
Expand All @@ -13,10 +16,7 @@ source "$(dirname $0)/set-up.sh"
# should take config.yaml and validator-config.yaml and generate files
# 1. nodes.yaml 2. validators.yaml 3. .key files for each of nodes

# 2. get the client cmds with args set
source "$scriptDir/$NETWORK_DIR/client_env.sh"

# 3. collect the nodes that the user has asked us to spin and perform setup
# 2. collect the nodes that the user has asked us to spin and perform setup
if [ "$validatorConfig" == "genesis_bootnode" ] || [ -z "$validatorConfig" ]; then
validator_config_file="$configDir/validator-config.yaml"
else
Expand Down Expand Up @@ -46,13 +46,13 @@ then
exit;
fi;

# 4. run clients
mkdir $dataDir
# 3. run clients
mkdir -p $dataDir
popupTerminalCmd="gnome-terminal --disable-factory --"
for item in "${spin_nodes[@]}"; do
# create and/or cleanup datadirs
itemDataDir="$dataDir/$item"
mkdir $itemDataDir
mkdir -p $itemDataDir
cmd="sudo rm -rf $itemDataDir/*"
echo $cmd
eval $cmd
Expand Down