Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
18bc202
gitignore - removed v8 build objects
mike31 Feb 12, 2019
6456f5c
gitignore - removed wdebug binaries
mike31 Feb 12, 2019
2e0b386
Fixed for Mac - block pkh calculation error
mike31 Feb 12, 2019
bdd353d
Compilation warnings
mike31 Feb 12, 2019
053f414
Minimizing number of boost warnings on asio
mike31 Feb 12, 2019
10a790c
Configuration changes required for Enterprise version
mike31 Feb 12, 2019
bda0053
RPC asio header
mike31 Feb 12, 2019
f59aa30
Configuration tweaks for Community Edition
mike31 Feb 12, 2019
bb94ed2
Fixing listtxfilters crash on Mac
mike31 Feb 14, 2019
a959a22
Fixing getfiltertransaction crash on Mac
mike31 Feb 14, 2019
95a73ff
Increased stack size for Mac
mike31 Feb 14, 2019
5c3776f
Fixed MAc switch for thread attributes
mike31 Feb 14, 2019
dc930de
Fix MacOS instructions
ztarem Feb 14, 2019
f7e2adf
Merge branch '2.0-dev' of https://github.com/MultiChain/multichain in…
ztarem Feb 14, 2019
5be0c21
Final fix to mac.md
ztarem Feb 16, 2019
3bc877d
-logdir runtime parameter
mike31 Feb 17, 2019
03f4acc
multichaind.pid for Windows
mike31 Feb 17, 2019
f2469d7
multichaind.pid for Windows
mike31 Feb 17, 2019
23c6bcd
multichaind.pid for Windows
mike31 Feb 18, 2019
ed9fc3f
Reverting emterprose makefile preparations
mike31 Feb 18, 2019
e16fe0e
multichaind.pid for Windows
mike31 Feb 18, 2019
b25595d
Fixed empty offchain data bug
mike31 Feb 18, 2019
e2ba49e
txouttobinarycache API
mike31 Feb 18, 2019
67d7e8f
Added nasm to mac instructions
mike31 Feb 18, 2019
acb3670
Makefile for Enterprise version
mike31 Feb 18, 2019
4083ca5
MultiChain startup message
mike31 Feb 18, 2019
61b21d7
Purely proprietary wallet wrapper
mike31 Feb 18, 2019
99ea4b1
Fixed double free issue for daemon
mike31 Feb 19, 2019
aa99fb0
txouttobinarycache with unlimited size
mike31 Feb 19, 2019
fb3625c
Fixed multichain-cli error when called without chain name
mike31 Feb 20, 2019
77fe929
Checking walletdbversion in different editions
mike31 Feb 20, 2019
b4225b1
Fixed wallet upgrade message
mike31 Feb 21, 2019
f695e1e
Subscribe help message for ent
mike31 Feb 21, 2019
33bf5fc
Moved EF initialization
mike31 Feb 21, 2019
dfaa8b9
Fixed multichain-cli error message on missing chain name
mike31 Feb 21, 2019
fd6c759
Preparation for contitional stream indexing
mike31 Feb 21, 2019
10ed9b5
Creating subscriptions
mike31 Feb 24, 2019
858784f
Modified import list, prepared for skipped local subscription
mike31 Feb 25, 2019
280ab60
Enterprise subscribe
mike31 Feb 27, 2019
3e6d7f8
Enterprise subscriptions - modified subscribe API
mike31 Feb 27, 2019
5ff8de3
Version 2.0 beta 3
mike31 Feb 27, 2019
5afe7ae
Fixed JS Date function determinism
mike31 Feb 28, 2019
43328da
Fixed JS Date function determinism on Windows
mike31 Feb 28, 2019
79f22ee
Disabling indexes parameter in subscribe for Community
mike31 Mar 3, 2019
e5ba5cf
Checking parameter count in subscribe
mike31 Mar 3, 2019
e5f6565
Fixed date string function output
mike31 Mar 3, 2019
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ src/multichain-cli
src/multichain-util
src/multichaind
src/multichaind-cold
src/multichain-cli-wdebug
src/multichain-util-wdebug
src/multichaind-wdebug
src/multichaind-cold-wdebug
src/test/test_bitcoin
src/qt/test/test_bitcoin-qt

local/*
openssl*

# autoreconf
Makefile.in
aclocal.m4
Expand Down
12 changes: 8 additions & 4 deletions V8_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ MultiChain uses V8 version 6.8, and requires at least 4 GB of RAM to build in a

## Clone Google's depot_tools

Google's [depot_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools) are used by the Google build system to manage Git checkouts.
Google's [depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) are used by the Google build system to manage Git checkouts.

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
cd depot_tools
Expand Down Expand Up @@ -38,12 +38,12 @@ The selected release of the V8 sources requires relaxing two compiler checks to

- Open the file `build/config/compiler/BUILD.gn` in your favorite editor.

- Locate the folllowing lines (currently at **1464**):
- Locate the following lines (currently at **1469**):

if (is_clang) {
cflags += [

- Add the following two lines to **the end** of the block and save the file:
- Add the following two lines to **the end of the block** and save the file:

"-Wno-defaulted-function-deleted",
"-Wno-null-pointer-arithmetic",
Expand All @@ -55,7 +55,11 @@ Build the V8 libraries:

Create an additional library embedding the V8 initial snapshot blobs:

brew install python
brew install python@2
pip install pathlib2
cd $RELEASE
python $MULTICHAIN_HOME/depends/v8_data_lib.py

### Note

The environment variable `$MULTICHAIN_HOME` should point to the parent of the V8 build folder (see [mac.md](mac.md) for details).
18 changes: 18 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ AC_ARG_ENABLE([wallet],
[enable_wallet=$enableval],
[enable_wallet=yes])

AC_ARG_ENABLE([enterprise],
[AS_HELP_STRING([--enable-enterprise],
[enable enterprise (default is no)])],
[enable_enterprise=$enableval],
[enable_enterprise=no])

AC_ARG_WITH([miniupnpc],
[AS_HELP_STRING([--with-miniupnpc],
[enable UPNP (default is yes if libminiupnpc is found)])],
Expand Down Expand Up @@ -757,6 +763,17 @@ else
AC_MSG_RESULT(no)
fi

dnl enable enterprise
AC_MSG_CHECKING([if enterprise should be enabled])
if test x$enable_enterprise != xno; then
AC_MSG_RESULT(yes)
AC_DEFINE_UNQUOTED([ENABLE_ENTERPRISE],[1],[Define to 1 to enable enterprise functions])

else
AC_MSG_RESULT(no)
fi


dnl enable upnp support
AC_MSG_CHECKING([whether to build with support for UPnP])
if test x$have_miniupnpc = xno; then
Expand Down Expand Up @@ -847,6 +864,7 @@ AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
AM_CONDITIONAL([ENABLE_ENTERPRISE],[test x$enable_enterprise = xyes])
AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests = xyes])
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes])
Expand Down
63 changes: 37 additions & 26 deletions mac.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,49 @@
# Mac Build Notes (on MacOS Sierra)

## Install dependencies
## Install XCode and XCode command line tools

- Test if XCode command line tools are installed:

xcode-select -p

- If the command does not print the location of the XCode command-line tools successfully:

xcode-select --install

- Select XCode locatioh:

sudo xcode-select -s <path/to/Xcode.app>

- Install brew (follow instructions on [brew.sh](https://brew.sh/))

## Clone MultiChain
Install git from git-scm, then

Install XCode and XCode command line tools
git clone https://github.com/MultiChain/multichain.git


## Prepare to download or build V8

cd multichain
set MULTICHAIN_HOME=$(pwd)
mkdir v8build
cd v8build

Install git from git-scm

You can use pre-built headers and binaries of Google's V8 JavaScript engine by downloading and expanding [macos-v8.tar.gz](https://github.com/MultiChain/multichain-binaries/raw/master/macos-v8.tar.gz) in the current directory. If, on the other hand, you prefer to build the V8 component yourself, please follow the instructions in [V8_mac.md](/V8_mac.md/).

Install brew (follow instructions on brew.sh)
## Install dependencies

brew install autoconf automake berkeley-db4 libtool boost@1.57 openssl pkg-config rename python@2
brew install autoconf automake berkeley-db4 libtool boost@1.57 pkg-config rename python@2 nasm
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
brew link boost@1.57 --force

If another Boost version was already installed, then do this:

brew uninstall boost
brew install boost@1.57
brew link boost@1.57 --force

The following command may be necessary if XCode was not used yet:

sudo xcode-select -s /Applications/Xcode.app

## Prepare for static linking

Expand All @@ -45,26 +69,13 @@ The default brew cookbook for berkeley-db and boost builds static libraries, but

brew edit openssl

In 'def configure_args' change 'shared' to 'no-shared'
In 'def install' => 'args =' change 'shared' to 'no-shared'

brew install openssl --force
<!--
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include

## Clone MultiChain

git clone https://github.com/MultiChain/multichain.git


## Prepare to download or build V8

cd multichain
set MULTICHAIN_HOME=$(pwd)
mkdir v8build
cd v8build


You can use pre-built headers and binaries of Google's V8 JavaScript engine by downloading and expanding [macos-v8.tar.gz](https://github.com/MultiChain/multichain-binaries/raw/master/macos-v8.tar.gz) in the current directory. If, on the other hand, you prefer to build the V8 component yourself, please follow the instructions in [V8_mac.md](/V8_mac.md/).
-->

## Compile MultiChain for Mac (64-bit)

Expand All @@ -80,7 +91,7 @@ You can use pre-built headers and binaries of Google's V8 JavaScript engine by d
rename -e 's/.dylib.hidden/.dylib/' /usr/local/opt/openssl/lib/*.dylib.hidden
brew edit openssl

In 'def configure_args' change 'no-shared' to 'shared'
In 'def install' => 'args =' change 'no-shared' to 'shared'

## Notes

Expand Down
29 changes: 27 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FwalDIST_SUBDIRS = secp256k1
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
CXXFLAGS += -std=c++0x

CPPFLAGS += -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-unused-result -DBOOST_SYSTEM_NO_DEPRECATED=1

if EMBEDDED_LEVELDB
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
Expand All @@ -24,6 +25,8 @@ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPP

BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include

LIBBITCOIN_ENTERPRISE=libbitcoin_enterprise.a
LIBBITCOIN_COMMUNITY=libbitcoin_community.a
LIBBITCOIN_SERVER=libbitcoin_server.a
LIBBITCOIN_WALLET=libbitcoin_wallet.a
LIBBITCOIN_COMMON=libbitcoin_common.a
Expand All @@ -49,6 +52,8 @@ EXTRA_LIBRARIES = \
libbitcoin_util.a \
libbitcoin_common.a \
univalue/libbitcoin_univalue.a \
libbitcoin_enterprise.a \
libbitcoin_community.a \
libbitcoin_server.a \
libbitcoin_cli.a
if ENABLE_WALLET
Expand Down Expand Up @@ -125,6 +130,7 @@ BITCOIN_CORE_H = \
utils/utilparse.h \
rpc/rpcclient.h \
rpc/rpcprotocol.h \
rpc/rpcasio.h \
rpc/rpcutils.h \
rpc/rpcwallet.h \
rpc/rpcserver.h \
Expand Down Expand Up @@ -175,6 +181,22 @@ obj/build.h: FORCE
$(abs_top_srcdir)
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h

libbitcoin_community_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_community_a_SOURCES = \
community/community.cpp \
wallet/db.cpp \
wallet/dbwrap_com.cpp

if ENABLE_ENTERPRISE
include entMakefile.am
else
libbitcoin_enterprise_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_enterprise_a_SOURCES = \
community/community.cpp \
wallet/db.cpp \
wallet/dbwrap_com.cpp
endif

# server: shared between bitcoind and bitcoin-qt
libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
libbitcoin_server_a_SOURCES = \
Expand Down Expand Up @@ -224,8 +246,6 @@ libbitcoin_server_a_SOURCES = \
libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
libbitcoin_wallet_a_SOURCES = \
wallet/dbflat.cpp \
wallet/db.cpp \
wallet/dbwrap_com.cpp \
wallet/crypter.cpp \
rpc/rpcdump.cpp \
rpc/rpcwallet.cpp \
Expand Down Expand Up @@ -262,6 +282,9 @@ crypto_libbitcoin_crypto_a_SOURCES = \
crypto/sha1.h \
crypto/ripemd160.h




# multichain library
multichain_libbitcoin_multichain_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
multichain_libbitcoin_multichain_a_SOURCES = \
Expand Down Expand Up @@ -460,6 +483,7 @@ multichaind_LDADD = \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UNIVALUE) \
$(LIBBITCOIN_WALLET) \
$(LIBBITCOIN_ENTERPRISE) \
$(LIBBITCOIN_MULTICHAIN) \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO) \
Expand Down Expand Up @@ -503,6 +527,7 @@ multichaind_cold_LDADD = \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UNIVALUE) \
$(LIBBITCOIN_WALLET) \
$(LIBBITCOIN_COMMUNITY) \
$(LIBBITCOIN_MULTICHAIN) \
$(LIBBITCOIN_UTIL) \
$(LIBBITCOIN_CRYPTO) \
Expand Down
9 changes: 7 additions & 2 deletions src/chainparams/buildgenesis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ int mc_MultichainParams::Build(const unsigned char* pubkey, int pubkey_size)
uint32_t nBits,timestamp;
int i;
const unsigned char *ptr;
const unsigned char *pubkey_hash=(unsigned char *)Hash160(pubkey,pubkey+pubkey_size).begin();
// const unsigned char *pubkey_hash=(unsigned char *)Hash160(pubkey,pubkey+pubkey_size).begin();

unsigned char pubkey_hash[20];
uint160 pkhash=Hash160(pubkey,pubkey+pubkey_size);
memcpy(pubkey_hash,&pkhash,20);

size_t elem_size;
const unsigned char *elem;
int root_stream_name_size;
Expand Down Expand Up @@ -271,7 +276,7 @@ int mc_MultichainParams::Build(const unsigned char* pubkey, int pubkey_size)
{
return err;
}


CalculateHash(hash);

Expand Down
28 changes: 28 additions & 0 deletions src/chainparams/params.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2245,4 +2245,32 @@ int mc_Features::LicenseTokens()
return ret;
}

int mc_Features::FixedJSDateFunctions()
{
int ret=0;
if(mc_gState->m_NetworkParams->IsProtocolMultichain() == 0)
{
return 0;
}
int protocol=mc_gState->m_NetworkParams->ProtocolVersion();

if(protocol)
{
if(protocol >= 20008)
{
ret=1;
}
else
{
if(Filters() == 0)
{
ret=1;
}
}
}

return ret;
}



2 changes: 2 additions & 0 deletions src/chainparams/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ typedef struct mc_Params
char** m_Arguments;
int m_FirstArgumentType;
char m_DataDirNetSpecific[MC_DCT_DB_MAX_PATH];
char m_LogDirNetSpecific[MC_DCT_DB_MAX_PATH];
char m_DataDir[MC_DCT_DB_MAX_PATH];

mc_Params()
Expand Down Expand Up @@ -153,6 +154,7 @@ typedef struct mc_Features
int NonceInMinerSignature();
int ImplicitConnectPermission();
int LicenseTokens();
int FixedJSDateFunctions();
} mc_Features;

typedef struct mc_BlockHeaderInfo
Expand Down
Loading