| Crates.io | bitcoin_solo_miner |
| lib.rs | bitcoin_solo_miner |
| version | 0.1.2 |
| created_at | 2025-08-06 18:49:49.321596+00 |
| updated_at | 2025-08-10 16:46:43.227306+00 |
| description | A bitcoin solo miner for CPUs that changes the metadata each loop instead of nonce. |
| homepage | https://github.com/viraladmin/bitcoin_solo_miner |
| repository | https://github.com/viraladmin/bitcoin_solo_miner |
| max_upload_size | |
| id | 1784205 |
| size | 218,343 |
This is a CPU-based Bitcoin solo miner designed primarily for educational and experimental purposes.
It demonstrates how to build and submit valid Bitcoin blocks without joining a mining pool or using specialized ASIC hardware.
The miner takes a novel approach compared to traditional mining loops:
nonce field, it inserts a random sentence from a user-provided file directly into the coinbase transaction's scriptSig as extra nonce data.While the odds of finding a block on a CPU are still astronomically low, they are statistically far better than trying to find a random private key with spendable Bitcoin (see why I built it). Also the fact remains, every single attempt to find a valid block has the exact same odds as every other attempt on the network. The reason high powered ASIC miners find the blocks is not because their odds are different, but rather because they can make more attempts per second by magnitudes. Still, every attempt has equal odds.
If you’re going to burn CPU cycles, you might as well be trying to earn some BTC instead of hunting for keys that almost certainly do not exist. Also why not put old computers / CPUs to use — you never know, you could get lucky. :)
All versions prior to v0.1.2 contain a bug in the mining process that prevents finding valid blocks. Upgrade immediately to v0.1.2 or later.
I make nothing creating and sharing the tools I create. I do it for my love of the space and my love of the people in the space.
Help a fellow dev out. I ain’t vibe coding here. What’s a sat or two between friends? :)
Bitcoin: bc1qls06cusnr0w7f3q5xtf6d8lfx4gf649375tp87
Many people waste huge amounts of computing power on “Satoshi key hunting” — scanning random private keys hoping to find BTC. The odds of success are so low they are effectively zero.
By contrast, Bitcoin mining, while still highly competitive and dominated by ASIC hardware, has a non-zero probability for any valid hash attempt to succeed.
Every hash you produce has exactly the same odds of being under the current target as one from any other machine, whether it’s a $20 CPU or a $20,000 ASIC.
This miner exists to:
.env).Create a .env file in the miner’s directory:
RPC_URL="http://127.0.0.1:8332"
RPC_USER="admin"
RPC_PASS="pass"
PAYOUT_ADDRESSES="payout_addresses.txt"
STRINGS_FILE="strings.txt"
NUM_TASKS=20
Explanation of fields:
RPC_URL — URL to your Bitcoin node’s RPC endpoint.RPC_USER / RPC_PASS — RPC username and password (set in your bitcoin.conf).PAYOUT_ADDRESSES — Path to a file containing one payout address per line. The miner will auto-rotate between them every 30 seconds.STRINGS_FILE — Path to a UTF-8 text file containing one sentence per line.NUM_TASKS — Number of concurrent mining tasks to run.The miner now supports dynamic payout address rotation via the payout_addresses.txt file.
This system is compatible with address files generated by bitcoin_mass_address_generator. You can generate thousands of wallets and feed them directly into the miner.
Example payout_addresses.txt:
bc1qxyz...
bc1qabc...
bc1qlmn...
Each address must be a valid bc1q SegWit address. Invalid or duplicate entries will be ignored.
./bitcoin_solo_miner
There are no command-line flags. The miner will:
.envTo run in the background:
nohup ./bitcoin_solo_miner > miner.log 2>&1 &
fastrand::u32(..) to vary nonce values along with the extra nonce sentences.MIT License — free to use, modify, and share.
These tools are provided as is for educational and research purposes only. No warranty is provided for any damages incurred by using these tools.