Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miner Transaction Replay on Bitcoin Reorg #4313

Open
2 tasks
AshtonStephens opened this issue Jan 30, 2024 · 1 comment
Open
2 tasks

Miner Transaction Replay on Bitcoin Reorg #4313

AshtonStephens opened this issue Jan 30, 2024 · 1 comment
Labels
feature Brand new functionality. New pages, workflows, endpoints, etc. nakamoto ship future

Comments

@AshtonStephens
Copy link
Collaborator

AshtonStephens commented Jan 30, 2024

Summary

Add a feature to the miner to replay Stacks transactions that were part of an invalid tenure due to a Bitcoin reorg.

Under Nakamoto, sortitions with a valid winner on the Bitcoin blockchain will yield a TenureChange that allows a new miner to produce blocks that the signers will sign, but a Bitcoin reorg can force the Stacks blockchain to reorganize because a Bitcoin block with a valid sortition can be orphaned itself, meaning that the orphaned tenures are now invalid. This ticket is to add a feature to the default Miner binary to have the miner replay transactions that were orphaned by a Bitcoin reorg to be included within the next tenure.

This ticket does not encompass including any kind of analysis on the validity of transactions, only prioritizing the replay of the transactions that were previously confirmed by a now invalid tenure.

Testing

  • When a Bitcoin block is orphaned any Stacks transactions that were included in a tenure triggered by that orphaned block are replayed by the miner.

Success Criteria

  • There's a written design for how the replay feature should behave
  • The reference miner implementation includes the replay feature
@AshtonStephens AshtonStephens added feature Brand new functionality. New pages, workflows, endpoints, etc. ship future nakamoto labels Jan 30, 2024
@AshtonStephens AshtonStephens changed the title Signer Transaction Replay on Bitcoin Reorg Miner Transaction Replay on Bitcoin Reorg Feb 1, 2024
@AshtonStephens
Copy link
Collaborator Author

Changed the wording to Miner, because that's what should be doing the replay, and the signer should potentially be enforcing it. This ticket is just for the reference miner implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Brand new functionality. New pages, workflows, endpoints, etc. nakamoto ship future
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant