X-CASH-official / xcash-core

πŸ“¦ First Cryptonote coin with public & private transactions, custom DPOS consensus
https://xcash.foundation
Other
66 stars 20 forks source link
blockchain dpos dpos-bft flexprivacy monero privacy-coin xcash
X-Cash Core [![Release](https://img.shields.io/github/v/release/X-CASH-official/xcash-core)](https://github.com/X-CASH-official/X-CASH/releases) [![Gitter](https://badges.gitter.im/xcash-foundation/xcash-core.svg)](https://gitter.im/xcash-foundation/xcash-core?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![chat](https://img.shields.io/discord/470575102203920395?logo=discord)](https://discordapp.com/invite/4CAahnd) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg?style=flat)](https://opensource.org/licenses/MIT)

X-Cash Core Blockchain

β›“ X-CASH is a community driven and open-source project developing the new standard of digital payment. Unique blockchain network with public and private transactions, custom DPOS consensus, and soon sidechains.

⚠ We are switching from CryptoNight PoW consensus algorithm to our own Delegated-Proof-of-Private-Stake (DPOPS) !
πŸ‘‰ Follow the development on the xcash-dpops repository.

Table of Content

Features

Based and improved upon the renowned CryptoNote protocol, X-Cash aims at becoming the standard in digital payment and transaction settlement:

FlexPrivacy

X-Cash proposes the flexibility to send a transaction privately or publicly, directly from your wallet by toggling a simple switch, without compromising your privacy.

Have a look at our πŸ“œ Hybrid Transactions' yellow paper to learn more about the technology behind it.

Delegated Proof of Private Stake (DPOPS)

To tackle scalability and future upgrades while reducing the energy comsuption of the network, we are developing a customized and unique DPOS consensus that can be implemented in any privacy coin.

Interested ? Read more about our πŸ“œ Delegated Proof-of-Private-Stake yellow paper to learn more about the technical challenge of integrating this consensus on a Monero-based privacy coin.

Sidechains

Delegates will be able to host sidechains on the X-Cash network, providing an easy, secured, economical and customizable blockchain solution to match your project needs.

License

X-Cash is an open-source project managed by the X-Cash Foundation.
We are operating under the MIT License.

Contributing

Thank you for thinking of contributing! πŸ˜ƒ
If you want to help out, check CONTRIBUTING for a set of guidelines and check our opened issues.

Documentation

We are hosting our documentation on GitBook πŸ‘‰ docs.xcash.foundation

You can contribute directly on our gitbook-docs repository.

Security

If you discover a security vulnerability, please send an e-mail to security@xcash.foundation.
All security vulnerabilities concerning the X-Cash blockchain will be promply addressed.

Installation

Dependencies

The following table summarizes the tools and libraries required to build.
A few of the libraries are also included in this repository (marked as "Vendored").

By default, the build uses the library installed on the system, and ignores the vendored sources. However, if no library is found installed on the system, then the vendored source will be built and used. The vendored sources are also used for statically-linked builds because distribution packages often include only shared library binaries (.so) but not static library archives (.a).

If you need to build statically linked linux binaries, please refer to Build Statically Linked Linux Binaries guide before you install any packages

Dep Min. version Vendored Debian/Ubuntu pkg Arch pkg Fedora Optional Purpose
GCC 4.7.3 NO build-essential base-devel gcc NO
CMake 3.0.0 NO cmake cmake cmake NO
pkg-config any NO pkg-config base-devel pkgconf NO
Boost 1.58 NO libboost-all-dev boost boost-devel NO C++ libraries
OpenSSL basically any NO libssl-dev openssl openssl-devel NO sha256 sum
libzmq 3.0.0 NO libzmq3-dev zeromq cppzmq-devel NO ZeroMQ library
libunbound 1.4.16 YES libunbound-dev unbound unbound-devel NO DNS resolver
libsodium ? NO libsodium-dev ? libsodium-devel NO libsodium
libminiupnpc 2.0 YES libminiupnpc-dev miniupnpc miniupnpc-devel YES NAT punching
libunwind any NO libunwind8-dev libunwind libunwind-devel YES Stack traces
liblzma any NO liblzma-dev xz xz-devel YES For libunwind
libreadline 6.3.0 NO libreadline6-dev readline readline-devel YES Input editing
ldns 1.6.17 NO libldns-dev ldns ldns-devel YES SSL toolkit
expat 1.1 NO libexpat1-dev expat expat-devel YES XML parsing
GTest 1.5 YES libgtest-dev^ gtest gtest-devel YES Test suite
Doxygen any NO doxygen doxygen doxygen YES Documentation
Graphviz any NO graphviz graphviz graphviz YES Documentation
pcsclite ? NO libpcsclite-dev ? pcsc-lite pcsc-lite-devel NO Ledger

^ On Debian/Ubuntu, libgtest-dev only includes sources and headers. You must build the library binary manually. This can be done with the following command:

sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake . && sudo make && sudo mv libg* /usr/lib/

Note: If you want to build with unit test (make instead of make release) you need libgtest to be compiled with fPIC. To do this, install libgtest using your package manager then run the following command to rebuild using fPIC:

cd /usr/src/gtest && sudo sed -i 's/CMAKE_CXX_FLAGS:STRING=/CMAKE_CXX_FLAGS:STRING=-fPIC/g' CMakeCache.txt && sudo sed -i 's/CMAKE_C_FLAGS:STRING=/CMAKE_C_FLAGS:STRING=-fPIC/g' CMakeCache.txt && sudo cmake . && sudo make && sudo mv libg* /usr/lib/

Cloning the repository

$ git clone https://github.com/X-CASH-official/xcash-core

Build instructions

X-CASH uses the CMake build system and a top-level makefile that invokes cmake commands as needed.

Linux and OS X

cd X-CASH
make

Optional: If your machine has several cores and enough memory, enable parallel build by running make -j<number of threads> instead of make.
For this to be worthwhile, the machine should have one core and about 2GB of RAM available per thread.

Note: If cmake can not find zmq.hpp file on OS X, installing zmq.hpp from https://github.com/zeromq/cppzmq to /usr/local/include should fix that error.

Note: core_tests test may take a few hours to complete.

Dependencies need to be built with -fPIC. Static libraries usually aren't, so you may have to build them yourself with -fPIC.
Refer to their documentation for how to build them, as well as refer to the Build Statically Linked Linux Binaries guide

Build Statically Linked Linux Binaries

Note: this guide is only for Ubuntu

Windows

Binaries are built on Windows using the MinGW toolchain within MSYS2 environment. The MSYS2 environment emulates a POSIX system. The toolchain runs within the environment and cross-compiles binaries that can run outside of the environment as a regular Windows application.

Preparing the build environment
Building

Building portable binaries

By default, in either dynamically or statically linked builds, binaries target the specific host processor on which the build happens and are not portable to other processors.

Build commands:
# Build binaries on Linux on x86_64 portable across POSIX systems on x86_64 processors
make release-static-linux-x86_64

# Builds binaries on Linux on x86_64 or i686 portable across POSIX systems on i686 processors
make release-static-linux-i686

# Builds binaries on Linux portable across POSIX systems on armv8 processors
make release-static-linux-armv8

# Builds binaries on Linux portable across POSIX systems on armv7 processors
make release-static-linux-armv7

# Builds binaries on Linux portable across POSIX systems on armv6 processors
make release-static-linux-armv6

# Builds binaries on 64-bit Windows portable across 64-bit Windows systems
make release-static-win64

# Builds binaries on 64-bit or 32-bit Windows portable across 32-bit Windows systems
make release-static-win32

Running xcashd daemon

The build places the binary in bin/ sub-directory within the build directory from which cmake was invoked (repository root by default). To run in foreground:

./bin/xcashd

To list all available options, run:

./bin/xcashd --help

Options can be specified either on the command line or in a configuration file passed by the --config-file argument. To specify an option in the configuration file, add a line with the syntax argumentname=value, where argumentname is the name of the argument without the leading dashes, for example log-level=1.

To run in background:

./bin/xcashd --log-file xcashd.log --detach

To run as a systemd service, copy xcashd.service to /etc/systemd/system/ and xcashd.conf to /etc/. The example service assumes that the user xcash exists and its home is the data directory specified in the example config.

If you're on Mac, you may need to add the --max-concurrency 1 option to xcash-wallet-cli, and possibly xcashd, if you get crashes refreshing.

Important Links

πŸ”— MAIN LINKS

πŸ‘› WALLET

πŸ’± SUPPORTED EXCHANGES

🌍 COMMUNITY