6

What i have
Case 1. following command line without --dev option (take too much time to start to mining)

geth --datadir ~/privateBlockChain1 --mine --minerthreads 1 --networkid 1300 --rpcport 8000  --port 30301 --rpcapi="db,eth,net,web3,personal,admin" --rpc --maxpeers 0 --nodiscover --targetgaslimit 110000000000 console

Case 2. following command line with --dev option(using this command line argument , mining works fine)

geth --datadir ~/privateBlockChain1 --mine --minerthreads 1 --networkid 1300 --rpcport 8000  --port 30301 --rpcapi="db,eth,net,web3,personal,admin" --rpc --maxpeers 0 --nodiscover --targetgaslimit 110000000000 **--dev** console

Scenario

  1. Start geth by case 1 command. Step 2.
  2. suppose block created by case 1 command as for example -> #34544 block
  3. Start geth by case 2 command
  4. Block start creating from #1 block , it is not resume from #34544 block, how to fix it.

What i want?

a) how to mining start quickly(with in a second or a minute) when i start geth command line
b) if i do'nt want to use --dev option , then how can start mining fast?
c) suppose if you say, --dev is only option to start mining fast in startup, then how can i resume mine block from previous(i.e #34544 not from #1 block)
d) what is the advantage and disadvantage of --dev option with geth.

1

Looking at the source code the --dev option appears to only turn off networking. No listening, no discovery of other nodes. So I don't immediately assume you can't use the --networkid option as well.

I am seeing a lot of talk about how the --dev flag prevents you from being a part of a test network(including the private network you setup). However, I have not been able to corroborate this within the source code within my 15 minutes of research. If I find out definitively, I'll update my answer.

Assuming that's true, the --dev flag will always create a standalone network and always start at block #1. So I guess my advice is to not use --dev if you don't want to start from scratch every time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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