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

[Feature]: Add bitcoin reorg integration tests #1304

Open
1 task
djordon opened this issue Feb 4, 2025 · 0 comments
Open
1 task

[Feature]: Add bitcoin reorg integration tests #1304

djordon opened this issue Feb 4, 2025 · 0 comments
Labels
sbtc signer binary The sBTC Bootstrap Signer.

Comments

@djordon
Copy link
Collaborator

djordon commented Feb 4, 2025

Feature - Add bitcoin reorg integration tests

1. Description

All of our logic is supposed to be reorg aware. In particular, if there is a reorg on bitcoin, we are supposed to be able to recover pretty seamlessly; picking up the right signer UTXO and re-minting any deposits that have been orphaned due to the reorg. Although we have some tests for this, most of them are not end-to-end tests. This ticket is to add them

1.1 Context & Purpose

We want to add more confidence that things will go smoothly in the event of a bitcoin reorg that affects the signers’ UTXO or a deposit.

2. Technical Details:

Add integration tests that use the invalidateblock and reconsiderblock RPCs on bitcoin core to test end-to-end handling of reorgs.

2.1 Acceptance Criteria:

  • We have more end-to-end tests that check that we handle things correctly in the event of a reorg on bitcoin.

3. Related Issues and Pull Requests (optional):

4. Appendix

A great test would also incorporate how we handle the Stacks side of things in addition to the bitcoin side of things. Alas, this would take quite a bit of work to do because of the difficulty of running a stacks node in a regtest environment.

@djordon djordon added the sbtc signer binary The sBTC Bootstrap Signer. label Feb 4, 2025
@djordon djordon added this to the sBTC: Nice to have milestone Feb 4, 2025
@djordon djordon added this to sBTC Feb 4, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Feb 4, 2025
@djordon djordon moved this from Needs Triage to Todo in sBTC Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sbtc signer binary The sBTC Bootstrap Signer.
Projects
Status: Todo
Development

No branches or pull requests

1 participant