From 077c1fccb0df2c00fb0267d3d8c6e553f633e46d Mon Sep 17 00:00:00 2001 From: sunerok Date: Sat, 1 Jun 2019 23:58:55 -0400 Subject: [PATCH 1/3] merge master (#932) * Update go.sh (#927) * Update go.sh * Update go.sh * add another 5.x clearnet node * more v5 clearnet nodes * fix for raspi (#929) * small error in of scrypt-sse2.cpp directory (#930) --- go.sh | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/go.sh b/go.sh index ef34ac34b..2ebb116db 100644 --- a/go.sh +++ b/go.sh @@ -1,5 +1,6 @@ #!/bin/bash -#// full deployement : wget -O - https://raw.githubusercontent.com/badbrainIRC/VERGE/go.sh | bash + +#// full deployement : wget -O - https://raw.githubusercontent.com/badbrainIRC/VERGE/master/go.sh | bash sudo rm -Rf ~/VERGE # generating entropy make it harder to guess the randomness!. echo "Initializing random number generator..." @@ -85,7 +86,7 @@ else red=`tput setaf 1` green=`tput setaf 2` reset=`tput sgr0` -echo "${red}Libboost will not be installed its already there....${reset}" +echo "${green}Libboost will not be installed its already there....${reset}" grep --include=*.hpp -r '/usr/' -e "define BOOST_LIB_VERSION" fi @@ -95,6 +96,8 @@ sudo apt-get -y install lynx sudo apt-get -y install unzip +sudo apt-get -y install sed + cd ~ #// Compile Berkeley if 4.8 is not there @@ -103,7 +106,7 @@ then red=`tput setaf 1` green=`tput setaf 2` reset=`tput sgr0` -echo "${red}BerkeleyDb already present...$(grep --include *.h -r '/usr/' -e 'DB_VERSION_STRING')${reset}" +echo "${green}BerkeleyDb already present...$(grep --include *.h -r '/usr/' -e 'DB_VERSION_STRING')${reset}" else wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz tar -xzvf db-4.8.30.NC.tar.gz @@ -117,6 +120,11 @@ if [ $result3 = "4.6" ] then sed -i 's/__atomic_compare_exchange/__db_atomic_compare_exchange/g' ~/db-4.8.30.NC/dbinc/atomic.h fi +result4=$(cat /etc/issue | grep -Po 'Ermine') +if [ $result4 = "Ermine" ] +then +sed -i 's/__atomic_compare_exchange/__db_atomic_compare_exchange/g' ~/db-4.8.30.NC/dbinc/atomic.h +fi rm db-4.8.30.NC.tar.gz cd db-4.8.30.NC/build_unix @@ -169,8 +177,6 @@ sudo rm words find /usr/ -name libboost_chrono.so > words split -dl 1 --additional-suffix=.txt words wrd - - if [ -e wrd01.txt ] then echo 0. $(cat wrd00.txt) @@ -186,16 +192,27 @@ fi echo "You have choosen $answer" -cd ~ +if [ $(dirname "$(cat wrd00.txt)") = "/usr/lib/arm-linux-gnueabihf" ] +then +red=`tput setaf 1` +green=`tput setaf 2` +reset=`tput sgr0` +echo "${green}ARM cpu detected --disable-sse2${reset}" +txt=$(echo "--disable-sse2") +sed -i 's/#include //g' ~/VERGE/src/crypto/pow/scrypt-sse2.cpp +else +txt=$(echo "") +fi if [ -d /usr/local/BerkeleyDB.4.8/include ] then cd VERGE -./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --with-gui=qt5 --with-boost-libdir=$(dirname "$(cat wrd0$answer.txt)") --disable-bench --disable-tests --disable-gui-tests --without-miniupnpc +./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --with-gui=qt5 --with-boost-libdir=$(dirname "$(cat wrd0$answer.txt)") --disable-bench --disable-tests --disable-gui-tests --without-miniupnpc $txt echo "Using Berkeley Generic..." else cd VERGE -./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" CPPFLAGS="-O2" --with-gui=qt5 --with-boost-libdir=$(dirname "$(cat wrd0$answer.txt)") --disable-bench --disable-tests --disable-gui-tests --without-miniupnpc +./configure CXXFLAGS="--param ggc-min-expand=1 --param ggc-min-heapsize=32768" CPPFLAGS="-O2" --with-gui=qt5 --with-boost-libdir=$(dirname "$(cat wrd0$answer.txt)") --disable-bench --disable-tests --disable-gui-tests --without-miniupnpc $txt + echo "Using default system Berkeley..." fi @@ -230,6 +247,9 @@ echo "listen=1" >> ~/.VERGE/VERGE.conf echo "server=1" >> ~/.VERGE/VERGE.conf echo "deprecatedrpc=accounts" >> ~/.VERGE/VERGE.conf +echo "usehd=1" >> ~/.VERGE/VERGE.conf + + #// Extract http link, download blockchain and install it. sudo chmod 777 /etc/lynx/lynx.cfg From 642d374cbc4c91b1697d70881400114c8630efe8 Mon Sep 17 00:00:00 2001 From: marpme Date: Mon, 3 Jun 2019 19:26:56 +0200 Subject: [PATCH 2/3] Fix compiling errors cause missing headers --- src/net_processing.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/net_processing.h b/src/net_processing.h index 1f1db27b1..b1b64670c 100644 --- a/src/net_processing.h +++ b/src/net_processing.h @@ -10,6 +10,7 @@ #include #include #include +#include /** Default for -maxorphantx, maximum number of orphan transactions kept in memory */ static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100; From 954854bb4493fedb3cc5864ebb02788d50b68542 Mon Sep 17 00:00:00 2001 From: marpme Date: Mon, 3 Jun 2019 19:27:26 +0200 Subject: [PATCH 3/3] False assumptions everywhere but there's isn't the -1 block :^) --- src/validation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation.cpp b/src/validation.cpp index 18bc7259b..66648ac80 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -3394,7 +3394,7 @@ static bool ContextualCheckBlock(const CBlock& block, CValidationState& state, c return state.DoS(100, false, REJECT_INVALID, "bad-blk-weight", false, strprintf("%s : weight limit failed", __func__)); } - if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast() || block.GetBlockTime() + GetMaxClockDrift(nHeight) < pindexPrev->GetBlockTime()) + if (nHeight > 0 && (block.GetBlockTime() <= pindexPrev->GetMedianTimePast() || block.GetBlockTime() + GetMaxClockDrift(nHeight) < pindexPrev->GetBlockTime())) { state.DoS(100, false, REJECT_INVALID, "bad-blk-time", false, strprintf("%s : blocks timestamp is too early", __func__)); }