Skip to content

truthcoin/truthcoin-cpp

 
 

Repository files navigation

This project is succeeded by Hivemind – Truthcoin implemented as a Bitcoin sidechain – where Bitcoin can be used to participate in a peer-to-peer prediction marketplace.

bitcoinhivemind.com →

Hivemind on GitHub →


Truthcoin Core integration/staging tree

Build Status

This is the actual implementation of the theoretical work here.

For an immediately useable, binary version of the Truthcoin Core software, visit the dev page.

Status: Pre-Alpha. Unless you're a blockchain-elite, you should probably go away (or stick to reading).

What is Truthcoin?

Truthcoin is an ambitious modification of Bitcoin, which extends Bitcoin's abilities (to send an receive value-tokens) by adding the ability to create and participate in markets for event derivatives ("prediction markets").

Although substantially more complex, Truthcoin offers correspondingly substantial benefits, having potentially world-changing implications for science, taxation, corporate governance and politics.

Truthcoin includes two types of value-token. One, "CashCoin", is used for storing value, buying/selling in markets and paying transaction fees to miners. This coin will resemble Bitcoin-testnet-money (an "Altcoin") for the duration of pre-release testing, and will then be a sidechain of Bitcoin. Therefore, the network will "accept" Bitcoin (indeed, this will be the only currency the network accepts). The second (less important) token, "VoteCoin", is used to track a smaller group of special users and reward them for providing reports to the blockchain on the status of the bet-upon events.

License

Truthcoin Core is released under the terms of the MIT license. See COPYING for more information or see http://opensource.org/licenses/MIT.

Current Install Instructions

To compile on Debian 64-bit Precise for Linux, Windows and Mac, see the Gitian build instructions in /doc.

To compile on Ubuntu 14.04:

# Install Git
sudo apt-get install git

# Download Truthcoin
git clone https://github.com/psztorc/truthcoin-cpp.git

# (permission is required)
# Username:
XXXXXXX
# Personal Access Token:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# Download Build Essential
sudo apt-get install build-essential

# Download BerkeleyDB (note that Ubuntu's BDB 5.1 is not backwards compatible).
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz' | sha256sum -c
# db-4.8.30.NC.tar.gz: OK

# Install BerkelyDB
tar -xvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix
mkdir -p build
BDB_PREFIX=$(pwd)/build
../dist/configure --disable-shared --enable-cxx --with-pic --prefix=$BDB_PREFIX
make install
cd ../..

# Install Remaining Dependencies
sudo apt-get install autoconf libboost-all-dev libssl-dev libtool libdb++-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev 


# Install Truthcoind (no GUI)
cd truthcoin-cpp/src/
make truthcoind
make truthcoin-cli

# # Install Truthcoin
# cd truthcoin-cpp
# ./autogen.sh
# ./configure --with-incompatible-bdb
# make
# make install # optional

Testing

Automated Testing

Developers are strongly encouraged to write unit tests for new code, and to submit new unit tests for old code. Unit tests can be compiled and run (assuming they weren't disabled in configure) with: make check

Manual Quality Assurance (QA) Testing

Large changes should have a test plan, and should be tested by somebody other than the developer who wrote the code. See https://github.com/truthcoin/QA/ for how to create a test plan.

Packages

No packages published

Languages

  • C++ 76.4%
  • C 12.7%
  • Python 4.1%
  • M4 2.8%
  • Makefile 1.7%
  • HTML 1.0%
  • Other 1.3%