Coder Social home page Coder Social logo

karbo's Introduction

Build check

This is the alternative version of Karbo codebase, compatible on P2P layer, however Karbo 1 wallets are incompatible with Karbo 2 nodes (built from this repo) and vice versa. In other words don't use Karbo node v. 2.*.* in wallets v. 1.*.* and Karbo nodes v. 1.*.* in wallets v. 2.*.*.

The Karbo (Karbovanets) is cryptocurrency of Ukrainian origin, just like Bitcoin but more anonymous and privacy centric with opaque and more analysis resistant blockchain. It is people's electronic cash, not connected to government or officials.

Building Karbo

On *nix

Dependencies: GCC 4.7.3 or later, CMake 2.8.6 or later, and Boost 1.55 or later.

You may download them from:

Alternatively, it may be possible to install them using a package manager.

To build, change to a directory where this file is located, and run make.

or

Run these commands:

cd ~
sudo apt-get install build-essential git cmake libboost-all-dev
git clone https://github.com/seredat/karbowanec.git
cd karbowanec
mkdir build
cd build
cmake ..
cd ..
make

The resulting executables can be found in build/release/src.

Advanced options:

  • Parallel build: run make -j<number of threads> instead of make.
  • Debug build: run make build-debug.
  • Test suite: run make test-release to run tests in addition to building. Running make test-debug will do the same to the debug version.
  • Building with Clang: it may be possible to use Clang instead of GCC, but this may not work everywhere. To build, run export CC=clang CXX=clang++ before running make.

On Windows

Dependencies: MSVC 2013 or later, CMake 2.8.6 or later, and Boost 1.55. You may download them from:

To build, change to a directory where this file is located, and run theas commands:

mkdir build
cd build
cmake -G "Visual Studio 15 Win64" ..

And then do Build. Good luck!

Building for macOS

Dependencies: cmake boost and Xcode

Download Xcode from the App store and the Xcode command line tools with xcode-select --install For the other we recommand you to use Homebrew

Continue with:

brew install git cmake boost
git clone https://github.com/seredat/karbowanec.git
cd karbowanec
cd build
cmake ..
make

Building for Android on Linux

Set up the 32 bit toolchain Download and extract the Android SDK and NDK

android-ndk-r15c/build/tools/make_standalone_toolchain.py --api 21 --stl=libc++ --arch arm --install-dir /opt/android/tool32

Download and setup the Boost 1.65.1 source

wget https://sourceforge.net/projects/boost/files/boost/1.65.1/boost_1_65_1.tar.bz2/download -O boost_1_65_1.tar.bz2
tar xjf boost_1_65_1.tar.bz2
cd boost_1_65_1
./bootstrap.sh

apply patch from external/boost1_65_1/libs/filesystem/src

Build Boost with the 32 bit toolchain

export PATH=/opt/android/tool32/arm-linux-androideabi/bin:/opt/android/tool32/bin:$PATH
./b2 abi=aapcs architecture=arm binary-format=elf address-model=32 link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-context --with-coroutine --with-atomic --build-dir=android32 --stagedir=android32 toolset=clang threading=multi threadapi=pthread target-os=android --reconfigure stage

Build Karbo for 32 bit Android

mkdir -p build/release.android32
cd build/release.android32
CC=clang CXX=clang++ cmake -D BUILD_TESTS=OFF -D ARCH="armv7-a" -ldl -D STATIC=ON -D BUILD_64=OFF -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D BUILD_TAG="android" -D BOOST_ROOT=/opt/android/boost_1_65_1 -D BOOST_LIBRARYDIR=/opt/android/boost_1_65_1/android32/lib -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON ../..
make SimpleWallet

karbo's People

Contributors

aivve avatar amjuarez avatar ekimmo avatar fourschaft avatar gregmeszaros avatar karboduck avatar lastick avatar noodledoodlenoodledoodlenoodledoodlenoo avatar pmitchev avatar quazarcoin avatar r3volut1oner avatar trendscharts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

karbo's Issues

Fix dynamic difficulty-driven fee

The dynamically adjusting fee based on difficulty needs to be fixed and need to take into account possible POW change #21.

Now it uses an all-time avg. difficulty as a reference difficulty whereas it should use some selected difficulty at the point of time with the desired price to calculate the corresponding fee.

If new POW algo is introduced, this all-time difficulty will not be relevant.

Moreover, this all-time average difficulty is not from the initial equation F = S * A / D from whitepaper where, F​ — minimum transaction fee in native currency, KRB; S​ — starting fee in fiat equivalent, USD; A​ — Average difficulty constant, corresponding to the chosen level of fiat price; D​ — Current difficulty.

Transaction multi-signature validation looks not finished.

Transaction multi-signature validation looks not finished.

Because output is not filled and has zero values condition on line 569 will be always true and validation always gonna fail.

if (outputKeyIndex == output.keys.size()) {

CryptoNote::MultisignatureOutput output;
size_t inputSignatureIndex = 0;
size_t outputKeyIndex = 0;
while (inputSignatureIndex < in.signatureCount) {
if (outputKeyIndex == output.keys.size()) {
m_validationResult.errorCode = CryptoNote::error::TransactionValidationError::INPUT_INVALID_SIGNATURES;
m_validationResult.errorMessage = "Transaction has input with invalid signature";
return false;
}

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.