Why does mining on a private net not work with small machines?

scbuergelscbuergel Member Posts: 15
Hi all

I succeed in mining on a private test net when having a medium or big machine (2GB ram, 2 cpus or bigger on digital ocean with Ubuntu 15.10 x64) but do not get any blocks using a small machine (1 GB ram, 1 cpu and smaller). I have the following customGensis.json

{
        "nonce": "0xdeadbeefdeadbeef",
        "timestamp": "0x0",
        "parentHash": "0x000000000000000000000000000000000000000000000000000000$
        "extraData": "0x0",
        "gasLimit": "0x8000000",
        "difficulty": "0x004",
        "mixhash": "0x000000000000000000000000000000000000000000000000000000000$
        "coinbase": "0x3333333333333333333333333333333333333333",
        "alloc": {
                "0x450e0d6e13b2fdc2ca30674e6fbd1a116a05f863": { "balance": "100$
        }
}
I then start geth as follows

# geth --genesis eth/customGenesis.json --datadir eth/ --networkid 1984 --nodiscover --maxpeers 0 console
Next I create an account, set the etherbase, start mining (1 CPU), wait a bit and then read the hashrate and the latest block difficulty (same as in the genesis since nothing got mined yet)

> personal.newAccount("mypassword")
> miner.setEtherbase(eth.accounts[0]) 
> miner.start(1)
> miner.hashrate
244
> web3.eth.getBlock("latest").difficulty
4
If I am not wrong hashrate > difficulty means that I should be able to mine a block in under one second. Yet I do not get any block mined, when letting it run overnight I realized that every couple of hours I get a block. However, once the machine has at least 2GB ram and 2 CPUs (still just using one for starting the miner thread) I quickly get many blocks mined.

I would be very happy if you could help out here or let me know if this is a known issue.

Sebastian

Best Answer

Answers

Sign In or Register to comment.