Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/2.0-dev' into 2.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-schmidtke committed Feb 7, 2019
2 parents aac42f6 + ffaa0a7 commit 1a34510
Show file tree
Hide file tree
Showing 265 changed files with 1,048 additions and 380 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ MultiChain

[MultiChain](http://www.multichain.com/) is an open source platform for private blockchains, which offers a rich set of features including extensive configurability, rapid deployment, permissions management, native assets and data streams. Although it is designed to enable private blockchains, MultiChain provides maximal compatibility with the bitcoin ecosystem, including the peer-to-peer protocol, transaction/block formats and [Bitcoin Core](https://bitcoin.org/en/bitcoin-core/) APIs/runtime parameters.

Copyright (c) 2014-2017 Coin Sciences Ltd
Copyright (c) 2014-2019 Coin Sciences Ltd
License: GNU General Public License version 3, see COPYING

Portions copyright (c) 2009-2016 The Bitcoin Core developers
Expand Down Expand Up @@ -39,18 +39,15 @@ Clone MultiChain

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

Prepare to build V8
Prepare to download or build V8
-------------------

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

Build Google's V8 JavaScript engine locally
-------------------------

Please use the instructions in [V8.md](/V8.md/) to build and install V8 for use by MultiChain.

You can use pre-built headers and binaries of Google's V8 JavaScript engine by downloading and expanding [linux-v8.tar.gz](https://github.com/MultiChain/multichain-binaries/raw/master/linux-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.md](/V8.md/).

Compile MultiChain for Ubuntu (64-bit)
-----------------------------
Expand Down
8 changes: 3 additions & 5 deletions mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ The default brew cookbook for berkeley-db and boost builds static libraries, but
git clone https://github.com/MultiChain/multichain.git


## Prepare to build V8
## Prepare to download or build V8

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

## Build Google's V8 JavaScript engine locally

Please use the instructions in [V8_mac.md](/V8_mac.md/) to build and install V8 for use by MultiChain.


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 Down
2 changes: 1 addition & 1 deletion src/chain/chain.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chain/chain.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chain/chain.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_CHAIN_H
Expand Down
2 changes: 1 addition & 1 deletion src/chain/checkpoints.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chain/checkpoints.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chain/checkpoints.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_CHECKPOINTS_H
Expand Down
2 changes: 1 addition & 1 deletion src/chain/merkleblock.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chain/merkleblock.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chain/merkleblock.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_MERKLEBLOCK_H
Expand Down
2 changes: 1 addition & 1 deletion src/chain/pow.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT/X11 software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chain/pow.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chain/pow.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT/X11 software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_POW_H
Expand Down
2 changes: 1 addition & 1 deletion src/chain/txmempool.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chain/txmempool.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chain/txmempool.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_TXMEMPOOL_H
Expand Down
2 changes: 1 addition & 1 deletion src/chain/undo.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2013 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_UNDO_H
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/buildgenesis.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "multichain/multichain.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/chainparams.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chainparams/chainparams.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/chainparams.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_CHAINPARAMS_H
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/chainparamsbase.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "chainparams/chainparamsbase.h"
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/chainparamsbase.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_CHAINPARAMSBASE_H
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/globals.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef GLOBALS_H
Expand Down
2 changes: 1 addition & 1 deletion src/chainparams/paramlist.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef MULTICHAINPARAMLIST_H
Expand Down
49 changes: 48 additions & 1 deletion src/chainparams/params.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include "multichain/multichain.h"
Expand Down Expand Up @@ -165,6 +165,11 @@ void* mc_MultichainParams::GetParam(const char *param,int* size)

int mc_MultichainParams::IsParamUpgradeValueInRange(const mc_OneMultichainParam *param,int version,int64_t value)
{
if((param->m_Type & MC_PRM_DATA_TYPE_MASK) == MC_PRM_BOOLEAN)
{
return 1;
}

if(value >= param->m_MinIntegerValue)
{
if(value <= param->m_MaxIntegerValue)
Expand Down Expand Up @@ -280,6 +285,20 @@ int mc_MultichainParams::CanBeUpgradedByVersion(const char *param,int version,in
}
}

if( (strcmp(param,"anyonecanconnect") == 0) ||
(strcmp(param,"anyonecansend") == 0) ||
(strcmp(param,"anyonecanreceive") == 0) ||
(strcmp(param,"anyonecanreceiveempty") == 0) ||
(strcmp(param,"anyonecancreate") == 0) ||
(strcmp(param,"anyonecanissue") == 0) ||
(strcmp(param,"anyonecanactivate") == 0) )
{
if(version >= 20007)
{
return m_lpCoord[2 * index + 1];
}
}



return 0;
Expand Down Expand Up @@ -2199,3 +2218,31 @@ int mc_Features::ImplicitConnectPermission()
return ret;
}

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

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

return ret;
}


2 changes: 1 addition & 1 deletion src/chainparams/params.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef MULTICHAINPARAMS_H
Expand Down
3 changes: 2 additions & 1 deletion src/chainparams/state.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef MULTICHAIN_STATE_H
Expand Down Expand Up @@ -152,6 +152,7 @@ typedef struct mc_Features
int FixedIn20006();
int NonceInMinerSignature();
int ImplicitConnectPermission();
int LicenseTokens();
} mc_Features;

typedef struct mc_BlockHeaderInfo
Expand Down
2 changes: 1 addition & 1 deletion src/checkqueue.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2012-2014 The Bitcoin developers
// Original code was distributed under the MIT software license.
// Copyright (c) 2014-2017 Coin Sciences Ltd
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_CHECKQUEUE_H
Expand Down
2 changes: 2 additions & 0 deletions src/compat/glibc_compat.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
Expand Down
2 changes: 2 additions & 0 deletions src/compat/glibc_sanity.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
Expand Down
2 changes: 2 additions & 0 deletions src/compat/glibcxx_compat.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include <cstddef>
#include <istream>
Expand Down
2 changes: 2 additions & 0 deletions src/compat/glibcxx_sanity.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#include <list>
#include <locale>
Expand Down
2 changes: 2 additions & 0 deletions src/compat/sanity.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#ifndef BITCOIN_COMPAT_SANITY_H
#define BITCOIN_COMPAT_SANITY_H
Expand Down
2 changes: 2 additions & 0 deletions src/compat/strnlen.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// Copyright (c) 2014-2019 Coin Sciences Ltd
// MultiChain code distributed under the GPLv3 license, see COPYING file.

#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
Expand Down
Loading

0 comments on commit 1a34510

Please sign in to comment.