Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stable localnet with external #4752

Merged
merged 2 commits into from
Sep 10, 2024
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
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ debug-kill:
bash ./test/kill_node.sh

debug-ext:
bash ./test/debug-external.sh
# update localnet block per epoch to ensure a stable localnet
sed -i 's/localnetBlocksPerEpoch\s*=\s*[0-9]*/localnetBlocksPerEpoch = 64/' internal/configs/sharding/localnet.go
mur-me marked this conversation as resolved.
Show resolved Hide resolved
sed -i 's/localnetBlocksPerEpochV2\s*=\s*[0-9]*/localnetBlocksPerEpochV2 = 64/' internal/configs/sharding/localnet.go
bash ./test/debug-external.sh &
mur-me marked this conversation as resolved.
Show resolved Hide resolved
echo sleep 10s before creating the external validator
sleep 10
bash ./test/build-localnet-validator.sh

clean:
rm -rf ./tmp_log*
Expand Down
4 changes: 2 additions & 2 deletions test/configs/local-resharding-with-external.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# fn node
127.0.0.1 9050 validator .hmy/52ecce5f64db21cbe374c9268188f5d2cdd5bec1a3112276a350349860e35fb81f8cfe447a311e0550d961cf25cb988d.key
127.0.0.1 9052 validator .hmy/678ec9670899bf6af85b877058bea4fc1301a5a3a376987e826e3ca150b80e3eaadffedad0fedfa111576fa76ded980c.key
#127.0.0.1 9054 validator .hmy/16513c487a6bb76f37219f3c2927a4f281f9dd3fd6ed2e3a64e500de6545cf391dd973cc228d24f9bd01efe94912e714.key
# 127.0.0.1 9054 validator .hmy/16513c487a6bb76f37219f3c2927a4f281f9dd3fd6ed2e3a64e500de6545cf391dd973cc228d24f9bd01efe94912e714.key
# explorer node
127.0.0.1 9098 explorer null 0

Expand All @@ -32,6 +32,6 @@
# fn node
127.0.0.1 9150 validator .hmy/a547a9bf6fdde4f4934cde21473748861a3cc0fe8bbb5e57225a29f483b05b72531f002f8187675743d819c955a86100.key
127.0.0.1 9152 validator .hmy/63f479f249c59f0486fda8caa2ffb247209489dae009dfde6144ff38c370230963d360dffd318cfb26c213320e89a512.key
#127.0.0.1 9154 validator .hmy/576d3c48294e00d6be4a22b07b66a870ddee03052fe48a5abbd180222e5d5a1f8946a78d55b025de21635fd743bbad90.key
# 127.0.0.1 9154 validator .hmy/576d3c48294e00d6be4a22b07b66a870ddee03052fe48a5abbd180222e5d5a1f8946a78d55b025de21635fd743bbad90.key
sophoah marked this conversation as resolved.
Show resolved Hide resolved
# explorer node
127.0.0.1 9096 explorer null 1
2 changes: 1 addition & 1 deletion test/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function launch_localnet() {
# Read config for i-th node form config file
IFS=' ' read -r ip port mode bls_key shard node_config <<<"${line}"
args=("${base_args[@]}" --ip "${ip}" --port "${port}" --key "/tmp/${ip}-${port}.key" --db_dir "${ROOT}/db-${ip}-${port}" "--broadcast_invalid_tx=false")
if [[ -z "$ip" || -z "$port" || "$ip" == "#" ]]; then
if [[ -z "$ip" || -z "$port" || "${ip:0:1}" == "#" ]]; then
echo "skip empty line or node or comment"
continue
fi
Expand Down