GetBlok-io / miningcore

Miningcore is a high-performance Mining Pool Software for Linux and Windows maintained by GetBlok.io
https://www.getblok.io
MIT License
2 stars 1 forks source link

Build status [license]()

Features

Support

GetBlok.io is a maintainer of this code base, implemented in the GetBlok.io world-wide pools. Support is provided "as-is" for no cost. You may visit the following channels to engage with us, as well as by GitHub issues and discussion channels:

PLEASE OPEN ISSUES IF YOU FIND A BUG

We are actively working on bringing the code base up to date: Issues

Running Miningcore

Linux: pre-built binaries

Windows: pre-built binaries

Database setup

Miningcore currently requires PostgreSQL 10 or higher.

Create the database:

$ createuser miningcore
$ createdb miningcore
$ psql (enter the password for postgres)

Inside psql execute:

alter user miningcore with encrypted password 'some-secure-password';
grant all privileges on database miningcore to miningcore;

Import the database schema:

$ wget https://raw.githubusercontent.com/coinfoundry/miningcore/master/src/Miningcore/Persistence/Postgres/Scripts/createdb.sql
$ psql -d miningcore -U miningcore -f createdb.sql

Advanced setup

If you are planning to run a Multipool-Cluster, the simple setup might not perform well enough under high load. In this case you are strongly advised to use PostgreSQL 11 or higher. After performing the steps outlined in the basic setup above, perform these additional steps:

WARNING: The following step will delete all recorded shares. Do NOT do this on a production pool unless you backup your shares table using pg_backup first!

$ wget https://raw.githubusercontent.com/coinfoundry/miningcore/master/src/Miningcore/Persistence/Postgres/Scripts/createdb_postgresql_11_appendix.sql
$ psql -d miningcore -U miningcore -f createdb_postgresql_11_appendix.sql

After executing the command, your shares table is now a list-partitioned table which dramatically improves query performance, since almost all database operations Miningcore performs are scoped to a certain pool.

The following step needs to performed once for every new pool you add to your cluster. Be sure to replace all occurences of mypool1 in the statement below with the id of your pool from your Miningcore configuration file:

CREATE TABLE shares_mypool1 PARTITION OF shares FOR VALUES IN ('mypool1');

Once you have done this for all of your existing pools you should now restore your shares from backup.

Configuration

Please refer to this Wiki Page: https://github.com/coinfoundry/miningcore/wiki/Configuration

Building from Source

Building on Ubuntu 20.04

$ wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
$ sudo apt-get update
$ sudo apt-get install -y apt-transport-https
$ sudo apt-get update
$ sudo apt-get -y install dotnet-sdk-5.0 git cmake build-essential libssl-dev pkg-config libboost-all-dev libsodium-dev libzmq5
$ git clone https://github.com/coinfoundry/miningcore
$ cd miningcore/src/Miningcore
$ dotnet publish -c Release --framework net5.0  -o ../../build

Building on Windows

Download and install the .NET 5 SDK

> git clone https://github.com/coinfoundry/miningcore
> cd miningcore/src/Miningcore
> dotnet publish -c Release --framework net5.0  -o ..\..\build

Building on Windows - Visual Studio

After successful build

Create a configuration file config.json as described here

$ cd ../../build
$ Miningcore -c config.json

Supported Currencies

Refer to this file for a complete list.

Caveats

Monero

ZCash

Ethereum

Vertcoin

API

Miningcore comes with an integrated REST API. Please refer to this page for instructions: https://github.com/coinfoundry/miningcore/wiki/API

Running a production pool

A public production pool requires a web-frontend for your users to check their hashrate, earnings etc. Miningcore does not include such frontend but there are several community projects that can be used as starting point.

Donations

This software does not include automatic donation. If you wish to contribute to the cause, please contact us at info@getblok.io or donate to the following wallets