stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 668 forks source link

Miner should generate a tenure-extend and continue mining if the next miner does not start mining #5361

Open obycode opened 2 weeks ago

obycode commented 2 weeks ago

Currently, the miner will generate a tenure-extend and continue mining if there is no sortition in the next burn block, but it should also do this if there is a sortition, but the next miner does not mine a block within some threshold time.

obycode commented 5 days ago

Sometimes, the next miner is unable to mine any blocks, so the previous miner should be able to tell for sure that it can extend its tenure. This happens if the winning miner's block commit is not committing to the correct tenure. Sometimes this will happen if a miner's block commit is not RBFed in time. #5064 could help with this, avoiding the need for an RBF.

obycode commented 5 days ago

If a miner sees that the next miner is in this situation, it should go ahead and immediately submit a tenure extend.

obycode commented 5 days ago

I think this scenario is happening often currently in mainnet, causing pauses in block production. One example I looked at: