{"id":36970419,"url":"https://github.com/distortions81/m45-core-gopool","last_synced_at":"2026-01-25T21:55:09.019Z","repository":{"id":328855960,"uuid":"1114858238","full_name":"Distortions81/M45-Core-goPool","owner":"Distortions81","description":"Solo btc mining pool software, written in golang","archived":false,"fork":false,"pushed_at":"2026-01-11T07:13:13.000Z","size":2000,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T22:00:01.701Z","etag":null,"topics":["bitcoin","golang","mining-pool"],"latest_commit_sha":null,"homepage":"https://M45Core.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Distortions81.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-12T01:53:00.000Z","updated_at":"2026-01-11T07:13:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Distortions81/M45-Core-goPool","commit_stats":null,"previous_names":["distortions81/m45-core-gopool"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Distortions81/M45-Core-goPool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distortions81%2FM45-Core-goPool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distortions81%2FM45-Core-goPool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distortions81%2FM45-Core-goPool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distortions81%2FM45-Core-goPool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Distortions81","download_url":"https://codeload.github.com/Distortions81/M45-Core-goPool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Distortions81%2FM45-Core-goPool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28568833,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T12:50:50.164Z","status":"ssl_error","status_checked_at":"2026-01-19T12:50:42.704Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","golang","mining-pool"],"created_at":"2026-01-13T21:48:02.346Z","updated_at":"2026-01-25T21:55:09.013Z","avatar_url":"https://github.com/Distortions81.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ca href=\"https://github.com/Distortions81/M45-Core-goPool/blob/main/data/www/logo.png\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/Distortions81/M45-Core-goPool/main/data/www/logo.png\" alt=\"goPool logo\" width=\"32\" height=\"32\" style=\"vertical-align: middle;\"\u003e\u003c/a\u003e M45-Core-goPool (goPool)\n\n[![Go CI](https://github.com/Distortions81/M45-Core-goPool/actions/workflows/ci.yml/badge.svg)](https://github.com/Distortions81/M45-Core-goPool/actions/workflows/ci.yml)\n[![Go Vulncheck](https://github.com/Distortions81/M45-Core-goPool/actions/workflows/govulncheck.yml/badge.svg)](https://github.com/Distortions81/M45-Core-goPool/actions/workflows/govulncheck.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Distortions81/M45-Core-goPool)](https://goreportcard.com/report/github.com/Distortions81/M45-Core-goPool)\n[![License](https://img.shields.io/github/license/Distortions81/M45-Core-goPool)](https://github.com/Distortions81/M45-Core-goPool/blob/main/LICENSE)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/Distortions81/M45-Core-goPool)](https://go.dev)\n\n\u003e **⬇️ [Download Pre-Built Releases](https://github.com/Distortions81/M45-Core-goPool/releases)** - Ready-to-run binaries for Linux (AMD64) and macOS (AMD64/ARM64). See [RELEASES.md](RELEASES.md) for details.\n\n## About\n\ngoPool is a solo Bitcoin mining pool that connects directly to Bitcoin Core (`bitcoind`) over JSON-RPC and ZMQ. It serves miners via Stratum v1 (with optional TLS) and provides a web-based status UI with JSON APIs for monitoring.\n\n**Key Features:**\n- Stratum v1 mining protocol with optional TLS support\n- Direct Bitcoin Core integration via JSON-RPC and ZMQ\n- Configurable coinbase splits (pool fee, operator donation, miner payout)\n- Web status UI with HTTPS-first design and auto-generated certificates\n- Automated backups with optional Backblaze B2 cloud storage\n- Rate limiting, invalid-submission bans, and reconnect churn protection\n- Comprehensive test suite with compatibility checks\n\n## Build\n\n**Requirements:**\n- Bitcoin Core with RPC enabled and ZMQ support recommended\n- Go toolchain (see [go.mod](go.mod) for version)\n- ZeroMQ library and headers (for `github.com/pebbe/zmq4`)\n\n### Installing Dependencies\n\n**Install Go (all distributions):**\n\ngoPool requires Go 1.24.11 or later. Always use the official golang.org release rather than distribution packages.\n\nVisit [https://go.dev/dl/](https://go.dev/dl/) to download and install the latest Go version for your platform.\n\n**Install ZeroMQ:**\n\n**Ubuntu / Debian:**\n```bash\nsudo apt update\nsudo apt install -y libzmq3-dev\n```\n\n**Fedora / RHEL / CentOS:**\n```bash\nsudo dnf install -y zeromq-devel\n```\n\n**Arch Linux:**\n```bash\nsudo pacman -S zeromq\n```\n\n**Alpine Linux:**\n```bash\napk add --no-cache zeromq-dev build-base\n```\n\n### Build \u0026 Run\n\n```bash\n# Clone the repository (if not already cloned)\ngit clone https://github.com/Distortions81/M45-Core-goPool.git\ncd M45-Core-goPool\n\n# Run directly\ngo run .\n\n# Or build binary\ngo build -o goPool\n./goPool\n```\n\nOn first run, goPool will generate example configuration files in `data/config/examples/` and exit with setup instructions.\n\n### Build Tags\n\ngoPool supports several build tags for different configurations:\n\n| Build Tag | Purpose | Default | Fallback |\n|-----------|---------|---------|----------|\n| `debug` | Enable debug logging + network traffic logs | Off | N/A |\n| `verbose` | Enable verbose logging (no network logs) | Off | N/A |\n| `noavx` | Disable hardware-accelerated SHA256 | Uses [`sha256-simd`](https://github.com/minio/sha256-simd) | [`crypto/sha256`](https://pkg.go.dev/crypto/sha256) |\n| `nojsonsimd` | Disable hardware-accelerated JSON | Uses [`sonic`](https://github.com/bytedance/sonic) | [`encoding/json`](https://pkg.go.dev/encoding/json) |\n\n**Logging Levels:**\n```bash\n# Debug build with network traffic logging\ngo build -tags debug -o goPool\n\n# Verbose build without network traffic logging\ngo build -tags verbose -o goPool\n```\n\n**Disable Hardware-Accelerated SHA256:**\n\nBy default, goPool uses [`github.com/minio/sha256-simd`](https://github.com/minio/sha256-simd) which provides hardware-accelerated SHA256 hashing:\n- **x86/x64:** AVX512, SHA Extensions, AVX2\n- **ARM64:** Cryptography Extensions (ARMv8)\n- **Fallback:** Pure Go implementation on unsupported platforms\n\nThe library automatically selects the best implementation at runtime. However, you can force the use of standard [`crypto/sha256`](https://pkg.go.dev/crypto/sha256):\n\n1. **Build without sha256-simd:**\n```bash\n# Disable sha256-simd at build time\ngo build -tags noavx -o goPool\n```\n\n2. **Use runtime flag:**\n```bash\n# Disable sha256-simd at runtime\n./goPool -sha256-no-avx\n```\n\n**When to disable:** Only needed for debugging, benchmarking the standard library, or if sha256-simd causes issues. The library handles unsupported platforms automatically.\n\n**Disable Hardware-Accelerated JSON:**\n\nBy default, goPool uses [`github.com/bytedance/sonic`](https://github.com/bytedance/sonic) for faster JSON encoding/decoding with JIT compilation and SIMD:\n- **Supported:** Linux, MacOS, Windows on AMD64 or ARM64\n- **Fallback:** Standard [`encoding/json`](https://pkg.go.dev/encoding/json) on unsupported platforms\n\n```bash\n# Disable sonic (forces encoding/json)\ngo build -tags nojsonsimd -o goPool\n```\n\n**Combining Build Tags:**\n```bash\n# Debug build without SIMD acceleration\ngo build -tags \"debug noavx nojsonsimd\" -o goPool\n\n# Verbose build without SIMD acceleration\ngo build -tags \"verbose noavx nojsonsimd\" -o goPool\n\n# Disable only JSON SIMD, keep SHA256 SIMD\ngo build -tags nojsonsimd -o goPool\n\n# Disable only SHA256 SIMD, keep JSON SIMD\ngo build -tags noavx -o goPool\n```\n\n## Command-Line Parameters\n\nRun `./goPool -h` to see all available command-line flags:\n\n| Flag | Description |\n|------|-------------|\n| `-allow-rpc-credentials` | Allow loading rpc_user/rpc_pass from secrets.toml when node.rpc_cookie_path is not set |\n| `-bind \u003cip\u003e` | Bind to specific IP address for stratum listener (e.g. 0.0.0.0 or 192.168.1.100) |\n| `-check-duplicates` | Enable duplicate share checking (disabled by default for solo pools) |\n| `-disable-json-endpoint` | Disable JSON status endpoints for debugging |\n| `-flood` | Enable flood-test mode (force min/max difficulty to 0.01) |\n| `-https-only` | Serve status UI over HTTPS only (auto-generating a self-signed cert if none is present) (default: true) |\n| `-http-only` | Serve status UI over HTTP only (disables HTTPS listener and redirects) |\n| `-mainnet` | Force mainnet defaults for RPC/ZMQ ports |\n| `-no-clean-bans` | Skip rewriting the ban list on startup (keep expired bans) |\n| `-no-zmq` | Disable ZMQ subscriptions and rely on RPC/longpoll only (SLOW) |\n| `-profile` | Collect a 60s CPU profile to default.pgo on startup |\n| `-regtest` | Force regtest defaults for RPC/ZMQ ports |\n| `-rewrite-config` | Rewrite config file with effective settings on startup |\n| `-rpc-cookie-path \u003cpath\u003e` | Override node RPC cookie path (skips autodetection when set) |\n| `-rpc-url \u003curl\u003e` | Override RPC URL (e.g. http://127.0.0.1:8332) |\n| `-secrets \u003cpath\u003e` | Path to secrets.toml (overrides default under data_dir/config) |\n| `-signet` | Force signet defaults for RPC/ZMQ ports |\n| `-stdoutlog` | Mirror logs to stdout in addition to writing to files |\n| `-testnet` | Force testnet defaults for RPC/ZMQ ports |\n\n**Common Usage Examples:**\n\n```bash\n# Run on testnet\n./goPool -testnet\n\n# Run on regtest for local development\n./goPool -regtest\n\n# Mirror logs to stdout for debugging\n./goPool -stdoutlog\n\n# Bind to specific IP address\n./goPool -bind 192.168.1.100\n\n# Override RPC URL\n./goPool -rpc-url http://127.0.0.1:8332\n```\n\n## Configuration\n\n### Quick Start Configuration\n\nAfter your first run, goPool generates example configs in `data/config/examples/`. Copy and edit them:\n\n```bash\ncp data/config/examples/config.toml.example data/config/config.toml\nnano data/config/config.toml\n```\n\n**Minimum Required Settings:**\n\n1. **Payout Address** - Where your mining rewards go:\n   ```toml\n   [node]\n   payout_address = \"YOUR_BITCOIN_ADDRESS\"\n   ```\n\n2. **Bitcoin Core Connection** - Update if not using defaults:\n   ```toml\n   [node]\n   rpc_url = \"http://127.0.0.1:8332\"\n   zmq_block_addr = \"tcp://127.0.0.1:28332\"\n   ```\n\n**Optional but Recommended:**\n\n- Set `server.status_public_url` to your pool's public URL for proper redirects\n- Configure `branding.status_brand_name` and `branding.status_tagline` for UI customization\n- Set `mining.pool_fee_percent` (default 2.0%)\n- Keep `mining.solo_mode = true` (the default) to skip strict share validation for solo miners; set it to `false` if you need the extra policy checks used in multi-worker pools\n- Set `mining.direct_submit_processing = true` to process `mining.submit` directly on the connection goroutine (bypassing the shared worker queue) when you want the absolute lowest submit latency; keep it `false` if you need the shared worker pool to limit concurrency.\n\nSee [operations.md](operations.md) for detailed configuration options.\n\n### Config Files\n\ngoPool uses three TOML configuration files in `data/config/`:\n\n- **`config.toml`** (required) - Primary pool configuration\n- **`secrets.toml`** (optional) - Sensitive credentials (Discord tokens, Clerk keys, RPC auth)\n- **`tuning.toml`** (optional) - Performance tuning overrides\n\nIf `config.toml` is missing, goPool generates examples and exits. Copy and customize `data/config/examples/config.toml` to get started.\n\n### Bitcoin Core Connection\n\n**RPC Authentication:**\n- Preferred: Cookie file via `node.rpc_cookie_path`\n- Autodetection: goPool searches `$BITCOIN_DATADIR` and common locations\n- Override: Use `-rpc-cookie-path` flag for single-run override\n- Alternative: Use `-allow-rpc-credentials` with `rpc_user`/`rpc_pass` in `secrets.toml` (insecure, not recommended)\n- Public RPC: Set `node.allow_public_rpc = true` for unauthenticated endpoints (understand security implications)\n\n**ZMQ Configuration:**\nAdd to your `bitcoin.conf`:\n```conf\nzmqpubrawblock=tcp://127.0.0.1:28332\nzmqpubhashblock=tcp://127.0.0.1:28332\nzmqpubrawtx=tcp://127.0.0.1:28332\nzmqpubhashtx=tcp://127.0.0.1:28332\n```\n\nThen set in `config.toml`:\n```toml\n[node]\nzmq_block_addr = \"tcp://127.0.0.1:28332\"\nrpc_url = \"http://127.0.0.1:8332\"\n```\n\nTo disable ZMQ and use RPC-only mode, use the `-no-zmq` flag.\n\n### Network Listeners\n\nDefault ports in `config.toml`:\n- Stratum (plain): `:3333`\n- Stratum (TLS): `:4333`\n- Status UI (HTTP): `:8080`\n- Status UI (HTTPS): `:4443`\n\n**TLS Certificates:**\n- Auto-generated: goPool creates self-signed certs on first run (`data/tls_cert.pem`, `data/tls_key.pem`)\n- Custom certs: Replace these files with your own (e.g., from Let's Encrypt)\n- Auto-reload: Certificates reload hourly automatically\n- Helper script: [scripts/certbot-gopool.sh](scripts/certbot-gopool.sh) automates certbot integration\n\n**HTTPS-First Mode:**\nBy default (`-https-only=true`), HTTP serves only a safe subset and redirects to HTTPS. Set `server.status_public_url` to your final public URL for proper redirects and session cookies.\n\n**HTTP-Only Mode (local/dev):**\nIf you want plain HTTP with no redirects and no HTTPS listener, run with `-http-only` (or set `server.status_tls_listen = \"\"` and run with `-https-only=false`).\n\n## Operation\n\n### Running the Pool\n\n**Point miners at Stratum:**\n- Plain: `stratum+tcp://\u003cpool-host\u003e:3333`\n- TLS: `stratum+ssl://\u003cpool-host\u003e:4333`\n\n**Runtime Configuration Reload:**\n- `SIGUSR1` - Reload HTML templates\n- `SIGUSR2` - Reload config/secrets/tuning (status pages only; restart required for listener/auth changes)\n\n**Command-Line Flags:**\n- `-rpc-cookie-path \u003cpath\u003e` - Override RPC cookie location\n- `-rpc-url \u003curl\u003e` - Override RPC URL\n- `-allow-rpc-credentials` - Enable `rpc_user`/`rpc_pass` from secrets.toml\n- `-no-zmq` - Disable ZMQ, use RPC/longpoll only\n- `-https-only=false` - Disable HTTPS-first mode\n- `-http-only` - Force HTTP-only status UI mode\n\n### Monitoring\n\n**Status UI:**\n- Access at `https://\u003cpool-host\u003e:4443` (default)\n- Templates in `data/templates/`\n- JSON API endpoints under `/api/*`\n\n**Data Storage:**\n- Worker database: `data/state/workers.db`\n- Automatic local snapshots for safe backups\n- Optional Backblaze B2 uploads (configure `[backblaze_backup]` section)\n\n### Additional Documentation\n\n- [RELEASES.md](RELEASES.md) - Pre-built release packages and upgrade guide\n- [operations.md](operations.md) - Detailed configuration, flags, API reference, logging\n- [performance.md](performance.md) - Capacity planning and benchmark data\n- [TESTING.md](TESTING.md) - Test suite overview and instructions\n- [data/config/examples/autogen.md](data/config/examples/autogen.md) - Config generation details\n\n### Useful Scripts\n\n- [scripts/install-bitcoind.sh](scripts/install-bitcoind.sh) - Bootstrap local bitcoind with ZMQ\n- [scripts/run-tests.sh](scripts/run-tests.sh) - Run complete Go test suite\n- [scripts/profile-graph.sh](scripts/profile-graph.sh) - Generate CPU profile visualization\n- [scripts/certbot-gopool.sh](scripts/certbot-gopool.sh) - Automate Let's Encrypt certificate setup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistortions81%2Fm45-core-gopool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistortions81%2Fm45-core-gopool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistortions81%2Fm45-core-gopool/lists"}