/metaverse

The metaverse blockchain service and command-line tools in C++ 14 implementation

Primary LanguageC++GNU Affero General Public License v3.0AGPL-3.0

Metaverse Core Integration/staging Tree

Build Status AGPL v3

Introduction

Metaverse(MVS) is a decentralised system based on the blockchain technology, through which, a network of smart properties, digital identities and value intermediators are established.

Metaverse on Blockchain Development Path:

dev-path

Metaverse Features:

MVS Project

MVS is implemented based on libbitcoin project.

Further Read: Documents

Build MVS

Compiler requirements

Compilier Minimum Version
gcc/g++ 5.0
clang++ 3.4 (8.0.0)
MSVC 19.0 (VS2015)

C++ compiler support C++14. Using c++ -v to check c++ version.

Dependencies of MVS are static linked (including libstdc++). Thus, there is no extra dependency after compilation. Recommends Ubuntu 16.04/CentOS 7.2/Visual Studio 2015 to develop/debug/build MVS.

Toolchain requirements

  • cmake 3.0+
  • git
  • automake (speck256k1/ZeroMQ required)
$ yum/brew/apt-get install git cmake
$ yum/brew/apt-get install autoconf automake libtool pkg-config

Build MVS

$ git clone https://github.com/mvs-org/metaverse.git
$ cd metaverse && mkdir build && cd build
$ cmake ..
$ make -j4
$ make install

If you do not need UPnP support, you can use "cmake -DUSE_UPNP=OFF .." to disable it.

optional:

$ make test (should install boost_unit_test_framework)
$ make doc  (should install doxygen and graphviz)

Needs to configure Library Dependencies firstly.

Library Dependencies

Installing by bash script (sudo required).

$ sudo ./install_dependencies.sh

By default, ./install_dependencies.sh will install ZeroMQ secp256k1.
You can install more by specify arguments, for example:

# --build-upnpc is needed is you want UPnP supporting.
$ sudo ./install_dependencies.sh --build-boost --build-upnpc

boost 1.56+

$ sudo yum/brew/apt-get install libboost-all-dev

If build boost manually, please download tar ball HERE.

Odder than v0.7.3 code && boost 1.59/1.6x: issue on json_parser 'placeholders::_1'

ZeroMQ 4.2.1+

Modules server/explorer required.

$ wget https://github.com/zeromq/libzmq/releases/download/v4.2.1/zeromq-4.2.1.tar.gz
$ tar -xzvf zeromq-4.2.1.tar.gz
$ cd zeromq-4.2.1
$ ./autogen.sh
$ ./configure
$ make -j4
$ sudo make install && sudo ldconfig

secp256k1

Modules blockchain/database required.

$ git clone https://github.com/mvs-live/secp256k1
$ cd secp256k1
$ ./autogen.sh
$ ./configure --enable-module-recovery
$ make -j4
$ sudo make install && sudo ldconfig

Sometimes we may meet the following compile error

undefined reference to '__gmpn_sub_n' ...

we may disable bignum in secp256k1 in this situation, use

$ ./configure --enable-module-recovery --with-bignum=no

and see more information here #issue209

miniupnpc

Modules blockchain/network with UPnP function required.

$ wget http://miniupnp.tuxfamily.org/files/miniupnpc-2.0.tar.gz
$ tar -xzvf miniupnpc-2.0.tar.gz
$ cd miniupnpc-2.0
$ make -j4
$ sudo INSTALLPREFIX=/usr/local make install && sudo ldconfig

Run MVS

After MVS is built successfully, there are two executable files in the bin directory:

  • mvsd - server program
    Runs a full metaverse node in the global peer-to-peer network.

  • mvs-cli - client program
    Sent your request to the server, the server will process it and return response to your client.

Go to bin diretory, and run the program. More information please reference to Command line usage and Configuration file.

$ cd bin
$ ./mvsd
$ ./mvs-cli $command $params $options

Build/Run in docker

Preparation

Install Docker.

wget qO https://get.docker.com/ | sh

Build metaverse image

git clone https://github.com/mvs-org/metaverse.git
cd metaverse
docker build -t metaverse -f Dockerfile .

Where is your built image? It’s in your machine’s local Docker image registry:

docker images

Run && Test

Start docker container

docker run -p 8820:8820 metaverse

Test

curl -X POST --data '{"jsonrpc":"2.0","method":"getinfo","params":[],"id":25}' http://127.0.0.1:8820/rpc/v2

Execute mvs-cli commands

Run mvs-cli commands via docker exec command. Example:

docker exec metaverse mvs-cli getinfo