Skip to content

Commit

Permalink
Merge pull request #4818 from harmony-one/feature/debug_multi_bls_ter…
Browse files Browse the repository at this point in the history
…minal

Add New Command to Makefile for Enhanced Localnet Debugging
  • Loading branch information
sophoah authored Dec 20, 2024
2 parents c84173a + f922c82 commit b17d14c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ help:
@echo "trace-pointer - build the harmony binary & bootnode with pointer analysis"
@echo "debug - start a localnet with 2 shards (s0 rpc endpoint = localhost:9700; s1 rpc endpoint = localhost:9800)"
@echo "debug-kill - force kill the localnet"
@echo "debug-multi-bls - start a localnet with external validators and multi-BLS keys in the background"
@echo "debug-multi-bls-with-terminal - start a localnet with external validators and multi-BLS keys using screen, providing real-time logs and automatic cleanup on exit"
@echo "debug-ext - start a localnet with 2 shards and external (s0 rpc endpoint = localhost:9598; s1 rpc endpoint = localhost:9596)"
@echo "clean - remove node files & logs created by localnet"
@echo "distclean - remove node files & logs created by localnet, and all libs"
Expand Down Expand Up @@ -99,6 +101,15 @@ debug-multi-bls:
echo sleep 10s before creating the external validator
sleep 10
bash ./test/build-localnet-validator.sh

debug-multi-bls-with-terminal:
# add VERBOSE=true before bash or run `export VERBOSE=true` on the shell level for have max logging
# add LEGACY_SYNC=true before bash or run `export LEGACY_SYNC=true` on the shell level to switch to the legacy sync
screen -L -Logfile ./tmp_log/localnet_terminal.log -dmS localnet bash -c './test/debug.sh ./test/configs/local-multi-bls.txt 64 64; echo "Press any key to exit..."; read -n 1'
echo sleep 10s before creating the external validator
sleep 10
bash ./test/build-localnet-validator.sh
screen -r localnet

clean:
rm -rf ./tmp_log*
Expand Down

0 comments on commit b17d14c

Please sign in to comment.