stacks-network / stacks-network/stacks-core
Improved handling of bitcoin reorgs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.1k
- Forks
- 762
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 76
Description
Yesterday, we saw a stall which was caused by a Bitcoin reorg. During this reorg, neither Bitcoin fork had >70% of signers following it, so there was no way for the Stacks miner to continue. When the Stacks miner sees a new Bitcoin block in which there is no new winning miner, it will issue a tenure extend transaction with the new burn view. In this case, since neither Bitcoin block reached consensus within the signer set, this block could not possibly be approved.
The change that I think is worth further investigation would be if the miner can detect this situation (signers reporting different bitcoin blocks at the same height and failing to reach consensus) and then in that case, it could continue to produce blocks normally, without attempting to emit the tenure extend with a burn view change.
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.
Research direction
The issue names no files, tests, or entry points. Start by tracing how the Stacks miner handles competing Bitcoin blocks, signer consensus, and tenure-extend transactions with burn-view changes. Done would mean defining and validating behavior for a reorg where neither fork reaches signer consensus, but the required design remains to be determined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100