eos icon indicating copy to clipboard operation
eos copied to clipboard

Stop Mining Empty Blocks in Private Chain

Open mamidi1211 opened this issue 8 years ago • 8 comments

Is there any way to stop mining empty blocks in private chain

mamidi1211 avatar Jun 27 '18 06:06 mamidi1211

Why would you want to stop mining empty blocks? If you do that, your chain will be stale

andriantolie avatar Jun 27 '18 09:06 andriantolie

Producing empty blocks may increase the data size. Also it may increase the computation time of the transactions. Am i right ? @andriantolie

mamidi1211 avatar Jun 27 '18 09:06 mamidi1211

Producing empty blocks does increase the size of the block log on disk. However empty blocks are extremely small compared to the capacity of modern disks. A desktop PC generating empty blocks is likely to experience a hardware failure before filling a 2TB disk with empty blocks.

Transaction computation time is totally unaffected by the size of the block chain.

jgiszczak avatar Jun 27 '18 21:06 jgiszczak

Thanks @jgiszczak . Is there any way to stop producing empty blocks. ?

mamidi1211 avatar Jul 09 '18 11:07 mamidi1211

If you load producer_api_plugin in your nodeos config.ini, it makes available the URL /v1/producer/pause, which you may access via curl or similar tools. cleos does not provide support for that API. To resume, use the URL /vi/producer/resume.

jgiszczak avatar Jul 12 '18 01:07 jgiszczak

Thanks. It worked.

mamidi1211 avatar Jul 12 '18 05:07 mamidi1211

I know this issue is closed but can you give me more detailed explanation Please. Like how to use curl to pause the blockchain and then resume it.

yashvadhvani avatar Aug 06 '18 05:08 yashvadhvani

@yashvadhvani , http://localhost:8888/v1/producer/pause /resume.

mamidi1211 avatar Aug 29 '18 10:08 mamidi1211