Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
feat: add standalone test network with long blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Marko Atanasievski committed Sep 13, 2023
1 parent a57719f commit dbf1f37
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docker/local-topos/polygon-edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,30 @@ case "$1" in

echo "Executing polygon-edge standalone node..."
exec "$POLYGON_EDGE_BIN" server --data-dir ./data-1 --chain genesis.json
;;
;;

"standalone-test-long-blocks")
echo "Cleaning up previous execution..."
rm -rf genesis.json data-1
echo "Generating node secrets..."
NODE_ID=`$POLYGON_EDGE_BIN secrets init --insecure --num 1 --data-dir data-1 | grep Node | awk '{ print $4}'`
echo "Boot node id: " $NODE_ID
echo "Validator private key:" `cat data-1/consensus/validator.key`
echo "Generating genesis script..."
"$POLYGON_EDGE_BIN" genesis --dir genesis.json \
--consensus ibft \
--ibft-validators-prefix-path data- \
--max-validator-count=1 \
--block-time 12s \
--premine=0x4AAb25B4fAd0Beaac466050f3A7142A502f4Cf0a:1000000000000000000000 \
--premine=0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac:1000000000000000000000 \
--premine=0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07:1000000000000000000000 \
--premine=0x5283ac54A7B9669F6415168DC7a5FcEe05019E45:1000000000000000000000 \
--bootnode /ip4/127.0.0.1/tcp/10001/p2p/$NODE_ID

echo "Executing polygon-edge standalone node with long block time..."
exec "$POLYGON_EDGE_BIN" server --data-dir ./data-1 --chain genesis.json
;;

*)
echo "Executing polygon-edge..."
Expand Down

0 comments on commit dbf1f37

Please sign in to comment.