{"id":13577122,"url":"https://github.com/oliverw/miningcore","last_synced_at":"2025-09-29T15:31:52.742Z","repository":{"id":37429465,"uuid":"102474706","full_name":"oliverw/miningcore","owner":"oliverw","description":"Miningcore is a high-performance Mining Pool Software for Linux and Windows.","archived":true,"fork":false,"pushed_at":"2023-09-02T12:10:50.000Z","size":36405,"stargazers_count":719,"open_issues_count":64,"forks_count":658,"subscribers_count":88,"default_branch":"master","last_synced_at":"2024-09-27T12:20:55.741Z","etag":null,"topics":["bitcoin","crypto","digibyte","dogecoin","ergo","ethereum","litecoin","mining","mining-pools","monero"],"latest_commit_sha":null,"homepage":"https://store.miningcore.pro","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oliverw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["oliverw"]}},"created_at":"2017-09-05T11:47:43.000Z","updated_at":"2024-09-24T07:18:11.000Z","dependencies_parsed_at":"2023-02-11T00:15:22.568Z","dependency_job_id":"8a301430-3ab3-4a1b-8b80-59dbab29cdbd","html_url":"https://github.com/oliverw/miningcore","commit_stats":null,"previous_names":[],"tags_count":65,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverw%2Fminingcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverw%2Fminingcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverw%2Fminingcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oliverw%2Fminingcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oliverw","download_url":"https://codeload.github.com/oliverw/miningcore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234635403,"owners_count":18864077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","crypto","digibyte","dogecoin","ergo","ethereum","litecoin","mining","mining-pools","monero"],"created_at":"2024-08-01T15:01:18.261Z","updated_at":"2025-09-29T15:31:50.503Z","avatar_url":"https://github.com/oliverw.png","language":"C","readme":"[![Build status](https://ci.appveyor.com/api/projects/status/nbvaa55gu3icd1q8?svg=true)](https://ci.appveyor.com/project/oliverw/miningcore)\n[![.NET](https://github.com/oliverw/miningcore/actions/workflows/dotnet.yml/badge.svg)](https://github.com/oliverw/miningcore/actions/workflows/dotnet.yml)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)]()\n\n\u003cimg src=\"https://github.com/oliverw/miningcore/raw/master/logo.png\" width=\"150\"\u003e\n\n### Features\n\n- Supports clusters of pools each running individual currencies\n- Ultra-low-latency, multi-threaded Stratum implementation using asynchronous I/O\n- Adaptive share difficulty (\"vardiff\")\n- PoW validation (hashing) using native code for maximum performance\n- Session management for purging DDoS/flood initiated zombie workers\n- Payment processing\n- Banning System\n- Live Stats [API](https://github.com/oliverw/miningcore/wiki/API) on Port 4000\n- WebSocket streaming of notable events like Blocks found, Blocks unlocked, Payments and more\n- POW (proof-of-work) \u0026 POS (proof-of-stake) support\n- Detailed per-pool logging to console \u0026 filesystem\n- Runs on Linux and Windows\n\n## Support\n\nCommercial support directly by the maintainer is available through [miningcore.pro](https://store.miningcore.pro).\n\nFor general questions visit the [Discussions Area](https://github.com/oliverw/miningcore/discussions).\n\n## Contributions\n\nCode contributions are very welcome and should be submitted as standard [pull requests](https://docs.github.com/en/pull-requests) (PR) based on the [`dev` branch](https://github.com/oliverw/miningcore/tree/dev).\n\n## Building on Debian/Ubuntu\n\n```console\ngit clone https://github.com/oliverw/miningcore\ncd miningcore\n```\n\nDepending on your OS Version run either of these scripts:\n\n```console\n./build-debian-11.sh\n```\nor\n```console\n./build-ubuntu-20.04.sh\n```\nor\n```console\n./build-ubuntu-21.04.sh\n```\n\n## Building on Windows\n\nDownload and install the [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)\n\n```dosbatch\ngit clone https://github.com/oliverw/miningcore\ncd miningcore\nbuild-windows.bat\n```\n\n### Building in Visual Studio\n\n- Install [Visual Studio 2022](https://www.visualstudio.com/vs/). Visual Studio Community Edition is fine.\n- Open `Miningcore.sln` in Visual Studio\n\n## Building using Docker Engine\nIn case you don't want to install any dependencies then you can build the app using the official Microsoft .NET SDK Docker image.\n\n```console\ngit clone https://github.com/oliverw/miningcore\ncd miningcore\n```\nThen build using Docker:\n\n```console\ndocker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:6.0 /bin/bash -c 'apt update \u0026\u0026 apt install libssl-dev pkg-config libboost-all-dev libsodium-dev build-essential cmake -y --no-install-recommends \u0026\u0026 cd src/Miningcore \u0026\u0026 dotnet publish -c Release --framework net6.0 -o /app/build/'\n```\nIt will use a Linux container, you will build a Linux executable that will not run on Windows or macOS. You can use a runtime argument (-r) to specify the type of assets that you want to publish (if they don't match the SDK container). The following examples assume you want assets that match your host operating system, and use runtime arguments to ensure that.\n\nFor macOS:\n\n```console\ndocker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:6.0 /bin/bash -c 'apt update \u0026\u0026 apt install libssl-dev pkg-config libboost-all-dev libsodium-dev build-essential cmake -y --no-install-recommends \u0026\u0026 cd src/Miningcore \u0026\u0026 dotnet publish -c Release --framework net6.0 -o /app/build/ -r osx-x64 --self-contained false'\n```\n\n### Building and Running Miningcore from a container\n\n**note** - The build scripts optimize  the build for the hardware platform the container is built on ( does it have avx for example).  If you run this container on a platform that does NOT have the same architecture you could have unexplained crashes.  YOU SHOULD BUILD THIS CONTAINER ON THE HOST YOU ARE GOING TO RUN THIS CONTAINER ON.\n\nCommands to build container: `docker build -t \u003cyour_dockerhubid\u003e/miningcore:v73-foo .`\n\nThe docker build assumes you are going to mount your  config file  in a volume mount.  for example:\n\n```sh\n\ndocker run -d \\\n    -p 4000:4000 \\\n    -p 4066:4066 \\\n    -p 4067:4067 \\\n    --name mc    \\\n    -v `pwd`/config_prod.json:/app/config.json \\\n    --restart=unless-stopped \\\n    \u003cyour_dockerhubid\u003e/miningcore:v73-foo\n\n```\n\n\n\n\n\nFor Windows using Linux container:\n\n```console\ndocker run --rm -v $(pwd):/app -w /app mcr.microsoft.com/dotnet/sdk:6.0 /bin/bash -c 'apt update \u0026\u0026 apt install libssl-dev pkg-config libboost-all-dev libsodium-dev build-essential cmake -y --no-install-recommends \u0026\u0026 cd src/Miningcore \u0026\u0026 dotnet publish -c Release --framework net6.0 -o /app/build/ -r win-x64 --self-contained false'\n```\n\nTo delete used images and containers you can run after all:\n```console\ndocker system prune -af\n```\n\n## Running Miningcore\n\n### Production OS\n\nWindows is **not** a supported production environment. Only Linux is. Please do not file issues related to running a pool on Windows. Windows topics should be posted under [discussions](https://github.com/oliverw/miningcore/discussions).\n\nRunning and developing Miningcore on Windows is of course supported.\n\n### Database setup\n\nMiningcore currently requires PostgreSQL 10 or higher.\n\nRun Postgres's `psql` tool:\n\n```console\nsudo -u postgres psql\n```\n\nIn `psql` execute:\n\n```sql\nCREATE ROLE miningcore WITH LOGIN ENCRYPTED PASSWORD 'your-secure-password';\nCREATE DATABASE miningcore OWNER miningcore;\n```\n\nQuit `psql` with \\q\n\nImport the database schema:\n\n```console\nsudo -u postgres psql -d miningcore -f miningcore/src/Miningcore/Persistence/Postgres/Scripts/createdb.sql\n```\n\n#### Advanced setup\n\nIf 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:\n\n**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!\n\n```console\nsudo -u postgres psql -d miningcore -f miningcore/src/Miningcore/Persistence/Postgres/Scripts/createdb_postgresql_11_appendix.sql\n```\n\nAfter executing the command, your `shares` table is now a [list-partitioned table](https://www.postgresql.org/docs/11/ddl-partitioning.html) which dramatically improves query performance, since almost all database operations Miningcore performs are scoped to a certain pool.\n\nThe 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:\n\n```sql\nCREATE TABLE shares_mypool1 PARTITION OF shares FOR VALUES IN ('mypool1');\n```\n\nOnce you have done this for all of your existing pools you should now restore your shares from backup.\n\n### Configuration\n\nCreate a configuration file `config.json` as described [here](https://github.com/oliverw/miningcore/wiki/Configuration).\n\n### Start the Pool\n\n```console\ncd build\nMiningcore -c config.json\n```\n\n## Supported Currencies\n\nRefer to [this file](https://github.com/oliverw/miningcore/blob/master/src/Miningcore/coins.json) for a complete list.\n\n## Caveats\n\n### Monero\n\n- Monero's Wallet Daemon (monero-wallet-rpc) relies on HTTP digest authentication for authentication which is currently not supported by Miningcore. Therefore monero-wallet-rpc must be run with the `--disable-rpc-login` option. It is advisable to mitigate the resulting security risk by putting monero-wallet-rpc behind a reverse proxy like nginx with basic-authentication.\n- Miningcore utilizes RandomX's light-mode by default which consumes only **256 MB of memory per RandomX-VM**. A modern (2021) era CPU will be able to handle ~ 50 shares per second in this mode.\n- If you are running into throughput problems on your pool you can either increase the number of RandomX virtual machines in light-mode by adding `\"randomXVmCount\": x` to your pool configuration where x is at maximum equal to the machine's number of processor cores. Alternatively you can activate fast-mode by adding `\"randomXFlagsAdd\": \"RANDOMX_FLAG_FULL_MEM\"` to the pool configuration. Fast mode increases performance by 10x but requires roughly **3 GB of RAM per RandomX-VM**.\n\n### ZCash\n\n- Pools needs to be configured with both a t-addr and z-addr (new configuration property \"z-address\" of the pool configuration element)\n- First configured zcashd daemon needs to control both the t-addr and the z-addr (have the private key)\n- To increase the share processing throughput it is advisable to increase the maximum number of concurrent equihash solvers through the new configuration property \"equihashMaxThreads\" of the cluster configuration element. Increasing this value by one increases the peak memory consumption of the pool cluster by 1 GB.\n- Miners may use both t-addresses and z-addresses when connecting to the pool\n\n### Vertcoin\n\n- Be sure to copy the file `verthash.dat` from your vertcoin blockchain folder to your Miningcore server\n- In your Miningcore config file add this property to your vertcoin pool configuration: `\"vertHashDataFile\": \"/path/to/verthash.dat\",`\n\n## API\n\nMiningcore comes with an integrated REST API. Please refer to this page for instructions: https://github.com/oliverw/miningcore/wiki/API\n\n## Running a production pool\n\nA 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.\n\nOnce again, do not run a production pool on Windows! This is not a supported configuration.\n\n## Donations\n\nTo support this project you can become a [sponsor](https://github.com/sponsors/oliverw) or send a donation to the following accounts:\n\n* ETH:  `miningcore.eth (ENS Address)`\n* BTC:  `miningcore.eth (ENS Address)`\n* LTC:  `miningcore.eth (ENS Address)`\n* DOGE: `DGDuKRhBewGP1kbUz4hszNd2p6dDzWYy9Q`\n* ETC:  `0xF8cCE9CE143C68d3d4A7e6bf47006f21Cfcf93c0`\n* DASH: `XqpBAV9QCaoLnz42uF5frSSfrJTrqHoxjp`\n* ZEC:  `t1YHZHz2DGVMJiggD2P4fBQ2TAPgtLSUwZ7`\n* BTG:  `GQb77ZuMCyJGZFyxpzqNfm7GB1rQreP4n6`\n* ERGO: `9foYU8JkoqWBSDA3ba8VHfduPXV2NaVNPPAFkdYoR9t9cPQGMv4`\n* XMR:  `46S2AEwYmD9fnmZkxCpXf1T3U3DyEq3Ekb8Lg9kgUMGABn9Fp9q5nE2fBcXebrjrXfZHy5uC5HfLE6X4WLtSm35wUr9Mh46`\n","funding_links":["https://github.com/sponsors/oliverw"],"categories":["C","⛏️ Mining \u003ca id=\"mining\"\u003e\u003c/a\u003e"],"sub_categories":["🏊 Pools \u003ca id=\"pools\"\u003e\u003c/a\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverw%2Fminingcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foliverw%2Fminingcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foliverw%2Fminingcore/lists"}