Skip to content

Latest commit

 

History

History
203 lines (172 loc) · 9.38 KB

README.md

File metadata and controls

203 lines (172 loc) · 9.38 KB

Documentation | Guides | News

Twitter AGPL License Version Build Status Quality Gate Status

Credits Node

A node is a client-side application that is installed on the user equipment. The Node processes and stores transactions, executes and confirms smart contract rules requests processing from third-party systems and provides data when requested. Written on C++.

Version

Current node version 4.2.532.0

What is Credits Node?

Credits Node is the main module that provide an opportunity to run a node and participate in CREDITS blockhain network. The node performs processing and storage of transactions, execution and confirmation of the terms of smart contracts, processing requests from third-party systems, and provides data upon request. Each node on the network has the same functionality. The node consists of the following elements:

  • API
  • Desision-making module(Solver)
  • Storage(CSDB)
  • Transport protocol

Build dependencies

  • Boost 1.70 or newest static prebuild
  • Compiler with C++17 support
  • Cmake 3.11 or newest
  • Requirements fo building Apache Thrift
  • The building Berkeley DB distribution uses the Free Software Foundation's autoconf and libtool tools to build on UNIX platforms.
  • It is necessary to run in the terminal, which sets the environment variables for building a Visual Studio project For Windows:

    git clone https://github.com/CREDITSCOM/node.git
    cd node
    git submodule update --init --recursive
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release -A x64 ..
    cmake --build . --target ALL_BUILD --config Release

    If necessary, full step-by-step instruction for Windows:

    # Install cmake
    # After install you can try to run in command line version check:
    cmake --version
    # If installation was successful, the result will be like:
    cmake version 3.17.0-rc1
    # Install git, check the version the same way:
    git --version
    # and result result:
    git version 2.33.0.windows.2
    # Install Visual Studio, as result you can rut it
    # FLEX&BISON usually are installed automatically with Visual Studio and are not necessary to install yourself
    # DO NOT TRY TO INSTALL IT SEPARATELY IF IT ISN'T NECESSARY, IT CAN PREVENT YOU FROM CORRECT NODE BUILDING PROCESS
    # Check is made the same way by requesting Software version. System should give the correct answer.
    # Install boost from 1.68.0 to 1.72.0:
    wget -c $https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
    # or just load with your browser
    # unzip with any archiver, you prefer and go to directory:
    cd boost_1_72_0
    ./bootstrap.sh
    ./b2 --build-type=complete link=static threading=multi $runtime-link=static --layout=tagged install --prefix=../boost
    # do not forget to add BOOST_ROOT to your SYSTEM VARIABLES and set the value pointing your BOOST directory C:\boost\boost_1_72_0
    # Check it:
    echo %BOOST_ROOT%
    # Result: boost root variable value
    # and add the directories of boost-root and boost-libs to your SYSTEM PATHS like that:
    # C:\boost\boost_1_72_0
    # C:\boost\boost_1_72_0\stage\lib
    # Now you are ready to get node repository and build it:
    git clone https://github.com/CREDITSCOM/node.git
    cd node
    git submodule update --init --recursive
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release -A x64 ..
    cmake --build . --target ALL_BUILD --config Release

    For Linux:

    git clone https://github.com/CREDITSCOM/node.git
    cd node
    git submodule update --init --recursive
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make -j4

    If necessary, full step-by-step instruction for Linux:

    Update repos and install required package

    sudo apt update
    apt upgrade -y
    sudo apt install build-essential libssl-dev autoconf -y
    sudo apt install flex bison libtool -y

    Create build directory

    mkdir csbuild
    d csbuild

    Update gcc g++ (there is no need to update in version of Ubuntu 20 and later)

    sudo apt install gcc-8 g++-8 -y
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
    gcc --version
    gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

    Update cmake to latest version

    wget -c https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0.tar.gz
    tar zxfv cmake-3.17.0.tar.gz
    cd cmake-3.17.0
    ./bootstrap
    make
    sudo make install
    cd ..

    Install boost

    wget -c $https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.gz
    tar zxfv boost_1_72_0.tar.gz
    cd boost_1_72_0
    ./bootstrap.sh
    ./b2 --build-type=complete link=static threading=multi $runtime-link=static --layout=tagged install --prefix=../boost
    export PATH=~/csbuild/boost:$PATH
    export BOOST_ROOT=~/csbuild/boost
    cd ..

    Build node

    git clone https://github.com/CREDITSCOM/node.git
    cd node
    git submodule update --init --recursive
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make -j2

    System requirements:

    Minimum system requirements:

    Operating system: Windows® 7 / Windows® 8 / Windows® 10 64-bit (with the last update package) Processor (CPU): with frequency of 1 GHz (or faster) with PAE, NX and SSE2 support; Memory (RAM): 8 Gb HDD: 600Gb Internet connection: 3 Mbit/s.

    Recommended system requirements:

    Operating system: Windows® 7 / Windows® 8 / Windows® 10 64-bit (with the last update package) Processor (CPU): Intel® Core ™ i3 or AMD Phenom ™ X3 8650 Memory (RAM): 8 Gb HDD: 3 Tb Internet connection: 5 Mbit/s.

    Contribution

    Thank you for considering to help out with the source code! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes! If you'd like to contribute to Credits Node, please fork, fix, commit and send a pull request for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check up with the core devs first on our Developers portal and Contribution file to ensure those changes are in line with the general philosophy of the project and/or get some early feedback which can make both your efforts much lighter as well as our review and merge procedures quick and simple. Please make sure your contributions adhere to our coding guidelines:

    • Code must adhere to the Credits coding style
    • Pull requests need to be based on and opened against the master branch
    • Commit messages should be prefixed with the package(s) they modify

    Resources

    CREDITS Website

    Documentation

    Whitepaper

    Technical paper

    Developers portal

    Community links

    <