Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from Phore 1.7.1 #85

Open
wants to merge 52 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d8d2cbd
Replaced boost::placeholders::_X with boost::arg<X>()
wqking Nov 13, 2021
41f3801
Add simplest BIP32/deterministic key generation implementation
KolbyML Jun 8, 2019
d1b4834
Fixed compile errors
wqking Nov 22, 2021
88cf251
[PHR-3] Prevent RPC calls during warmup
tohsnoom Oct 1, 2019
675eb6e
Fix bugs in mnemonic selection and mint maturity
meyer9 Oct 9, 2019
6fda1c6
[Refactor] Move ThreadStakeMinter out of net.cpp
Fuzzbawls Jul 4, 2019
19f2be0
Changed for loop copies to references, and added stake logging
tohsnoom Nov 11, 2019
cb84848
Fixed compiler warning about BIP32_HARDENED_KEY_LIMIT constant
tohsnoom Oct 28, 2019
f74627c
Fix staking assertion
tohsnoom Oct 28, 2019
328fc99
Fixed reindex crash bug
wqking Jan 18, 2020
1cb8ddd
Fixed some compiler warnings
tohsnoom Jun 11, 2020
8a559d1
Fixed compile errors
wqking Nov 24, 2021
44935e1
Merge pull request #158 from wqking/speed-up-getchaintips
tohsnoom Jun 11, 2020
ff1ccfd
Replaced sigcache with cuckoocache
wqking Jan 11, 2020
b596b9f
Cache full script execution results.
wqking Jan 13, 2020
5a5cde6
Merge pull request #161 from wqking/use-sse4-for-sha256
tohsnoom Jun 11, 2020
277ab12
Merge pull request #162 from mrmetech/PHR-7
tohsnoom Jun 11, 2020
2e86918
Merge pull request #163 from mrmetech/PHR-18
tohsnoom Jun 11, 2020
a36e49e
Batch flushing operations to the walletdb
wqking Jan 29, 2020
ea43331
Removed BIP32 code that was supposed to be removed
KolbyML Feb 9, 2020
d6f5b67
Use object reference instead of copy to improve performance.
wqking Feb 14, 2020
fbeac48
Batching all block index writes to improve disk update performance.
wqking Feb 13, 2020
8fc4d53
Removed comments that blocked a default value
KolbyML Oct 26, 2019
cbedd8a
Improved staking/mining efficiency.
tohsnoom Oct 28, 2019
222b8a5
Fixed compile errors
wqking Nov 25, 2021
bbf6cdf
Merge branch 'rel-1.6.4' of https://github.com/phoreproject/phore int…
tohsnoom Jun 12, 2020
7959f02
Changed default addressing to legacy (non-HD)
tohsnoom Nov 14, 2019
1f7686e
Fix bug with empty mnemonic not being generated
meyer9 Nov 15, 2019
fdc213f
Merge pull request #178 from wqking/use-sse4-for-sha256
tohsnoom Jun 12, 2020
cdf8389
Fixed compile errors
wqking Nov 25, 2021
57abbb7
Merge branch 'mrmetech-PHR-17' into rel-1.6.4
tohsnoom Jun 12, 2020
52d9741
Merge branch 'rel-1.6.4' of https://github.com/phoreproject/phore int…
tohsnoom Jun 12, 2020
9ec8031
Merge branch 'rel-1.6.4' of https://github.com/phoreproject/phore int…
tohsnoom Jun 12, 2020
2ade282
More cleanup replacing BOOST_FOREACH with for :
tohsnoom Jun 12, 2020
97f737a
Fixed compile errors
wqking Nov 26, 2021
14c9e0a
Added cuckoocache.h to Makefile.am
tohsnoom Jun 12, 2020
841e616
Removed Qt5Svg dependency
wqking Jul 7, 2020
86135d7
Updated link to Qt packages
tohsnoom Jul 16, 2020
1a3d242
Fixed compile errors in tests
wqking Nov 27, 2021
3983454
Fixed coin name
wqking Nov 29, 2021
0976d3f
Stake Modifier V2
KolbyML Sep 30, 2019
5841172
Fixed compile errors
wqking Dec 11, 2021
ba8fe3c
fixed problems staking modifier v2
KolbyML Nov 9, 2020
e19898c
Merge branch 'wkqing-prevent' into rel-1.7.0
KolbyML Nov 15, 2020
f303510
Fixed compile errors
wqking Dec 13, 2021
4cdc26b
Removed check for zerocoin mint in coinstake transaction
tohsnoom Jan 3, 2021
0143b9b
Fixed compile errors
wqking Dec 13, 2021
f7875e5
Removed extra unused variable txin in kernel.cpp
tohsnoom Jan 3, 2021
ae1d1f5
Added kernel extra check for staking
wqking Aug 17, 2021
4ab3f67
Fixed compile errors
wqking Dec 14, 2021
8c61dee
Updated kernel spork names
tohsnoom Oct 11, 2021
a281e22
Updated coin name
wqking Jan 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,5 @@ src/ohmcoin-tx
src/ohmcoind
doc/Doxyfile
doc/Doxyfile
src/test/test_ohmcoin
src/qt/test/test_ohmcoin-qt
15 changes: 13 additions & 2 deletions build-aux/m4/bitcoin_qt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,19 @@ dnl Outputs: All necessary QT_* variables are set.
dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
m4_ifdef([PKG_CHECK_MODULES],[
QT_LIB_PREFIX=Qt5
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets Qt5Svg"
auto_priority_version=$1
if test "x$auto_priority_version" = x; then
auto_priority_version=qt5
fi
if test "x$bitcoin_qt_want_version" = xqt5 || ( test "x$bitcoin_qt_want_version" = xauto && test "x$auto_priority_version" = xqt5 ); then
QT_LIB_PREFIX=Qt5
bitcoin_qt_got_major_vers=5
else
QT_LIB_PREFIX=Qt
bitcoin_qt_got_major_vers=4
fi
qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets Qt5Concurrent"
qt4_modules="QtCore QtGui QtNetwork"
BITCOIN_QT_CHECK([
PKG_CHECK_MODULES([QT5], [$qt5_modules], [QT_INCLUDES="$QT5_CFLAGS"; QT_LIBS="$QT5_LIBS" have_qt=yes],[have_qt=no])
if test "x$have_qt" != xyes; then
Expand Down
6,277 changes: 6,277 additions & 0 deletions compileroutput.txt

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ AC_ARG_ENABLE([glibc-back-compat],
[use_glibc_compat=$enableval],
[use_glibc_compat=no])

AC_ARG_ENABLE([asm],
[AS_HELP_STRING([--disable-asm],
[disable assembly routines (enabled by default)])],
[use_asm=$enableval],
[use_asm=yes])

if test "x$use_asm" = xyes; then
AC_DEFINE(USE_ASM, 1, [Define this symbol to build in assembly routines])
fi

AC_ARG_ENABLE([zmq],
[AS_HELP_STRING([--disable-zmq],
[disable ZMQ notifications])],
Expand Down Expand Up @@ -1100,6 +1110,7 @@ AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
AM_CONDITIONAL([USE_LIBSECP256K1],[test x$use_libsecp256k1 = xyes])
AM_CONDITIONAL([USE_ASM],[test x$use_asm = xyes])

AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
Expand Down Expand Up @@ -1211,6 +1222,7 @@ echo " with zmq = $use_zmq"
echo " with test = $use_tests"
dnl echo " with bench = $use_bench"
echo " with upnp = $use_upnp"
echo " use asm = $use_asm"
echo " debug enabled = $enable_debug"
echo " werror = $enable_werror"
echo
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/qt.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PACKAGE=qt
$(package)_version=5.7.1
$(package)_download_path=https://download.qt.io/archive/qt/5.7/$($(package)_version)/submodules
$(package)_download_path=http://download.qt.io/new_archive/qt/5.7/$($(package)_version)/submodules
$(package)_suffix=opensource-src-$($(package)_version).tar.gz
$(package)_file_name=qtbase-$($(package)_suffix)
$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
Expand Down
4 changes: 2 additions & 2 deletions qa/pull-tester/rpc-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ fi
#Run the tests

if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
${BUILDDIR}/test/wallet.py
${BUILDDIR}/test/segwit.py
${BUILDDIR}/test/functional/wallet.py
${BUILDDIR}/test/functional/segwit.py
else
echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
fi
44 changes: 30 additions & 14 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,24 @@ BITCOIN_CORE_H = \
checkpoints.h \
checkqueue.h \
clientversion.h \
coincontrol.h \
coins.h \
compat.h \
compat/cpuid.h \
compat/sanity.h \
consensus/merkle.h \
consensus/validation.h \
consensus/params.h \
consensus/upgrades.h \
compressor.h \
cuckoocache.h \
primitives/block.h \
primitives/deterministicmint.h \
primitives/transaction.h \
primitives/zerocoin.h \
core_io.h \
crypter.h \
denomination_functions.h \
obfuscation.h \
obfuscation-relay.h \
wallet/db.h \
eccryptoverify.h \
ecwrapper.h \
hash.h \
Expand Down Expand Up @@ -176,10 +175,11 @@ BITCOIN_CORE_H = \
script/script_error.h \
serialize.h \
support/allocators/zeroafterfree.h \
support/cleanse.h \
spork.h \
sporkdb.h \
stakeinput.h \
streams.h \
support/cleanse.h \
sync.h \
threadsafety.h \
timedata.h \
Expand All @@ -195,12 +195,20 @@ BITCOIN_CORE_H = \
utilmoneystr.h \
utiltime.h \
validationinterface.h \
utilsplitstring.h \
version.h \
wallet/wallet.h \
wallet/wallet_ismine.h \
wallet/walletdb.h \
zohmctracker.h \
zohmcwallet.h \
wallet/coincontrol.h \
wallet/crypter.h \
wallet/db.h \
wallet/wallet.h \
wallet/walletdb.h \
wallet/bip39_english.h \
wallet/bip39.h \
wallet/arrayslice.h \
wallet/hdchain.h \
zmq/zmqabstractnotifier.h \
zmq/zmqconfig.h \
zmq/zmqnotificationinterface.h \
Expand Down Expand Up @@ -270,8 +278,6 @@ libbitcoin_wallet_a_SOURCES = \
denomination_functions.cpp \
obfuscation.cpp \
obfuscation-relay.cpp \
wallet/db.cpp \
crypter.cpp \
swifttx.cpp \
karmanode.cpp \
karmanode-budget.cpp \
Expand All @@ -281,15 +287,19 @@ libbitcoin_wallet_a_SOURCES = \
karmanodeman.cpp \
mintpool.cpp \
wallet/rpcdump.cpp \
wallet/rpcwallet.cpp \
kernel.cpp \
wallet/wallet.cpp \
wallet/wallet_ismine.cpp \
wallet/walletdb.cpp \
primitives/deterministicmint.cpp \
primitives/zerocoin.cpp \
kernel.cpp \
wallet/wallet_ismine.cpp \
stakeinput.cpp \
zohmcwallet.cpp \
zohmctracker.cpp \
wallet/crypter.cpp \
wallet/db.cpp \
wallet/rpcwallet.cpp \
wallet/wallet.cpp \
wallet/walletdb.cpp \
ui_interface.cpp \
$(BITCOIN_CORE_H)

# crypto primitives library
Expand All @@ -298,8 +308,11 @@ crypto_libbitcoin_crypto_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
crypto_libbitcoin_crypto_a_SOURCES = \
crypto/sha1.cpp \
crypto/sha256.cpp \
crypto/sha256_sse4.cpp \
crypto/sha512.cpp \
crypto/hmac_sha256.cpp \
crypto/pkcs5_pbkdf2.h \
crypto/pkcs5_pbkdf2.cpp \
crypto/rfc6979_hmac_sha256.cpp \
crypto/hmac_sha512.cpp \
crypto/scrypt.cpp \
Expand Down Expand Up @@ -365,6 +378,7 @@ libbitcoin_common_a_SOURCES = \
amount.cpp \
base58.cpp \
bech32.cpp \
wallet/bip39.cpp \
bip38.cpp \
chainparams.cpp \
coins.cpp \
Expand All @@ -391,7 +405,7 @@ libbitcoin_common_a_SOURCES = \
script/sign.cpp \
script/standard.cpp \
script/script_error.cpp \
support/cleanse.cpp \
wallet/hdchain.cpp \
spork.cpp \
sporkdb.cpp \
$(BITCOIN_CORE_H)
Expand All @@ -410,6 +424,7 @@ libbitcoin_util_a_SOURCES = \
clientversion.cpp \
random.cpp \
rpc/protocol.cpp \
support/cleanse.cpp \
sync.cpp \
uint256.cpp \
util.cpp \
Expand Down Expand Up @@ -573,3 +588,4 @@ endif
if ENABLE_QT_TESTS
include Makefile.qttest.include
endif

26 changes: 26 additions & 0 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ QT_FORMS_UI = \
qt/forms/addressbookpage.ui \
qt/forms/configurekarmanodepage.ui \
qt/forms/askpassphrasedialog.ui \
qt/forms/startoptionsdialog.ui \
qt/forms/startoptions.ui \
qt/forms/startoptionsrestore.ui \
qt/forms/startoptionssort.ui \
qt/forms/startoptionsrevealed.ui \
qt/forms/startoptionsmain.ui \
qt/forms/bip38tooldialog.ui \
qt/forms/coincontroldialog.ui \
qt/forms/blockexplorer.ui \
Expand Down Expand Up @@ -67,6 +73,12 @@ QT_MOC_CPP = \
qt/moc_configurekarmanodepage.cpp \
qt/moc_addresstablemodel.cpp \
qt/moc_askpassphrasedialog.cpp \
qt/moc_startoptionsdialog.cpp \
qt/moc_startoptions.cpp \
qt/moc_startoptionsrestore.cpp \
qt/moc_startoptionssort.cpp \
qt/moc_startoptionsrevealed.cpp \
qt/moc_startoptionsmain.cpp \
qt/moc_bantablemodel.cpp \
qt/moc_bip38tooldialog.cpp \
qt/moc_bitcoinaddressvalidator.cpp \
Expand Down Expand Up @@ -146,6 +158,12 @@ BITCOIN_QT_H = \
qt/addressbookpage.h \
qt/addresstablemodel.h \
qt/askpassphrasedialog.h \
qt/startoptionsdialog.h \
qt/startoptions.h \
qt/startoptionsrestore.h \
qt/startoptionssort.h \
qt/startoptionsrevealed.h \
qt/startoptionsmain.h \
qt/bantablemodel.h \
qt/bip38tooldialog.h \
qt/bitcoinaddressvalidator.h \
Expand Down Expand Up @@ -245,6 +263,8 @@ RES_ICONS = \
qt/res/icons/history_off.png \
qt/res/icons/karmanodes.png \
qt/res/icons/karmanodes_off.png \
qt/res/icons/hd_enabled.png \
qt/res/icons/hd_disabled.png \
qt/res/icons/key.png \
qt/res/icons/lock_closed.png \
qt/res/icons/lock_open.png \
Expand Down Expand Up @@ -306,6 +326,12 @@ BITCOIN_QT_CPP = \
qt/rpcconsole.cpp \
qt/splashscreen.cpp \
qt/trafficgraphwidget.cpp \
qt/startoptionsdialog.cpp \
qt/startoptions.cpp \
qt/startoptionsrestore.cpp \
qt/startoptionssort.cpp \
qt/startoptionsrevealed.cpp \
qt/startoptionsmain.cpp \
qt/utilitydialog.cpp

if TARGET_WINDOWS
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ JSON_TEST_FILES = \
test/data/sig_noncanonical.json \
test/data/base58_encode_decode.json \
test/data/base58_keys_invalid.json \
test/data/bip39_vectors.json \
test/data/script_invalid.json \
test/data/tx_invalid.json \
test/data/tx_valid.json \
Expand All @@ -46,6 +47,7 @@ BITCOIN_TESTS =\
test/base32_tests.cpp \
test/base58_tests.cpp \
test/base64_tests.cpp \
test/bip39_tests.cpp \
test/budget_tests.cpp \
test/checkblock_tests.cpp \
test/Checkpoints_tests.cpp \
Expand Down
6 changes: 3 additions & 3 deletions src/accumulators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ std::list<uint256> listAccCheckpointsNoDB;
uint32_t ParseChecksum(uint256 nChecksum, CoinDenomination denomination)
{
//shift to the beginning bit of this denomination and trim any remaining bits by returning 32 bits only
int pos = std::distance(zerocoinDenomList.begin(), find(zerocoinDenomList.begin(), zerocoinDenomList.end(), denomination));
int pos = distance(zerocoinDenomList.begin(), find(zerocoinDenomList.begin(), zerocoinDenomList.end(), denomination));
nChecksum = nChecksum >> (32*((zerocoinDenomList.size() - 1) - pos));
return nChecksum.Get32();
}
Expand Down Expand Up @@ -261,7 +261,7 @@ bool CalculateAccumulatorCheckpoint(int nHeight, uint256& nCheckpoint, Accumulat
LogPrint("zero", "%s found %d mints\n", __func__, listPubcoins.size());

//add the pubcoins to accumulator
for (const PublicCoin pubcoin : listPubcoins) {
for (const PublicCoin& pubcoin : listPubcoins) {
if(!mapAccumulators.Accumulate(pubcoin, true))
return error("%s: failed to add pubcoin to accumulator at height %d", __func__, pindex->nHeight);
}
Expand Down Expand Up @@ -512,7 +512,7 @@ map<CoinDenomination, int> GetMintMaturityHeight()

if (isFinished)
break;
pindex = chainActive[pindex->nHeight - 1];
pindex = pindex->pprev;
}

//Generate final map
Expand Down
2 changes: 1 addition & 1 deletion src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,4 +582,4 @@ class CAddrMan
}
};

#endif // BITCOIN_ADDRMAN_H
#endif // BITCOIN_ADDRMAN_H
10 changes: 5 additions & 5 deletions src/allocators.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#ifndef BITCOIN_ALLOCATORS_H
#define BITCOIN_ALLOCATORS_H

#include "support/cleanse.h"

#include <map>
#include <string.h>
#include <string>
Expand All @@ -14,8 +16,6 @@
#include <boost/thread/mutex.hpp>
#include <boost/thread/once.hpp>

#include <openssl/crypto.h> // for OPENSSL_cleanse()

/**
* Thread-safe class to keep track of locked (ie, non-swappable) memory pages.
*
Expand Down Expand Up @@ -173,7 +173,7 @@ void LockObject(const T& t)
template <typename T>
void UnlockObject(const T& t)
{
OPENSSL_cleanse((void*)(&t), sizeof(T));
memory_cleanse((void*)(&t), sizeof(T));
LockedPageManager::Instance().UnlockRange((void*)(&t), sizeof(T));
}

Expand Down Expand Up @@ -216,7 +216,7 @@ struct secure_allocator : public std::allocator<T> {
void deallocate(T* p, std::size_t n)
{
if (p != NULL) {
OPENSSL_cleanse(p, sizeof(T) * n);
memory_cleanse(p, sizeof(T) * n);
LockedPageManager::Instance().UnlockRange(p, sizeof(T) * n);
}
std::allocator<T>::deallocate(p, n);
Expand All @@ -226,5 +226,5 @@ struct secure_allocator : public std::allocator<T> {

// This is exactly like std::string, but with a custom allocator.
typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;

typedef std::vector<unsigned char, secure_allocator<unsigned char> > SecureVector;
#endif // BITCOIN_ALLOCATORS_H
Loading