net/ testnet nodes now stake more lamports (#3812)

* Add --bootstrap-leader-lamports

* Generalize --no-stake into --stake NUM

* Use a large stake for net/ fullnodes

* Setup vote account before starting fullnode to avoid mixed log output
This commit is contained in:
Michael Vines
2019-04-16 13:03:01 -07:00
committed by GitHub
parent a4b5493ba1
commit 63d66ece57
9 changed files with 68 additions and 29 deletions

View File

@ -16,7 +16,7 @@ fi
gossip_port=
extra_fullnode_args=()
self_setup=0
setup_stakes=1
stake=43 # number of lamports to assign as stake (plus transaction fee to setup the stake)
poll_for_new_genesis_block=0
while [[ ${1:0:1} = - ]]; do
@ -32,7 +32,7 @@ while [[ ${1:0:1} = - ]]; do
poll_for_new_genesis_block=1
shift
elif [[ $1 = --blockstream ]]; then
setup_stakes=0
stake=0
extra_fullnode_args+=("$1" "$2")
shift 2
elif [[ $1 = --enable-rpc-exit ]]; then
@ -41,9 +41,9 @@ while [[ ${1:0:1} = - ]]; do
elif [[ $1 = --init-complete-file ]]; then
extra_fullnode_args+=("$1" "$2")
shift 2
elif [[ $1 = --no-stake ]]; then
setup_stakes=0
shift
elif [[ $1 = --stake ]]; then
stake="$2"
shift 2
elif [[ $1 = --public-address ]]; then
extra_fullnode_args+=("$1")
shift
@ -170,6 +170,11 @@ while true; do
fi
trap 'kill "$pid" && wait "$pid"' INT TERM ERR
if ((stake)); then
setup_vote_account "${leader_address%:*}" "$fullnode_id_path" "$fullnode_vote_id_path" "$stake"
fi
$program \
--identity "$fullnode_id_path" \
--voting-keypair "$fullnode_vote_id_path" \
@ -183,9 +188,6 @@ while true; do
pid=$!
oom_score_adj "$pid" 1000
if ((setup_stakes)); then
setup_vote_account "${leader_address%:*}" "$fullnode_id_path" "$fullnode_vote_id_path"
fi
set +x
while true; do