- Go 75.7%
- Go Template 18.5%
- HTML 2.5%
- CSS 2%
- Shell 1.1%
- Other 0.2%
Pre-rewrite upstream main as of 2026-06-12, mirrored 2026-07-07 as the pinned build base for dvb-gopool v0.3.2-patched.70 after the upstream repo force-pushed a rewritten history on 2026-07-04. Upstream license: AGPL-3.0 (see LICENSE). |
||
|---|---|---|
| .github | ||
| data | ||
| documentation | ||
| LICENSES | ||
| scripts | ||
| .gitignore | ||
| accept_rate_limiter.go | ||
| accept_rate_limiter_test.go | ||
| accounting.go | ||
| accounting_fuzz_test.go | ||
| address.go | ||
| address_roundtrip_test.go | ||
| address_test_helpers.go | ||
| admin_config.go | ||
| backblaze_backup.go | ||
| backblaze_backup_test.go | ||
| ban_expiry_test.go | ||
| bip110.go | ||
| bip110_test.go | ||
| block_test.go | ||
| block_validity_compat_test.go | ||
| clerk_auth.go | ||
| coinbase_btcd_compat_test.go | ||
| coinbase_fuzz_test.go | ||
| coinbase_multi_output_test.go | ||
| coinbase_test.go | ||
| coinbase_wallet_types_test.go | ||
| config_autoconfig.go | ||
| config_build.go | ||
| config_examples.go | ||
| config_feature_gates.go | ||
| config_file_types.go | ||
| config_helpers.go | ||
| config_load.go | ||
| config_rpc.go | ||
| config_target_shares_test.go | ||
| config_test.go | ||
| config_types.go | ||
| config_validate.go | ||
| const.go | ||
| cross_impl_sanity_test.go | ||
| default.pgo | ||
| defaults.go | ||
| difficulty_compat_test.go | ||
| difficulty_fuzz_test.go | ||
| difficulty_test.go | ||
| discord_bot_test.go | ||
| discord_notifier_commands.go | ||
| discord_notifier_config.go | ||
| discord_notifier_network.go | ||
| discord_notifier_poll.go | ||
| discord_notifier_queue.go | ||
| discord_notifier_types.go | ||
| discord_notify_state.go | ||
| docker-compose.yml | ||
| Dockerfile | ||
| embedded_assets.go | ||
| env.example | ||
| found_block_async.go | ||
| found_block_test.go | ||
| generated_wallet_test_helpers.go | ||
| go.mod | ||
| go.sum | ||
| hash_sha256_common.go | ||
| hash_sha256_noavx.go | ||
| hash_sha256_simd.go | ||
| http_fallback.go | ||
| job_block.go | ||
| job_block_test_helpers.go | ||
| job_build.go | ||
| job_coinbase.go | ||
| job_coinbase_test_helpers.go | ||
| job_feed.go | ||
| job_hash.go | ||
| job_id_test.go | ||
| job_manager.go | ||
| job_manager_node_sync_test.go | ||
| job_nozmq_history_test.go | ||
| job_refresh.go | ||
| job_subscribe.go | ||
| job_types.go | ||
| job_utils.go | ||
| job_utils_hex_bench_test.go | ||
| job_utils_hex_test.go | ||
| job_validate.go | ||
| job_zmq_blocktip_test.go | ||
| job_zmq_rawblock_refresh_test.go | ||
| job_zmq_test.go | ||
| json_cache_test.go | ||
| jsonx_common.go | ||
| jsonx_pretouch_sonic.go | ||
| jsonx_sonic.go | ||
| jsonx_std.go | ||
| LICENSE | ||
| logging.go | ||
| logo.png | ||
| main.go | ||
| merkle_branches_test.go | ||
| metrics.go | ||
| miner_atomic.go | ||
| miner_auth.go | ||
| miner_auth_order_test.go | ||
| miner_auth_variants_test.go | ||
| miner_authorize_ban_test.go | ||
| miner_ban.go | ||
| miner_ban_forgiveness_test.go | ||
| miner_conn.go | ||
| miner_conn_unknown_method_test.go | ||
| miner_decode_bench_test.go | ||
| miner_duplicates.go | ||
| miner_fuzz_test.go | ||
| miner_get_transactions_test.go | ||
| miner_hashrate_ema_test.go | ||
| miner_io.go | ||
| miner_io_subscribe_test.go | ||
| miner_log_found_block_test.go | ||
| miner_notify_jobid_test.go | ||
| miner_profile_collector.go | ||
| miner_rate_limit_test.go | ||
| miner_registry.go | ||
| miner_rejects.go | ||
| miner_response_bench_test.go | ||
| miner_rpc.go | ||
| miner_startup_priming_test.go | ||
| miner_stats.go | ||
| miner_stats_snapshot_test.go | ||
| miner_submit_async_test.go | ||
| miner_submit_bench_test.go | ||
| miner_submit_block.go | ||
| miner_submit_block_safety_test.go | ||
| miner_submit_context.go | ||
| miner_submit_handlers.go | ||
| miner_submit_modes_test.go | ||
| miner_submit_parse.go | ||
| miner_submit_process.go | ||
| miner_submit_types.go | ||
| miner_suggest_ban_test.go | ||
| miner_tuning_quality_test.go | ||
| miner_types.go | ||
| miner_vardiff_steps_test.go | ||
| miner_vardiff_virtual_test.go | ||
| miner_wallet.go | ||
| miner_wallet_saved_worker_test.go | ||
| miner_wallet_single_payout_test.go | ||
| miner_warn_before_ban_test.go | ||
| netlog.go | ||
| netlog_stub.go | ||
| network_params.go | ||
| one_time_code.go | ||
| one_time_code_test.go | ||
| path_traversal_test.go | ||
| payout_debug_test.go | ||
| payout_helpers_test.go | ||
| payout_test.go | ||
| payout_wrapper_selection_test.go | ||
| pending_submissions.go | ||
| pending_submissions_test.go | ||
| performance.md | ||
| pogolo_compat_test.go | ||
| pool_tag.go | ||
| pow_compat_test.go | ||
| price.go | ||
| profile.svg | ||
| README.md | ||
| reconnect_tracker.go | ||
| rpc.go | ||
| rpc_test.go | ||
| rpc_test_helpers.go | ||
| runtime_overrides.go | ||
| saved_workers_bench_test.go | ||
| saved_workers_display_test.go | ||
| Screenshot_20260215_055225.png | ||
| share_detail.go | ||
| share_detail_test_helpers.go | ||
| si_quant.go | ||
| si_quant_test.go | ||
| state_db.go | ||
| state_db_test_helpers.go | ||
| status_bench_test.go | ||
| status_cache.go | ||
| status_confidence_test.go | ||
| status_constants.go | ||
| status_data_base.go | ||
| status_data_build.go | ||
| status_data_helpers.go | ||
| status_data_types.go | ||
| status_display_helpers.go | ||
| status_display_test.go | ||
| status_error_history.go | ||
| status_hashrate_accuracy_test.go | ||
| status_hashrate_calc_test.go | ||
| status_net_helpers.go | ||
| status_peer.go | ||
| status_pool_hashrate_history.go | ||
| status_pool_hashrate_history_test.go | ||
| status_pool_tag.go | ||
| status_pool_tag_test.go | ||
| status_rate_limiter.go | ||
| status_response_cache.go | ||
| status_saved_worker_periods.go | ||
| status_saved_worker_periods_persist.go | ||
| status_saved_worker_periods_persist_test.go | ||
| status_saved_worker_periods_test.go | ||
| status_server_admin_auth.go | ||
| status_server_admin_config.go | ||
| status_server_admin_handlers.go | ||
| status_server_admin_helpers.go | ||
| status_server_admin_helpers_test.go | ||
| status_server_admin_logs.go | ||
| status_server_admin_settings_test.go | ||
| status_server_admin_types.go | ||
| status_server_cache.go | ||
| status_server_censor.go | ||
| status_server_clerk.go | ||
| status_server_clerk_local_noauth_test.go | ||
| status_server_http.go | ||
| status_server_http_node_down_test.go | ||
| status_server_http_test.go | ||
| status_server_json.go | ||
| status_server_json_test.go | ||
| status_server_struct.go | ||
| status_server_types.go | ||
| status_share_rate_test.go | ||
| status_snapshot.go | ||
| status_stratum_disconnect_events.go | ||
| status_sysinfo.go | ||
| status_template_funcs_test.go | ||
| status_templates_load_test.go | ||
| status_worker_view.go | ||
| status_workers_clerk_handlers.go | ||
| status_workers_handlers.go | ||
| status_workers_helpers.go | ||
| status_workers_lookup_redirect_test.go | ||
| status_workers_saved.go | ||
| status_workers_saved_history_test.go | ||
| status_workers_static.go | ||
| status_workers_types.go | ||
| status_workers_worker_helpers.go | ||
| status_workers_worker_helpers_test.go | ||
| stratum_health.go | ||
| stratum_health_test.go | ||
| submission_worker_pool.go | ||
| submit_response_order_test.go | ||
| submit_timing_test.go | ||
| taproot_test.go | ||
| tcp_rtt_linux.go | ||
| tcp_rtt_stub.go | ||
| test_helpers_test.go | ||
| THIRD_PARTY_NOTICES.md | ||
| timeutil.go | ||
| tls_cert.go | ||
| tls_cert_test.go | ||
| validate_all_test_data.go | ||
| version_mask_test.go | ||
| wallet_fuzz_test.go | ||
| wallet_validation_test.go | ||
| wallet_validation_test_helpers.go | ||
| witness_strip_compat_test.go | ||
| worker_hash.go | ||
| worker_list_store_backfill_test.go | ||
| worker_list_store_bestdiff.go | ||
| worker_list_store_clerk.go | ||
| worker_list_store_close.go | ||
| worker_list_store_discord.go | ||
| worker_list_store_discord_state.go | ||
| worker_list_store_migration_test.go | ||
| worker_list_store_minutebest.go | ||
| worker_list_store_open.go | ||
| worker_list_store_saved.go | ||
| worker_list_store_saved_storage_test.go | ||
| worker_list_store_types.go | ||
| worker_lookup_test.go | ||
| worker_page_cache_test.go | ||
| worker_registry.go | ||
| worker_registry_test.go | ||
M45-goPool
goPool is a from-scratch Golang solo Bitcoin mining pool. It connects directly to Bitcoin Core over JSON-RPC and ZMQ, exposes Stratum v1 (with optional TLS), and ships with a status UI + JSON APIs for monitoring.
What this project is
- A solo Bitcoin pool server written in Go from the ground up for this project.
- A direct integration with Bitcoin Core (no external pool engine dependency).
- A self-hosted stack: Stratum endpoint, web status UI, and JSON APIs.
Feature highlights
-
Simple live dashboard to quickly see pool health and mining activity.
-
Worker pages so you can check each rig's speed and recent performance.
-
Online/offline status so you can quickly see which miners are up or down.
-
Saved workers so your favorite rigs are easy to revisit anytime.
-
24-hour hashrate charts to spot drops, spikes, and stability trends.
-
Best share tracking so you can see standout shares over time.
-
Discord pings (optional): alerts when a saved worker goes offline, when it has been back online long enough to count as recovered, and when a saved worker finds a block.
-
Easy connect details shown on the site for miner setup.
-
Solo mining core: builds and submits Bitcoin blocks directly against Bitcoin Core (
getblocktemplate+submitblock) with JSON-RPC and optional ZMQ acceleration. -
Stratum v1 server: supports
mining.subscribe,mining.authorize,mining.submit,mining.configure, CKPool-stylemining.auth, and optional Stratum TLS. -
Compatibility controls: CKPool subscribe-response emulation, version-rolling support, suggest-difficulty handling, optional
mining.set_extranonceandmining.set_version_masknotifications. -
Share-policy controls: duplicate checks, nTime and version-rolling checks, worker-match enforcement, stale-job freshness modes, and optional inline submit processing.
-
VarDiff + hashrate telemetry: configurable difficulty clamps/targets, EMA smoothing, worker/pool hashrate history, and best-share tracking.
-
Safety and resilience: node/job-feed health gating (disconnect/refuse when unsafe), reconnect/invalid-submit banning, pending submission replay, and stale-feed safeguards.
-
Web status UI + JSON APIs: live overview, node/pool/server pages, worker pages, and
/api/*endpoints for monitoring/automation. -
Operator controls: optional admin panel for live settings updates, persist-to-disk controls, log tooling, and guarded reboot action.
-
Storage and backups: SQLite state store with atomic snapshots and optional Backblaze B2 upload workflow.
-
Auth/integrations: optional Clerk auth flows, saved-worker pages, Discord notification toggles, and one-time worker linking codes.
-
Performance options: Stratum socket buffer tuning, optional SIMD JSON/hash paths, and built-in profiling hooks.
Direct Go libraries and licenses
The table below lists direct Go module dependencies from go.mod and the license declared in each dependency's upstream LICENSE* file.
| Library | Version | License |
|---|---|---|
| github.com/Backblaze/blazer | v0.7.2 | Apache-2.0 |
| github.com/btcsuite/btcd | v0.25.0 | ISC |
| github.com/btcsuite/btcd/btcec/v2 | v2.3.6 | ISC |
| github.com/btcsuite/btcd/btcutil | v1.1.6 | ISC |
| github.com/btcsuite/btcd/chaincfg/chainhash | v1.1.0 | ISC |
| github.com/bwmarrin/discordgo | v0.29.0 | BSD-3-Clause |
| github.com/bytedance/sonic | v1.15.0 | Apache-2.0 |
| github.com/clerk/clerk-sdk-go/v2 | v2.5.1 | MIT |
| github.com/golang-jwt/jwt/v5 | v5.3.0 | MIT |
| github.com/hako/durafmt | v0.0.0-20210608085754-5c1018a4e16b | MIT |
| github.com/martinhoefling/goxkcdpwgen | v0.1.1 | MIT |
| github.com/minio/sha256-simd | v1.0.1 | Apache-2.0 |
| github.com/pebbe/zmq4 | v1.4.0 | BSD-3-Clause |
| github.com/pelletier/go-toml | v1.9.5 | Apache-2.0 |
| github.com/remeh/sizedwaitgroup | v1.0.0 | MIT |
| golang.org/x/sys | v0.40.0 | BSD-3-Clause |
| modernc.org/sqlite | v1.44.1 | BSD-3-Clause |
Additional third-party asset notices are in THIRD_PARTY_NOTICES.md.
Downloads: Pre-built binaries are available on GitHub Releases.
Stratum notes:
- goPool accepts both
mining.authorizeand CKPool-stylemining.auth, and tolerates authorize-before-subscribe (work starts after subscribe completes). - On startup and during runtime, Stratum is gated only when the node/job feed reports errors or the node is in a non-usable syncing/indexing state: new connections are refused and existing miners are disconnected to avoid wasted hashing.
Quick start
- Install Go 1.26 or later and ZeroMQ (
libzmq3-devor equivalent depending on your platform). - Clone the repo and build the pool:
git clone https://github.com/Distortions81/M45-Core-goPool.git cd M45-Core-goPool go build -o goPool - Run
./goPoolonce to generate example config files underdata/config/examples/, then copy the base example intodata/config/config.tomland edit it. - Set the required
node.payout_address,node.rpc_url, and ZMQ addresses (node.zmq_hashblock_addr/node.zmq_rawblock_addr; leave empty to run RPC/longpoll-only) before restarting the pool.
Containerization (Docker/Compose)
You can run goPool using Docker or Docker Compose for easy deployment and reproducibility.
Build and run with Docker
docker build -t gopool:local .
docker run --rm -it \
-e BUILD_TIME="$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
-e BUILD_VERSION="v0.0.0-dev" \
-p 3333:3333 -p 80:80 -p 443:443 \
-v "$PWD/data:/app/data" \
gopool:local -stdout
Using Docker Compose
Edit .env or env.example to set environment variables as needed. Then:
# Build and start in background
make up
# View logs
make logs
# Stop and remove containers
make down
Codebase size
- Go source (excluding tests): 35,438 lines across 147 non-test
.gofiles. - Go tests: 17,518 lines across 107
*_test.gofiles. - Go source (total): 52,956 lines across 254
.gofiles.
Counts above were collected on March 1, 2026.
Configuration overview
data/config/config.tomlcontrols listener ports, core branding, node endpoints, fee percentages, and most runtime behavior.- TLS on the status UI is driven by
server.status_tls_listen(default:443). Leave it empty ("") to disable HTTPS and rely solely onserver.status_listenfor HTTP; leavingserver.status_listenempty disables HTTP entirely. data/config/config.tomlalso covers bitcoind settings such asnode.rpc_url,node.rpc_cookie_path, and ZMQ addresses (node.zmq_hashblock_addr/node.zmq_rawblock_addr; leave empty to disable ZMQ and rely on RPC/longpoll). First run writes helper examples todata/config/examples/.- Optional split files:
data/config/services.tomlfor service/integration settings (auth,backblaze_backup,discord,statuslinks).data/config/policy.tomlfor submit-policy/version/bans/timeouts.data/config/tuning.tomlfor rate limits, vardiff, EMA tuning, and peer-cleaning controls.data/config/version_bits.tomlfor explicit per-bit block-version overrides (read-only; never rewritten by goPool).data/config/policy.toml[version].bip110_enabledtoggles BIP-110 signaling (bit 4),[version].share_allow_out_of_mask_version_bitsallows unnegotiated or out-of-mask miner submit versions for compatibility (defaulttrue), andversion_bits.tomlcan still force bit-level overrides afterward. BIP-110 reference: https://github.com/bitcoin/bips/blob/master/bip-0110.mediawikidata/config/secrets.tomlfor sensitive credentials (RPC user/pass, Discord/Clerk secrets, Backblaze keys).
data/config/admin.tomlcontrols the optional admin UI at/admin. The file is auto-generated on first run withenabled = falseand a random password (read the file to see the generated secret). Update it to enable the panel, pick fresh credentials, and keep the file private. goPool writespassword_sha256on startup and clears the plaintext password after the first successful login; subsequent logins use the hash. The admin UI provides a field-based editor for the in-memory config, can force-writeconfig.toml+ split override files, and includes a reboot control; reboot requests require typingREBOOTand resubmitting the admin password.[logging]uses boolean toggles:debugenables verbose runtime logs, andnet_debugenables raw network tracing (net-debug.log). You can also force these at startup with-debugand-net-debug.share_*validation toggles live indata/config/policy.toml[mining](for exampleshare_check_duplicate).
Flags like -network, -rpc-url, -rpc-cookie, and -secrets override the corresponding config file values for a single run—they are not written back to config.toml.
Building & releases
-
Build directly with
go build -o goPool. Use hardware-acceleration tags such asnoavxornojsonsimdonly when necessary; see documentation/operations.md for guidance. -
Release builds already embed
build_time/build_versionvia-ldflags. For a local build, pass the same metadata manually:go build -ldflags="-X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.buildVersion=v0.0.0-dev" -o goPool -
Downloaded releases bundle everything under
data/plusdocumentation/docs.
Documentation & resources
documentation/README.md- Documentation index.documentation/operations.md– Main reference for configuration options, CLI flags, logging, backup policies, and runtime procedures.documentation/version-bits.md– Version-bit override file format and known bit usage in goPool.documentation/json-apis.md– HTTP JSON API reference for the/api/*status endpoints.documentation/TESTING.md– Test suite instructions and how to add or run existing tests.LICENSE– Legal terms for using goPool.
Need help? Open an issue on GitHub or refer to the documentation in documentation/ before asking for assistance.