stacks-network / stacks-network/stacks-core
Update `miners` StackerDB to handle multiple bad sortitions
@jcnelson is already working on this.
Since Nov 21, 2024.
- Dominant language
- Rust
- Stars
- 3.1k
- Forks
- 762
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 76
Description
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:
- Modify
make_miners_stackerdb_configto allow either the sortition winner OR the miner who was able to successfullyTenureExtendthe previous block to write to this slot. - Make a new StackerDB, like
miners-v2, which allows N previous sortition winners to write to it. This technically can run into the same issue as described here, even if N was something high like ~10.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.