Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

(Deprecated) Bitcoin Core 16.99 + BIPs 300/301 + Signet + Tools

License

Notifications You must be signed in to change notification settings

LayerTwo-Labs/mainchain-deprecated

 
 

Repository files navigation

This software is deprecated please see https://github.com/LayerTwo-Labs/bip300301_enforcer for the new version

Mainchain is an implementation of Bitcoin that extends it with Drivechain capabilities.

Drivechain (BIPs 300+301)

Drivechain allows Bitcoin to create, delete, send BTC to, and receive BTC from “Layer-2”s called “sidechains”. Sidechains are Altcoins that lack a native “coin” – instead, BTC must first be sent over.

BIP 300: https://github.com/bitcoin/bips/blob/master/bip-0300.mediawiki

BIP 301: https://github.com/bitcoin/bips/blob/master/bip-0301.mediawiki

Learn more about Drivechain here: http://drivechain.info

For an example sidechain implementation, see: https://github.com/LayerTwo-Labs/testchain

Building Mainchain

Mainchain is built and released for Linux, macOS and Windows. The only supported way of building Mainchain is through cross-compiling from Linux. If you only want to build node binaries, you can disable building the UI through passing NO_QT=1 to the make -C ./depends call. If the build crashes unexpectedly, try reducing the amount of concurrency by removing the -j parameter.

Linux

These instructions have been tested with Ubuntu 20.04 (Focal).

# install build dependencies 
$ sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils python3

# compile dependencies
$ make -C ./depends -j

# Compile binaries
$ ./autogen.sh
$ export CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site
$ ./configure
$ ./make -j

# binaries are located in src/drivechaind, src/drivechain-cli and src/qt/drivechain-qt

macOS

Building Mainchain requires a very old version of Ubuntu. A version that is known to work is 14.04 (Jerry). An old version of the macOS SDK is also required. For convenience, a Docker image is provided that has all the required build dependencies pre-installed. If you want to set up your local environment to match this, it is recommended to take a look at the Dockerfile that produced this image.

# start the Docker container that will build the binaries
$ docker run --rm -it \
    --workdir /mainchain -v $PWD:/mainchain \
    barebitcoin/mainchain-macos-builder bash


# from within the Docker container shell

# compile dependencies
$ make -C ./depends -j

# compile the binaries
$ export CONFIG_SITE=$PWD/depends/x86_64-apple-darwin11/share/config.site
$ ./autogen.sh
$ ./configure.sh
$ make -j

# binaries are located (on the host machine) 
# at src/mainchaind, src/mainchain-cli and src/qt/mainchain-qt

Windows

These instructions have been tested with Ubuntu 20.04 (Focal).

# install dependencies
$ sudo apt install g++-mingw-w64-x86-64 \
                build-essential libtool autotools-dev automake \
                libssl-dev libevent-dev \
                pkg-config bsdmainutils curl git \
                python3-setuptools python-is-python3 

# configure the Windows toolchain
$ sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix

# compile dependencies
$ make -C ./depends HOST=x86_64-w64-mingw32 -j

# compile the binaries
$ export CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site
$ ./autogen.sh
$ ./configure.sh
$ make -j

# binaries are located at src/mainchaind.exe, src/mainchain-cli.exe and
# src/qt/mainchain-qt.exe

License

Bitcoin Core (and Drivechain) are released under the terms of the MIT license. See COPYING for more information or see https://opensource.org/licenses/MIT.

About

(Deprecated) Bitcoin Core 16.99 + BIPs 300/301 + Signet + Tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 71.2%
  • Python 14.5%
  • C 8.5%
  • M4 2.2%
  • Makefile 1.3%
  • Shell 0.8%
  • Other 1.5%