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]: Validate reject-withdrawal-request contract calls #478

Open
1 task
Tracked by #476
djordon opened this issue Sep 2, 2024 · 0 comments · May be fixed by #1336
Open
1 task
Tracked by #476

[Feature]: Validate reject-withdrawal-request contract calls #478

djordon opened this issue Sep 2, 2024 · 0 comments · May be fixed by #1336
Assignees
Labels
sbtc signer binary The sBTC Bootstrap Signer. withdrawal The withdrawal sBTC operation.

Comments

@djordon
Copy link
Collaborator

djordon commented Sep 2, 2024

1. Description

This is a part of #476.

1.1 Context & Purpose

The checks for validating reject-withdrawal-request contract call include the following is to create a report struct containing the key pieces of information about a withdrawal request. They include:

  1. The request exists. Check whether the associated withdrawal request transaction is confirmed on the canonical stacks blockchain. Fail the withdrawal request if it is not on the canonical stacks blockchain.
  2. The double spend check. Check whether the qualified request ID is in the bitcoin_withdrawals_outputs table, and that any of the associated txids are confirmed on the canonical bitcoin blockchain. Fail the withdrawal request if such a transaction was found.
  3. The request is final. Check that we've seen six new bitcoin blocks since observing the bitcoin anchor block associated with the Stacks block confirming the withdrawal request transaction. Fail the withdrawal request if we’ve observed less than 6 bitcoin blocks since the anchor block.
  4. The request is collectively rejected or expired. Check if the request does not have enough votes or if we've observed 24 new bitcoin blocks since observing the bitcoin anchor block associated with the Stacks block confirming the withdrawal request transaction. Fail otherwise.

I think that that's it. All other things are implicitly handled by the design laid out in #782.

2. Technical Details:

Validation of reject-withdrawal-request contract calls, happens inside the RejectWithdrawalV1::validate function. The task is to implement that function

2.1 Acceptance Criteria:

  • We have a properly implemented function for validating reject-withdrawal-request contract call sign requests.

3. Related Issues and Pull Requests (optional):

I think that this ticket is the last part of #255

@djordon djordon changed the title We have code for validating reject-withdrawal-request contract calls. [Feature]: Validate reject-withdrawal-request contract calls. Sep 2, 2024
@djordon djordon added the sbtc signer binary The sBTC Bootstrap Signer. label Sep 2, 2024
@djordon djordon added this to sBTC Sep 2, 2024
@djordon djordon added this to the sBTC Code Complete milestone Sep 2, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in sBTC Sep 2, 2024
@djordon djordon moved this from Needs Triage to Todo in sBTC Sep 2, 2024
@djordon djordon changed the title [Feature]: Validate reject-withdrawal-request contract calls. [Feature]: Validate reject-withdrawal-request contract calls Sep 3, 2024
@djordon djordon self-assigned this Sep 21, 2024
@djordon djordon moved this from Todo to In Progress in sBTC Sep 21, 2024
@djordon djordon moved this from In Progress to Todo in sBTC Sep 30, 2024
@djordon djordon removed their assignment Oct 22, 2024
@xoloki xoloki linked a pull request Feb 10, 2025 that will close this issue
4 tasks
@xoloki xoloki self-assigned this Feb 10, 2025
@djordon djordon moved this from Todo to In Progress in sBTC Feb 11, 2025
@djordon djordon added the withdrawal The withdrawal sBTC operation. label Feb 13, 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. withdrawal The withdrawal sBTC operation.
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants
@xoloki @djordon @AshtonStephens and others