stacks-network / stacks-network/stacks-core

Update `miners` StackerDB to handle multiple bad sortitions

Open
#5,487 0 comments 0 reactions 1 assignee View on GitHub

@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_config to allow either the sortition winner OR the miner who was able to successfully TenureExtend the 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.