Skip to content

Instantly share code, notes, and snippets.

@leordev
Created May 16, 2018 13:44
Show Gist options
  • Save leordev/1e12b229c28735e9defbd6249e4108c5 to your computer and use it in GitHub Desktop.
Save leordev/1e12b229c28735e9defbd6249e4108c5 to your computer and use it in GitHub Desktop.
#!/bin/bash
###########################################################################
#
# Created by
# Bohdan Kossak, CryptoLions.io
#
# Auto Installer for Jungle Network Generated by Monitor
###########################################################################
GLOBAL_PATH=$(pwd) #GLOBAL PATH
TAG="dawn-v4.0.0"
#if empty - it will create folder, download sources and compile
EOS_SOURCE_DIR=""
TESTNET="JungleTestnet"
NODE_HTTP_SRV_ADDR="178.63.66.3:8888"
NODE_P2P_LST_ENDP="178.63.66.3:9877"
NODE_P2P_SRV_ADDR="178.63.66.3:9876"
NODE_HTTPS_SERVER_ADDR=""
NODE_HOST="178.63.66.3"
NODE_API_PORT="8888"
NODE_SSL_PORT=""
PRODUCER_PUB_KEY="EOS5TwEch1Cpw4zkpiBbX8ep1UZxrDHdqNU8KKoKnaGDq3sy3nWzi"
PRODUCER_PRIV_KEY="";
PRODUSER_NAME="cryptosforce"
PRODUCER_AGENT_NAME="cryptosforce"
TESTNET="$TESTNET-$PRODUSER_NAME"
WALLET_HOST="127.0.0.1"
WALLET_PORT="55554"
PEER_LIST='
#p2p-peer-address = 127.0.0.1:44449
p2p-peer-address = dev.cryptolions.io:19876
'
ISBP=true
PRODUCER_URL="https://cryptosforce.com"
NODE_MONIOTR_JSON='{
"bp_name": "cryptosforce",
"organisation": "CryptosForce.com",
"location": "Amsterdam",
"node_addr": "178.63.66.3",
"port_http": "8888",
"port_ssl": "{{port_ssl}}",
"port_p2p": "{{port_p2p}}",
"pub_key": "EOS5TwEch1Cpw4zkpiBbX8ep1UZxrDHdqNU8KKoKnaGDq3sy3nWzi",
"bp": true,
"enabled": true,
"comment": "",
"telegram": ""
"url": "url"
}'
GENESIS='{
"initial_timestamp": "2018-03-11T12:00:00.000",
"initial_key": "EOS5UDp9v8rQfrZwUPog8KetBo7cEEbMRrSpBJjfPqB3489Mz2b47",
"initial_configuration": {
"max_block_net_usage": 1048576,
"target_block_net_usage_pct": 1000,
"max_transaction_net_usage": 524288,
"base_per_transaction_net_usage": 12,
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 100000,
"target_block_cpu_usage_pct": 500,
"max_transaction_cpu_usage": 100000,
"base_per_transaction_cpu_usage": 512,
"base_per_action_cpu_usage": 1024,
"base_setcode_cpu_usage": 2097152,
"per_signature_cpu_usage": 102400,
"cpu_usage_leeway": 2048,
"context_free_discount_cpu_usage_num": 20,
"context_free_discount_cpu_usage_den": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
"max_transaction_delay": 3888000,
"max_inline_action_size": 4096,
"max_inline_action_depth": 4,
"max_authority_depth": 6,
"max_generated_transaction_count": 16
},
"initial_chain_id": "0000000000000000000000000000000000000000000000007472696e6974790a"
}'
######################################################################################################################################################
echo -n $'\E[0;32m'
cat << "EOF"
██╗██╗ ██╗███╗ ██╗ ██████╗ ██╗ ███████╗ ████████╗███████╗███████╗████████╗███╗ ██╗███████╗████████╗
██║██║ ██║████╗ ██║██╔════╝ ██║ ██╔════╝ ╚══██╔══╝██╔════╝██╔════╝╚══██╔══╝████╗ ██║██╔════╝╚══██╔══╝
██║██║ ██║██╔██╗ ██║██║ ███╗██║ █████╗ ██║ █████╗ ███████╗ ██║ ██╔██╗ ██║█████╗ ██║
██ ██║██║ ██║██║╚██╗██║██║ ██║██║ ██╔══╝ ██║ ██╔══╝ ╚════██║ ██║ ██║╚██╗██║██╔══╝ ██║
╚█████╔╝╚██████╔╝██║ ╚████║╚██████╔╝███████╗███████╗ ██║ ███████╗███████║ ██║ ██║ ╚████║███████╗ ██║
╚════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝╚══════╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═╝
EOF
######################################################################################################################################################
echo -n $'\E[0;37m'
PRODUCER_PRIV_KEY_DEF="!! INSERT HERE PRIVATE KEY TO THIS PUBLIC ADDRESS !!";
TESTNET_DIR="$GLOBAL_PATH/$TESTNET"
if [[ $EOS_SOURCE_DIR == "" ]]; then
EOS_SOURCE_DIR="$GLOBAL_PATH/eos-source"
fi
WALLET_DIR="$GLOBAL_PATH/wallet"
# Download sources
if [[ ! -d $EOS_SOURCE_DIR ]]; then
echo "..:: Downloading EOS Sources ::..";
mkdir $EOS_SOURCE_DIR
cd $EOS_SOURCE_DIR
git clone https://github.com/eosio/eos --recursive .
git checkout $TAG
git submodule update --init --recursive
cd $GLOBAL_PATH
fi
# Compile Sources
if [[ ! -d $EOS_SOURCE_DIR/build ]]; then
echo "..:: Compiling EOS Sources ::..";
cd $EOS_SOURCE_DIR
git pull
./eosio_build.sh
cd $GLOBAL_PATH
fi
# Creating Wallet Folder and files
if [[ ! -d $WALLET_DIR ]]; then
echo "..:: Creating Wallet Dir: $WALLET_DIR ::..";
mkdir $WALLET_DIR
echo "..:: Creating Wallet start.sh ::..";
# Creating start.sh for wallet
echo "#!/bin/bash" > $WALLET_DIR/start.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $WALLET_DIR/start.sh
echo "DATADIR=$WALLET_DIR" >> $WALLET_DIR/start.sh
echo "\$DATADIR/stop.sh" >> $WALLET_DIR/start.sh
echo "$EOS_SOURCE_DIR/build/programs/keosd/keosd --data-dir \$DATADIR --http-server-address $WALLET_HOST:$WALLET_PORT \"\$@\" > $WALLET_DIR/stdout.txt 2> $WALLET_DIR/stderr.txt & echo \$! > \$DATADIR/wallet.pid" >> $WALLET_DIR/start.sh
echo "echo \"Wallet started\"" >> $WALLET_DIR/start.sh
chmod u+x $WALLET_DIR/start.sh
# Creating stop.sh for wallet
echo "#!/bin/bash" > $WALLET_DIR/stop.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $WALLET_DIR/stop.sh
echo "DIR=$WALLET_DIR" >> $WALLET_DIR/stop.sh
echo '
if [ -f $DIR"/wallet.pid" ]; then
pid=$(cat $DIR"/wallet.pid")
echo $pid
kill $pid
rm -r $DIR"/wallet.pid"
echo -ne "Stoping Wallet"
while true; do
[ ! -d "/proc/$pid/fd" ] && break
echo -ne "."
sleep 1
done
echo -ne "\rWallet stopped. \n"
fi
' >> $WALLET_DIR/stop.sh
chmod u+x $WALLET_DIR/stop.sh
fi
#start Wallet
echo "..:: Satrt Wallet ::.."
if [[ ! -f $WALLET_DIR/wallet.pid ]]; then
$WALLET_DIR/start.sh
fi
#################### TESTNET #################################
# Creating TestNet Folder and files
if [[ ! -d $TESTNET_DIR ]]; then
echo "..:: Creating Testnet Dir: $TESTNET_DIR ::..";
mkdir $TESTNET_DIR
# Creating node start.sh
echo "..:: Creating start.sh ::..";
echo "#!/bin/bash" > $TESTNET_DIR/start.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/start.sh
echo "NODEOS=$EOS_SOURCE_DIR/build/programs/nodeos/nodeos" >> $TESTNET_DIR/start.sh
echo "DATADIR=$TESTNET_DIR" >> $TESTNET_DIR/start.sh
echo -ne "\n";
echo "\$DATADIR/stop.sh" >> $TESTNET_DIR/start.sh
echo -ne "\n";
echo "\$NODEOS --data-dir \$DATADIR --config-dir \$DATADIR \"\$@\" > \$DATADIR/stdout.txt 2> \$DATADIR/stderr.txt & echo \$! > \$DATADIR/nodeos.pid" >> $TESTNET_DIR/start.sh
chmod u+x $TESTNET_DIR/start.sh
# Creating node stop.sh
echo "..:: Creating stop.sh ::..";
echo "#!/bin/bash" > $TESTNET_DIR/stop.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/stop.sh
echo "DIR=$TESTNET_DIR" >> $TESTNET_DIR/stop.sh
echo -ne "\n";
echo '
if [ -f $DIR"/nodeos.pid" ]; then
pid=$(cat $DIR"/nodeos.pid")
echo $pid
kill $pid
rm -r $DIR"/nodeos.pid"
echo -ne "Stoping Nodeos"
while true; do
[ ! -d "/proc/$pid/fd" ] && break
echo -ne "."
sleep 1
done
echo -ne "\rNodeos stopped. \n"
fi
' >> $TESTNET_DIR/stop.sh
chmod u+x $TESTNET_DIR/stop.sh
# Creating cleos.sh
echo "..:: Creating cleos.sh ::..";
echo "#!/bin/bash" > $TESTNET_DIR/cleos.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/cleos.sh
echo "CLEOS=$EOS_SOURCE_DIR/build/programs/cleos/cleos" >> $TESTNET_DIR/cleos.sh
echo -ne "\n"
if [[ $NODE_SSL_PORT != "" ]]; then
echo "\$CLEOS -u https://127.0.0.1:$NODE_SSL_PORT --wallet-url http://127.0.0.1:$WALLET_PORT \"\$@\"" >> $TESTNET_DIR/cleos.sh
echo "#\$CLEOS -u http://127.0.0.1:$NODE_API_PORT --wallet-url http://127.0.0.1:$WALLET_PORT \"\$@\"" >> $TESTNET_DIR/cleos.sh
else
echo "\$CLEOS -u http://127.0.0.1:$NODE_API_PORT --wallet-url http://127.0.0.1:$WALLET_PORT \"\$@\"" >> $TESTNET_DIR/cleos.sh
echo "#\$CLEOS -u https://127.0.0.1:$NODE_SSL_PORT --wallet-url http://127.0.0.1:$WALLET_PORT \"\$@\"" >> $TESTNET_DIR/cleos.sh
fi
chmod u+x $TESTNET_DIR/cleos.sh
# genesis.json
echo -ne "$GENESIS" > $TESTNET_DIR/genesis.json
# config.ini
echo -ne "\n\n..:: Creating config.ini ::..\n\n";
if [[ $PRODUCER_PRIV_KEY -eq "" ]]; then
echo -n $'\E[0;33m'
echo "!!! PRIV KEY SECTION !!! You can enter your private key here and it will be imported in wallet and inserted in config.ini. I can skip this step (Enter) and do it manually before start"
echo -ne "PRIV KEY (Enter skip):"
read PRODUCER_PRIV_KEY
echo -n $'\E[0;37m'
fi
if [[ $PRODUCER_PRIV_KEY == "" ]]; then
PRODUCER_PRIV_KEY=$PRODUCER_PRIV_KEY_DEF
else
if [[ ! -f $WALLET_DIR/default.wallet ]]; then
WALLET_LOG=$( $TESTNET_DIR/cleos.sh wallet create)
echo "$WALLET_LOG" > wallet_pass.txt
fi
$TESTNET_DIR/cleos.sh wallet import $PRODUCER_PRIV_KEY
fi
echo "#EOS Jungle Testnet Config file. Autogenerated by Jungle monitor." > $TESTNET_DIR/config.ini
echo '
get-transactions-time-limit = 3
genesis-json = "'$TESTNET_DIR'/genesis.json"
block-log-dir = "'$TESTNET_DIR'/blocks"
http-server-address = '$NODE_HTTP_SRV_ADDR'
p2p-listen-endpoint = '$NODE_P2P_LST_ENDP'
p2p-server-address = '$NODE_P2P_SRV_ADDR'
access-control-allow-origin = *
' >> $TESTNET_DIR/config.ini
if [[ $NODE_HTTPS_SERVER_ADDR != "" ]]; then
echo '
# SSL
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
https-server-address = '$NODE_HTTPS_SERVER_ADDR'
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
https-certificate-chain-file = /path/to/certificate-chain
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
https-private-key-file = /path/to/certificate-key
' >> $TESTNET_DIR/config.ini
else
echo '
# SSL
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-server-address =
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
# https-certificate-chain-file =
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-private-key-file =
' >> $TESTNET_DIR/config.ini
fi
echo '
allowed-connection = any
log-level-net-plugin = info
max-clients = 120
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 2000
enable-stale-production = false
required-participation = 33
mongodb-queue-size = 256
# mongodb-uri =
# peer-key =
# peer-private-key =
plugin = eosio::producer_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::chain_plugin
#plugin = net_plugin
#plugin = net_api_plugin
agent-name = '$PRODUCER_AGENT_NAME'
' >> $TESTNET_DIR/config.ini
if [[ $ISBP == true ]]; then
echo '
plugin = eosio::producer_plugin
private-key = ["'$PRODUCER_PUB_KEY'","'$PRODUCER_PRIV_KEY'"]
producer-name = '$PRODUSER_NAME'
' >> $TESTNET_DIR/config.ini
else
echo '
#plugin = eosio::producer_plugin
#private-key = ["'$PRODUCER_PUB_KEY'","'$PRODUCER_PRIV_KEY'"]
#producer-name = '$PRODUSER_NAME'
' >> $TESTNET_DIR/config.ini
fi
echo "$PEER_LIST" >> $TESTNET_DIR/config.ini
# creating eosmonitor.json
echo '..:: Creating eosmonitor.json ::..'
echo -ne "$NODE_MONIOTR_JSON" > $TESTNET_DIR/eosmonitor-$PRODUSER_NAME.json
fi
###############################
# Register Producer
echo '..:: Creating your registerProducer.sh ::..'
echo "#!/bin/bash" > $TESTNET_DIR/bp01_registerProducer.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/bp01_registerProducer.sh
echo "./cleos.sh system regproducer $PRODUSER_NAME $PRODUCER_PUB_KEY \"$PRODUCER_URL\" -p $PRODUSER_NAME" >> $TESTNET_DIR/bp01_registerProducer.sh
chmod u+x $TESTNET_DIR/bp01_registerProducer.sh
# UnRegister Producer
echo '..:: Creating your unRegisterProducer.sh ::..'
echo "#!/bin/bash" > $TESTNET_DIR/bp06_unRegisterProducer.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/bp06_unRegisterProducer.sh
echo "./cleos.sh system unregprod $PRODUSER_NAME -p $PRODUSER_NAME" >> $TESTNET_DIR/bp06_unRegisterProducer.sh
chmod u+x $TESTNET_DIR/bp06_unRegisterProducer.sh
# Stake Coins
echo '..:: Creating Stake script stakeTokens.sh ::..'
echo "#!/bin/bash" > $TESTNET_DIR/bp02_stakeTokens.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/bp02_stakeTokens.sh
echo "#./cleos.sh system delegatebw $PRODUSER_NAME $PRODUSER_NAME \"1000.0000 EOS\" \"1000.0000 EOS\" -p $PRODUSER_NAME" >> $TESTNET_DIR/bp02_stakeTokens.sh
echo "./cleos.sh push action eosio delegatebw '{\"from\":\"$PRODUSER_NAME\", \"receiver\":\"$PRODUSER_NAME\", \"stake_net_quantity\": \"1000.0000 EOS\", \"stake_cpu_quantity\": \"1000.0000 EOS\", \"transfer\": true}' -p $PRODUSER_NAME" >> $TESTNET_DIR/bp02_stakeTokens.sh
chmod u+x $TESTNET_DIR/bp02_stakeTokens.sh
# Unstake Coins
echo '..:: Creating UnStake script unStakeTokens.sh ::..'
echo "#!/bin/bash" > $TESTNET_DIR/bp05_unStakeTokens.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/bp05_unStakeTokens.sh
echo "./cleos.sh system undelegatebw $PRODUSER_NAME $PRODUSER_NAME \"1000.0000 EOS\" \"1000.0000 EOS\" -p $PRODUSER_NAME" >> $TESTNET_DIR/bp05_unStakeTokens.sh
chmod u+x $TESTNET_DIR/bp05_unStakeTokens.sh
# Vote Producer
echo '..:: Creating Vote script voteProducer.sh ::..'
echo "#!/bin/bash" > $TESTNET_DIR/bp03_voteProducer.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/bp03_voteProducer.sh
echo "./cleos.sh system voteproducer prods $PRODUSER_NAME $PRODUSER_NAME -p $PRODUSER_NAME" >> $TESTNET_DIR/bp03_voteProducer.sh
echo "#./cleos.sh system voteproducer prods $PRODUSER_NAME $PRODUSER_NAME tiger lion -p $PRODUSER_NAME" >> $TESTNET_DIR/bp03_voteProducer.sh
chmod u+x $TESTNET_DIR/bp03_voteProducer.sh
# Claim rewrds
echo '..:: Creating ClaimReward script claimReward.sh ::..'
echo "#!/bin/bash" > $TESTNET_DIR/bp04_claimReward.sh
echo -ne "################################################################################\n#\n# Scrip Created by http://CryptoLions.io\n# For EOS Junlge testnet\n#\n# https://github.com/CryptoLions/\n#\n################################################################################\n\n" >> $TESTNET_DIR/bp04_claimReward.sh
echo "./cleos.sh system claimrewards $PRODUSER_NAME -p $PRODUSER_NAME" >> $TESTNET_DIR/bp04_claimReward.sh
chmod u+x $TESTNET_DIR/bp04_claimReward.sh
# FINISH
FINISHTEXT="\n.=================================================================================.\n"
FINISHTEXT+="|=================================================================================|\n"
FINISHTEXT+="|˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙...::: INSTALLATION COMPLETED :::...˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙|\n"
FINISHTEXT+="|˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙|\n"
FINISHTEXT+="|˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙- Jungle testnet node Info -˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙|\n"
FINISHTEXT+="| by CryptoLions.io ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙|\n"
FINISHTEXT+="\_-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-_/\n"
FINISHTEXT+="\n"
FINISHTEXT+="\n"
FINISHTEXT+="Wallet key was stroed in file wallet_pass.txt. Please use it to unlock you wallet:\n"
FINISHTEXT+="./cleos.sh wallet unlock\n"
FINISHTEXT+="\n"
FINISHTEXT+="All scripts to manage you node are located in $TESTNET_DIR folder:\n"
FINISHTEXT+=" start.sh - start your node. If you inserted your private key, then everything is ready. So start and please wait until synced.\n"
FINISHTEXT+=" stop.sh - stop your node\n"
FINISHTEXT+=" bp01_registerProducer.sh - register producer. Use it to register in the system contract.\n"
FINISHTEXT+=" bp02_stakeTokens.sh - stake tokens. Use it to stake tokens before voting.\n"
FINISHTEXT+=" bp03_voteProducer.sh - vote example. Vote only for you. You can add producer manually in script or using monitor interface. \n"
FINISHTEXT+=" bp05_unStakeTokens.sh - unstake tokens.\n"
FINISHTEXT+=" bp06_unRegisterProducer.sh - unregister producer.\n"
FINISHTEXT+=" stderr.txt - node logs file\n"
FINISHTEXT+="\n"
FINISHTEXT+="\n"
FINISHTEXT+="To stop/start wallet use start/stop.sh scripts in wallet folder. This installation script starts wallet by default.\n"
FINISHTEXT+="\n"
FINISHTEXT+="Installation Script disabled. To run again please chmod:\n"
FINISHTEXT+="chmod u+x $0\n"
FINISHTEXT+="\n"
FINISHTEXT+=". - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n"
FINISHTEXT+="| http://CryptoLions.io\n"
FINISHTEXT+="| https://github.com/CryptoLions/EOS-Jungle-Testnet\n"
echo -n $'\E[0;32m'
echo -ne $FINISHTEXT
echo -ne $FINISHTEXT > JungleTestnet.txt
echo ""
echo "This info was saved to JungleTestnet.txt file"
echo ""
read -n 1 -s -r -p "Press any key to continue"
echo -n $'\E[0;33m'
cat >> JungleTestnet.txt << "EOF"
.u:o. -c:o. ex::u. .czeez* .edB$ e@$$eu
e$MMMMMNu^$MMMb.#BMMM$c $MMM8P.d$RM$F4RMMMMMMRb
A$MMMMMMMMRb^$MMMMb^$MMMP MMMMF4$MMM8"dRMMMMMMMMMN
zMM8M***M$8M$.#8MMM$.$8M&J$M$%$RMM8*.$R8$#"""""BMM
$$".e@Rmu. "*M" ' ^^ .o$$RMM$c'$
$.$RMMMMMM$$$$ dRRRRRRRRRR$$MMMMMMRL'$$RMMMMMMMM$.
.$MMMMMMMMM$" $RMMMMMMMMMMMMMMMMMMMMb ^4$MMMMMMMM$
JMMMM$$**" ..$MMMMMMMMMMMMMMMMMMMMMMM$.:c "***$MM
$M"..oenR$".$MMMMMMMMMMMMMMMMMMMMMMMMM$.*$$MMMRc.*
* d$MMMM$"u$MMMMMMMMMMMMMMMMMMMMMMMMM8MRc"$MMMMM$b
.$RMMM$# J$MF "MMMMMMMMM .....4M$b "$MMMM$
dMM8P" dMMM$ $M8P4 4MMMMMMMMM 'L"$M$ JMMMF "*88M _____ _ _ _ _
$$P\d$$ $MMMM$L..d$r4MMMMMMMMM <$$u.e$RMMMF $M$c"$ / ____| | | | | (_) (_)
$ zRMM& ^8MMMMMMMMMF'MMMMMMMMM 4MMMMMMMMMG $MMM$r | | _ __ _ _ _ __ | |_ ___ | | _ ___ _ __ ___ _ ___
$RMMMF$f)MMMMMMMMMF'MMMMMMMMM 4MMMMMMMMMF.$'$MMMM | | | '__| | | | '_ \| __/ _ \| | | |/ _ \| '_ \/ __| | |/ _ \
'MMM$FJR$ $MMMMMMMMF4MMMMMMMMM 4MMMMMMMM$ $Rh^$MMM | |____| | | |_| | |_) | || (_) | |____| | (_) | | | \__ \_| | (_) |
AMM8\dRMMF RMMMMMMM 4MMMMMMMMM MMMMMMM$".MMMRb$MM \_____|_| \__, | .__/ \__\___/|______|_|\___/|_| |_|___(_)_|\___/
AM$.$MMMMF.3MMMM$P*-'*********- "*NMMMM*..RMMMM$'$ __/ | |
AP.$RMMM$:$ $M$".oM$.'$RRRRR$".d$5u'*M$ $$?RMMMM$' |___/|_|
$ $MMMM$\$Rb'P eMMMMM$c"$M8# dRMMMMRc"F4MMb^$MMMMb
$RMMMPzRMM! eRMMMMMMR$c" dRMMMMMMMR 'MMMR.?$MM$
$M8$ $MMMM"x $MMMMMMMMMM ?MMMMMMMMM$ 3'$MMM$b'$MM
ARM$.$RMMMP $$'BMMMMMMMMM 4MMMMMMMM8P4$$ $MMMM$.$M
A$F4RMMMMf $RM *88MMM88M J8MM888$$\ @MMMr5MMMM$.$
$ $RMM8P.$MMMF?b. z$F$MMMMc3BMMM$'
4MMMM$-$RMM8F4MM$ '8MMMMMMMM$ dRMM$#8MMM$r#8MMM.
4MMM$.$MMMM$ RMMM$ MMMMMM dMMMMM 3MMMM$ 8MMM
$MM$'MMMMP zRMMM$ .'**4P*".$ $MMMM$'$MMMM $MM$
4MMC'MMMM$:$MMMMPoM$b .@$M$$MMMMRL^$MMMF$M8
"$$'MMM$\$MMMM$ MMMM$.4RMMM$r$MMMMRr*MMMN$$"
'N'$MM$4$MMMMF$MMMMM$$RMMMM$4$MMMM$$MMM @
#$MN4MMMMMF$MMMMM$#MMMMMM RMMMM$$M$F
?$$.$MMMMF$MMMMMF RMMMMM $MMMM\$MP
*$'$MMMb3MMMMM RMMMMNJRMMNFJ*
#88$L#8MMMr RMMM$z$M8$"
^*$P/*B8$$R8M"zP*"
KonFucius
http://CryptoLions.io
https://github.com/CryptoLions/EOS-Jungle-Testnet
EOF
cat << "EOF"
.u:o. -c:o. ex::u. .czeez* .edB$ e@$$eu
e$MMMMMNu^$MMMb.#BMMM$c $MMM8P.d$RM$F4RMMMMMMRb
A$MMMMMMMMRb^$MMMMb^$MMMP MMMMF4$MMM8"dRMMMMMMMMMN
zMM8M***M$8M$.#8MMM$.$8M&J$M$%$RMM8*.$R8$#"""""BMM
$$".e@Rmu. "*M" ' ^^ .o$$RMM$c'$
$.$RMMMMMM$$$$ dRRRRRRRRRR$$MMMMMMRL'$$RMMMMMMMM$.
.$MMMMMMMMM$" $RMMMMMMMMMMMMMMMMMMMMb ^4$MMMMMMMM$
JMMMM$$**" ..$MMMMMMMMMMMMMMMMMMMMMMM$.:c "***$MM
$M"..oenR$".$MMMMMMMMMMMMMMMMMMMMMMMMM$.*$$MMMRc.*
* d$MMMM$"u$MMMMMMMMMMMMMMMMMMMMMMMMM8MRc"$MMMMM$b
.$RMMM$# J$MF "MMMMMMMMM .....4M$b "$MMMM$
dMM8P" dMMM$ $M8P4 4MMMMMMMMM 'L"$M$ JMMMF "*88M _____ _ _ _ _
$$P\d$$ $MMMM$L..d$r4MMMMMMMMM <$$u.e$RMMMF $M$c"$ / ____| | | | | (_) (_)
$ zRMM& ^8MMMMMMMMMF'MMMMMMMMM 4MMMMMMMMMG $MMM$r | | _ __ _ _ _ __ | |_ ___ | | _ ___ _ __ ___ _ ___
$RMMMF$f)MMMMMMMMMF'MMMMMMMMM 4MMMMMMMMMF.$'$MMMM | | | '__| | | | '_ \| __/ _ \| | | |/ _ \| '_ \/ __| | |/ _ \
'MMM$FJR$ $MMMMMMMMF4MMMMMMMMM 4MMMMMMMM$ $Rh^$MMM | |____| | | |_| | |_) | || (_) | |____| | (_) | | | \__ \_| | (_) |
AMM8\dRMMF RMMMMMMM 4MMMMMMMMM MMMMMMM$".MMMRb$MM \_____|_| \__, | .__/ \__\___/|______|_|\___/|_| |_|___(_)_|\___/
AM$.$MMMMF.3MMMM$P*-'*********- "*NMMMM*..RMMMM$'$ __/ | |
AP.$RMMM$:$ $M$".oM$.'$RRRRR$".d$5u'*M$ $$?RMMMM$' |___/|_|
$ $MMMM$\$Rb'P eMMMMM$c"$M8# dRMMMMRc"F4MMb^$MMMMb
$RMMMPzRMM! eRMMMMMMR$c" dRMMMMMMMR 'MMMR.?$MM$
$M8$ $MMMM"x $MMMMMMMMMM ?MMMMMMMMM$ 3'$MMM$b'$MM
ARM$.$RMMMP $$'BMMMMMMMMM 4MMMMMMMM8P4$$ $MMMM$.$M
A$F4RMMMMf $RM *88MMM88M J8MM888$$\ @MMMr5MMMM$.$
$ $RMM8P.$MMMF?b. z$F$MMMMc3BMMM$'
4MMMM$-$RMM8F4MM$ '8MMMMMMMM$ dRMM$#8MMM$r#8MMM.
4MMM$.$MMMM$ RMMM$ MMMMMM dMMMMM 3MMMM$ 8MMM
$MM$'MMMMP zRMMM$ .'**4P*".$ $MMMM$'$MMMM $MM$
4MMC'MMMM$:$MMMMPoM$b .@$M$$MMMMRL^$MMMF$M8
"$$'MMM$\$MMMM$ MMMM$.4RMMM$r$MMMMRr*MMMN$$"
'N'$MM$4$MMMMF$MMMMM$$RMMMM$4$MMMM$$MMM @
#$MN4MMMMMF$MMMMM$#MMMMMM RMMMM$$M$F
?$$.$MMMMF$MMMMMF RMMMMM $MMMM\$MP
*$'$MMMb3MMMMM RMMMMNJRMMNFJ*
#88$L#8MMMr RMMM$z$M8$"
^*$P/*B8$$R8M"zP*"
KonFucius
EOF
echo -n $'\E[0;32m'
cat << "EOF"
http://CryptoLions.io
https://github.com/CryptoLions/EOS-Jungle-Testnet
EOF
chmod 644 $0
echo ""
read -n 1 -s -r -p "Press any key to continue"
@leordev
Copy link
Author

leordev commented May 16, 2018

It will ask you to enter your private key which matches the producer-registered public address. This private key will be imported into the wallet and added to config.ini
You can skip this step (press Enter) and add it manually to config.ini and to your wallet.

By default in installation script there is no EOS sources folder selected. In this case script will automatically download EOS sources and compile it in eos-source folder located in script folder.

If you have sources already compiled please edit 'EOS_SOURCE_DIR' parameter with path to EOS sources

In case of questions - welcome to Jungle Testnet Telegram group

@leordev
Copy link
Author

leordev commented May 16, 2018

This is the final config.ini so we can readapt to other test nets

get-transactions-time-limit = 3
genesis-json = "/home/eos/jungletestnet/genesis.json"
block-log-dir = "/home/eos/jungletestnet/blocks"


http-server-address = 178.63.66.3:8888
p2p-listen-endpoint = 178.63.66.3:9877
p2p-server-address = 178.63.66.3:9876
access-control-allow-origin = *

# SSL
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-server-address =
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
# https-certificate-chain-file =
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-private-key-file =

allowed-connection = any

log-level-net-plugin = info
max-clients = 120
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 2000
enable-stale-production = false
required-participation = 33

mongodb-queue-size = 256
# mongodb-uri =

# peer-key =
# peer-private-key =

plugin = eosio::producer_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::chain_plugin
#plugin = net_plugin
#plugin = net_api_plugin

agent-name = cryptosforce

plugin = eosio::producer_plugin
private-key = ["EOS5TwEch1Cpw4zkpiBbX8ep1UZxrDHdqNU8KKoKnaGDq3sy3nWzi","xxxxxxxx"]
producer-name = cryptosforce

# Here goes all the p2p list provided by the Testnet
p2p-peer-address = dev.cryptolions.io:19876
p2p-peer-address = 193.93.219.219:9877
p2p-peer-address = 94.154.212.15:9878
p2p-peer-address = dev.cryptolions.io:29876
p2p-peer-address = testnet.eosdublin.io:9878

And it is super simple to start the node like:
$NODEOS --data-dir /home/eos/jungletestnet --config-dir /home/eos/jungletestnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment