Miner in Ethereum Private network is hanging

–1 vote

These are the commands I have used.

To initialize genesis block:

$ geth --datadir ./dataDir init genesis.json


INFO [01-17|14:10:49.725] Maximum peer count                       ETH=25 LES=0 total=25
INFO [01-17|14:10:49.725] Allocated cache and file handles         database=/home/edureka/private-ethereum/dataDir/geth/chaindata cache=16 handles=16
INFO [01-17|14:10:49.754] Persisted trie from memory database      nodes=3 size=413.00B time=30.356µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [01-17|14:10:49.755] Successfully wrote genesis state         database=chaindata                                             hash=8fd285…6ebefc
INFO [01-17|14:10:49.755] Allocated cache and file handles         database=/home/edureka/private-ethereum/dataDir/geth/lightchaindata cache=16 handles=16
INFO [01-17|14:10:49.786] Persisted trie from memory database      nodes=3 size=413.00B time=22.994µs gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [01-17|14:10:49.787] Successfully wrote genesis state         database=lightchaindata                                             hash=8fd285…6ebefc

And then to start the Blockchain:

geth --datadir ./myDataDir --networkid 1114 console 2 --rpc --rpcport 8543 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --rpcapi "eth,net,web3,personal,miner"

Then in geth console, I start the miner:

miner.start(1)

Now, it just hangs there. I waited for more than 40 mins but it just stays there. 

Jan 17, 2019 in Blockchain by digger
• 26,740 points
1,880 views
It could be because the difficulty level is set high. And maybe because of that, it is taking more time.

This is genesis block. Difficulty level is less:

{

   "config": {

      "chainId": 2019,

      "homesteadBlock": 0,

      "eip155Block": 0,

      "eip158Block": 0,

      "byzantiumBlock": 0

   },

   "difficulty": "0x0",

   "gasLimit": "2000000",

   "alloc": {

   }

}
Yes.. Difficulty level is not the problem here

1 answer to this question.

0 votes

Looking at your commands again, I figured out the problem. While initiating genesis block you have used dataDir as the Data Directory but while starting the Blockchain you have mentioned a different Data Directory (myDataDir). You have to mention the same directory. Try this:

geth --datadir ./dataDir --networkid 1114 console 2 --rpc --rpcport 8543 --rpcaddr 127.0.0.1 --rpccorsdomain "*" --rpcapi "eth,net,web3,personal,miner"
answered Jan 17, 2019 by Omkar
• 69,230 points

Related Questions In Blockchain

0 votes
1 answer

Is it possible to setup private ethereum network for creating applications??

yes, ethereum is an open source platform ...READ MORE

answered Apr 18, 2018 in Blockchain by Christine
• 15,790 points
722 views
0 votes
1 answer

Why is it downloading the blocks when I am trying to deploy the ethereum private network?

Once you have installed the Ethereum wallet, ...READ MORE

answered May 3, 2018 in Blockchain by Shashank
• 10,400 points
585 views
0 votes
1 answer

Unable to perform an operation in Ethereum private network

It seems that the Unix socket can't ...READ MORE

answered Jul 31, 2018 in Blockchain by Shashank
• 10,400 points
1,065 views
0 votes
1 answer

Not able to send ethers in private ethereum network

Your account is locked by default due ...READ MORE

answered Jan 9, 2019 in Blockchain by Omkar
• 69,230 points
1,031 views
0 votes
0 answers

Error: Unexpected token o in JSON at position 1

I have been working with Interacting a ...READ MORE

Mar 6, 2019 in Blockchain by saeedi
• 120 points

edited Mar 6, 2019 by Omkar 2,393 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,881 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,399 views
+1 vote
2 answers

Not able to create new account in geth for private ethereum network

Looks like the account you are trying ...READ MORE

answered Dec 6, 2018 in Blockchain by Omkar
• 69,230 points
3,996 views
0 votes
1 answer

How to get account with ethers by default in ethereum private network?

Have you created an account before allocating ...READ MORE

answered Jan 9, 2019 in Blockchain by Omkar
• 69,230 points
1,639 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP