Skip to content

Commit

Permalink
Merge pull request #4 from DeckerSU/static-experimental-hf
Browse files Browse the repository at this point in the history
hf changes
  • Loading branch information
DeckerSU authored Dec 4, 2019
2 parents f430d0d + 379954f commit 0055251
Show file tree
Hide file tree
Showing 35 changed files with 923 additions and 443 deletions.
22 changes: 12 additions & 10 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, 2)
define(_CLIENT_VERSION_MAJOR, 3)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 15)
define(_CLIENT_VERSION_BUILD, 26)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
define(_CLIENT_VERSION_IS_RELEASE, true)
Expand Down Expand Up @@ -877,13 +877,15 @@ AX_CHECK_COMPILE_FLAG([-fwrapv],[CXXFLAGS="$CXXFLAGS -fwrapv"])
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]])

if test x$TARGET_OS = xdarwin; then
LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium $RUST_LIBS"
elif test x$TARGET_OS != xwindows; then
LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system -lcrypto -lsodium $RUST_LIBS"
else
LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system-mt-s -lcrypto -lsodium $RUST_LIBS"
fi
# if test x$TARGET_OS = xdarwin; then
# LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system-mt -lcrypto -lsodium $RUST_LIBS"
# elif test x$TARGET_OS != xwindows; then
# LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system -lcrypto -lsodium $RUST_LIBS"
# else
# LIBZCASH_LIBS="-lgmp -lgmpxx -lboost_system-mt-s -lcrypto -lsodium $RUST_LIBS"
# fi

LIBZCASH_LIBS="-lgmp -lgmpxx $BOOST_SYSTEM_LIB -lcrypto -lsodium $RUST_LIBS"

CXXFLAGS_TEMP="$CXXFLAGS"
LIBS_TEMP="$LIBS"
Expand Down
19 changes: 9 additions & 10 deletions depends/packages/boost.mk
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package=boost
$(package)_version=1_62_0
$(package)_download_path=http://sourceforge.net/projects/boost/files/boost/1.62.0

$(package)_version=1_66_0
$(package)_download_path=https://dl.bintray.com/boostorg/release/1.66.0/source
$(package)_sha256_hash=5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
$(package)_sha256_hash=36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0
$(package)_patches=deprecated_auto_ptr.patch include_poll.patch

define $(package)_set_vars
$(package)_config_opts_release=variant=release
$(package)_config_opts_debug=variant=debug
$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
$(package)_config_opts=--layout=system --user-config=user-config.jam
$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
$(package)_config_opts_darwin=--toolset=gcc threadapi=pthread runtime-link=shared
$(package)_config_opts_darwin=--toolset=gcc runtime-link=shared threadapi=pthread
$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
$(package)_config_opts_x86_64_mingw32=address-model=64
$(package)_config_opts_i686_mingw32=address-model=32
Expand All @@ -21,14 +21,13 @@ $(package)_archiver_$(host_os)=$($(package)_ar)
$(package)_toolset_darwin=gcc
$(package)_archiver_darwin=$($(package)_ar)
$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
$(package)_cxxflags=-fvisibility=hidden
$(package)_cxxflags=-std=c++11 -fvisibility=hidden
$(package)_cxxflags_linux=-fPIC
endef


define $(package)_preprocess_cmds
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam && \
patch -p1 < $($(package)_patch_dir)/deprecated_auto_ptr.patch && \
patch -p1 < $($(package)_patch_dir)/include_poll.patch
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef

define $(package)_config_cmds
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/libevent.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package=libevent
$(package)_version=2.1.8
$(package)_download_path=https://github.com/libevent/libevent/archive/
$(package)_download_path=https://github.com/libevent/libevent/archive
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_download_file=release-$($(package)_version)-stable.tar.gz
$(package)_sha256_hash=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
Expand Down
6 changes: 3 additions & 3 deletions depends/packages/libgmp.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package=libgmp

ifeq ($(host_os),mingw32)
$(package)_download_path=https://github.com/joshuayabut/$(package)/archive/
$(package)_download_path=https://github.com/joshuayabut/$(package)/archive
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_sha256_hash=193836c1acc9dc00fe2521205d7bbe1ba13263f6cbef6f02584bf6f8b34b108f
$(package)_git_commit=053c03b1cab347671d936f43ef66b48ab5e380ee
$(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared
else ifeq ($(build_os),darwin)
$(package)_download_path=https://github.com/ca333/$(package)/archive/
$(package)_download_path=https://github.com/ca333/$(package)/archive
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c
Expand All @@ -18,7 +18,7 @@ $(package)_dependencies=
$(package)_config_opts=--enable-cxx --disable-shared
else
$(package)_version=6.1.1
$(package)_download_path=https://gmplib.org/download/gmp/
$(package)_download_path=https://ftp.gnu.org/gnu/gmp
$(package)_file_name=gmp-$($(package)_version).tar.bz2
$(package)_sha256_hash=a8109865f2893f1373b0a8ed5ff7429de8db696fc451b1036bd7bdf95bbeffd6
$(package)_dependencies=
Expand Down
8 changes: 4 additions & 4 deletions depends/packages/libsnark.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package=libsnark
$(package)_version=0.1
$(package)_download_path=https://supernetorg.bintray.com/misc/
$(package)_download_path=https://github.com/ca333/libsnark/releases/download/v$($(package)_version)-$($(package)_git_commit)/
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$(package)-$($(package)_git_commit).tar.gz
$(package)_sha256_hash=47478adc2ae88c448dc736d59dfe007de6478e41e88d2d4d2ff4135a17ee6f90
Expand All @@ -14,15 +14,15 @@ define $(package)_set_vars
$(package)_build_env+=CXXFLAGS="$($(package)_cxxflags) -DBINARY_OUTPUT -DSTATICLIB -DNO_PT_COMPRESSION=1 "
endef
define $(package)_build_cmds
$(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64"
$(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64 -g "
endef
else ifeq ($(host_os),mingw32)
define $(package)_build_cmds
CXX="x86_64-w64-mingw32-g++-posix" CXXFLAGS="-DBINARY_OUTPUT -DPTW32_STATIC_LIB -DSTATICLIB -DNO_PT_COMPRESSION=1 -fopenmp" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64"
CXX="x86_64-w64-mingw32-g++-posix" CXXFLAGS="-DBINARY_OUTPUT -DPTW32_STATIC_LIB -DSTATICLIB -DNO_PT_COMPRESSION=1 -fopenmp" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64 -g "
endef
else
define $(package)_build_cmds
CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64"
CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64 -g "
endef
endif

Expand Down
17 changes: 13 additions & 4 deletions depends/packages/libsodium.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package=libsodium
$(package)_version=1.0.11
$(package)_download_path=https://supernetorg.bintray.com/misc
$(package)_file_name=libsodium-1.0.11.tar.gz
$(package)_sha256_hash=a14549db3c49f6ae2170cbbf4664bd48ace50681045e8dbea7c8d9fb96f9c765
$(package)_version=1.0.18
$(package)_download_path=https://download.libsodium.org/libsodium/releases
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
$(package)_dependencies=
$(package)_config_opts=

define $(package)_set_vars
$(package)_build_env=DO_NOT_UPDATE_CONFIG_SCRIPTS=1
ifeq ($(build_os),darwin)
$(package)_build_env+=MACOSX_DEPLOYMENT_TARGET="10.11"
$(package)_cc=clang
$(package)_cxx=clang++
endif
endef

define $(package)_preprocess_cmds
cd $($(package)_build_subdir); ./autogen.sh
endef
Expand Down
14 changes: 14 additions & 0 deletions share/nsi_win64/content/komodo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
txindex=1
addnode=5.9.102.210
addnode=78.47.196.146
addnode=178.63.69.164
addnode=88.198.65.74
addnode=5.9.122.241
addnode=144.76.94.38
addnode=89.248.166.91
onlynet=ipv4
rpcuser=komodo
rpcpassword=local321
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
server=1
97 changes: 97 additions & 0 deletions share/nsi_win64/install.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Target x86-unicode
; SetCompressor lzma

; Settings
Name "KomodoOcean (Komodo-Qt)"
OutFile "komodo-qt-install.exe"
RequestExecutionLevel admin
InstallDir "$PROGRAMFILES64\KomodoOcean"
Icon "komodo.ico"
CRCCheck on

; Includes

; Pages
Page components
Page directory
Page instfiles

;--------------------------------

Section "Install Komodo-Qt (GUI)" Section1
SetOutPath $INSTDIR
File "content\komodo-qt-win.exe"
CreateShortCut "$DESKTOP\Komodo-Qt.lnk" "$INSTDIR\komodo-qt-win.exe"
SectionEnd

Section "Download ZCash Params" Section3

SetOverwrite on
CreateDirectory "$APPDATA\ZcashParams"
DetailPrint "Checking: sprout-proving.key"
IfFileExists "$APPDATA\ZcashParams\sprout-proving.key" next_1
DetailPrint "Downloading: sprout-proving.key"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-proving.key" \
"https://z.cash/downloads/sprout-proving.key" "$APPDATA\ZcashParams\sprout-proving.key" \
/END
Pop $0
StrCmp $0 "OK" next_1
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to fetch ZCash params, click OK to abort installation" /SD IDOK
Abort
next_1:

DetailPrint "Checking: sprout-verifying.key"
IfFileExists "$APPDATA\ZcashParams\sprout-verifying.key" next_2
DetailPrint "Downloading: sprout-verifying.key"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-verifying.key" \
"https://z.cash/downloads/sprout-verifying.key" "$APPDATA\ZcashParams\sprout-verifying.key" \
/END
Pop $0
StrCmp $0 "OK" next_2
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to fetch ZCash params, click OK to abort installation" /SD IDOK
Abort
next_2:

DetailPrint "Checking: sapling-spend.params"
IfFileExists "$APPDATA\ZcashParams\sapling-spend.params" next_3
DetailPrint "Downloading: sapling-spend.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sapling-spend.params" \
"https://z.cash/downloads/sapling-spend.params" "$APPDATA\ZcashParams\sapling-spend.params" \
/END
Pop $0
StrCmp $0 "OK" next_3
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to fetch ZCash params, click OK to abort installation" /SD IDOK
Abort
next_3:

DetailPrint "Checking: sapling-output.params"
IfFileExists "$APPDATA\ZcashParams\sapling-output.params" next_4
DetailPrint "Downloading: sapling-output.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sapling-output.params" \
"https://z.cash/downloads/sapling-output.params" "$APPDATA\ZcashParams\sapling-output.params" \
/END
Pop $0
StrCmp $0 "OK" next_4
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to fetch ZCash params, click OK to abort installation" /SD IDOK
Abort
next_4:

DetailPrint "Checking: sprout-groth16.params"
IfFileExists "$APPDATA\ZcashParams\sprout-groth16.params" next_5
DetailPrint "Downloading: sprout-groth16.params"
inetc::get /CAPTION "ZCash Params" /POPUP "sprout-groth16.params" \
"https://z.cash/downloads/sprout-groth16.params" "$APPDATA\ZcashParams\sprout-groth16.params" \
/END
Pop $0
StrCmp $0 "OK" next_5
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to fetch ZCash params, click OK to abort installation" /SD IDOK
Abort
next_5:
SectionEnd

Section "Create komodo.conf" Section2
SetOverwrite on
CreateDirectory "$APPDATA\Komodo"
SetOutPath $APPDATA\Komodo
File "content\komodo.conf"
SectionEnd
Binary file added share/nsi_win64/komodo.ico
Binary file not shown.
5 changes: 5 additions & 0 deletions share/nsi_win64/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Requirements:

- Internet client plug-in for files download and upload (http://nsis.sourceforge.net/Inetc_plug-in)
- Place komodo-qt-win.exe in content\komodo-qt-win.exe, before create installer

18 changes: 16 additions & 2 deletions src/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class CChainPower;
#include "pow.h"
#include "tinyformat.h"
#include "uint256.h"
extern int8_t is_STAKED(const char *chain_name);

#include <vector>

Expand All @@ -39,6 +38,10 @@ static const int SAPLING_VALUE_VERSION = 1010100;
extern int32_t ASSETCHAINS_LWMAPOS;
extern char ASSETCHAINS_SYMBOL[65];
extern uint64_t ASSETCHAINS_NOTARY_PAY[];
extern int32_t ASSETCHAINS_STAKED;
extern const uint32_t nStakedDecemberHardforkTimestamp; //December 2019 hardfork
extern const int32_t nDecemberHardforkHeight; //December 2019 hardfork
extern int8_t is_STAKED(const char *chain_name);

struct CDiskBlockPos
{
Expand Down Expand Up @@ -547,11 +550,22 @@ class CDiskBlockIndex : public CBlockIndex
if ((s.GetType() & SER_DISK) && (nVersion >= SAPLING_VALUE_VERSION)) {
READWRITE(nSaplingValue);
}
if ( (s.GetType() & SER_DISK) && (is_STAKED(ASSETCHAINS_SYMBOL) != 0) && ASSETCHAINS_NOTARY_PAY[0] != 0 )

// leave the existing LABS exemption here for segid and notary pay, but also add a timestamp activated segid for non LABS PoS64 chains.
if ( (s.GetType() & SER_DISK) && is_STAKED(ASSETCHAINS_SYMBOL) != 0 && ASSETCHAINS_NOTARY_PAY[0] != 0 )
{
READWRITE(nNotaryPay);
}
if ( (s.GetType() & SER_DISK) && ASSETCHAINS_STAKED != 0 && (nTime > nStakedDecemberHardforkTimestamp || is_STAKED(ASSETCHAINS_SYMBOL) != 0) ) //December 2019 hardfork
{
READWRITE(segid);
}

/*if ( (s.GetType() & SER_DISK) && (is_STAKED(ASSETCHAINS_SYMBOL) != 0) && ASSETCHAINS_NOTARY_PAY[0] != 0 )
{
READWRITE(nNotaryPay);
READWRITE(segid);
}*/
}

uint256 GetBlockHash() const
Expand Down
6 changes: 3 additions & 3 deletions src/clientversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
*/

//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MAJOR 3
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 15
#define CLIENT_VERSION_BUILD 26
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 0

//! Set to true for release, false for prerelease or test build
#define CLIENT_VERSION_IS_RELEASE true
Expand Down
9 changes: 8 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
#endif
if (GetBoolArg("-shrinkdebugfile", !fDebug))
ShrinkDebugFile();
LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
//LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
LogPrintf("Komodo version %s (%s)\n", FormatFullVersion(), CLIENT_DATE);

if (fPrintToDebugLog)
Expand All @@ -1292,6 +1292,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
#ifdef ENABLE_WALLET
LogPrintf("Using BerkeleyDB version %s\n", DbEnv::version(0, 0, 0));
#endif
std::stringstream boost_version_ss("");
boost_version_ss << BOOST_VERSION / 100000 << "." // major version
<< BOOST_VERSION / 100 % 1000 << "." // minor version
<< BOOST_VERSION % 100; // patch level
LogPrintf("Using Boost version %s\n", boost_version_ss.str() /*BOOST_LIB_VERSION*/ );
LogPrintf("Using Sodium version %s\n", sodium_version_string());

if (!fLogTimestamps)
LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()));
LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
Expand Down
Loading

0 comments on commit 0055251

Please sign in to comment.