-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update all nodes and script indexing for bootnodes
- Loading branch information
1 parent
d9cd315
commit 8a4db8c
Showing
68 changed files
with
18,295 additions
and
6,355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
#!/bin/bash | ||
|
||
arr=("30303 prime" "30304 cyprus" "30305 paxos" "30306 hyrda" "30307 cyprus1" "30308 cyprus2" "30309 cyprus3" "30310 paxos1" "30311 paxos2" "30312 paxos3" "30313 hydra1" "30314 hyrda2" "30315 hyrda3") | ||
arr=("30303 prime" "30304 cyprus" "30305 paxos" "30306 hydra" "30307 cyprus1" "30308 cyprus2" "30309 cyprus3" "30310 paxos1" "30311 paxos2" "30312 paxos3" "30313 hydra1" "30314 hydra2" "30315 hydra3") | ||
|
||
mkdir -p all-nodes | ||
for net in "${arr[@]}" | ||
do | ||
set -- $net | ||
echo $1 $2 | ||
echo $QUAI_DNS_DISCV4_BOOTNODE:$1 | ||
./devp2p discv4 crawl --addr 0.0.0.0:$1 -timeout "$QUAI_DNS_DISCV4_CRAWLTIME" --bootnodes $QUAI_DNS_DISCV4_BOOTNODE:$1 all-nodes/all-$2.json & | ||
port=$1 | ||
node_name=$2 | ||
# Convert node_name to uppercase and replace spaces/hyphens with underscores | ||
env_var="QUAI_DNS_DISCV4_BOOTNODE_$(echo $node_name | tr '[:lower:]-' '[:upper:]_')" | ||
bootnode=${!env_var} # Use indirect expansion to get the value of the dynamically generated env var | ||
|
||
echo $port $node_name | ||
echo $bootnode:$port | ||
|
||
./devp2p discv4 crawl --addr 0.0.0.0:$port -timeout "$QUAI_DNS_DISCV4_CRAWLTIME" --bootnodes $bootnode all-nodes/all-$node_name.json & | ||
pids[${i}]=$! | ||
echo pids | ||
done | ||
|
@@ -18,7 +25,6 @@ for pid in ${pids[*]}; do | |
wait $pid | ||
done | ||
|
||
|
||
QUAI_DNS_DISCV4_KEY_PUBLICINFO="$(cat $QUAI_DNS_DISCV4_KEYPASS_PATH | ./key-util inspect $QUAI_DNS_DISCV4_KEY_PATH | grep -E '(Addr|Pub)')" | ||
git add . | ||
git -c user.name="ci" -c user.email='[email protected]' commit --author 'crawler <>' -m "ci update (all.json) $GITHUB_RUN_ID:$GITHUB_RUN_NUMBER" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.