0

For development reasons I'd like to have a private "real" bitcoin mainnet network. Bitcoin-core doesn't support mining any more.

I have set up a network of 2 nodes (using connect conf command). CPUminer is designed (as far as I know) to connect to a mining pool server.

Any idea how to directly do cpu solo mining with bitcoin?

Thanks.

educob
  • 19
  • 4

3 Answers3

3

For development it's often helpful to start both nodes in regression test mode (regtest mode). The developer has his own private blockchain and can choose when to create a new block. You can use bitcoin-cli -regtest generate 1 to generate a new block.

For more information see Developer Examples - Regtest Mode.

0xb10c
  • 1,392
  • 5
  • 21
  • I know all that but I don't like having different addresses. I want a 100% bitcoin network that produces a block every 10 minutes, etc. The real thing but private. I am developing a rather complex app and I need to test it as real as possible. – educob Oct 22 '18 at 17:53
0

cpuminer does work for solo mining. I've used it successfully on the BCH testnet.

I don't have the exact command line handy right now, but if you can't figure it out, I can try to dig it up.

Nate Eldredge
  • 22,970
  • 3
  • 39
  • 80
  • I thought I could do solo mining and tried and tried ( ./minerd --threads=1 --coinbase-addr=3GGvSvodq8Gp5pjWZxhihBxo4gEtSjKtKo -o http://127.0.0.1:8332 -O xxx:yyy --no-longpoll --no-getwork --no-stratum ) until I realized I had to set a mining pool server which I don't know how to do. So I wonder if there is a software to do solo mining. – educob Oct 22 '18 at 17:55
  • No, you don't have to set up a mining pool server. cpuminer can connect directly to your bitcoind. When I have some time, I can try to look up the syntax. – Nate Eldredge Oct 22 '18 at 19:53
0

I finally learn that mainnet has (among many other things) checkpoints (certain blocks with their hash hard coded and check they agree with the blockchain). So starting a private mainnet it's simply not possible (wihtout touching the code).

educob
  • 19
  • 4