Skip to content

nate2211/BitcoinMiner

Repository files navigation

bitcoinminer

โ‚ฟ BitcoinMiner

A high-performance Bitcoin mining framework featuring hybrid CPU acceleration, VirtualASIC integration, and advanced batch hashing pipelines.

Designed for experimentation, optimization, and high-throughput SHA-256d mining using both software and hardware-accelerated techniques.


๐Ÿš€ Features

โšก High Performance Hashing

  • Optimized SHA-256d hashing pipeline
  • VirtualASIC acceleration support
  • Batch hashing for increased throughput
  • Hybrid CPU execution model

๐Ÿง  VirtualASIC Integration

  • Native VirtualASIC DLL support
  • Kernel-based hashing execution
  • Candidate merge optimization
  • Dynamic core utilization

๐Ÿ”€ Dual-Lane CPU Support

  • Parallel CPU hashing lanes
  • Enhanced throughput without DLL modification
  • Load-balanced hashing pipeline
  • Scalable thread configuration

๐Ÿงฎ Advanced Work Processing

  • Efficient nonce generation and distribution
  • Batch candidate processing
  • Reduced redundant computations
  • Optimized work scheduling

๐Ÿ”— Mining Backend Support

  • Stratum protocol compatibility
  • Pool mining support
  • Flexible job handling
  • Low-latency submission pipeline

๐Ÿ“Š Monitoring & Metrics

  • Real-time hashrate tracking
  • Accepted/rejected share stats
  • Worker status reporting
  • Debug and performance logs

๐Ÿ—๏ธ Architecture Overview

        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚   Stratum Server   โ”‚
        โ”‚   (Mining Pool)    โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ Job Manager        โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
                  โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ Work Generator           โ”‚
        โ”‚ (Nonce Distribution)     โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ–ผ                   โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ CPU Lane 1   โ”‚   โ”‚ CPU Lane 2   โ”‚
โ”‚ (Hashing)    โ”‚   โ”‚ (Hashing)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚                  โ”‚
       โ–ผ                  โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ VirtualASIC Engine       โ”‚
        โ”‚ (Kernel Execution)       โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ Share Validation         โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                  โ–ผ
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚ Share Submission         โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ฆ Project Structure

bitcoinminer/
โ”œโ”€โ”€ miner_core.py        # Main mining pipeline
โ”œโ”€โ”€ btc_virtualasic.py   # VirtualASIC integration
โ”œโ”€โ”€ btc_stratum.py       # Stratum protocol client
โ”œโ”€โ”€ btc_models.py        # Data models (jobs, shares)
โ”œโ”€โ”€ btc_native.py        # Native bridge / DLL interaction
โ”œโ”€โ”€ config.py            # Configuration
โ”œโ”€โ”€ utils/               # Utilities
โ””โ”€โ”€ logs/                # Runtime logs

โš™๏ธ Installation

Requirements

  • Python 3.10+
  • Windows (recommended)
  • VirtualASIC DLL
  • OpenCL (optional, depending on setup)

Setup

git clone https://github.com/nate2211/bitcoinminer.git
cd bitcoinminer

pip install -r requirements.txt

๐Ÿ”ง Configuration

Example configuration:

POOL_URL = "stratum+tcp://127.0.0.1:3333"
WALLET = "YOUR_BTC_WALLET"
WORKER_NAME = "worker1"

THREADS = 8
ENABLE_DUAL_LANE = True

VIRTUAL_ASIC_DLL = "VirtualASIC.dll"
ENABLE_VIRTUAL_ASIC = True

โ–ถ๏ธ Running the Miner

python miner_core.py

โšก Performance Tuning

CPU Optimization

  • Increase THREADS for higher throughput
  • Enable dual-lane mode for parallel hashing

VirtualASIC Optimization

  • Ensure DLL is properly loaded
  • Tune kernel parameters if available
  • Monitor CPU/GPU utilization

General Tips

  • Keep system cooled properly
  • Avoid CPU throttling
  • Balance workload between lanes

๐Ÿง  Advanced Features

๐Ÿ”€ Dual-Lane CPU Execution

Runs multiple hashing lanes simultaneously for improved performance.

โšก Batch Hashing Pipeline

Processes multiple nonces at once to maximize efficiency.

๐Ÿงฎ Candidate Merge Optimization

Combines multiple hashing results to reduce overhead.

๐Ÿ”— Flexible Backend Integration

Supports multiple pool configurations and job formats.


๐Ÿ“Š Performance Notes

  • Best performance achieved with VirtualASIC enabled
  • Dual-lane CPU significantly improves throughput
  • Batch processing reduces overhead per hash

โš ๏ธ Disclaimer

This project is for educational and experimental purposes.
Mining Bitcoin may require significant computational resources and electricity.


๐Ÿ“„ License

MIT License


๐Ÿ‘ค Author

Nathan Andrew McDonald
GitHub: https://github.com/nate2211


โญ Contributing

Pull requests are welcome.
For major changes, open an issue first to discuss what you'd like to change.

About

Mines bitcoin with your gpu

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors