6

We are using private ethereum network(1 node). We have a couple transaction per second. But mining is too slow. It takes about 10-60 seconds for every transaction. Could you provide some advice settings for genesis or maybe geth start options?

  • How quick is it to mine a block with no transactions? – Joe Mar 13 '17 at 16:51
  • About 2 seconds – Sergey Mashin Mar 13 '17 at 21:44
2

When you create a new test network, you define a genesis block in a JSON file. In that JSON file you can set difficulty. If you set difficulty very low, the blocks will be discovered very fast for the first 100 or so blocks.

However, the difficulty is automatically adjusted such that a new block is found on average every 13 seconds. So a fasst computer will just increase the difficulty, it will, in the long run, not mine faster. You may need to change the source code of Geth and recompile in order to change the 13 second average. Maybe you could lower it to for example 2 seconds? Alternatively, you can start a new genesis block with low difficulty every time you need to test something and then make a new genesis block when the difficulty becomes too high for your patience.

On a mid range laptop a starting difficulty of 0x400 will mine a new block once every second or so.

Do not increase the numbers of threads you use for mining. You will just use more power and you will not find blocks faster since the difficulty adjusts automatically.

  • I use private network for real project and I can't change genesis settings in runtime. Also I use this assembly of geth ethereum.stackexchange.com/questions/2539/…, but it haven't helped in common. I am trying to use one account for ethereum with a lot of money. Is it possible to use ethereum in highload projects? What is the best practice for that case? – Sergey Mashin Mar 13 '17 at 18:01

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.