Author

Topic: Solo mining/private network (Read 764 times)

member
Activity: 75
Merit: 10
January 14, 2017, 01:44:13 PM
#2
Allright, since many viewed this post and nobody answered the call i will just post here how i solved my problem:

It was all due to the version of the core btc; I was using 0.10.4 where the internal miner is disabled in the source code except for testnet. This was the reason I could mine the first blocks in testnet but not on the mainnet. As for the solution, i just inserted the same parameters as in btc 0.10.4 to btc version 0.9 and used the miner to solve the first few blocks.

In version 0.10.4 the bitcoind was stuck in downloading blocks and could not tell the rpc miner api gateway the GBT (GetBlockTemplate) information so there was no way for external miners to get work from the server. Good thing coffee made me stay awake and crack the problem, hope this helps someone struggling with the same thing!
member
Activity: 75
Merit: 10
January 12, 2017, 01:23:53 PM
#1
Hey!

I have created a bitcoin 0.10.4 version private network with a brand new genesis block. I have setup 2 virtual machines that are connected to eachother and want to use the integrated miner to mine the difficulty 1 main net.
Heres the thing; I have succeeded doing this in the testnet, the network is going on block 13 and i can verify that the network is hashing with (./bitcoin-cli -testnet getmininginfo). I cannot for some reason do this with the mainnet, it says that bitcoinminer has started but no hashing starts.. This is just for a school project, last thing that i need to get it working. Any help is appreciated (Might tip the guy who solves this for me!).

Heres the bitcoin.conf for both machines:

PC1

gen=1
listen=1
server=1
rpcuser=foo
rpcpassword=bar
rpcallowip=207.242.196.190
rpcallowip=127.0.0.1
rpcport=8332


PC2

gen=1
rpcuser=foo
rpcpassword=bar
connect=207.243.197.55
rpcallowip=127.0.0.1
rpcallowip=207.243.197.55
rpcport=8332

I am using debian jessie as the base os, any advice on how to go about this? Heres what is in the debug.log when i start bitcoind:



Bitcoin version v0.10.4.0-4e1134b-dirty (2016-03-01 15:10:02 +0100)
Using OpenSSL version OpenSSL 1.0.1t  3 May 2016
Using BerkeleyDB version Berkeley DB 5.3.28: (September  9, 2013)
Default data directory /root/.bitcoin
Using data directory /root/.bitcoin
Using config file /root/.bitcoin/bitcoin.conf
Using at most 125 connections (65536 file descriptors available)
Using 2 threads for script verification
Binding RPC on address :: port 8332 (IPv4+IPv6 bind any: 1)
Using wallet wallet.dat
init message: Verifying wallet...
CDBEnv::Open : LogDir=/root/.bitcoin/database ErrorFile=/root/.bitcoin/db.log
init message: Loading block index...
Opening LevelDB in /root/.bitcoin/blocks/index
Opened LevelDB successfully
Opening LevelDB in /root/.bitcoin/chainstate
Opened LevelDB successfully
LoadBlockIndexDB: last block file = 0
LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=1, size=262, heights=0...0, time=2016-12-23...2016-12-23)
Checking all blk files are present...
LoadBlockIndexDB(): transaction index disabled
nFileVersion = 100400
Keys: 102 plaintext, 0 encrypted, 102 w/ metadata, 102 total
 wallet                    6ms
mapBlockIndex.size() = 1
nBestHeight = 0
setKeyPool.size() = 101
mapWallet.size() = 0
mapAddressBook.size() = 1
init message: Loading addresses...
Loaded 532 addresses from peers.dat  1ms
DNS seeding disabled
init message: Done loading
BitcoinMiner started
msghand thread start
addcon thread start
dumpaddr thread start
opencon thread start
net thread start
receive version message: /Satoshi:0.10.4/: version 70002, blocks=0, us=207.242.196.190:57092, peer=1
Added time data, samples 2, offset +0 (+0 minutes)


Thankyou!
Jump to: