diff --git a/avalanchego/empty_secret b/avalanchego/empty_secret new file mode 100644 index 00000000..2d3ad38e --- /dev/null +++ b/avalanchego/empty_secret @@ -0,0 +1 @@ +PRIVATE_KEY_HEX='56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027' diff --git a/avalanchego/launch_local5.sh b/avalanchego/launch_local5.sh new file mode 100755 index 00000000..d9001813 --- /dev/null +++ b/avalanchego/launch_local5.sh @@ -0,0 +1,9 @@ +#!/bin/sh +EXTRA=--min-stake-duration=600s +./build/avalanchego --public-ip=127.0.0.1 --http-port=9650 --staking-port=9651 --db-dir=db/node1 --network-id=localflare --staking-tls-cert-file=$(pwd)/staking/local/staker1.crt --staking-tls-key-file=$(pwd)/staking/local/staker1.key --chain-config-dir=$(pwd)/../config/localflare $EXTRA & +./build/avalanchego --public-ip=127.0.0.1 --http-port=9652 --staking-port=9653 --db-dir=db/node2 --network-id=localflare --bootstrap-ips=127.0.0.1:9651 --bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg --staking-tls-cert-file=$(pwd)/staking/local/staker2.crt --staking-tls-key-file=$(pwd)/staking/local/staker2.key $EXTRA & +./build/avalanchego --public-ip=127.0.0.1 --http-port=9654 --staking-port=9655 --db-dir=db/node3 --network-id=localflare --bootstrap-ips=127.0.0.1:9651 --bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg --staking-tls-cert-file=$(pwd)/staking/local/staker3.crt --staking-tls-key-file=$(pwd)/staking/local/staker3.key $EXTRA & +./build/avalanchego --public-ip=127.0.0.1 --http-port=9656 --staking-port=9657 --db-dir=db/node4 --network-id=localflare --bootstrap-ips=127.0.0.1:9651 --bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg --staking-tls-cert-file=$(pwd)/staking/local/staker4.crt --staking-tls-key-file=$(pwd)/staking/local/staker4.key $EXTRA & +./build/avalanchego --public-ip=127.0.0.1 --http-port=9658 --staking-port=9659 --db-dir=db/node5 --network-id=localflare --bootstrap-ips=127.0.0.1:9651 --bootstrap-ids=NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg --staking-tls-cert-file=$(pwd)/staking/local/staker5.crt --staking-tls-key-file=$(pwd)/staking/local/staker5.key $EXTRA & + +sleep 60 diff --git a/avalanchego/launch_validators.sh b/avalanchego/launch_validators.sh new file mode 100755 index 00000000..d741f23a --- /dev/null +++ b/avalanchego/launch_validators.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Define node IDs +NODE_IDS=("NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ" "NodeID-NFBbbJ4qCmNaCzeW7sxErhvWqvEQMnYcN" "NodeID-GWPcbFJZFfZreETSoWjPimr846mXEKCtu" "NodeID-P7oB2McjBGgW2NXXWVYjV8JEDFoW9xDE5") +flare-stake-tool exportCP -a 6000000 --network localflare --env-path empty_secret --get-hacked +sleep 1 +flare-stake-tool importCP --network localflare --env-path empty_secret --get-hacked +sleep 1 +# Loop over each Node ID and execute the command +for NODE_ID in "${NODE_IDS[@]}"; do + flare-stake-tool transaction stake -n "$NODE_ID" -a 1000000 -s $(date -d "+5 minutes" +%s) -e $(date -d "+52 weeks" +%s) --network localflare --env-path ./empty_secret --get-hacked + sleep 2 +done + +sleep 20 + +printf "\nGet pending validators:\n" + +curl -s --location --request POST 'http://localhost:9650/ext/bc/P' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "jsonrpc": "2.0", + "method": "platform.getPendingValidators", + "params": { + "subnetID": null, + "nodeIDs": [] + }, + "id": 1 +}' | jq . + +printf "\nNew validators will start in $(($START_TIME-$(date +%s))) seconds\n"