* Add --bpf-program argument (cherry picked from commit8eb6cbf784) * Fetch and install SPL programs by default (cherry picked from commit3a1ca4efff) * .sh Co-authored-by: Michael Vines <mvines@gmail.com>
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
here=$(dirname "$0")
 | 
						|
# shellcheck source=multinode-demo/common.sh
 | 
						|
source "$here"/common.sh
 | 
						|
 | 
						|
set -e
 | 
						|
 | 
						|
rm -rf "$SOLANA_CONFIG_DIR"/bootstrap-validator
 | 
						|
mkdir -p "$SOLANA_CONFIG_DIR"/bootstrap-validator
 | 
						|
 | 
						|
# Create genesis ledger
 | 
						|
if [[ -r $FAUCET_KEYPAIR ]]; then
 | 
						|
  cp -f "$FAUCET_KEYPAIR" "$SOLANA_CONFIG_DIR"/faucet.json
 | 
						|
else
 | 
						|
  $solana_keygen new --no-passphrase -fso "$SOLANA_CONFIG_DIR"/faucet.json
 | 
						|
fi
 | 
						|
 | 
						|
if [[ -f $BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR ]]; then
 | 
						|
  cp -f "$BOOTSTRAP_VALIDATOR_IDENTITY_KEYPAIR" "$SOLANA_CONFIG_DIR"/bootstrap-validator/identity.json
 | 
						|
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
 | 
						|
 | 
						|
args=(
 | 
						|
  "$@"
 | 
						|
  --max-genesis-archive-unpacked-size 1073741824
 | 
						|
  --enable-warmup-epochs
 | 
						|
  --bootstrap-validator "$SOLANA_CONFIG_DIR"/bootstrap-validator/identity.json
 | 
						|
                        "$SOLANA_CONFIG_DIR"/bootstrap-validator/vote-account.json
 | 
						|
                        "$SOLANA_CONFIG_DIR"/bootstrap-validator/stake-account.json
 | 
						|
)
 | 
						|
 | 
						|
"$SOLANA_ROOT"/fetch-spl.sh
 | 
						|
if [[ -r spl-genesis-args.sh ]]; then
 | 
						|
  SPL_GENESIS_ARGS=$(cat "$SOLANA_ROOT"/spl-genesis-args.sh)
 | 
						|
  #shellcheck disable=SC2207
 | 
						|
  #shellcheck disable=SC2206
 | 
						|
  args+=($SPL_GENESIS_ARGS)
 | 
						|
fi
 | 
						|
 | 
						|
default_arg --ledger "$SOLANA_CONFIG_DIR"/bootstrap-validator
 | 
						|
default_arg --faucet-pubkey "$SOLANA_CONFIG_DIR"/faucet.json
 | 
						|
default_arg --faucet-lamports 500000000000000000
 | 
						|
default_arg --hashes-per-tick auto
 | 
						|
default_arg --operating-mode development
 | 
						|
 | 
						|
$solana_genesis "${args[@]}"
 |