stacks-network / stacks-core

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

Update `miners` StackerDB to handle multiple bad sortitions #5487

Open hstove opened 1 day ago

hstove commented 1 day ago

We have multiple workstreams (mainly #5452) presently where a TenureExtend is created, even if a new BTC block has a winning miner. As part of testing for this feature, we've learned that there is an edge case where, if there are two bad sortition winners in a row, the "good" miner cannot TenureExtend a second time, because they can't write to the miners StackerDB contract. This is because the miners StackerDB only allows writes from the current and previous sortition winner.

I think there are a few potential paths forward for this: