Miner in Ethereum Private network is hanging

0 votes

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 in Blockchain by digger
• 27,620 points
20 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.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 by Omkar
• 65,850 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
20 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,330 points
13 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,330 points
53 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 in Blockchain by Omkar
• 65,850 points
11 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 in Blockchain by saeedi
• 120 points

edited Mar 6 by Omkar 114 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
63 views
0 votes
1 answer
0 votes
1 answer

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
• 65,850 points
35 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 in Blockchain by Omkar
• 65,850 points
20 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.