Local BlockDAG mining lab for this machine. It includes:
- GitHub/USB findings for the CPU miner reference.
- A local Stratum pool that follows the USB pool's miner-facing message shape.
- A dashboard on
http://127.0.0.1:8088. - The official monitoring dashboard repo with a merged mining-pool page on
http://127.0.0.1:5173/mining. - A Numba CUDA GPU miner tested against the local SHA lab pool.
- A native mainnet Stratum pool built from the BlockDAG pool repo and wired to the local mainnet node.
- An exact production
scrypt_hash_datashare tester for validating the BlockDAG scrypt-like algorithm. - A BlockDAG scrypt GPU miner for the RTX 2070 that points at an ASIC-compatible Stratum pool.
Official CPU nonce scanning code is in:
BlockdagEngineering/blockdag-core,services/miner/cpuworker.go- local mirror:
C:\Users\Jeremy Harkness\Documents\BlockDAG\dev\BlockdagEngineering\blockdag-core\services\miner\cpuworker.go
The newer pool release on the USB drive is built around:
BlockdagEngineering/blockdag-corechain, branchfeature/corechain-template-ws-pool-compatibleBlockdagEngineering/asic-pool, branchfeature/block-template-stream
The current USB/official pool Stratum contract is:
mining.subscribereturnsextranonce1andextranonce2_size.mining.notifyparams are[job_id, prevhash, bbversion, nbits, ntime, clean].- Miner submits
[wallet, job_id, extranonce2, ntime, nonce]. - The pool rebuilds an 80-byte header as:
version || prevhash || sha256d(extranonce1 || extranonce2) || ntime || nbits || nonce.
Production BlockDAG validation uses the pool's scrypt_hash_data path:
blockdag-corechain\common\hash\scrypt.cblockdag-corechain\common\hash\hashfuncs_scrypt.gopool\internal\pool\server\scrypt.c
The algorithm is scrypt N=1024/r=1/p=1 with SHA256/PBKDF2, Salsa20/8 ROMix, and the BlockDAG post-ROMix tweak before the final PBKDF2. The earlier Windows GPU lab still uses a CUDA SHA-256d predicate for fast end-to-end GPU/pool/dashboard testing. The mainnet GPU path is now bdag_gpu_miner.gpu_scrypt_miner, which ports the production scrypt path to Numba CUDA and submits normal Stratum shares.
The GitHub monitoring dashboard repo is cloned at:
github/BlockdagEngineering-blockdag-monitoring-dashboard
It now has a Mining Pool sidebar item and /mining route that reads the local pool API from /api/status.
Start the standalone local app with one command:
.\scripts\start-standalone-app.ps1Point the GPU miner at a remote Stratum pool instead of the local pool:
.\scripts\start-standalone-app.ps1 -RemotePool -PoolHost <pool-host> -PoolPort <pool-port>Start the local pool and dashboard:
python -m bdag_gpu_miner.local_pool --difficulty 262144 --job-interval 5In another shell, start the GPU miner:
python -m bdag_gpu_miner.gpu_miner --host 127.0.0.1 --port 3334 --wallet 0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFc --runtime 0Open the dashboard:
http://127.0.0.1:8088
http://127.0.0.1:5173/mining
Current tracking wallet:
0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFc
Start the BlockDAG mainnet node, native Stratum pool, and dashboard API:
.\scripts\start-mainnet-node.ps1 -StopExisting
.\scripts\start-mainnet-asic-pool.ps1 -Build -StopExisting
.\scripts\start-mainnet-dashboard-api.ps1Start the RTX 2070 BlockDAG scrypt GPU miner against the local mainnet Stratum pool:
.\scripts\start-mainnet-gpu-scrypt-miner.ps1 -StopExistingStart the standalone packaged GPU miner EXE against the same pool:
.\scripts\start-blockdag-gpu-miner-exe.ps1 -StopExistingRun it in the foreground for testing:
.\scripts\run-mainnet-gpu-scrypt-miner.ps1 -Runtime 60Run the packaged EXE in the foreground for testing:
.\scripts\start-blockdag-gpu-miner-exe.ps1 -Runtime 60 -ForegroundRebuild the packaged EXE:
.\scripts\build-mainnet-gpu-miner-exe.ps1 -Python .\.venv-build\Scripts\python.exeRebuild the exact production scrypt DLL if needed:
.\scripts\build-bdag-scrypt-dll.ps1Submit one exact BlockDAG scrypt share to the local mainnet Stratum pool:
.\scripts\test-mainnet-scrypt-share.ps1 -Wallet 0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFcCurrent local endpoints:
Stratum: stratum+tcp://127.0.0.1:3334
LAN Stratum: stratum+tcp://192.168.1.108:3334
Pool metrics: http://127.0.0.1:9091/metrics
Dashboard API: http://127.0.0.1:8088/api/status
Dashboard UI: http://127.0.0.1:5173/mining
The native BlockDAG Stratum pool is configured to listen on all local interfaces:
.\scripts\start-mainnet-asic-pool.ps1 -StopExistingFor miners on the same LAN, use:
URL: stratum+tcp://192.168.1.108:3334
User: 0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFc
Password: x
The firewall rule is limited to the local subnet:
.\scripts\enable-stratum-firewall.ps1 -Port 3334The pool metrics endpoint stays bound to 127.0.0.1:9091, so external miners can submit shares without exposing the dashboard metrics service. The mining dashboard shows the current external Stratum endpoint under Dashboard API -> External Stratum.
Working GPU mining save point:
savepoints\20260517-173754-gpu-mining-mainnet-working
savepoints\20260517-173754-gpu-mining-mainnet-working.zip
Optimized standalone GPU miner save point:
savepoints\20260517-181450-gpu-miner-optimized-standalone
savepoints\20260517-181450-gpu-miner-optimized-standalone.zip
Standalone GPU miner:
dist\BlockDAGGpuMiner\BlockDAGGpuMiner.exe
dist\BlockDAGGpuMiner\gpu-miner.json
Run the standalone miner app:
.\scripts\start-blockdag-gpu-miner-exe.ps1 -StopExistingThe miner app serves its own status screen at:
http://127.0.0.1:8787
When launched directly, BlockDAGGpuMiner.exe reads gpu-miner.json, detects the CUDA GPU, checks whether the saved tuning signature matches that GPU, and auto-tunes if it is a new machine or a different GPU. Tuning benchmarks safe BlockDAG scrypt launch sizes and prefers low-latency settings when raw hashrate is close, so it does not trade a small synthetic gain for stale shares.
The sidecar gpu-miner.json contains the Stratum destination and reward address:
{
"host": "127.0.0.1",
"port": 3334,
"wallet": "0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFc",
"worker_name": "rtx2070",
"runtime": 0,
"auto_tune": true,
"dashboard_enabled": true,
"dashboard_port": 8787,
"batch_size": 8192,
"threads_per_block": 32,
"max_results": 64
}Current optimized RTX 2070 Max-Q settings are batch_size=8192, threads_per_block=32, and max_results=64. The miner uses a reusable CUDA scrypt scanner so the 1 GB scrypt scratch buffers stay allocated on the GPU instead of being recreated every scan. Status writes are throttled so accepted share traffic does not dominate the mining loop.
The built-in miner screen shows:
- Mining status, pool, wallet, and worker name
- Live hashrate and total hashes
- Accepted, submitted, rejected, and last share age
- GPU name, utilization, temperature, power, and launch settings
- Auto-tune summary and on-chain wallet balance when
balance_rpc_urlis configured
The dashboard API reads the newest GPU status file from either the workspace Python miner logs or the packaged EXE logs, so the dashboard works whether mining is launched from Python or from BlockDAGGpuMiner.exe.
The shell had CUDA_VISIBLE_DEVICES set to a blank value, hiding the RTX 2070 from CUDA. The miner sets it to 0 if it is blank or a quoted blank string.
Numba needed local CUDA 12.1 NVVM/runtime files. They were installed in workspace-local folders:
.vendor_cuda121.vendor_cuda121_runtime
No system CUDA installation was changed.
The missing Clang CUDA runtime wrapper headers were added under the workspace-local Zig/Clang resource directories. That gets past the original __clang_cuda_runtime_wrapper.h failure, but this Windows PC still does not have a complete nvcc/MSVC CUDA compiler stack on PATH. The working mainnet miner therefore uses the local CUDA 12.1 runtime through Numba and the production BlockDAG scrypt logic port in bdag_gpu_miner/gpu_bdag_scrypt.py.
On this RTX 2070 Max-Q machine:
python -m pytest -q:1 passed- CUDA warmup: OK
- 20 second local mining run:
1,711,276,032hashes,85,554,747 H/saverage - Pool/dashboard result:
6,577accepted shares,0rejected shares - Native mainnet Stratum pool: built as
bdagstack-live\asic-pool.exe - Exact BlockDAG scrypt share test:
2submitted,2accepted,0rejected against127.0.0.1:3334 - GPU BlockDAG scrypt miner: running against
127.0.0.1:3334with wallet0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFc - GPU scrypt verification: GPU hashes match
bdag_scrypt.dll; live run accepted shares on mainnet Stratum. - Dashboard GPU panel: shows hashrate, accepted/submitted shares, GPU utilization, temperature, pool target, and worker status.
- Dashboard wallet panel: queries
eth_getBalancefromhttp://127.0.0.1:18545and shows the configured mining wallet's on-chain BDAG balance. - Packaged EXE benchmark:
184,360.3 H/sonNVIDIA GeForce RTX 2070 with Max-Q Design - Packaged EXE live mining test:
1,654,784hashes in8.067seconds,205,085.8 H/saverage,731submitted,731accepted,0rejected. - Packaged EXE launcher test:
630,784hashes in3.0seconds,206,307.2 H/saverage,300submitted,300accepted,0rejected. - Self-tuned EXE app test: detected
NVIDIA GeForce RTX 2070 with Max-Q Design, selected8192 x 32, servedhttp://127.0.0.1:8787, and mined around210-215 kH/s.
Dashboard screenshot:
logs/dashboard.pnglogs/mining-dashboard-merged.png
A native Windows bdag.exe was built from the local blockdag-corechain repo with production scrypt support and started with:
- EVM RPC:
http://127.0.0.1:18545 - DAG RPC:
http://127.0.0.1:38131 - Mining address:
0xA1Ee1005c4Ff181e93e717D2C624554b66AB7DFc
The node is reachable by RPC, but it is not synced yet:
eth_blockNumber:0x0- DAG block count:
1 - peer count:
0
The public stack page at https://bdagstack.bdagdev.xyz/ points to a release bundle and snapshot flow, but the snapshot host and discovered peer endpoints were unreachable from this PC during setup. The dashboard reports this as Live Node: Waiting.
The Windows AMD64 release in Downloads was used here:
C:\Users\Jeremy Harkness\Downloads\blockdag-pool-windows-amd64-release-20260517-151144
The release is a Docker Desktop stack, but Docker is not on PATH on this PC, so the mainnet data seed was restored into the release's native data folder and run with the local Windows bdag.exe:
C:\Users\Jeremy Harkness\Downloads\blockdag-pool-windows-amd64-release-20260517-151144\unpacked\blockdag-pool-windows-amd64-release-20260517-151144\data\node1
Repeatable launch commands:
.\scripts\start-mainnet-node.ps1 -StopExisting
.\scripts\start-mainnet-dashboard-api.ps1 -StopExistingCurrent mainnet dashboard:
http://127.0.0.1:5173/mining
Current mainnet RPC status after restoring the release chain seed and connecting to peers:
- Network:
mainnet - Chain ID:
1404 - EVM RPC:
http://127.0.0.1:18545 - DAG RPC:
http://127.0.0.1:38131 - EVM block: about
7.40M - DAG block count: about
7.53M - DAG peers observed:
14
The dashboard labels this state as Connected when the DAG RPC has peers and block-template pushes are arriving. EVM peer count may still show 0 while DAG peers and templates are active.