Skip to content

Commit

Permalink
Merge branch 'SAPP-develop' of https://github.com/decenomy/DSW
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-at-decenomy committed Jan 10, 2023
2 parents 452781c + 2baaf56 commit 3bd2a4a
Show file tree
Hide file tree
Showing 283 changed files with 3,158 additions and 31,668 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
*.sublime-workspace
todo.txt
reset-files.bash

*.tar.gz

*.exe
configure~

# DSW
src/__decenomy__
Expand Down Expand Up @@ -198,6 +197,15 @@ src/mobic-cli
src/mobic-tx
src/mobicd

# Flits
src/bench/bench_flits
src/qt/test/test_flits-qt
src/qt/flits-qt
src/test/test_flits
src/flits-cli
src/flits-tx
src/flitsd

##########################################
# clear this section when it's fixed
###
Expand Down Expand Up @@ -346,3 +354,4 @@ __decenomy__d-new-gui.*
# for Visual Studio Code

.vscode/*
null.d
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pipeline {
rm -rf SDKs
mkdir SDKs
cd SDKs
wget -c https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.11.sdk.tar.xz
wget -c https://github.com/decenomy/depends/raw/main/SDKs/MacOSX10.11.sdk.tar.xz
tar -xf MacOSX10.11.sdk.tar.xz
cd ..
make -j $(nproc) HOST=x86_64-apple-darwin14
Expand All @@ -38,7 +38,7 @@ pipeline {
sh '''#!/bin/bash
make clean
./autogen.sh
./configure --enable-glibc-back-compat --prefix=$(pwd)/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench --with-pic CPPFLAGS="-fPIC -O3" CXXFLAGS="-fPIC -O3"
./configure --enable-glibc-back-compat --prefix=$(pwd)/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench --with-pic --enable-upnp-default CPPFLAGS="-fPIC -O3" CXXFLAGS="-fPIC -O3"
make -j $(nproc) HOST=x86_64-pc-linux-gnu
'''
}
Expand Down Expand Up @@ -70,7 +70,7 @@ pipeline {
sh '''#!/bin/bash
make clean
./autogen.sh
./configure --prefix=$(pwd)/depends/x86_64-w64-mingw32 --disable-debug --disable-tests --disable-bench CFLAGS="-O3" CXXFLAGS="-O3"
./configure --prefix=$(pwd)/depends/x86_64-w64-mingw32 --disable-debug --disable-tests --disable-bench --enable-upnp-default CFLAGS="-O3" CXXFLAGS="-O3"
make -j $(nproc) HOST=x86_64-w64-mingw32
'''
}
Expand Down Expand Up @@ -105,7 +105,7 @@ pipeline {
sh '''#!/bin/bash
make clean
./autogen.sh
./configure --prefix=$(pwd)/depends/x86_64-apple-darwin14 --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench
./configure --prefix=$(pwd)/depends/x86_64-apple-darwin14 --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench --enable-upnp-default
make -j $(nproc) HOST=x86_64-apple-darwin14
'''
}
Expand Down Expand Up @@ -134,7 +134,7 @@ pipeline {
sh '''#!/bin/bash
make clean
./autogen.sh
./configure --prefix=$(pwd)/depends/aarch64-linux-gnu --disable-debug --disable-tests --disable-bench CFLAGS="-O3" CXXFLAGS="-O3"
./configure --prefix=$(pwd)/depends/aarch64-linux-gnu --disable-debug --disable-tests --disable-bench --enable-upnp-default CFLAGS="-O3" CXXFLAGS="-O3"
make -j $(nproc) HOST=aarch64-linux-gnu
'''
}
Expand Down Expand Up @@ -162,7 +162,7 @@ pipeline {
sh '''#!/bin/bash
make clean
./autogen.sh
./configure --prefix=$(pwd)/depends/arm-linux-gnueabihf --disable-debug --disable-tests --disable-bench CFLAGS="-O3" CXXFLAGS="-O3"
./configure --prefix=$(pwd)/depends/arm-linux-gnueabihf --disable-debug --disable-tests --disable-bench --enable-upnp-default CFLAGS="-O3" CXXFLAGS="-O3"
make -j $(nproc) HOST=arm-linux-gnueabihf
'''
}
Expand Down
24 changes: 23 additions & 1 deletion build_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ then
CPU_CORES=1
fi

echo -e "\033[0;32mDo you want to disable the tests? (yes/no)\033[0m"
read -e TEST_ANSWER
case "$TEST_ANSWER" in
[nN] | [n|N][O|o] ) TEST_STATUS='--enable-tests' # qt tests still have some problems
;; # so use --without-gui
[yY] | [yY][Ee][Ss] ) TEST_STATUS='--disable-tests'
;;
*) TEST_STATUS='--disable-tests'
;;
esac

echo -e "\033[0;32mDo you want to disable the debug? (yes/no)\033[0m"
read -e DEBUG_ANSWER
case "$DEBUG_ANSWER" in
[nN] | [n|N][O|o] ) DEBUG_STATUS='--enable-debug' # qt tests still have some problems
;; # so use --without-gui
[yY] | [yY][Ee][Ss] ) DEBUG_STATUS='--disable-debug'
;;
*) DEBUG_STATUS='--disable-debug'
;;
esac

# Upgrade the system and install required dependencies
sudo apt update
sudo apt install git zip unzip build-essential libtool bsdmainutils autotools-dev autoconf pkg-config automake python3 libqt5svg5-dev -y
Expand All @@ -24,7 +46,7 @@ fi

# Compile
./autogen.sh
./configure --enable-glibc-back-compat --prefix=$(pwd)/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench --with-pic CPPFLAGS="-fPIC -O3 --param ggc-min-expand=1 --param ggc-min-heapsize=32768" CXXFLAGS="-fPIC -O3 --param ggc-min-expand=1 --param ggc-min-heapsize=32768"
./configure --enable-glibc-back-compat --prefix=$(pwd)/depends/x86_64-pc-linux-gnu LDFLAGS="-static-libstdc++" --enable-cxx --enable-static --disable-shared $(echo $DEBUG_STATUS) $(echo $TEST_STATUS) --disable-bench --with-pic --enable-upnp-default CPPFLAGS="-fPIC -O3 --param ggc-min-expand=1 --param ggc-min-heapsize=32768" CXXFLAGS="-fPIC -O3 --param ggc-min-expand=1 --param ggc-min-heapsize=32768"
make -j$(echo $CPU_CORES) HOST=x86_64-pc-linux-gnu
cd ..

Expand Down
4 changes: 2 additions & 2 deletions build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ fi
cd depends
mkdir SDKs
cd SDKs
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.11.sdk.tar.xz
wget -c https://cloudflare-ipfs.com/ipfs/QmYv9wHqKa5gZE1kL4ZpcVqKp1coS5tS9cYKGe4mUxxrqL/SDKs/MacOSX10.11.sdk.tar.xz
tar -xf MacOSX10.11.sdk.tar.xz
cd ..
make -j$(echo $CPU_CORES) HOST=x86_64-apple-darwin14
cd ..

# Compile
./autogen.sh
./configure --prefix=$(pwd)/depends/x86_64-apple-darwin14 --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench --disable-online-rust
./configure --prefix=$(pwd)/depends/x86_64-apple-darwin14 --enable-cxx --enable-static --disable-shared --disable-debug --disable-tests --disable-bench --disable-online-rust --enable-upnp-default
make -j$(echo $CPU_CORES) HOST=x86_64-apple-darwin14
make deploy
cd ..
Expand Down
12 changes: 9 additions & 3 deletions build_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fi

# Upgrade the system and install required dependencies
sudo apt update
sudo apt install git zip unzip build-essential libtool bsdmainutils autotools-dev autoconf pkg-config automake python3 curl g++-mingw-w64-x86-64 libqt5svg5-dev -y
sudo apt install git zip unzip build-essential libtool bsdmainutils autotools-dev autoconf pkg-config automake python3 curl g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix libqt5svg5-dev -y
echo "1" | sudo update-alternatives --config x86_64-w64-mingw32-g++

# Clone code from official Github repository
Expand All @@ -18,18 +18,24 @@ fi
# Entering directory
cd SAPP

# Disable WSL support for Win32 applications.
sudo bash -c "echo 0 > /proc/sys/fs/binfmt_misc/status"

# Compile dependencies
cd depends
cd depends
make -j$(echo $CPU_CORES) HOST=x86_64-w64-mingw32
cd ..

# Compile
./autogen.sh
./configure --prefix=$(pwd)/depends/x86_64-w64-mingw32 --disable-debug --disable-tests --disable-bench --disable-online-rust CFLAGS="-O3" CXXFLAGS="-O3"
./configure --prefix=$(pwd)/depends/x86_64-w64-mingw32 --disable-debug --disable-tests --disable-bench --disable-online-rust --enable-upnp-default CFLAGS="-O3" CXXFLAGS="-O3"
make -j$(echo $CPU_CORES) HOST=x86_64-w64-mingw32
cd ..

# Create zip file of binaries
cp SAPP/src/sapphired.exe SAPP/src/sapphire-cli.exe SAPP/src/sapphire-tx.exe SAPP/src/qt/sapphire-qt.exe .
zip SAPP-Windows.zip sapphired.exe sapphire-cli.exe sapphire-tx.exe sapphire-qt.exe
rm -f sapphired.exe sapphire-cli.exe sapphire-tx.exe sapphire-qt.exe

# Enable WSL support for Win32 applications.
sudo bash -c "echo 1 > /proc/sys/fs/binfmt_misc/status"
62 changes: 5 additions & 57 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 4)
define(_CLIENT_VERSION_REVISION, 2)
define(_CLIENT_VERSION_BUILD, 3)
define(_CLIENT_VERSION_MINOR, 5)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, true)
define(_COPYRIGHT_YEAR, 2021)
Expand Down Expand Up @@ -222,12 +222,6 @@ AC_ARG_ENABLE([zmq],
[use_zmq=$enableval],
[use_zmq=yes])

AC_ARG_WITH([zerocoin-bignum],
[AS_HELP_STRING([--with-zerocoin-bignum=gmp|openssl|auto],
[Specify Bignum Implementation. Default is auto])],
[req_bignum=$withval],
[req_bignum=auto])

AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])

AC_ARG_ENABLE(man,
Expand Down Expand Up @@ -1183,12 +1177,10 @@ AC_SUBST(UNIVALUE_LIBS)

BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)

# Additional Zcash flags
# Additional flags
AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing],[CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"])
AX_CHECK_COMPILE_FLAG([-Wno-builtin-declaration-mismatch],[CXXFLAGS="$CXXFLAGS -Wno-builtin-declaration-mismatch"],,[[$CXXFLAG_WERROR]])

LIBZCASH_LIBS="$BOOST_SYSTEM_LIB $CRYPTO_LIBS"

AC_MSG_CHECKING([whether to build sapphired])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)
Expand Down Expand Up @@ -1226,32 +1218,6 @@ if test "x$use_ccache" = "xyes"; then
AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"])
fi

dnl bignum value
set_bignum=$req_bignum
case $req_bignum in
auto)
GMP_CHECK
if test x"$has_gmp" != x"yes"; then
AC_MSG_ERROR([gmp bignum automatically selected but libgmp is not available. Use depends,
install libgmp or select an other bignum implementation (ONLY gmp is fully SUPPORTED)])
else
set_bignum=gmp
fi
;;
gmp)
GMP_CHECK
if test x"$has_gmp" != x"yes"; then
AC_MSG_ERROR([gmp bignum explicitly requested but libgmp is not available])
fi
;;
openssl)
AC_MSG_WARN([openssl bignum explicitly requested. This is DEPRECATED.])
;;
*)
AC_MSG_ERROR([invalid bignum implementation selection])
;;
esac

dnl enable wallet
AC_MSG_CHECKING([if wallet should be enabled])
if test x$enable_wallet != xno; then
Expand Down Expand Up @@ -1332,22 +1298,6 @@ fi

AM_CONDITIONAL([ENABLE_ZMQ], [test "x$use_zmq" = "xyes"])

# select bignum implementation
case $set_bignum in
gmp)
AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation])
;;
openssl)
AC_DEFINE(USE_NUM_OPENSSL, 1, [Define this symbol to use openssl implementation])
;;
*)
AC_MSG_ERROR([invalid bignum implementation])
;;
esac

AM_CONDITIONAL([USE_NUM_GMP], [test "x$set_bignum" = "xgmp"])
AM_CONDITIONAL([USE_NUM_OPENSSL], [test "x$set_bignum" = "xopenssl"])

AC_MSG_CHECKING([whether to build test_sapphire])
if test x$use_tests = xyes; then
AC_MSG_RESULT([yes])
Expand Down Expand Up @@ -1440,7 +1390,6 @@ AC_SUBST(SSL_LIBS)
AC_SUBST(EVENT_LIBS)
AC_SUBST(EVENT_PTHREADS_LIBS)
AC_SUBST(ZMQ_LIBS)
AC_SUBST(LIBZCASH_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS)
AC_SUBST(USE_NUM_GMP)
Expand Down Expand Up @@ -1487,7 +1436,7 @@ if test x$need_bundled_univalue = xyes; then
AC_CONFIG_SUBDIRS([src/univalue])
fi

ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no --enable-module-recovery --disable-jni"
ac_configure_args="${ac_configure_args} --disable-shared --with-pic --enable-module-recovery --disable-jni"
AC_CONFIG_SUBDIRS([src/secp256k1])

AC_OUTPUT
Expand Down Expand Up @@ -1519,7 +1468,6 @@ if test x$bitcoin_enable_qt != xno; then
echo " with qtcharts = $use_qtcharts"
fi
echo " with zmq = $use_zmq"
echo " with bignum = $set_bignum"
echo " with test = $use_tests"
echo " with bench = $use_bench"
echo " with upnp = $use_upnp"
Expand Down
3 changes: 0 additions & 3 deletions contrib/gitian-descriptors/gitian-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,6 @@ script: |
rename 's/-setup\.exe$/-setup-unsigned.exe/' *-setup.exe
cp -f pivx-*setup*.exe $OUTDIR/
cd installed
# mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/ # temporarily disabled for Zerocoin
# find . -name "lib*.la" -delete # temporarily disabled for Zerocoin
# find . -name "lib*.a" -delete # temporarily disabled for Zerocoin
rm -rf ${DISTNAME}/lib/pkgconfig
find ${DISTNAME}/bin -type f -executable -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
# find ${DISTNAME}/lib -type f -exec ${i}-objcopy --only-keep-debug {} {}.dbg \; -exec ${i}-strip -s {} \; -exec ${i}-objcopy --add-gnu-debuglink={}.dbg {} \;
Expand Down
2 changes: 0 additions & 2 deletions contrib/innosetup/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ Type: filesandordirs; Name: {code:GetDataDir}\blocks; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\chainstate; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\database; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\sporks; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\zerocoin; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\.lock; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\banlist.dat; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\budget.dat; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\fee_estimates.dat; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\mncache.dat; Components: bootstrap
Type: filesandordirs; Name: {code:GetDataDir}\mnpayments.dat; Components: bootstrap
Expand Down
2 changes: 1 addition & 1 deletion contrib/masternodesetup/masternodesetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function update_config() {
sed -i 's/daemon=1/daemon=0/' $CONFIGFOLDER/$CONFIG_FILE
cat << EOF >> $CONFIGFOLDER/$CONFIG_FILE
maxconnections=256
bind=$NODEIP
bind=0.0.0.0
masternode=1
externalip=$NODEIP:$COIN_PORT
masternodeprivkey=$COINKEY
Expand Down
8 changes: 4 additions & 4 deletions contrib/pivx-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ INCLUDEPATH += . \

# Input
HEADERS += src/activemasternode.h \
src/activemasternodeman.h \
src/activemasternodeconfig.h \
src/addrman.h \
src/alert.h \
src/allocators.h \
Expand Down Expand Up @@ -90,7 +92,6 @@ HEADERS += src/activemasternode.h \
src/leveldbwrapper.h \
src/limitedmap.h \
src/main.h \
src/masternode-budget.h \
src/masternode-payments.h \
src/masternode-sync.h \
src/masternode.h \
Expand Down Expand Up @@ -356,6 +357,8 @@ FORMS += src/qt/forms/addressbookpage.ui \
src/qt/forms/signverifymessagedialog.ui \
src/qt/forms/transactiondescdialog.ui
SOURCES += src/activemasternode.cpp \
src/activemasternodeconfig.cpp \
src/activemasternodeman.cpp \
src/addrman.cpp \
src/alert.cpp \
src/allocators.cpp \
Expand Down Expand Up @@ -388,7 +391,6 @@ SOURCES += src/activemasternode.cpp \
src/keystore.cpp \
src/leveldbwrapper.cpp \
src/main.cpp \
src/masternode-budget.cpp \
src/masternode-payments.cpp \
src/masternode-sync.cpp \
src/masternode.cpp \
Expand All @@ -407,7 +409,6 @@ SOURCES += src/activemasternode.cpp \
src/rpcblockchain.cpp \
src/rpcclient.cpp \
src/rpcdump.cpp \
src/rpcmasternode-budget.cpp \
src/rpcmasternode.cpp \
src/rpcmining.cpp \
src/rpcmisc.cpp \
Expand Down Expand Up @@ -546,7 +547,6 @@ SOURCES += src/activemasternode.cpp \
src/test/sanity_tests.cpp \
src/test/script_P2SH_tests.cpp \
src/test/script_tests.cpp \
src/test/scriptnum_tests.cpp \
src/test/serialize_tests.cpp \
src/test/sighash_tests.cpp \
src/test/sigopcount_tests.cpp \
Expand Down
6 changes: 3 additions & 3 deletions contrib/testgen/gen_base58_test_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
from binascii import b2a_hex

# key types
PUBKEY_ADDRESS = 30
SCRIPT_ADDRESS = 13
PUBKEY_ADDRESS = 15
SCRIPT_ADDRESS = 16
PUBKEY_ADDRESS_TEST = 139
SCRIPT_ADDRESS_TEST = 19
PRIVKEY = 212
PRIVKEY = 43
PRIVKEY_TEST = 239

metadata_keys = ['isPrivkey', 'isTestnet', 'addrType', 'isCompressed']
Expand Down
Loading

0 comments on commit 3bd2a4a

Please sign in to comment.