chia-blockchain/tests/chia-start-sim
Mariano Sorgente 700eaad9e0 Ms.1.8bugs3 (#326)
* harvester fixes
* Improve networking stability
* Fix wallet shutdown
* Allow chia keys sign and chia keys verify
* Dislpay the public key also
* Retry loading invalid plots, handle drive disconnection
* Confirm before deleting plots
* Improve error message WIP
* XImproved error message for importing keys
* Uncomment process.kill
* Fix merge error with restore backup
* Fixed markdown
* Switch button order, and fix request_peers
* Consolidate styles
* Set ci's to timeout after 60 minutes has elapsed
* plot directories and memory buffer
* Fix flake8
* Update chiapos, chiavdf, chiabip158, and blspy

Co-authored-by: Gene Hoffman <hoffmang@hoffmang.com>
Co-authored-by: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com>
2020-07-27 16:01:18 -07:00

42 lines
1.7 KiB
Plaintext
Executable File

_kill_servers() {
PROCS=`ps -e | grep -E 'chia|vdf_client' -v "chia-start-sim" | awk '!/grep/' | awk '{print $1}'`
if [ -n "$PROCS" ]; then
echo "$PROCS" | xargs -L1 kill -KILL
fi
}
_kill_servers
BG_PIDS=""
_run_bg_cmd() {
"$@" &
BG_PIDS="$BG_PIDS $!"
}
_term() {
echo "Caught TERM or INT signal, killing all servers."
for PID in $BG_PIDS; do
kill -TERM "$PID"
done
_kill_servers
}
echo "Starting local blockchain simulation. Runs a local introducer and chia system."
echo "Note that this simulation will not work if connected to external nodes."
# Starts a harvester, farmer, timelord, introducer, and 3 full nodes, locally.
# Please note that the simulation is meant to be run locally and not connected to external nodes.
# NOTE: you must run install.sh when changing this file
_run_bg_cmd chia_farmer --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd chia_harvester --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd chia_timelord --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd chia_timelord_launcher --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd chia_introducer --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd chia_full_node --port=8444 --database_path="simulation_1.db" --rpc_port=8555 --introducer_peer.host="127.0.0.1" --introducer_peer.port=8445 --logging.log_stdout=True --logging.log_level=INFO --logging.log_level=INFO
sleep 1
_run_bg_cmd chia_full_node --port=8002 --database_path="simulation_2.db" --rpc_port=8556 --introducer_peer.host="127.0.0.1" --introducer_peer.port=8445 --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd python -m src.daemon.server --logging.log_stdout=True --logging.log_level=INFO
wait