Giter Club home page Giter Club logo

safexcore's Introduction

Safex Project

Releases

Network has performed hard fork 6 with Fix for token overflow issue, Wallet fix and other bug fixes. Current hard fork ready release of Ubuntu, Windows and Mac safexd node binaries and source code is available here.

Build Instructions

MacOS

Check if you have Developer Tools Installed

$ xcode-select -p

If you don't have Developer Tools, install it. If you do, skip this step

$ xcode-select --install

Clone the git repository with recursive

$ git clone --recursive https://github.com/safex/safexcore.git

Go into safexcore folder

$ cd safexcore

Check if brew is installed

$ which brew

If you don't have brew installed, install it. If you have it, skip this step

$ brew install wget

Install all libraries

$ brew tap jmuncaster/homebrew-header-only
$ brew install cmake boost zmq czmq zeromq jmuncaster/header-only/cppzmq openssl pkg-config protbuf

You will need to have MacPorts installed. If you don't have it install it from here https://guide.macports.org/. Download the package for your OS version from the website. Open new terminal window and check if MacPorts are installed

$ port version

If the installation was successful, install readline using MacPorts

$ sudo port install readline

Build it and insert the number of cores you have

$ make -j<Your number of cores> debug-all

If you want to build safexd with protobuf support you need to install protobuf build dependency by starting install_protobuf_dep_macos.sh

Ubuntu 18.04

A one liner for installing all dependencies on Ubuntu 18.04 is

$ sudo apt update && sudo apt install build-essential cmake pkg-config \
    libboost-all-dev libssl-dev libzmq3-dev libunbound-dev libminiupnpc-dev \
    libunwind8-dev liblzma-dev libreadline6-dev libldns-dev libexpat1-dev \
    libgtest-dev doxygen graphviz libpcsclite-dev libprotobuf-dev

To build a debug version run:

make -j <Your number of cores> debug-all > build.log

to use all cores.

To build a release version run:

make -j <Your number of cores> release-all > build.log

to use all cores.

Docker

    # Build using all available cores
    docker build -t safex . > docker_build.log

    # or build using a specific number of cores (reduce RAM requirement)
    docker build --build-arg NPROC=1 -t safex . > docker_build.log

    # either run in foreground
    docker run -it -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 safex

    # or in background
    docker run -it -d -v /monero/chain:/root/.bitmonero -v /monero/wallet:/wallet -p 18080:18080 safex

Testing

To test the code, run:

$ cd build/debug/tests
$ ctest -j <Your number of cores> -VV > tests.log

On Windows:

Binaries for Windows 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

  • Download and install the MSYS2 installer, either the 64-bit or the 32-bit package, depending on your system.

  • Open the MSYS shell via the MSYS2 MSYS shortcut

  • Update packages using pacman:

      pacman -Syuu
    
  • Exit the MSYS shell using Alt+F4

  • Start MSYS2 MinGW 64-bit shell and update packages again using pacman:

      pacman -Syuu
    
  • Install dependencies:

    To build for 64-bit Windows:

      pacman -S mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium
    

    To build for 32-bit Windows:

      pacman -S mingw-w64-i686-toolchain make mingw-w64-i686-cmake mingw-w64-i686-boost mingw-w64-i686-openssl mingw-w64-i686-zeromq mingw-w64-i686-libsodium
    

    To install protobuf dependency on MinGW: Go to external/ folder and run ./install_protobuf_dep_mingw.sh.

  • Open the MingW shell via MSYS2 MinGW 64-bit shortcut on 64-bit Windows or MSYS2 MinGW 32-bit shortcut on 32-bit Windows. Note that if you are running 64-bit Windows, you will have both 64-bit and 32-bit MinGW shells.

Cloning

  • To git clone, run:

      git clone --recursive https://github.com/safex/safexcore.git
    

Building

  • Change to the cloned directory, run:

      cd safexcore
    
  • If you would like a specific version/tag, do a git checkout for that version. eg. 'v0.1.0'. If you don't care about the version and just want binaries from master, skip this step:

      git checkout
    
  • If you are on a 64-bit system, run:

      make release-static-win64
    
  • If you are on a 32-bit system, run:

      make release-static-win32
    
  • The resulting executables can be found in build/release/bin

Running

Built binaries are located in build/debug/bin and/or build/release/bin, depending upon which build was used. To run Ubuntu 18.04 statically built binaries on another machine, libnorm1 and libpcsclite1 libraries must be installed.

To run the node:

$ ./build/debug/bin/safexd --testnet

To run the wallet:

$ /path/to/binaries/safex-wallet-cli --testnet <other wallet parameters>

To list all wallet parameters use:

$ /path/to/binaries/safex-wallet-cli --testnet --help




Copyright (c) 2018 The Safex Project.

Portions Copyright (c) 2014-2018 The Monero Project.

Portions Copyright (c) 2012-2013 The Cryptonote developers.

safexcore's People

Contributors

atanmarko avatar vangrx avatar razgadjanje avatar ddabek avatar stefanisidorovic avatar moneromooo-monero avatar zarnoevic avatar stoffu avatar kiu0612 avatar denpamusic avatar cool-pool avatar dhniels avatar gene-telligent avatar kaca-1212 avatar aivve avatar anonimal avatar aussiesloth avatar m2049r avatar moneroexamples avatar

Watchers

James Cloos avatar

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.