Skip to content

Commit

Permalink
Preserve pre-existing vote/stake keypairs for bootstrap validator (so…
Browse files Browse the repository at this point in the history
  • Loading branch information
CriesofCarrots authored Aug 24, 2021
1 parent 46890ac commit d559426
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 10 additions & 3 deletions multinode-demo/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ if [[ -f $BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR ]]; then
else
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/identity.json
fi

$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
if [[ -f $BOOTSTRAP_VALIDATOR_STAKE_KEYPAIR ]]; then
cp -f "$BOOTSTRAP_VALIDATOR_STAKE_KEYPAIR" "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
else
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
fi
if [[ -f $BOOTSTRAP_VALIDATOR_VOTE_KEYPAIR ]]; then
cp -f "$BOOTSTRAP_VALIDATOR_VOTE_KEYPAIR" "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
else
$solana_keygen new --no-passphrase -so "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
fi

args=(
"$@"
Expand Down
6 changes: 6 additions & 0 deletions net/remote/remote-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,12 @@ EOF
if [[ -f net/keypairs/bootstrap-validator-identity.json ]]; then
export BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR=net/keypairs/bootstrap-validator-identity.json
fi
if [[ -f net/keypairs/bootstrap-validator-stake.json ]]; then
export BOOTSTRAP_VALIDATOR_STAKE_KEYPAIR=net/keypairs/bootstrap-validator-stake.json
fi
if [[ -f net/keypairs/bootstrap-validator-vote.json ]]; then
export BOOTSTRAP_VALIDATOR_VOTE_KEYPAIR=net/keypairs/bootstrap-validator-vote.json
fi
echo "remote-node.sh: Primordial stakes: $extraPrimordialStakes"
if [[ "$extraPrimordialStakes" -gt 0 ]]; then
if [[ "$extraPrimordialStakes" -gt "$numNodes" ]]; then
Expand Down

0 comments on commit d559426

Please sign in to comment.