Giter Site home page Giter Site logo

multichain / multichain Goto Github PK

View Code? Open in Web Editor NEW
536.0 536.0 259.0 10.44 MB

Source code for multichaind, multichain-cli and multichain-util.

License: GNU General Public License v3.0

Makefile 1.20% Shell 0.10% M4 1.80% C++ 84.58% C 11.51% HTML 0.63% CSS 0.01% Java 0.03% JavaScript 0.01% Python 0.11% CMake 0.03%

multichain's Introduction

MultiChain

MultiChain 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 APIs/runtime parameters.

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
Portions copyright many others - see individual files

System requirements

These compilation instructions have been tested on Ubuntu 16.04 x64 (xenial) and Ubuntu 18.04 x64 (bionic) only.

C++ compilers are memory-hungry, so it is recommended to have at least 1 GB of memory available when compiling MultiChain. With less memory, compilation may take much longer due to swapfile thrashing.

Linux Build Notes (on Ubuntu 16.04 x64 or later)

Install dependencies

sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get install -y build-essential libtool autotools-dev automake pkg-config git
sudo apt-get install libboost-all-dev
sudo apt-get install libevent-dev

Clone MultiChain

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

Prepare to download or build V8

cd multichain
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 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.

Compile MultiChain for Ubuntu (64-bit)

cd $MULTICHAIN_HOME
./autogen.sh
./configure
make

Notes

  • This will build multichaind, multichain-cli and multichain-util in the src directory.

  • The release is built with GCC after which strip multichaind strings the debug symbols, which reduces the executable size by about 90%.

Windows Build Notes

Please see the instructions in win.md to build MultiChain for use with Windows.

Mac Build Notes (on MacOS Sierra)

Please see the instructions in mac.md to build MultiChain for use with MacOS.

multichain's People

Contributors

gidgreen avatar kination avatar mike31 avatar ztarem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multichain's Issues

getnewadress or keypollrefill - return error in cold wallet

Hi,

I just can't generate a new address in cold wallet.

Using the cold wallet client, if I enter getnewadress, I get this error:
$ Keypool ran out, please call keypoolrefill first .

Then, trying to run keypoolrefill, or keypoolrefill=1000 or keypool=100, I get this error:
$ Method not available in cold version of MultiChain.

On a fun fact, the keypool= option is available in the cold wallet help menu.

I tried run the keypool command on a unlock cold wallet with walletpassphrase abcxyz, but same result, as trying to run command on hot wallet, where the command seems to work without any flaw but dosen't help on the cold wallet getnewaddress issue.

Anyone know ho to get new address in a cold wallet?

Regards,

Inz

Compiling MultiChain on Mac OS X Mojave

Greetings,

I'm trying to compile Multichain on Mac OSX Mojave - Xcode 11
I've followed the readme instruction which states to use boost @1.57
Compilation throws the following errors.

Would you please help solve the issue ?

Thank you

Sincerely

/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:46:66: error:
expected unqualified-id
::CRYPTO_set_locking_callback(&do_init::openssl_locking_func);
^
/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:47:56: error:
expected unqualified-id
::CRYPTO_set_id_callback(&do_init::openssl_id_func);
^
/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:64:32: error:
expected unqualified-id
::CRYPTO_set_id_callback(0);
^
/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:65:37: error:
expected unqualified-id
::CRYPTO_set_locking_callback(0);
^
/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:66:7: error:
expected unqualified-id
::ERR_free_strings();
^
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/err.h:257:29: note:
expanded from macro 'ERR_free_strings'

define ERR_free_strings() while(0) continue

                        ^

In file included from rpc/rpcserver.cpp:8:
In file included from ./rpc/rpcasio.h:17:
In file included from /usr/local/include/boost/asio/ssl.hpp:19:
In file included from /usr/local/include/boost/asio/ssl/context.hpp:29:
In file included from /usr/local/include/boost/asio/ssl/detail/openssl_init.hpp:100:
/usr/local/include/boost/asio/ssl/detail/impl/openssl_init.ipp:68:7: error:
expected unqualified-id
::EVP_cleanup();
^
/usr/local/Cellar/[email protected]/1.1.1d/include/openssl/evp.h:962:25: note:
expanded from macro 'EVP_cleanup'

define EVP_cleanup() while(0) continue

Processes are killed with segfault on high load

When a lot of requests are made against the RPC API, multichain processes regularily fail with segfault.

Here is what I see in the systemd journal:

Jan 06 00:06:15  systemd[1]: [email protected]: Main process exited, code=killed, status=11/SEGV
Jan 06 00:06:15  systemd[1]: [email protected]: Unit entered failed state.
Jan 06 00:06:15  systemd[1]: [email protected]: Failed with result 'signal'.

I am seeing this error regularily coming up in times where a lot of requests are made against the RPC API, when the amount of requests was low it did not happen before.

Multichain Version: 1.0.2, I am using the binaries from the website.

To provide more information about the problem I'd compile multichain myself and run it with gdb, I wonder however, which branch I should use, as this repo does not seem to have any tags?

Missing error message details on non-mandatory-script-verify-flag

When sendrawtransaction is used with a transaction signature not in canonical form, the following error is returned:

16: ConnectInputs failed: non-mandatory-script-verify-flag (No error)

(No error) should be the actual error message, but it looks like error message is being taken from the wrong CScriptCheck instance:

multichain/src/core/main.cpp

Lines 2147 to 2150 in 4ddb443

CScriptCheck check(*coins, tx, i,
flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore);
if (check())
return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError())));

check is the instance that succeeded, so it is always "No error". The error message from the check that failed should be used instead.

Does not build on Debian Stretch (libboost 1.62)

Getting a lot of errors similar to this:

chainparams/chainparams.cpp:177:51: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector’ and ‘boost::assign_detail::generic_list’)
base58Prefixes[SCRIPT_ADDRESS] = list_of(5);
^
In file included from /usr/include/c++/6/vector:69:0,
from ./chainparams/chainparamsbase.h:10,
from ./chainparams/chainparams.h:10,
from chainparams/chainparams.cpp:7:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator]
vector<_Tp, _Alloc>::
^~~~~~~~~~~~~~~~~~~

nValue of CTxOut only holding 0 when at CreateNewBlock

Poking around with the debugger at CreateNewBlock. It seems that the nValue of all the CTxOuts taken from tx.vin and tx.vout are set to 0. For a quick check you can run the current tx's GetValueOut and it will report 0. I had to recompile with O0 in order to verify this. I recommend taking a look, as this would lead to a lot of weird behavior, like the transaction fee not being set properly. CCoinsViewCache is relaying that the txin does have coins, so I suspect the issue isn't far away. Although when accessing a given txin's previous output's vout, the nValue is also empty (src/miner/miner.cpp L418-L422)

Building on Mac OS X

OS Mac OS X 10.12.13
While building
1st error
Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)

resolved using installing

brew install berkeley@4

2nd error
OpenSSL ec header missing

resolved using

export LDFLAGS=-L/usr/local/opt/openssl/lib

export CPPFLAGS=-I/usr/local/opt/openssl/include

Processes are killed with SIGABRT on high load

As it is unrelated to #38, I am making a new issue here.

The following error happens occasionally on different nodes in the blockchain (systemd journal):

Jan 24 20:18:45 htzn022 systemd[1]: [email protected]: Unit entered failed state.
Jan 24 20:18:45 htzn022 systemd[1]: [email protected]: Failed with result 'exit-code'.
Jan 24 20:18:46 htzn022 multichaind[30469]: *** Error in `/opt/multichain/testcoin/bin/multichaind': double free or corruption (out): 0x00007f6e28003010 ***
Jan 24 20:18:46 htzn022 multichaind[30469]: ======= Backtrace: =========
Jan 24 20:18:46 htzn022 systemd[1]: [email protected]: Main process exited, code=killed, status=6/ABRT
Jan 24 20:18:46 htzn022 systemd[1]: [email protected]: Unit entered failed state.
Jan 24 20:18:46 htzn022 systemd[1]: [email protected]: Failed with result 'signal'.

I was able to catch it with gdb:

# gdb --args /opt/multichain/testcoin/bin/multichaind [email protected]:9200 -datadir="/var/lib/multichain/testcoin/node-9612"
GNU gdb (Debian 7.12-6) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/multichain/testcoin/bin/multichaind...done.
(gdb) run
Starting program: /opt/multichain/testcoin/bin/multichaind [email protected]:9200 -datadir=/var/lib/multichain/testcoin/node-9612
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

MultiChain 1.0.2.1 Daemon (latest protocol 10009)

[New Thread 0x7ffff6654700 (LWP 13046)]
[New Thread 0x7ffff5e53700 (LWP 13047)]
[New Thread 0x7ffff5652700 (LWP 13048)]
[New Thread 0x7ffff4e51700 (LWP 13049)]
[New Thread 0x7fffe7fff700 (LWP 13050)]
[New Thread 0x7fffe77fe700 (LWP 13051)]
[New Thread 0x7fffe6ffd700 (LWP 13052)]
[New Thread 0x7fffe67fc700 (LWP 13053)]
[New Thread 0x7fffe5ffb700 (LWP 13054)]
[New Thread 0x7fffe57fa700 (LWP 13055)]
[New Thread 0x7fffe4ff9700 (LWP 13056)]
[New Thread 0x7fffc7fff700 (LWP 13057)]
Chain testcoin already exists, adding 127.0.0.1:9200 to list of peers

[New Thread 0x7fffc77fe700 (LWP 13146)]
[New Thread 0x7fffc6ffd700 (LWP 13147)]
[New Thread 0x7fffc67fc700 (LWP 13148)]
[New Thread 0x7fffc5ffb700 (LWP 13149)]
[New Thread 0x7fffc57fa700 (LWP 13150)]
[New Thread 0x7fffc4ff9700 (LWP 13151)]
[New Thread 0x7fffbffff700 (LWP 13152)]
[New Thread 0x7fffbf7fe700 (LWP 13153)]
[New Thread 0x7fffbeffd700 (LWP 13154)]
Other nodes can connect to this node using:
multichaind [email protected]:9612

0 of 9 blocks rescanned
[New Thread 0x7fffbe7fc700 (LWP 13275)]
[Thread 0x7fffbe7fc700 (LWP 13275) exited]
[New Thread 0x7fffbdffb700 (LWP 13276)]
[New Thread 0x7fffbd7fa700 (LWP 13277)]
[New Thread 0x7fffbcff9700 (LWP 13278)]
[Thread 0x7fffbdffb700 (LWP 13276) exited]
[New Thread 0x7fff93fff700 (LWP 13279)]
[New Thread 0x7fff937fe700 (LWP 13280)]
[New Thread 0x7fff92ffd700 (LWP 13281)]
[New Thread 0x7fff927fc700 (LWP 13282)]
[New Thread 0x7fff91ffb700 (LWP 13283)]
Node ready.

*** Error in `/opt/multichain/testcoin/bin/multichaind': double free or corruption (!prev): 0x00007fff9801a840 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7ffff69e0bcb]
/lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x7ffff69e6f96]
/lib/x86_64-linux-gnu/libc.so.6(+0x777de)[0x7ffff69e77de]
/opt/multichain/testcoin/bin/multichaind[0x4d0600]
/opt/multichain/testcoin/bin/multichaind[0x4adf2b]
/opt/multichain/testcoin/bin/multichaind[0x537b4c]
/opt/multichain/testcoin/bin/multichaind[0x51ba45]
/opt/multichain/testcoin/bin/multichaind[0x535ea5]
/opt/multichain/testcoin/bin/multichaind[0x852354]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7ffff6d16494]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7ffff6a58aff]
======= Memory map: ========
00400000-00cc6000 r-xp 00000000 09:02 168429917                          /opt/multichain/testcoin/bin/multichaind-wdebug
00ec6000-00ef4000 r--p 008c6000 09:02 168429917                          /opt/multichain/testcoin/bin/multichaind-wdebug
00ef4000-00f07000 rw-p 008f4000 09:02 168429917                          /opt/multichain/testcoin/bin/multichaind-wdebug
00f07000-00fbd000 rw-p 00000000 00:00 0                                  [heap]
00fbd000-00fbe000 rw-p 00000000 00:00 0                                  [heap]
00fbe000-00fd0000 rw-p 00000000 00:00 0                                  [heap]
00fd0000-00fd1000 rw-p 00000000 00:00 0                                  [heap]
00fd1000-01ae5000 rw-p 00000000 00:00 0                                  [heap]
01ae5000-01ae6000 rw-p 00000000 00:00 0                                  [heap]
01ae6000-01d71000 rw-p 00000000 00:00 0                                  [heap]
7fff78000000-7fff78021000 rw-p 00000000 00:00 0 
7fff78021000-7fff7c000000 ---p 00000000 00:00 0 
7fff7c000000-7fff7c021000 rw-p 00000000 00:00 0 
7fff7c021000-7fff80000000 ---p 00000000 00:00 0 
7fff80000000-7fff80228000 rw-p 00000000 00:00 0 
7fff80228000-7fff84000000 ---p 00000000 00:00 0 
7fff84000000-7fff84021000 rw-p 00000000 00:00 0 
7fff84021000-7fff88000000 ---p 00000000 00:00 0 
7fff88000000-7fff88021000 rw-p 00000000 00:00 0 
7fff88021000-7fff8c000000 ---p 00000000 00:00 0 
7fff8c000000-7fff8c021000 rw-p 00000000 00:00 0 
7fff8c021000-7fff90000000 ---p 00000000 00:00 0 
7fff917fb000-7fff917fc000 ---p 00000000 00:00 0 
7fff917fc000-7fff91ffc000 rw-p 00000000 00:00 0 
7fff91ffc000-7fff91ffd000 ---p 00000000 00:00 0 
7fff91ffd000-7fff927fd000 rw-p 00000000 00:00 0 
7fff927fd000-7fff927fe000 ---p 00000000 00:00 0 
7fff927fe000-7fff92ffe000 rw-p 00000000 00:00 0 
7fff92ffe000-7fff92fff000 ---p 00000000 00:00 0 
7fff92fff000-7fff937ff000 rw-p 00000000 00:00 0 
7fff937ff000-7fff93800000 ---p 00000000 00:00 0 
7fff93800000-7fff94000000 rw-p 00000000 00:00 0 
7fff94000000-7fff9410c000 rw-p 00000000 00:00 0 
7fff9410c000-7fff98000000 ---p 00000000 00:00 0 
7fff98000000-7fff98054000 rw-p 00000000 00:00 0 
7fff98054000-7fff9c000000 ---p 00000000 00:00 0 
7fff9c000000-7fff9c054000 rw-p 00000000 00:00 0 
7fff9c054000-7fffa0000000 ---p 00000000 00:00 0 
7fffa0000000-7fffa0057000 rw-p 00000000 00:00 0 
7fffa0057000-7fffa4000000 ---p 00000000 00:00 0 
7fffa4000000-7fffa409f000 rw-p 00000000 00:00 0 
7fffa409f000-7fffa8000000 ---p 00000000 00:00 0 
7fffa8000000-7fffa8051000 rw-p 00000000 00:00 0 
7fffa8051000-7fffac000000 ---p 00000000 00:00 0 
7fffac000000-7fffac09c000 rw-p 00000000 00:00 0 
7fffac09c000-7fffb0000000 ---p 00000000 00:00 0 
7fffb0000000-7fffb0081000 rw-p 00000000 00:00 0 
7fffb0081000-7fffb4000000 ---p 00000000 00:00 0 
7fffb4000000-7fffb4061000 rw-p 00000000 00:00 0 
7fffb4061000-7fffb8000000 ---p 00000000 00:00 0 
7fffb8000000-7fffb8021000 rw-p 00000000 00:00 0 
7fffb8021000-7fffbc000000 ---p 00000000 00:00 0 
7fffbc7f9000-7fffbc7fa000 ---p 00000000 00:00 0 
7fffbc7fa000-7fffbcffa000 rw-p 00000000 00:00 0 
7fffbcffa000-7fffbcffb000 ---p 00000000 00:00 0 
7fffbcffb000-7fffbd7fb000 rw-p 00000000 00:00 0 
7fffbd7fb000-7fffbd7fc000 ---p 00000000 00:00 0 
7fffbd7fc000-7fffbdffc000 rw-p 00000000 00:00 0 
7fffbdffc000-7fffbdffd000 ---p 00000000 00:00 0 
7fffbdffd000-7fffbe7fd000 rw-p 00000000 00:00 0 
7fffbe7fd000-7fffbe7fe000 ---p 00000000 00:00 0 
7fffbe7fe000-7fffbeffe000 rw-p 00000000 00:00 0 
7fffbeffe000-7fffbefff000 ---p 00000000 00:00 0 
7fffbefff000-7fffbf7ff000 rw-p 00000000 00:00 0 
7fffbf7ff000-7fffbf800000 ---p 00000000 00:00 0 
7fffbf800000-7fffc0000000 rw-p 00000000 00:00 0 
7fffc0000000-7fffc0023000 rw-p 00000000 00:00 0 
7fffc0023000-7fffc4000000 ---p 00000000 00:00 0 
7fffc47f9000-7fffc47fa000 ---p 00000000 00:00 0 
7fffc47fa000-7fffc4ffa000 rw-p 00000000 00:00 0 
7fffc4ffa000-7fffc4ffb000 ---p 00000000 00:00 0 
7fffc4ffb000-7fffc57fb000 rw-p 00000000 00:00 0 
7fffc57fb000-7fffc57fc000 ---p 00000000 00:00 0 
7fffc57fc000-7fffc5ffc000 rw-p 00000000 00:00 0 
7fffc5ffc000-7fffc5ffd000 ---p 00000000 00:00 0 
7fffc5ffd000-7fffc67fd000 rw-p 00000000 00:00 0 
7fffc67fd000-7fffc67fe000 ---p 00000000 00:00 0 
7fffc67fe000-7fffc6ffe000 rw-p 00000000 00:00 0 
7fffc6ffe000-7fffc6fff000 ---p 00000000 00:00 0 
7fffc6fff000-7fffc77ff000 rw-p 00000000 00:00 0 
7fffc77ff000-7fffc7800000 ---p 00000000 00:00 0 
7fffc7800000-7fffc8000000 rw-p 00000000 00:00 0 
7fffc8000000-7fffc8023000 rw-p 00000000 00:00 0 
7fffc8023000-7fffcc000000 ---p 00000000 00:00 0 
7fffcc000000-7fffcc023000 rw-p 00000000 00:00 0 
7fffcc023000-7fffd0000000 ---p 00000000 00:00 0 
7fffd0000000-7fffd0023000 rw-p 00000000 00:00 0 
7fffd0023000-7fffd4000000 ---p 00000000 00:00 0 
7fffd4000000-7fffd4023000 rw-p 00000000 00:00 0 
7fffd4023000-7fffd8000000 ---p 00000000 00:00 0 
7fffd8000000-7fffd8023000 rw-p 00000000 00:00 0 
7fffd8023000-7fffdc000000 ---p 00000000 00:00 0 
7fffdc000000-7fffdc023000 rw-p 00000000 00:00 0 
7fffdc023000-7fffe0000000 ---p 00000000 00:00 0 
7fffe0000000-7fffe0023000 rw-p 00000000 00:00 0 
7fffe0023000-7fffe4000000 ---p 00000000 00:00 0 
7fffe4071000-7fffe47f9000 rw-p 00000000 00:00 0 
7fffe47f9000-7fffe47fa000 ---p 00000000 00:00 0 
7fffe47fa000-7fffe4ffa000 rw-p 00000000 00:00 0 
7fffe4ffa000-7fffe4ffb000 ---p 00000000 00:00 0 
7fffe4ffb000-7fffe57fb000 rw-p 00000000 00:00 0 
7fffe57fb000-7fffe57fc000 ---p 00000000 00:00 0 
7fffe57fc000-7fffe5ffc000 rw-p 00000000 00:00 0 
7fffe5ffc000-7fffe5ffd000 ---p 00000000 00:00 0 
7fffe5ffd000-7fffe67fd000 rw-p 00000000 00:00 0 
7fffe67fd000-7fffe67fe000 ---p 00000000 00:00 0 
7fffe67fe000-7fffe6ffe000 rw-p 00000000 00:00 0 
7fffe6ffe000-7fffe6fff000 ---p 00000000 00:00 0 
7fffe6fff000-7fffe77ff000 rw-p 00000000 00:00 0 
7fffe77ff000-7fffe7800000 ---p 00000000 00:00 0 
7fffe7800000-7fffe8000000 rw-p 00000000 00:00 0 
7fffe8000000-7fffe8023000 rw-p 00000000 00:00 0 
7fffe8023000-7fffec000000 ---p 00000000 00:00 0 
7fffec000000-7fffec023000 rw-p 00000000 00:00 0 
7fffec023000-7ffff0000000 ---p 00000000 00:00 0 
7ffff0000000-7ffff0023000 rw-p 00000000 00:00 0 
7ffff0023000-7ffff4000000 ---p 00000000 00:00 0 
7ffff4061000-7ffff4651000 rw-p 00000000 00:00 0 
7ffff4651000-7ffff4652000 ---p 00000000 00:00 0 
7ffff4652000-7ffff4e52000 rw-p 00000000 00:00 0 
7ffff4e52000-7ffff4e53000 ---p 00000000 00:00 0 
7ffff4e53000-7ffff5653000 rw-p 00000000 00:00 0 
7ffff5653000-7ffff5654000 ---p 00000000 00:00 0 
7ffff5654000-7ffff5e54000 rw-p 00000000 00:00 0 
7ffff5e54000-7ffff5e55000 ---p 00000000 00:00 0 
7ffff5e55000-7ffff6655000 rw-p 00000000 00:00 0 
7ffff6655000-7ffff6970000 r--p 00000000 09:02 188876800                  /usr/lib/locale/locale-archive
7ffff6970000-7ffff6b05000 r-xp 00000000 09:02 51251940                   /lib/x86_64-linux-gnu/libc-2.24.so
7ffff6b05000-7ffff6d05000 ---p 00195000 09:02 51251940                   /lib/x86_64-linux-gnu/libc-2.24.so
7ffff6d05000-7ffff6d09000 r--p 00195000 09:02 51251940                   /lib/x86_64-linux-gnu/libc-2.24.so
7ffff6d09000-7ffff6d0b000 rw-p 00199000 09:02 51251940                   /lib/x86_64-linux-gnu/libc-2.24.so
7ffff6d0b000-7ffff6d0f000 rw-p 00000000 00:00 0 
7ffff6d0f000-7ffff6d27000 r-xp 00000000 09:02 51251922                   /lib/x86_64-linux-gnu/libpthread-2.24.so
7ffff6d27000-7ffff6f26000 ---p 00018000 09:02 51251922                   /lib/x86_64-linux-gnu/libpthread-2.24.so
7ffff6f26000-7ffff6f27000 r--p 00017000 09:02 51251922                   /lib/x86_64-linux-gnu/libpthread-2.24.so
7ffff6f27000-7ffff6f28000 rw-p 00018000 09:02 51251922                   /lib/x86_64-linux-gnu/libpthread-2.24.so
7ffff6f28000-7ffff6f2c000 rw-p 00000000 00:00 0 
7ffff6f2c000-7ffff6f42000 r-xp 00000000 09:02 51252004                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff6f42000-7ffff7141000 ---p 00016000 09:02 51252004                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff7141000-7ffff7142000 r--p 00015000 09:02 51252004                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff7142000-7ffff7143000 rw-p 00016000 09:02 51252004                   /lib/x86_64-linux-gnu/libgcc_s.so.1
7ffff7143000-7ffff7246000 r-xp 00000000 09:02 51251895                   /lib/x86_64-linux-gnu/libm-2.24.so
7ffff7246000-7ffff7445000 ---p 00103000 09:02 51251895                   /lib/x86_64-linux-gnu/libm-2.24.so
7ffff7445000-7ffff7446000 r--p 00102000 09:02 51251895                   /lib/x86_64-linux-gnu/libm-2.24.so
7ffff7446000-7ffff7447000 rw-p 00103000 09:02 51251895                   /lib/x86_64-linux-gnu/libm-2.24.so
7ffff7447000-7ffff75b9000 r-xp 00000000 09:02 188883309                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ffff75b9000-7ffff77b9000 ---p 00172000 09:02 188883309                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ffff77b9000-7ffff77c3000 r--p 00172000 09:02 188883309                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ffff77c3000-7ffff77c5000 rw-p 0017c000 09:02 188883309                  /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
7ffff77c5000-7ffff77c9000 rw-p 00000000 00:00 0 
7ffff77c9000-7ffff77d0000 r-xp 00000000 09:02 51251975                   /lib/x86_64-linux-gnu/librt-2.24.so
7ffff77d0000-7ffff79cf000 ---p 00007000 09:02 51251975                   /lib/x86_64-linux-gnu/librt-2.24.so
7ffff79cf000-7ffff79d0000 r--p 00006000 09:02 51251975                   /lib/x86_64-linux-gnu/librt-2.24.so
7ffff79d0000-7ffff79d1000 rw-p 00007000 09:02 51251975                   /lib/x86_64-linux-gnu/librt-2.24.so
7ffff79d1000-7ffff79d4000 r-xp 00000000 09:02 51252035                   /lib/x86_64-linux-gnu/libanl-2.24.so
7ffff79d4000-7ffff7bd3000 ---p 00003000 09:02 51252035                   /lib/x86_64-linux-gnu/libanl-2.24.so
7ffff7bd3000-7ffff7bd4000 r--p 00002000 09:02 51252035                   /lib/x86_64-linux-gnu/libanl-2.24.so
7ffff7bd4000-7ffff7bd5000 rw-p 00003000 09:02 51252035                   /lib/x86_64-linux-gnu/libanl-2.24.so
7ffff7bd5000-7ffff7bd8000 r-xp 00000000 09:02 51252000                   /lib/x86_64-linux-gnu/libdl-2.24.so
7ffff7bd8000-7ffff7dd7000 ---p 00003000 09:02 51252000                   /lib/x86_64-linux-gnu/libdl-2.24.so
7ffff7dd7000-7ffff7dd8000 r--p 00002000 09:02 51252000                   /lib/x86_64-linux-gnu/libdl-2.24.so
7ffff7dd8000-7ffff7dd9000 rw-p 00003000 09:02 51252000                   /lib/x86_64-linux-gnu/libdl-2.24.so
7ffff7dd9000-7ffff7dfc000 r-xp 00000000 09:02 51251905                   /lib/x86_64-linux-gnu/ld-2.24.so
7ffff7e5f000-7ffff7e60000 rw-p 00000000 00:00 0 
7ffff7e60000-7ffff7e61000 r--s 00000000 09:02 130286581                  /var/lib/multichain/testcoin/node-9612/testcoin/chainstate/000005.ldb
7ffff7e61000-7ffff7e62000 r--s 00000000 09:02 130286451                  /var/lib/multichain/testcoin/node-9612/testcoin/permissions.db/000010.ldb
7ffff7e62000-7ffff7ee4000 r--s 00000000 09:02 130286480                  /var/lib/multichain/testcoin/node-9612/testcoin/blocks/index/000005.ldb
7ffff7ee4000-7ffff7ee5000 r--s 00000000 09:02 130286354                  /var/lib/multichain/testcoin/node-9612/testcoin/entities.db/000005.ldb
7ffff7ee5000-7ffff7fe6000 rw-p 00000000 00:00 0 
7ffff7fe6000-7ffff7fe7000 r--s 00000000 09:02 130286573                  /var/lib/multichain/testcoin/node-9612/testcoin/permissions.db/000005.ldb
7ffff7fe7000-7ffff7fe8000 r--s 00000000 09:02 130286481                  /var/lib/multichain/testcoin/node-9612/testcoin/permissions.db/000008.ldb
7ffff7fe8000-7ffff7fee000 rw-p 00000000 00:00 0 
7ffff7fee000-7ffff7ff5000 r--s 00000000 09:02 188883703                  /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7ffff7ff5000-7ffff7ff8000 rw-p 00000000 00:00 0 
7ffff7ff8000-7ffff7ffa000 r--p 00000000 00:00 0                          [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0                          [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 00023000 09:02 51251905                   /lib/x86_64-linux-gnu/ld-2.24.so
7ffff7ffd000-7ffff7ffe000 rw-p 00024000 09:02 51251905                   /lib/x86_64-linux-gnu/ld-2.24.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0 
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0                          [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

Thread 28 "bitcoin-msghand" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fff937fe700 (LWP 13280)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff69a43fa in __GI_abort () at abort.c:89
#2  0x00007ffff69e0bd0 in __libc_message (do_abort=do_abort@entry=2, 
    fmt=fmt@entry=0x7ffff6ad5dd0 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff69e6f96 in malloc_printerr (action=3, 
    str=0x7ffff6ad5e48 "double free or corruption (!prev)", ptr=<optimized out>, ar_ptr=<optimized out>)
    at malloc.c:5049
#4  0x00007ffff69e77de in _int_free (av=0x7fff98000020, p=0x7fff9801a830, have_lock=0) at malloc.c:3905
#5  0x00000000004d0600 in std::deque<CNetMessage, std::allocator<CNetMessage> >::erase(std::_Deque_iterator<CNetMessage, CNetMessage&, CNetMessage*>, std::_Deque_iterator<CNetMessage, CNetMessage&, CNetMessage*>) ()
#6  0x00000000004adf2b in ProcessMessages (pfrom=0x7fff880076d0) at core/main.cpp:6829
#7  0x0000000000537b4c in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value<bool>, int, std::less<int>, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::operator()(CNode*) ()
#8  0x000000000051ba45 in boost::signals2::signal1<bool, CNode*, boost::signals2::optional_last_value<bool>, int, std::less<int>, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::operator()(CNode*) (arg1=<optimized out>, 
    this=<optimized out>) at /usr/local/include/boost/signals2/detail/signal_template.hpp:718
#9  ThreadMessageHandler () at net/net.cpp:1643
#10 0x0000000000535ea5 in void TraceThread<void (*)()>(char const*, void (*)()) ()
#11 0x0000000000852354 in thread_proxy ()
#12 0x00007ffff6d16494 in start_thread (arg=0x7fff937fe700) at pthread_create.c:333
#13 0x00007ffff6a58aff in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
(gdb) 

I got the same error with the same stack trace multiple times on different nodes in the blockchain.
This one is using the 1.0.2.1-wdebug build, but I have also seen it with 1.0.2.1 without debug symbols so I think it is unrelated to the build type.

I have sent you an email with the blockchain directory of one affected node.

Poor native blockchain currency settings means no one can submit transactions

Took me an hour to get to the bottom of this one:

With the following in your params.dat:

# Native blockchain currency (likely not required)

initial-block-reward = 64               # Initial block mining reward in raw native currency units. (0 - 1000000000000000000)
first-block-reward = 5000000            # Different mining reward for first block only, ignored if negative. (-1 - 1000000000000000000)
reward-halving-interval = 1051200       # Interval for halving of mining rewards, in blocks. (60 - 1000000000)
reward-spendable-delay = 6              # Delay before mining reward can be spent, in blocks. (1 - 100000)
minimum-per-output = 0                  # Minimum native currency per output (anti-dust), in raw units.
                                        # If set to -1, this is calculated from minimum-relay-fee. (-1 - 1000000000)
maximum-per-output = 100000000000000    # Maximum native currency per output, in raw units. (0 - 1000000000000000000)
minimum-offchain-fee = 0                # Minimum fee for publishing off-chain data items, per 1000 bytes, in raw units of native currency. (0 - 1000000000)
minimum-relay-fee = 0                   # Minimum transaction fee, per 1000 bytes, in raw units of native currency. (0 - 1000000000)
native-currency-multiple = 1000000      # Number of raw units of native currency per display unit. (0 - 1000000000)

you get the following error, even as admin, when trying to submit any transaction (I used an issue <1...> votes 1000 1 command during testing, but found the problem when trying to grant admin rights to a second address):

error code: -704
error message:
No unspent output with issue permission

Once the number of blocks exceeds the reward-spendable-delay (in this case 6), then commands start working.

But if you set reward-spendable-delay higher than the total number of blocks made in initial setup, you end up with a useless blockchain where no address has unspent UTXO and hence nothing can be done on the chain. As there are no transactions, block generation halts before the reward-spendable-delay is reached.

Might be worth checking for when setting up a MultiChain for the first time, and rejecting with a suitable message explaining why the params are no good.

multichain-cli can't connect to the remote node

I'm using Chainstack for network and node deployment.

I can interact with RPC via multiple methods described here (curl) and here (JavaScript and Python libraries) but not with multichain-cli.

I'm getting the error providing all required parameters:

$ ./multichain-cli nw-123-456-7 -rpcconnect=nd-123-456-789.p2pify.com -rpcport=80 -rpcuser=focused-koala -rpcpassword=shadow-sierra-sketch-edison-bonded-paging -rpcssl

MultiChain 2.0.2 RPC client


Interactive mode

nw-123-456-7: getinfo
{"method":"getinfo","params":[],"id":"57073710-1561637872","chain_name":"nw-123-456-7"}

error: no response from server

What could be the issue? Am I missing something?

Configure looking for install.sh

When trying to run the configure script on OSX it crashes due to there not being any content in the root of the build-aux folder.

Exact error text:

configure: error: cannot find install-sh, install.sh, or shtool in build-aux "."/build-aux

BerkeleyDB 4.x?

Hi,

I'm trying to get multichain running on an alpine docker container (which implies lots of tinkering and I'm also trying compiling). I wanted to ask why is the BerkeleyDB version forced to 4.X when the latest is 5.3?

Is there a hard reason for this? Can we be a bit more flexible with the version at compile time?

ZeroMQ support?

It seems that multichain does not have ZeroMQ support yet. Some tools in Bitcoin ecosystem rely on ZeroMQ to get new transaction/ block notification. Do you have plan to add it?

SmartFilter: JS-Code size limit?

Hello,

I seem to have hit the maximum size limit that a Smart Filter can have? Inside my code I'm loading an object with ~250k lines of information that I use to verify a few things about the transaction.

When I try to send the filter through Savior I get:

Json: {'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}
{'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}

However, if I empty my object the filter goes through:

> tloriato$ python3 filterwithObject.py 
Error! Status code: 500
Text: {"result":null,"error":{"code":-8,"message":"Invalid custom fields or filter name, too long"},"id":1}

Json: {'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}
{'result': None, 'error': {'code': -8, 'message': 'Invalid custom fields or filter name, too long'}, 'id': 1}
> tloriato$ python3 filterWithoutObject.py 
8167852d16573667efac308becdd0175af1a8effa549b0eb054ec5fb25446db7

The saddest part is that I wanted to load other object after this one with 2mi lines 😢

Windows build fails (on Ubuntu 17)

Hi all, cannot build a Windows version from Ubuntu. I followed all the steps of the README.md file but I get an error during the make:

chainparams/chainparams.cpp: In constructor ‘CMainParams::CMainParams()’: chainparams/chainparams.cpp:176:51: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’) base58Prefixes[PUBKEY_ADDRESS] = list_of(0); ^

Asset name restriction error with createrawsendfrom

Apparently we can create assets with names which do not respect the 32 characters limitations. Those assets become unusable with their names. We are currently in production with multichain 1.0.2.

How do you think you will correct this issue ?

Here is the scenario to reproduce bug:

createrawsendfrom "<my-address>" '{"<my-address>": {"issue": {"raw": 3}}}' '[{"name": "1234567890123456789012345678901234567890"}]'
>> <hex>
signrawtransaction <hex>
>> <hex>
sendrawtransaction <hex>
>> success
listassets "1234567890123456789012345678901234567890" true
>> Could not parse asset key: 1234567890123456789012345678901234567890
listassets "*" true
[ ...
    {
        "name" : "1234567890123456789012345678901234567890",
        "issuetxid" : "8ab44b100220333cdff196c763e4ff676460c4d94ec687eb28005417e058e977",
        "assetref" : "60-265-46218",
        "multiple" : 1,
        "units" : 1.00000000,
        "open" : false,
        "details" : {
        },
        "issueqty" : 3.00000000,
        "issueraw" : 3,
        "subscribed" : false,
        "issues" : [
            {
                "txid" : "8ab44b100220333cdff196c763e4ff676460c4d94ec687eb28005417e058e977",
                "qty" : 3.00000000,
                "raw" : 3,
                "details" : {
                },
                "issuers" : [
                    "<my-address>"
                ]
            }
        ]
    }
]

compile error

Hi,
I am experiencing a compile break on ubuntu 16.04-update and git fetch updated.

nohup log file says:

make[2]: Leaving directory '/root/git/multichain/src/secp256k1'
CXXLD libbitcoinconsensus.la
/usr/bin/ar: u' modifier ignored since D' is the default (see `U')
CXX multichain/multichaind-multichaind.o
CXX rpc/multichaind-rpclist.o
CXX chainparams/multichaind-buildgenesis.o
CXX protocol/multichaind-filter.o
In file included from protocol/filter.cpp:4:0:
./v8/v8engine.h:8:16: fatal error: v8.h: No such file or directory
compilation terminated.
Makefile:4322: recipe for target 'protocol/multichaind-filter.o' failed
make[1]: *** [protocol/multichaind-filter.o] Error 1
make[1]: Leaving directory '/root/git/multichain/src'
Makefile:560: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I posted the same compile error yesterday on multichain Q&A site, but it was under ubuntu 18.04, so I gave it a chance to compile also under ubuntu 16.04 but same error happens.

Thanks,
Luca

Argument list too long

Hello,
I've created a new local environment with a stream in order to publish some documents, not so large (200K). The steps are:

xxd -p pre.pdf | tr -d '\n' > pre.hex
var=$(cat pre.hex)
multichain-cli testenv publish documents pdf $var

And i'm getting the following error:

/usr/local/bin/multichain-cli: The argument list is too long

There's any way to avoid that error ?

ps: It works fine for the first 2184 lines of the xxd output.

Issue transactions are not (or slowly) accepted in the blockchain

I am generating a lot of issue transactions using issuemorefrom API call.

This was working okay when the chain was small, but now I see that nearly all of them are getting rejected with debug.log showing:

2018-02-06 12:30:19 ERROR: AcceptToMemoryPool : inputs already spent
2018-02-06 12:30:19 Tx e8bfb5b419be6a318e3ffd87e6ba3882cc1176e3726d165bfb786eadb07745a1 was not accepted to mempool, setting INVALID flag

An example API call:

{
    "id":"bo5a79a12363437",
    "method":"issuemorefrom",
    "params": [
        "1EaV1JMtbW1AwtcPE8cqGHgiPx1nUiHctU4wVe",
        "1P1jZrdugtWdqwHHCKyZ6ACgeCrSBArDSEhkve",
        "alpcoin",
        6.48332685,
        0,
        {"description":"exchange from Alpcoin Classic","exchange_rate":"5"}
    ]
}

As far as I understand a coin issue has no inputs to spend so it should not fail. I would consider this a bug in the implementation, or is there something I do not understand correctly?

Item data should be hexadecimal string

What is the correct format for text data streams
I wrote it according to the official API
chain1: publish stream1 key1 '{"text":"hello world"}'
But it always displays the following error

{"method":"publish","params":["stream1","key1","{'text':'hello'}"],"id":1,"chain_name":"chain1"}

error code: -8
error message:
Item data should be hexadecimal string
chain1: publish stream1 key1 '{"text":"hello world"}'                              
{"method":"publish","params":["stream1","key1","{\"text\":\"hello world\"}"],"id":1,"chain_name":"chain1"}

error code: -8
error message:
Item data should be hexadecimal string

i use multichain-2.0-beta-1 version,Doesn't this version support text and json data

chain1: publish
{"method":"publish","params":[],"id":"43892661-1548068949","chain_name":"chain1"}

error code: -1
error message:
publish "stream-identifier" "key" "data-hex"

Publishes stream item

Arguments:
1. "stream-identifier"              (string, required) Stream identifier - one of the following: stream txid, stream reference, stream name.
2. "key"                            (string, required) Item key
3. "data-hex"                       (string, required) Item data hex string

Result:
"transactionid"                     (string) The transaction id.

Examples:
> multichain-cli chain1 publish test "hello world" 48656C6C6F20576F726C64210A
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "publish", "params": ["test", "hello world", "48656C6C6F20576F726C64210A"] }' -H 'content-type: text/plain;' http://127.0.0.1:4412

Is there anything else that needs to be configured?

Simplify Running Two Nodes on One Machine

Right within the Getting Started (https://www.multichain.com/getting-started/) I hit on a problem.

After looking up for a solution, I found this here:

https://www.multichain.com/qa/2817/how-to-run-datadir-in-multichain

This is far too complicated (for a getting-started) and should be drastically simplified. The first contact with MultiChain should be smooth and barrier-free.

Is there any way (without code-level changes) to replace the need of the many cmd-line parameters (`-datadir=.multichain-other -port=10255 -rpcport=10254), e.g. running the tools from within different installation-dirs or similar?

Build fails on OS X Sierra (1.0.2 & 2.0 alpha 1)

Both 1.0.2 (44bdabe) and 2.0 alpha 1 (0a428c7) fail to build on Mac OS X Sierra (w/ LLVM 9.0.0; boost 1.65.1 and boost 1.59) while 1.0.1 (1de5d44) builds just fine.

It seems like the problem has been introduced in ef18500 as the previous commit seems to build correctly.

See the two ambiguous type conversions below:

This-MacBook-Pro:multichain vagrant$ make
Making all in src
  CXX      json/libbitcoin_server_a-json_spirit_ubjson.o
json/json_spirit_ubjson.cpp:364:39: error: conversion from 'size_type' (aka 'unsigned long') to 'const json_spirit::Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >' is ambiguous
                    value=array_value.size();
                          ~~~~~~~~~~~~^~~~~~
./json/json_spirit_value.h:46:9: note: candidate constructor
        Value_impl( bool               value );
        ^
./json/json_spirit_value.h:47:9: note: candidate constructor
        Value_impl( int                value );
        ^
./json/json_spirit_value.h:48:9: note: candidate constructor
        Value_impl( int64_t     value );
        ^
./json/json_spirit_value.h:49:9: note: candidate constructor
        Value_impl( uint64_t    value );
        ^
./json/json_spirit_value.h:50:9: note: candidate constructor
        Value_impl( double             value );
        ^
json/json_spirit_ubjson.cpp:452:37: error: conversion from 'size_type' (aka 'unsigned long') to 'const json_spirit::Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >' is ambiguous
                    value=obj_value.size();
                          ~~~~~~~~~~^~~~~~
./json/json_spirit_value.h:46:9: note: candidate constructor
        Value_impl( bool               value );
        ^
./json/json_spirit_value.h:47:9: note: candidate constructor
        Value_impl( int                value );
        ^
./json/json_spirit_value.h:48:9: note: candidate constructor
        Value_impl( int64_t     value );
        ^
./json/json_spirit_value.h:49:9: note: candidate constructor
        Value_impl( uint64_t    value );
        ^
./json/json_spirit_value.h:50:9: note: candidate constructor
        Value_impl( double             value );
        ^
2 errors generated.
make[1]: *** [json/libbitcoin_server_a-json_spirit_ubjson.o] Error 1
make: *** [all-recursive] Error 1

address not exist in the sample_wallet

Hello,
I can not get the sample wallet to work,
I have created the java and saved it in ~ / BitcoinWallet / BitcoinWallet.conf configuration. But it does not work, if I try to send money to some address of the wallet from multichain, but the console tells me that the address does not exist.
Please help, I do not understand what I should do.
Is the application unfinished?

Blockchain parameter `minimum-per-output` is ignored

On a test chain based on the latest release version (1.0.1) of multichain I was able to create and confirm a 1 raw unit native currency transaction without transaction fee while the blockchain parameters are set to:
minimum-per-output = 10000
minimum-relay-fee = 10000

Maybe I am doing something wrong but it seems to be a bug.

Q: Supported algo/coins?

I would like to know which algo/coins are currently supported? Are there any example configs for existing currencies already supported out of the box using the specific blockchain-params to host nodes for multiple coins out of one daemon and separate configs/processes managing each of them?

Named semaphore generation on Mac OS X

The generation of semaphore names for OS X is making use of rand() without seeding it, which ultimately leads to multichain always trying to use the same semaphore name on each invocation until the machine is rebooted.

void* __US_SemCreate()
{
sem_t *lpsem;
lpsem=NULL;
#ifdef MAC_OSX
// Create a unique name for the named semaphore
static const char alphanum[] =
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
int namelen = 20;
char name[namelen + 1];
for (int i = 0; i < namelen; ++i) {
name[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
}
name[namelen] = 0;
// Create named semaphore as unnamed semaphores are deprecated on OS X.
lpsem = sem_open(name, O_CREAT | O_EXCL, 0666, 1);
if (lpsem == SEM_FAILED) {
return NULL;
}
#else

This becomes a problem when the semaphore isn't cleaned up properly (e.g. after a SIGKILL or even when stopping a running sync with SIGINT, deleting the datadir and trying to sync again, which can get pretty annoying when testing stuff) as multichaind will refuse to start until the machine is rebooted or the semaphore is removed manually

I guess it would be a good idea to add mc_RandomSeed(mc_TimeNowAsUInt()) in init (or before trying to create the semaphore in https://github.com/MultiChain/multichain/blob/master/src/permissions/permission.cpp#L528) to make sure a random semaphore name is used

wallet storage directory inefficient with large number of addresses

I am running a multichaind network where each node manages a lot of addresses.
One node for examples currently has 31039 addresses. The wallet.dat file is 7.4MB, which sounds quite okay, but the wallet directory contains 620388 files and according to du takes about 52G disk space. Accessing the multichain API for information and creating new transactions takes a lot of time.

Are there any plans on improving this? Or is there anything I can configure to make it more efficient?

liststreamitems doesn't work on windows 10?

I receive only an empty array when calling 'multichain-cli.exe testchain liststreamitems "test-stream" false'. liststreamitems on my linux machine works without problems. Is this a general problem on windows?

macOS High Sierra compile error

Latest git from today.

Ark:multichain burton$ make
Making all in src
  CXXLD    libbitcoinconsensus.la
Undefined symbols for architecture x86_64:
  "_MAX_SIZE", referenced from:
      unsigned long long ReadCompactSize<(anonymous namespace)::TxInputStream>((anonymous namespace)::TxInputStream&) in libbitcoinconsensus_la-bitcoinconsensus.o
  "ExtractDestination(CScript const&, boost::variant<CNoDestination, CKeyID, CScriptID, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_>&)", referenced from:
      VerifyScript(CScript const&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "mc_Features::FixedIn10007()", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "mc_MultichainParams::IsProtocolMultichain()", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
      CScript::IsPayToScriptHash() const in libbitcoinconsensus_la-script.o
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
      TransactionSignatureChecker::CheckSig(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, CScript const&, bool&) const in libbitcoinconsensus_la-interpreter.o
  "_MCP_ANYONE_CAN_SEND", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
  "CBlockHeader::GetHash() const", referenced from:
      CMainParams::CMainParams() in libbitcoinconsensus_la-chainparams.o
      CTestNetParams::CTestNetParams() in libbitcoinconsensus_la-chainparams.o
      CRegTestParams::CRegTestParams() in libbitcoinconsensus_la-chainparams.o
  "_leveldb_create_iterator", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "boost::system::system_category()", referenced from:
      __GLOBAL__sub_I_utilwrapper.cpp in libbitcoinconsensus_la-utilwrapper.o
      __GLOBAL__sub_I_buildgenesis.cpp in libbitcoinconsensus_la-buildgenesis.o
      __GLOBAL__sub_I_version.cpp in libbitcoinconsensus_la-version.o
      __GLOBAL__sub_I_custom.cpp in libbitcoinconsensus_la-custom.o
      __GLOBAL__sub_I_chainparams.cpp in libbitcoinconsensus_la-chainparams.o
  "_leveldb_iter_seek", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "_leveldb_iter_key", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "CService::CService(in6_addr const&, unsigned short)", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "GetTime()", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "_leveldb_get", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "mc_Features::VerifySizeOfOpDropElements()", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "mc_Features::Streams()", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
      VerifyScript(CScript const&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "_leveldb_iter_valid", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "_leveldb_free", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "boost::system::generic_category()", referenced from:
      __GLOBAL__sub_I_utilwrapper.cpp in libbitcoinconsensus_la-utilwrapper.o
      __GLOBAL__sub_I_buildgenesis.cpp in libbitcoinconsensus_la-buildgenesis.o
      __GLOBAL__sub_I_version.cpp in libbitcoinconsensus_la-version.o
      __GLOBAL__sub_I_custom.cpp in libbitcoinconsensus_la-custom.o
      __GLOBAL__sub_I_chainparams.cpp in libbitcoinconsensus_la-chainparams.o
  "_leveldb_iter_destroy", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "GetRand(unsigned long long)", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "_COIN", referenced from:
      CMainParams::CMainParams() in libbitcoinconsensus_la-chainparams.o
  "CBlock::BuildMerkleTree(bool*) const", referenced from:
      CMainParams::CMainParams() in libbitcoinconsensus_la-chainparams.o
  "_leveldb_iter_value", referenced from:
      mc_Database::Read(char*, int, int*, int, int*) in libbitcoinconsensus_la-dbwrapper.o
  "_MAX_SCRIPT_ELEMENT_SIZE", referenced from:
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
  "CAddress::CAddress(CService, unsigned long long)", referenced from:
      convertSeed6(std::__1::vector<CAddress, std::__1::allocator<CAddress> >&, SeedSpec6 const*, unsigned int) in libbitcoinconsensus_la-chainparams.o
  "_mc_gState", referenced from:
      mc_Permissions::CanSend(void const*, void const*) in libbitcoinconsensus_la-permission.o
      CScript::IsPayToScriptHash() const in libbitcoinconsensus_la-script.o
      EvalScript(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
      TransactionSignatureChecker::CheckSig(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&, CScript const&, bool&) const in libbitcoinconsensus_la-interpreter.o
      VerifyScript(CScript const&, CScript const&, unsigned int, BaseSignatureChecker const&, ScriptError_t*) in libbitcoinconsensus_la-interpreter.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libbitcoinconsensus.la] Error 1
make: *** [all-recursive] Error 1

Backup and Dump Wallet API

if the folder does not exist, the errors returned are.

BackupWallet
{"result":null,"error":{"code":-4,"message":"Error: Wallet backup failed!"},"id":null}
I genuinely had a lot of time waste due to the fact that a file had the same name as an expected folder.. This error was very crude.

DumpWallet
{"result":null,"error":{"code":-717,"message":"Cannot open wallet dump file"},"id":null}
This error is misleading as it suggests that a file be opened - but its the stream that you need to create that cannot be created, due to path not found

RPC 500 HTTP error on not found block and tx

RPC returns 500 for not found blocks and transactions:

image

MultiChain Explorer makes queries that fail from time to time:

mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599165"}
mcapi: API request failure: {"method":"getblockhash","id":"599165"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599166"}
mcapi: API request successful: {"method":"getblockhash","id":"599166"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599167"}
mcapi: API request failure: {"method":"getblockhash","id":"599167"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599168"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599168"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599169"}
mcapi: API request successful: {"method":"listassets","id":"599169"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599170"}
mcapi: API request successful: {"method":"liststreams","id":"599170"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599171"}
mcapi: API request successful: {"method":"getrawmempool","id":"599171"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599172"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599172"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599173"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599173"}, code: -710
Adding fixed seed nodes as DNS doesn't seem to be available.
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599174"}
mcapi: API request failure: {"method":"getblockhash","id":"599174"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599175"}
mcapi: API request successful: {"method":"getblockhash","id":"599175"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599176"}
mcapi: API request failure: {"method":"getblockhash","id":"599176"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599177"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599177"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599178"}
mcapi: API request successful: {"method":"listassets","id":"599178"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599179"}
mcapi: API request successful: {"method":"liststreams","id":"599179"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599180"}
mcapi: API request successful: {"method":"getrawmempool","id":"599180"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599181"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599181"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599182"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599182"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599183"}
mcapi: API request failure: {"method":"getblockhash","id":"599183"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599184"}
mcapi: API request successful: {"method":"getblockhash","id":"599184"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599185"}
mcapi: API request failure: {"method":"getblockhash","id":"599185"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599186"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599186"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599187"}
mcapi: API request successful: {"method":"listassets","id":"599187"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599188"}
mcapi: API request successful: {"method":"liststreams","id":"599188"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599189"}
mcapi: API request successful: {"method":"getrawmempool","id":"599189"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599190"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599190"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599191"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599191"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599192"}
mcapi: API request failure: {"method":"getblockhash","id":"599192"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599193"}
mcapi: API request successful: {"method":"getblockhash","id":"599193"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599194"}
mcapi: API request failure: {"method":"getblockhash","id":"599194"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599195"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599195"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599196"}
mcapi: API request successful: {"method":"listassets","id":"599196"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599197"}
mcapi: API request successful: {"method":"liststreams","id":"599197"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599198"}
mcapi: API request successful: {"method":"getrawmempool","id":"599198"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599199"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599199"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599200"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599200"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599201"}
mcapi: API request failure: {"method":"getblockhash","id":"599201"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599202"}
mcapi: API request successful: {"method":"getblockhash","id":"599202"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599203"}
mcapi: API request failure: {"method":"getblockhash","id":"599203"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599204"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599204"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599205"}
mcapi: API request successful: {"method":"listassets","id":"599205"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599206"}
mcapi: API request successful: {"method":"liststreams","id":"599206"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599207"}
mcapi: API request successful: {"method":"getrawmempool","id":"599207"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599208"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599208"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599209"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599209"}, code: -710
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599210"}
mcapi: API request failure: {"method":"getblockhash","id":"599210"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599211"}
mcapi: API request successful: {"method":"getblockhash","id":"599211"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599212"}
mcapi: API request failure: {"method":"getblockhash","id":"599212"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599213"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599213"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599214"}
mcapi: API request successful: {"method":"listassets","id":"599214"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599215"}
mcapi: API request successful: {"method":"liststreams","id":"599215"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599216"}
mcapi: API request successful: {"method":"getrawmempool","id":"599216"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599217"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599217"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599218"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599218"}, code: -710
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599219"}
mcapi: API request failure: {"method":"getblockhash","id":"599219"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599220"}
mcapi: API request successful: {"method":"getblockhash","id":"599220"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599221"}
mcapi: API request failure: {"method":"getblockhash","id":"599221"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599222"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599222"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599223"}
mcapi: API request successful: {"method":"listassets","id":"599223"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599224"}
mcapi: API request successful: {"method":"liststreams","id":"599224"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599225"}
mcapi: API request successful: {"method":"getrawmempool","id":"599225"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599226"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599226"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599227"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599227"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599228"}
mcapi: API request failure: {"method":"getblockhash","id":"599228"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599229"}
mcapi: API request successful: {"method":"getblockhash","id":"599229"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599230"}
mcapi: API request failure: {"method":"getblockhash","id":"599230"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599231"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599231"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599232"}
mcapi: API request successful: {"method":"listassets","id":"599232"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599233"}
mcapi: API request successful: {"method":"liststreams","id":"599233"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599234"}
mcapi: API request successful: {"method":"getrawmempool","id":"599234"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599235"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599235"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599236"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599236"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599237"}
mcapi: API request failure: {"method":"getblockhash","id":"599237"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599238"}
mcapi: API request successful: {"method":"getblockhash","id":"599238"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599239"}
mcapi: API request failure: {"method":"getblockhash","id":"599239"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599240"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599240"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599241"}
mcapi: API request successful: {"method":"listassets","id":"599241"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599242"}
mcapi: API request successful: {"method":"liststreams","id":"599242"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599243"}
mcapi: API request successful: {"method":"getrawmempool","id":"599243"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599244"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599244"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599245"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599245"}, code: -710
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599246"}
mcapi: API request failure: {"method":"getblockhash","id":"599246"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599247"}
mcapi: API request successful: {"method":"getblockhash","id":"599247"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599248"}
mcapi: API request failure: {"method":"getblockhash","id":"599248"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599249"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599249"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599250"}
mcapi: API request successful: {"method":"listassets","id":"599250"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599251"}
mcapi: API request successful: {"method":"liststreams","id":"599251"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599252"}
mcapi: API request successful: {"method":"getrawmempool","id":"599252"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599253"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599253"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599254"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599254"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599255"}
mcapi: API request failure: {"method":"getblockhash","id":"599255"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599256"}
mcapi: API request successful: {"method":"getblockhash","id":"599256"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599257"}
mcapi: API request failure: {"method":"getblockhash","id":"599257"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599258"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599258"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599259"}
mcapi: API request successful: {"method":"listassets","id":"599259"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599260"}
mcapi: API request successful: {"method":"liststreams","id":"599260"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599261"}
mcapi: API request successful: {"method":"getrawmempool","id":"599261"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599262"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599262"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599263"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599263"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599264"}
mcapi: API request failure: {"method":"getblockhash","id":"599264"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599265"}
mcapi: API request successful: {"method":"getblockhash","id":"599265"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599266"}
mcapi: API request failure: {"method":"getblockhash","id":"599266"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599267"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599267"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599268"}
mcapi: API request successful: {"method":"listassets","id":"599268"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599269"}
mcapi: API request successful: {"method":"liststreams","id":"599269"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599270"}
mcapi: API request successful: {"method":"getrawmempool","id":"599270"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599271"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599271"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599272"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599272"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599273"}
mcapi: API request failure: {"method":"getblockhash","id":"599273"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599274"}
mcapi: API request successful: {"method":"getblockhash","id":"599274"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599275"}
mcapi: API request failure: {"method":"getblockhash","id":"599275"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599276"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599276"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599277"}
mcapi: API request successful: {"method":"listassets","id":"599277"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599278"}
mcapi: API request successful: {"method":"liststreams","id":"599278"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599279"}
mcapi: API request successful: {"method":"getrawmempool","id":"599279"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599280"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599280"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599281"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599281"}, code: -710
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599282"}
mcapi: API request failure: {"method":"getblockhash","id":"599282"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599283"}
mcapi: API request successful: {"method":"getblockhash","id":"599283"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599284"}
mcapi: API request failure: {"method":"getblockhash","id":"599284"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599285"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599285"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"listassets","params":[],"id":"599286"}
mcapi: API request successful: {"method":"listassets","id":"599286"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599287"}
mcapi: API request successful: {"method":"liststreams","id":"599287"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599288"}
mcapi: API request successful: {"method":"getrawmempool","id":"599288"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599289"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599289"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599290"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599290"}, code: -710
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599291"}
mcapi: API request failure: {"method":"getblockhash","id":"599291"}, code: -711
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[59],"id":"599292"}
mcapi: API request successful: {"method":"getblockhash","id":"599292"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getblockhash","params":[60],"id":"599293"}
mcapi: API request failure: {"method":"getblockhash","id":"599293"}, code: -711
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getpeerinfo","params":[],"id":"599294"}
mcapi: API request successful: {"method":"getpeerinfo","id":"599294"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"listassets","params":[],"id":"599295"}
mcapi: API request successful: {"method":"listassets","id":"599295"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"liststreams","params":["*",true],"id":"599296"}
mcapi: API request successful: {"method":"liststreams","id":"599296"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawmempool","params":[true],"id":"599297"}
mcapi: API request successful: {"method":"getrawmempool","id":"599297"}
mcapi: API request from ::ffff:10.36.4.80
mcapi: API request: {"method":"getrawtransaction","params":["aa2ae3213b8c22eaf47f947fa8a00b2dd4deac35170efd237dece6e1ef200af7",1],"id":"599298"}
mcapi: API request successful: {"method":"getrawtransaction","id":"599298"}
mcapi: API request from ::ffff:10.36.41.3
mcapi: API request: {"method":"getrawtransaction","params":["a2a572cf54a2daef3ebb8ebace46ebdac511fe8d6a6adcfd5cb08f96a726e25a",1],"id":"599299"}
mcapi: API request failure: {"method":"getrawtransaction","id":"599299"}, code: -710

In monitoring system it looks like there's something wrong with the API which is not the case. Any reason to return 500 and not 200?

Travis CI integration for macOS binaries

Hi everyone,

this is not an issue as such, but since I haven't found a mailing list, here it goes. I have forked MultiChain and added Travis CI scripts for the master, 1.0.x-dev, 1.0.x-release, 2.0-dev and 2.0-release branches that build macOS High Sierra binaries (macOS 10.13.6 as of today) and release them to GitHub, whenever I merge your upstream changes and push them. The builds are "versioned" with the latest upstream branch merge commit date (UTC). They do not include a proper README.txt, which you distribute with your pre-compiled packages, as I could not find them in your repository (I only include a README with a reference to the proper upstream tree). However they do contain the multichain-cli, multichain-util, multichaind and multichaind-cold binaries.

If you find this useful, I can open a PR, otherwise I just wanted to put it out here, in case someone does not want to go through the trouble of compiling. I have too many different versions of boost and openssl installed (via brew, self-built or provided binaries) on my machine to compile the thing properly (i.e. weird pointer corruption errors due to linking of different versions, failed assertions and whatnot). The binaries mentioned above run fine on my macOS Mojave 10.14.3 as well, and the very simple test case included in the .travis.yml scripts succeeds on High Sierra 10.13.6 on Travis.

As a disclaimer I'll have to say that I need MultiChain as part of a project we are working on, and as such I cannot say I'll be able to maintain this fork, at least on a regular basis (or at all).

Cheers and keep up the great work!
Robert

Issuemorefrom spends wrong UTXO

Background

I am trying to create raw transactions with issuemorefrom. I am not using the issuemorefrom api call because I want to store some information in the application that creates the transation before sending it.

The problem

  • my own issuemorefrom transactions do not have an output that could be spent on new asset issues as it is the case with the transactions generated by issuemorefrom api call. I have not figured out what is the problem here, but that could be my own fault.
  • when I run issuemorefrom api call after my incorrect transaction is in the network it will spend asset outputs for generating new transactions, making these assets unusable.

How to reproduce

  1. create a new blockchain with permissions, everyone can connect, send, receive.
  2. api call listaddresses -> my admin address is 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8
  3. api call issue 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8 '{"name":"cointest","open":true}' 1 0.00000001
  4. api call issuemorefrom 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8 cointest 5

The relevant transactions in the network are now:

  • the original issue TX (A):
    • outputs:
      • 0 - the issued assets
      • 1 - the issue metadata
      • 2 - output to be used for further asset issues
  • the issuemore TX (B):
    • inputs:
      • A 2
    • outputs:
      • 0 - the issued assets
      • 1 - output to be used for further asset issues

now I create my transaction:

  • `createrawtransaction '[{"txid":"B","vout":1}]' '{"someaddress":{"issuemore":{"asset":"cointest","raw":500}}}'
  • appendrawdata hex-from-above '{"details":{"origin":"us","stage":"two"}}'
  • signrawtransaction hex-from-above [] ['pk of 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8 obtained via dumpprivkey']
  • sendrawtransaction hex-from-above

This transaction has only the output of the asset issue and the meta data.

now make api call issuemorefrom 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8 1RuottrEKTyLbi9EARtppJEwXLwUzPz48eB5s8 cointest 5

This transactions spends the asset issued in step 4! As far as I see this is a major issue and such a transaction should never be accepted on the network.

Build fail on macOS Sierra 10.12.6

After following the procedure for mac, I got a failed build:

Making all in src
  CXX      multichain/multichaind-multichaind.o
  CXX      rpc/multichaind-rpclist.o
  CXX      chainparams/multichaind-buildgenesis.o
  CXX      storage/libbitcoin_server_a-addrman.o
  CXX      structs/libbitcoin_server_a-alert.o
  CXX      structs/libbitcoin_server_a-bloom.o
  CXX      chain/libbitcoin_server_a-chain.o
  CXX      chain/libbitcoin_server_a-checkpoints.o
  CXX      core/libbitcoin_server_a-init.o
  CXX      storage/libbitcoin_server_a-leveldbwrapper.o
  CXX      core/libbitcoin_server_a-main.o
  CXX      protocol/libbitcoin_server_a-multichaintx.o
protocol/multichaintx.cpp:855:37: warning: unused variable 'pc1' [-Wunused-variable]
            CScript::const_iterator pc1 = script1.begin();
                                    ^
protocol/multichaintx.cpp:2052:37: warning: unused variable 'pc1' [-Wunused-variable]
            CScript::const_iterator pc1 = script1.begin();
                                    ^
2 warnings generated.
  CXX      protocol/libbitcoin_server_a-multichainblock.o
  CXX      protocol/libbitcoin_server_a-handshake.o
  CXX      chain/libbitcoin_server_a-merkleblock.o
  CXX      miner/libbitcoin_server_a-miner.o
  CXX      net/libbitcoin_server_a-net.o
  CXX      ui/libbitcoin_server_a-noui.o
  CXX      chain/libbitcoin_server_a-pow.o
  CXX      net/libbitcoin_server_a-rest.o
  CXX      utils/libbitcoin_server_a-utilparse.o
  CXX      json/libbitcoin_server_a-json_spirit_ubjson.o
In file included from json/json_spirit_ubjson.cpp:4:
./json/json_spirit_ubjson.h:19:7: warning: 'ubjson_read' has C-linkage specified, but returns incomplete type 'Value' (aka 'Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >') which could be
      incompatible with C [-Wreturn-type-c-linkage]
Value ubjson_read(const unsigned char *elem,size_t elem_size,int max_depth,int *err);
      ^
json/json_spirit_ubjson.cpp:358:39: error: conversion from 'size_type' (aka 'unsigned long') to 'const json_spirit::Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >' is ambiguous
                    value=array_value.size();
                          ~~~~~~~~~~~~^~~~~~
./json/json_spirit_value.h:46:9: note: candidate constructor
        Value_impl( bool               value );
        ^
./json/json_spirit_value.h:47:9: note: candidate constructor
        Value_impl( int                value );
        ^
./json/json_spirit_value.h:48:9: note: candidate constructor
        Value_impl( int64_t     value );
        ^
./json/json_spirit_value.h:49:9: note: candidate constructor
        Value_impl( uint64_t    value );
        ^
./json/json_spirit_value.h:50:9: note: candidate constructor
        Value_impl( double             value );
        ^
json/json_spirit_ubjson.cpp:446:37: error: conversion from 'size_type' (aka 'unsigned long') to 'const json_spirit::Value_impl<json_spirit::Config_vector<std::__1::basic_string<char> > >' is ambiguous
                    value=obj_value.size();
                          ~~~~~~~~~~^~~~~~
./json/json_spirit_value.h:46:9: note: candidate constructor
        Value_impl( bool               value );
        ^
./json/json_spirit_value.h:47:9: note: candidate constructor
        Value_impl( int                value );
        ^
./json/json_spirit_value.h:48:9: note: candidate constructor
        Value_impl( int64_t     value );
        ^
./json/json_spirit_value.h:49:9: note: candidate constructor
        Value_impl( uint64_t    value );
        ^
./json/json_spirit_value.h:50:9: note: candidate constructor
        Value_impl( double             value );
        ^
1 warning and 2 errors generated.
make[1]: *** [json/libbitcoin_server_a-json_spirit_ubjson.o] Error 1
make: *** [all-recursive] Error 1

Issues with floating point precision

When sending high amounts of assets, multichain may reject transactions due to rounding errors in floating point calculation. I was trying to work around this by adding additional outputs that would correct the error, but internal calculations seem to add additional errors.

Steps to reproduce:

  1. create a blockchain alpcointest with asset alpcointest
    (issue <adminaddress> '{"name":"alpcointest","open":true}' 1 0.00000001)
  2. Issue 132463363.16643485 coins to an address
  3. Try to send 30000000 to another address using the above amount as input (I am using raw transactions)
  4. sendrawtransaction fails with
    error 500 Internal Server Error: {"result":null,"error":{"code":-26,"message":"64: Asset transfer script rejected - mismatch in input/output quantities"},"id":"bo5b79fd2b28f59"}
    

The raw transaction is:

0100000002c62fc6bb2d9e2c55c7cf570ab9746c8b32b3e85012cdbbacb16a690be128298d000000006b483045022100bcd897b01b0893563b8fadc9f05314275ac9c5866ea924ae04645ef0f3d3476402201ce59042f5c4fdd1b4a29d86921bb83c64f6cd9be63ffba26f69bf5e0298b4cd012103ac43252d0ffe7bf6d037e071f5633e918ea8c566a8520fad602b8a281dba9a41ffffffff76f52585f69116c1d49c39efe0e5eaa1d883f485eee0691042efb0162324c6ea000000006b483045022100e72e5a2b5fb0260be2e6981e9063462e0e12f3562757e1a45ee542cf8772703202207835584a9c74e4c770b10f17e3126ae63109df97906f6b6c0aacacb23c6ac900012102c48536111bdf048dbaba4359385f0f858678c19e47c7819ed7fca06a7853588fffffffff0400000000000000003776a914ddfd520187cbb74acf415f7b190c400a3034b89f88ac1c73706b71f212ea472d620aecb9655431691af945008053ee7ba80a007500000000000000003776a9147bbc3a30edef5d56f11032d747e6039f81cb071088ac1c73706b71f212ea472d620aecb9655431691af94568ce889cf74e26007500000000000000003776a9146aafe02b1faccce7c1bd0f1203759abdc2974fa888ac1c73706b71f212ea472d620aecb9655431691af94501000000000000007500000000000000000e6a0c74657374207061796d656e7400000000

output of decoderawtransaction:

{
    "txid" : "b215d5dd0c214d22e3e1493354a71ccd87a997a159736e97b12d4927f42c4f2b",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "16dd6507862ffea2813a0dbc818fad964e63e78721854803096061ed51ad1213",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "3045022100d61ee93a282fc7896d80bf67dc0e53a1564f4cd6b44b6dd11acafc2f9422754602205e277dfd00178a7d90b3c92e26439eec0f647dbe3566d046d4cdf4f11f55f9fb01 02e479c3db581bbd95a1a6ca5f67ed64805d2c2a7a374810b44002e0c7071cd069",
                "hex" : "483045022100d61ee93a282fc7896d80bf67dc0e53a1564f4cd6b44b6dd11acafc2f9422754602205e277dfd00178a7d90b3c92e26439eec0f647dbe3566d046d4cdf4f11f55f9fb012102e479c3db581bbd95a1a6ca5f67ed64805d2c2a7a374810b44002e0c7071cd069"
            },
            "sequence" : 4294967295
        },
        {
            "txid" : "c7d88d8e7e13db441688d5b5dca29c1090b65772842e7fa3d2a8c7332d44b7b0",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "3045022100c851ecb052bed1fc74011d7a98a2454dd15b645620bb0f40eb95eaad376ce2c902204c25f6b1a6baf7be798672648c5fd43f20599b44039f1b12d5421601c099fab401 0261cf770703bb8a7f57df7a20c4344216c24ca7847d7678a0671109537094b0d4",
                "hex" : "483045022100c851ecb052bed1fc74011d7a98a2454dd15b645620bb0f40eb95eaad376ce2c902204c25f6b1a6baf7be798672648c5fd43f20599b44039f1b12d5421601c099fab401210261cf770703bb8a7f57df7a20c4344216c24ca7847d7678a0671109537094b0d4"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 91bb0191a1913b2c68e788be254afd8b5a3d7ff2 OP_EQUALVERIFY OP_CHECKSIG 73706b71f212ea472d620aecb9655431691af945008053ee7ba80a00 OP_DROP",
                "hex" : "76a91491bb0191a1913b2c68e788be254afd8b5a3d7ff288ac1c73706b71f212ea472d620aecb9655431691af945008053ee7ba80a0075",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1LhNuwE8ppQzcVqC5VRViJGPzQ5Ao4wMEaz6QV"
                ]
            },
            "assets" : [
                {
                    "name" : "alpcointest",
                    "issuetxid" : "45f91a69315465b9ec0a622d47ea12f21c4372bf337f7b38a52b8df4dc029b05",
                    "assetref" : "4-264-63813",
                    "qty" : 30000000.00000000,
                    "raw" : 3000000000000000,
                    "type" : "transfer"
                }
            ],
            "permissions" : [
            ],
            "items" : [
            ]
        },
        {
            "value" : 0.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 785b4f13f8985aa34dbab4a61375741a067633cc OP_EQUALVERIFY OP_CHECKSIG 73706b71f212ea472d620aecb9655431691af94568ce889cf74e2600 OP_DROP",
                "hex" : "76a914785b4f13f8985aa34dbab4a61375741a067633cc88ac1c73706b71f212ea472d620aecb9655431691af94568ce889cf74e260075",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1HGUSPfRHhvgE32ese2LkubkUaNgQqJcejSkYg"
                ]
            },
            "assets" : [
                {
                    "name" : "alpcointest",
                    "issuetxid" : "45f91a69315465b9ec0a622d47ea12f21c4372bf337f7b38a52b8df4dc029b05",
                    "assetref" : "4-264-63813",
                    "qty" : 107828745.05105001,
                    "raw" : 10782874505105000,
                    "type" : "transfer"
                }
            ],
            "permissions" : [
            ],
            "items" : [
            ]
        },
        {
            "value" : 0.00000000,
            "n" : 2,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 1876f33c88cdc19b6ccf98a122315b06470acf97 OP_EQUALVERIFY OP_CHECKSIG 73706b71f212ea472d620aecb9655431691af9450100000000000000 OP_DROP",
                "hex" : "76a9141876f33c88cdc19b6ccf98a122315b06470acf9788ac1c73706b71f212ea472d620aecb9655431691af945010000000000000075",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "14Jn7VQtc5XH4KdXBf87R4UEbhrtcXDgFPdvxg"
                ]
            },
            "assets" : [
                {
                    "name" : "alpcointest",
                    "issuetxid" : "45f91a69315465b9ec0a622d47ea12f21c4372bf337f7b38a52b8df4dc029b05",
                    "assetref" : "4-264-63813",
                    "qty" : 0.00000001,
                    "raw" : 1,
                    "type" : "transfer"
                }
            ],
            "permissions" : [
            ],
            "items" : [
            ]
        },
        {
            "value" : 0.00000000,
            "n" : 3,
            "scriptPubKey" : {
                "asm" : "OP_RETURN 74657374207061796d656e74",
                "hex" : "6a0c74657374207061796d656e74",
                "type" : "nulldata"
            },
            "assets" : [
            ],
            "permissions" : [
            ],
            "items" : [
            ]
        }
    ],
    "data" : [
        "74657374207061796d656e74"
    ]
}

The problem seems to be related to the conversion from raw and qty here:

                    "qty" : 107828745.05105001,
                    "raw" : 10782874505105000,

3rd party app data

Is it possible to allow a 3rd party app to publish some piece of simple data on my block chain? If yes, how?

Unable to create and sign 3-to-4 multisig.

created 3-to-4 multisig using
addmultisigaddress 3 '["02d819390343b71d8a354f874e9d7e2274fa29dfd53ce32927bc7701aa355535da", "0253b1a5b5f4448dcaa1d20955dd14822aac7cef605fb67b4ed755717efd157d53", "03e09aad2dbe87a56ff8c3508b13f2be3eb55b81eeb6e2e0ccc75702de702e046c", "03d2dc053d833c03007d395bf45dccbb578d1e711726f07f3ea72e6252f625d2e6"]'
but when I try to sign any transaction ' "complete" : false ' is shown for all sign from 4 nodes.

Segmentation fault

Error:

MultiChain 2.0 alpha 5 Daemon (latest protocol 20004)

Retrieving blockchain parameters from the seed node frogchain.multidasher.org:8882 ...
Other nodes can connect to this node using:
multichaind [email protected]:8882

Listening for API requests on port 8881 (local only - see rpcallowip setting)

Node ready.

Segmentation fault (core dumped)

OS: Ubuntu 18.04

Version: Multichain 2.0.5

Params.dat file:

# ==== MultiChain configuration file ====

# Created by multichain-util 
# Protocol version: 20004 

# This parameter set is VALID. 
# To join network please run "multichaind frogchain".

# The following parameters can only be edited if this file is a prototype of another configuration file. 
# Please run "multichain-util clone frogchain <new-network-name>" to generate new network. 

# Basic chain parameters

chain-protocol = multichain             # Chain protocol: multichain (permissions, native assets) or bitcoin
chain-description = Drupal plus Blockchain FTW! # Chain description, embedded in genesis block coinbase, max 90 chars.
root-stream-name = root                 # Root stream name, blank means no root stream.
root-stream-open = true                 # Allow anyone to publish in root stream
chain-is-testnet = false                # Content of the 'testnet' field of API responses, for compatibility.
target-block-time = 60                  # Target time between blocks (transaction confirmation delay), seconds. (2 - 86400)
maximum-block-size = 8388608            # Maximum block size in bytes. (5000 - 1000000000)
maximum-chunk-size = 1048576            # Maximum chunk size for off-chain items in bytes. (256 - 16777216)
maximum-chunk-count = 1024              # Maximum number of chunks in one off-chain item. (16 - 2048)

# Global permissions

anyone-can-connect = true               # Anyone can connect, i.e. a publicly readable blockchain.
anyone-can-send = true                  # Anyone can send, i.e. transaction signing not restricted by address.
anyone-can-receive = true               # Anyone can receive, i.e. transaction outputs not restricted by address.
anyone-can-receive-empty = true         # Anyone can receive empty output, i.e. without permission grants, asset transfers and zero native currency.
anyone-can-create = false               # Anyone can create new streams.
anyone-can-issue = false                # Anyone can issue new native assets.
anyone-can-mine = false                 # Anyone can mine blocks (confirm transactions).
anyone-can-activate = false             # Anyone can grant or revoke connect, send and receive permissions.
anyone-can-admin = false                # Anyone can grant or revoke all permissions.
support-miner-precheck = true           # Require special metadata output with cached scriptPubKey for input, to support advanced miner checks.
allow-arbitrary-outputs = false         # Allow arbitrary (without clear destination) scripts.
allow-p2sh-outputs = true               # Allow pay-to-scripthash (P2SH) scripts, often used for multisig. Ignored if allow-arbitrary-outputs=true.
allow-multisig-outputs = true           # Allow bare multisignature scripts, rarely used but still supported. Ignored if allow-arbitrary-outputs=true.

# Consensus requirements

setup-first-blocks = 30                 # Length of initial setup phase in blocks, in which mining-diversity,
                                        # admin-consensus-* and mining-requires-peers are not applied. (1 - 31536000)
mining-diversity = 0.3                  # Miners must wait <mining-diversity>*<active miners> between blocks. (0 - 1)
admin-consensus-upgrade = 0.5           # <admin-consensus-upgrade>*<active admins> needed to upgrade the chain. (0 - 1)
admin-consensus-txfilter = 0.5          # <admin-consensus-txfilter>*<active admins> needed to approve filter in the chain. (0 - 1)
admin-consensus-admin = 0.5             # <admin-consensus-admin>*<active admins> needed to change admin perms. (0 - 1)
admin-consensus-activate = 0.5          # <admin-consensus-activate>*<active admins> to change activate perms. (0 - 1)
admin-consensus-mine = 0.5              # <admin-consensus-mine>*<active admins> to change mining permissions. (0 - 1)
admin-consensus-create = 0.0            # <admin-consensus-create>*<active admins> to change create permissions. (0 - 1)
admin-consensus-issue = 0.0             # <admin-consensus-issue>*<active admins> to change issue permissions. (0 - 1)

# Defaults for node runtime parameters

lock-admin-mine-rounds = 10             # Ignore forks that reverse changes in admin or mine permissions after this many mining rounds have passed. Integer only. (0 - 10000)
mining-requires-peers = true            # Nodes only mine blocks if connected to other nodes (ignored if only one permitted miner).
mine-empty-rounds = 10                  # Mine this many rounds of empty blocks before pausing to wait for new transactions. If negative, continue indefinitely (ignored if target-adjust-freq>0). Non-integer allowed. (-1 - 1000)
mining-turnover = 0.5                   # Prefer pure round robin between a subset of active miners to minimize forks (0.0) or random equal participation for all permitted miners (1.0). (0 - 1)

# Native blockchain currency (likely not required)

initial-block-reward = 64               # Initial block mining reward in raw native currency units. (0 - 1000000000000000000)
first-block-reward = 5000000            # Different mining reward for first block only, ignored if negative. (-1 - 1000000000000000000)
reward-halving-interval = 1051200       # Interval for halving of mining rewards, in blocks. (60 - 1000000000)
reward-spendable-delay = 60             # Delay before mining reward can be spent, in blocks. (1 - 100000)
minimum-per-output = 0                  # Minimum native currency per output (anti-dust), in raw units.
                                        # If set to -1, this is calculated from minimum-relay-fee. (-1 - 1000000000)
maximum-per-output = 100000000000000    # Maximum native currency per output, in raw units. (0 - 1000000000000000000)
minimum-offchain-fee = 0                # Minimum fee for publishing off-chain data items, per 1000 bytes, in raw units of native currency. (0 - 1000000000)
minimum-relay-fee = 0                   # Minimum transaction fee, per 1000 bytes, in raw units of native currency. (0 - 1000000000)
native-currency-multiple = 1000000      # Number of raw units of native currency per display unit. (0 - 1000000000)

# Advanced mining parameters

skip-pow-check = false                  # Skip checking whether block hashes demonstrate proof of work.
pow-minimum-bits = 8                    # Initial and minimum proof of work difficulty, in leading zero bits. (1 - 32)
target-adjust-freq = -1                 # Interval between proof of work difficulty adjustments, in seconds, if negative - never adjusted. (-1 - 4294967295)
allow-min-difficulty-blocks = false     # Allow lower difficulty blocks if none after 2*<target-block-time>.

# Standard transaction definitions

only-accept-std-txs = true              # Only accept and relay transactions which qualify as 'standard'.
max-std-tx-size = 4194304               # Maximum size of standard transactions, in bytes. (1024 - 100000000)
max-std-op-returns-count = 32           # Maximum number of OP_RETURN metadata outputs in standard transactions. (0 - 1024)
max-std-op-return-size = 2097152        # Maximum size of OP_RETURN metadata in standard transactions, in bytes. (0 - 67108864)
max-std-op-drops-count = 5              # Maximum number of OP_DROPs per output in standard transactions. (0 - 100)
max-std-element-size = 40000            # Maximum size of data elements in standard transactions, in bytes. (128 - 80000)

# The following parameters were generated by multichain-util.
# They SHOULD ONLY BE EDITED IF YOU KNOW WHAT YOU ARE DOING. 

default-network-port = 8882             # Default TCP/IP port for peer-to-peer connection with other nodes.
default-rpc-port = 8881                 # Default TCP/IP port for incoming JSON-RPC API requests.
chain-name = frogchain                  # Chain name, used as first argument for multichaind and multichain-cli.
protocol-version = 20004                # Protocol version at the moment of blockchain genesis.
network-message-start = f40970ad        # Magic value sent as the first 4 bytes of every peer-to-peer message.
address-pubkeyhash-version = 003336cf   # Version bytes used for pay-to-pubkeyhash addresses.
address-scripthash-version = 05ab711b   # Version bytes used for pay-to-scripthash addresses.
private-key-version = 80b016af          # Version bytes used for exporting private keys.
address-checksum-value = d45f27f8       # Bytes used for XOR in address checksum calculation.

# The following parameters were generated by multichaind.
# They SHOULD NOT BE EDITED. 

genesis-pubkey = 02da0ce4e279f432d7163d2b9241d6e1c31e5af2e969bc019477c53b33b9ed523f # Genesis block coinbase output public key.
genesis-version = 1                     # Genesis block version.
genesis-timestamp = 1539624963          # Genesis block timestamp.
genesis-nbits = 536936447               # Genesis block difficulty (nBits).
genesis-nonce = 140                     # Genesis block nonce.
genesis-pubkey-hash = e4043e4b65f2a263d12b3e0f619f05dc4e9cbfb1 # Genesis block coinbase output public key hash.
genesis-hash = 000cc30c163fe3b18d8bf4e4eab574689705b7cf3f81db9ae556263b10818692 # Genesis block hash.
chain-params-hash = 2f735951174ab2b9cd1c9e597d4e0d296a4c50c9dba9f554723b0f5d4642e19f # Hash of blockchain parameters, to prevent accidental changes.

Notes:
Chain contains a native currency, and has anyone-can-connect/send/receive set to true.

multichain-cli frogchain getinfo returns: error: couldn't connect to server

Node was started with multichaind frogchain i.e. not as a daemon.

Running the command again didn't give a segmentation fault.

Contribution Guide

I saw in an earlier issue that you guys were working on this but I wanted to check in on progress.

A couple of things that might be helpful would include:

  • What operating system / version are you developing on?
  • Using any IDE's and / or tools that are easy to set up with this project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.