solana/multinode-demo/setup.sh

36 lines
1.3 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
2018-06-24 10:10:55 -07:00
2018-06-23 11:52:12 -07:00
here=$(dirname "$0")
2018-06-24 10:10:55 -07:00
# shellcheck source=multinode-demo/common.sh
source "$here"/common.sh
2018-06-23 11:52:12 -07:00
2018-06-24 10:10:55 -07:00
set -e
rm -rf "$SOLANA_CONFIG_DIR"/bootstrap-leader
mkdir -p "$SOLANA_CONFIG_DIR"/bootstrap-leader
# Create genesis ledger
$solana_keygen new -f -o "$SOLANA_CONFIG_DIR"/mint-keypair.json
2019-07-30 22:43:47 -07:00
$solana_keygen new -o "$SOLANA_CONFIG_DIR"/bootstrap-leader/identity-keypair.json
$solana_keygen new -o "$SOLANA_CONFIG_DIR"/bootstrap-leader/vote-keypair.json
$solana_keygen new -o "$SOLANA_CONFIG_DIR"/bootstrap-leader/stake-keypair.json
$solana_keygen new -o "$SOLANA_CONFIG_DIR"/bootstrap-leader/storage-keypair.json
args=("$@")
2019-07-30 22:43:47 -07:00
default_arg --bootstrap-leader-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader/identity-keypair.json
default_arg --bootstrap-vote-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader/vote-keypair.json
default_arg --bootstrap-stake-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader/stake-keypair.json
default_arg --bootstrap-storage-keypair "$SOLANA_CONFIG_DIR"/bootstrap-leader/storage-keypair.json
default_arg --ledger "$SOLANA_CONFIG_DIR"/bootstrap-leader
default_arg --mint "$SOLANA_CONFIG_DIR"/mint-keypair.json
default_arg --hashes-per-tick auto
default_arg --dev
$solana_genesis "${args[@]}"
2019-07-30 22:43:47 -07:00
(
cd "$SOLANA_CONFIG_DIR"/bootstrap-leader
2019-07-30 22:43:47 -07:00
set -x
tar jcvfS genesis.tar.bz2 genesis.bin rocksdb
2019-07-30 22:43:47 -07:00
)