stacks-network / stacks-core

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

Enhancement: Delay block commit until first block in tenure #5064

Open obycode opened 1 month ago

obycode commented 1 month ago

Currently, the miner submits a block commit as soon as it sees a new burn block. Since it has not yet seen any blocks in the that new tenure, it commits to the previous tenure. Then, once it sees the first block in the current tenure, it needs to RBF its previous block commit in order to commit to the current tenure. It does this even when it is itself the miner of the current tenure. It would be better to wait some threshold before submitting that block commit, in the hopes that the first tx does not need to be RBFed.