forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update seed nodes (#28) * Rewards: Adjust Miner/Masternode reward ratio - Add sentinel version check - Bump version to v0.12.3.0 (#27) * Update the version number * Bump to 70213 * Adjust Rewards * Update sentinel ping code to require min version * Update blockHeight for reward change, update client version and copyright * Update checkpoints (#30) * Add new DNS nodes (#31) * Adding a script to update the Linux wallets to the latest version (#33) * Update masternode upgrade script. * Adding info to run pac update for linux (#34) * Update README.md * Update masternode installer script * Bump min protocol version to 70213 (#35) * Fix genesis block input hex (#29) Updated the genesis block input hex to be accurate. * Add block 50000 to the checkpoints (#36) * Bump min protocol version to 70213 * Add block 50,000 to the checkpoints * Reject bad chain with wrong rewards, block 50000 * Formating * Update invalidate logic, all blocks which are different than the main chain will be invalidated. * Update masternode installation script
- Loading branch information
Showing
19 changed files
with
348 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
54.244.79.140:7112 | ||
34.209.87.8:7112 | ||
209.250.251.184:7112 | ||
108.61.252.138:7112 | ||
144.202.48.162:7112 | ||
45.32.193.76:7112 | ||
144.202.101.191:7112 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
34.212.116.68:17111 | ||
34.212.253.142:17111 | ||
144.202.75.199:17112 | ||
144.202.106.163:17112 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
cd ~/ | ||
|
||
arch=`uname -m` | ||
version="0.12.3.1" | ||
old_version="0.12.3.0" | ||
base_url="https://github.com/PACCommunity/PAC/releases/download/v${version}" | ||
if [ "${arch}" == "x86_64" ]; then | ||
tarball_name="PAC-v${version}-linux-x86_64.tar.gz" | ||
binary_url="${base_url}/${tarball_name}" | ||
elif [ "${arch}" == "x86_32" ]; then | ||
tarball_name="PAC-v${version}-linux-x86.tar.gz" | ||
binary_url="${base_url}/${tarball_name}" | ||
else | ||
echo "PAC binary distribution not available for the architecture: ${arch}" | ||
exit -1 | ||
fi | ||
|
||
echo " .......... " | ||
echo " .............. " | ||
echo " .................... " | ||
echo " .....-yyyyyyys+-:oo-.. oooooooo. ooooo oooooooo " | ||
echo " ......:MMMMNNdddmMMMd... MMMMNMMMMMh. MMMMMMM MMMMMMMMMM " | ||
echo "......:MMmy..-+MNdh:..... MMMM: .dMMMy oMMMyMMNN .NMMMMy " | ||
echo "......:ddmm...-hdNm...... MMMM+-+mMMMs :MMMs dMMm yMMMMo " | ||
echo "....:ohNMMNdoydNMMN/..... MMMMMMMMMmo. NMMN -MMMd yMMMM. " | ||
echo "...+dMNdddNmmdhy+-....... MMMM+::- dMMMNmmmMMMMs :MMMMm. " | ||
echo "......::MMMm............. MMMM: yMMMdoooooNMMM mMMMMNdddN+ " | ||
echo " ......:MNdo............. dddd- ddddd. ddddd. :ohdmmdhy: " | ||
echo " ....-+-.............. " | ||
echo " ................. " | ||
echo " ........... " | ||
|
||
echo "################################################" | ||
echo "# Welcome #" | ||
echo "################################################" | ||
echo "" | ||
echo "This script will update PAC to the latest version (${version})." | ||
echo "Before running the script we recommend to backup your private keys and your wallet.dat file that is under ~/.paccoincore/wallet.dat even though this script will not affect them" | ||
read -p "Do you want to auto-backup wallet.dat and continue with the process? [y/n]: " cont | ||
if [ $cont = 'n' ] || [ $cont = 'no' ] || [ $cont = 'N' ] || [ $cont = 'No' ]; then | ||
exit -1 | ||
fi | ||
|
||
if [ -e ~/paccoin-cli ] && [ -e ~/paccoind ]; then | ||
echo "" | ||
echo "#######################################" | ||
echo "# Stopping pac services (daemon) #" | ||
echo "#######################################" | ||
echo "" | ||
|
||
wallstatus=$( ./paccoin-cli mnsync status ) || true | ||
if [ -z "$wallstatus" ]; then | ||
echo "Daemon is not running no need to stop it" | ||
else | ||
echo "Stopping the Daemon" | ||
./paccoin-cli stop | ||
sleep 60 | ||
|
||
wallstatus=$( ./paccoin-cli mnsync status ) || true | ||
if [ -z "$wallstatus" ]; then | ||
echo "Daemon stopped!" | ||
else | ||
echo "Daemon was not stopped! Please kill the deamon process or run ./paccoin-cli stop, then run the script again" | ||
exit | ||
fi | ||
fi | ||
|
||
echo "" | ||
echo "###############################" | ||
echo "# Removing old binaries #" | ||
echo "###############################" | ||
echo "" | ||
|
||
if [ -e paccoin-cli ]; then | ||
echo "Removing paccoin-cli" | ||
rm paccoin-cli | ||
fi | ||
|
||
if [ -e paccoind ]; then | ||
echo "Removing paccoind" | ||
rm paccoind | ||
fi | ||
|
||
if [ -e paccoin-qt ]; then | ||
echo "Removing paccoin-qt" | ||
rm paccoin-qt | ||
fi | ||
|
||
if [ -e ~/PAC-v0.12.3.0-linux-x86_64.tar.gz ]; then | ||
echo "Removing PAC-v0.12.3.0-linux-x86_64.tar.gz" | ||
rm PAC-v0.12.3.0-linux-x86_64.tar.gz | ||
fi | ||
|
||
if [ -d ~/PAC-v0.12.3.0-linux-x86_64 ]; then | ||
echo "Removing PAC-v0.12.23.0-linux-x86_64 directory" | ||
rm -r PAC-v0.12.3.0-linux-x86_64 | ||
fi | ||
else | ||
is_pac_running=`ps ax | grep -v grep | grep paccoind | wc -l` | ||
if [ $is_pac_running -gt 0 ]; then | ||
echo "PAC process is still running, it's not safe to continue with the update, exiting." | ||
echo "Please stop the daemon with './pacoin-cli stop' or kill the daeomon process, then run the script again." | ||
exit -1 | ||
fi | ||
fi | ||
|
||
echo "" | ||
echo "#######################################" | ||
echo "# Backing up the wallet.dat #" | ||
echo "#######################################" | ||
echo "" | ||
is_pac_running=`ps ax | grep -v grep | grep paccoind | wc -l` | ||
if [ $is_pac_running -gt 0 ]; then | ||
echo "PAC process is still running, it's not safe to continue with the update, exiting." | ||
echo "Please stop the daemon with './paccoin-cli stop' or kill the daemon process, then run the script again." | ||
exit -1 | ||
else | ||
currpath=$( pwd ) | ||
echo "Backing up the wallet.dat" | ||
backupsdir="pac_wallet_backups" | ||
mkdir -p $backupsdir | ||
backupfilename=wallet.dat.$(date +%F_%T) | ||
cp ~/.paccoincore/wallet.dat "$currpath/$backupsdir/$backupfilename" | ||
echo "wallet.dat was saved to : $currpath/$backupsdir/$backupfilename" | ||
fi | ||
|
||
echo "" | ||
echo "###############################" | ||
echo "# Get/Setup new binaries #" | ||
echo "###############################" | ||
echo "" | ||
|
||
if test -e "${tarball_name}"; then | ||
rm -r $tarball_name | ||
fi | ||
wget $binary_url | ||
if test -e "${tarball_name}"; then | ||
echo "Unpacking $PAC distribution" | ||
tar -xvzf $tarball_name | ||
chmod +x paccoind | ||
chmod +x paccoin-cli | ||
echo "Binaries were saved to: $PWD/$tarball_name" | ||
else | ||
echo "There was a problem downloading the binaries, please try running again the script." | ||
exit -1 | ||
fi | ||
|
||
echo "" | ||
echo "##################################################################" | ||
echo "# Updating the sentinel (Applies only on masternodes) #" | ||
echo "##################################################################" | ||
echo "" | ||
|
||
was_sentinel_found=0 | ||
if [ -d ~/sentinel ]; then | ||
was_sentinel_found=1 | ||
cd sentinel | ||
git pull | ||
cd .. | ||
fi | ||
|
||
echo "" | ||
echo "###########################" | ||
echo "# Running the daemon #" | ||
echo "###########################" | ||
echo "" | ||
|
||
cd ~/ | ||
./paccoind -daemon=1 | ||
echo "Waiting for daemon to be up and running" | ||
sleep 60 | ||
./paccoin-cli getinfo | ||
echo "PAC Updated!" | ||
echo "Remember to go to your cold wallet and start the masternode (cold wallet must also be on the latest version)." | ||
|
||
if [ $was_sentinel_found -eq 0 ]; then | ||
echo "No sentinel was found, in case this is a masternode follow the instructions below. If this is not a masternode, then ignore this message." | ||
echo "Intructions:" | ||
echo "1) Go to the sentinel folder" | ||
echo "2) Run this command: git pull" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.