3

I will mine myself ONLY so difficulty will be always in 1 range so CPU is enough for this task

So my question is: how to setup bitcoin core 0.12 to start mining with CPU new blockchain ?

If I type in the console: setgenerate true and wait a few hours it's possible to mine first block with 50 BTC (of course with internet connection OFF to prevent download blocks)?

I know that this BTC will be worthless ATM (without $ value) but I want to do that anyway to better understand mining process

4 Answers 4

3

First, create a directory to store your blocks and configuration:

$ mkdir mybitcoindir
$ cd mybitcoindir

next, you need to create a conf file called bitcoin.conf that has this in it:

checkpoints=0
connect=0.0.0.0
daemon=1
discover=0
dnsseed=0
gen=1
irc=0
keypool=5
listen=0
port=19002
rpcpassword=test123
rpcport=19003
rpcuser=test
upnp=0

Now start up your bitcoin daemon

$ bitcoind -datadir=mybitcoindir

You should have no outbound connections

$ bitcoin-cli -datadir=mybitcoindir getpeerinfo
[
]

Now you can generate coins

$ bitcoin-cli -datadir=mybitcoindir setgenerate true

Note even with the difficulty at 1, generating coins off of a single CPU can take a while. Expect it to take a few hours to find your first block. You're better off getting a really cheap USB miner as they can find about 2-3 blocks at difficulty 1 every minute. But that, of course, requires a bunch of setup as well.

Best of luck.

0

Set regtest=1 in bitcoin.conf.

3
  • I don't want to use TEST BTC i want to mine complete new blockchain so Set regtest=1 in bitcoin.conf. it's not solution to my question
    – user35225
    May 1, 2016 at 6:57
  • @zxt1 They're not testnet BTC. Are you asking how to create a new blockchain and mine BTC that is freely exchangeable with the main Bitcoin network?
    – Nick ODell
    May 1, 2016 at 15:06
  • NO - I want co create complete NEW blockchain not exchangeable with the main Bitcoin network
    – user35225
    May 2, 2016 at 10:08
0

It won't work right out of the box.

First of all, the Bitcoin Core client has hardcoded checkpoints asserting that certain specific blocks should be found at certain heights. Your chain won't contain those blocks, so if you ever reach those heights, your own client will reject your whole chain. It might even be that the client will refuse to even start mining until it has downloaded a chain that matches up to the last checkpoint.

So for starters, you'd have to edit out the checkpoints and recompile the source code.

There may be other issues, due to changes in the Bitcoin protocol since 2009. The client knows what the rules were at that time, and is able to check that blocks near the beginning of the block chain satisfy them. But it most likely creates new blocks in conformance with today's rules, which might not be acceptable in an "old" block. So again, you might find that it rejects its own blocks.

0

You can spawn and distribute blockchain networks on the fly with coinclone:
https://github.com/coinclone/cloner

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.