Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
14 changes: 12 additions & 2 deletions client-cmds/qlean-cmd.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
#!/bin/bash

#-----------------------qlean setup----------------------
node_binary=
# 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
--node-id $item --node-key /config/$privKeyPath \
--listen-addr /ip4/0.0.0.0/udp/$quicPort/quic-v1 \
2>&1 | tee $dataDir/$item.log"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed that capturing logs to file helps debugging and should be enabled for all nodes.
Please don't add this to node_binary.

Suggested change
2>&1 | tee $dataDir/$item.log"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodes should auto gen logs in data dir for example zeam writes file logs with debug level while console logs are only info level

so its upto the client what they want and hence in a particular client cmd


node_docker=

# choose either binary or docker
node_setup="docker"
node_setup="binary"
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