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

feat: add validation for accept-withdrawal-request transactions #555

Merged
merged 26 commits into from
Sep 24, 2024

Conversation

djordon
Copy link
Contributor

@djordon djordon commented Sep 21, 2024

Description

Closes #477.

Changes

The changes here are very similar in spirit to the changes in #545.

  • Add a SignerVotes type for converting to a bitmap
  • Implement validate for the AcceptWithdrawalV1 type, which is used for accept-withdrawal-request contract calls.
  • Minor clean-up of the integration tests for the complete-deposit validation integration tests.

Testing Information

This PR adds integration tests. There is still some work to what is here before it is finalize, specifically #552 and #554.

Checklist:

  • I have performed a self-review of my code

Copy link
Member

@cylewitruk cylewitruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't gotten all the way through yet but here's my comments so far :)

signer/src/bitcoin/utxo.rs Show resolved Hide resolved
signer/src/stacks/contracts.rs Show resolved Hide resolved
signer/src/stacks/contracts.rs Show resolved Hide resolved
signer/src/stacks/contracts.rs Show resolved Hide resolved
signer/src/stacks/contracts.rs Show resolved Hide resolved
signer/src/error.rs Show resolved Hide resolved
Copy link
Member

@cylewitruk cylewitruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still have a few tests left to go through but here's a few more comments (same stuff as on the other PR pretty much)

signer/tests/integration/withdrawal_accept.rs Outdated Show resolved Hide resolved
signer/tests/integration/withdrawal_accept.rs Outdated Show resolved Hide resolved
signer/tests/integration/withdrawal_accept.rs Outdated Show resolved Hide resolved
Base automatically changed from 479-validate-complete-deposit-sign-requests to main September 24, 2024 05:12
Copy link
Member

@cylewitruk cylewitruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, finally got through this -- few docs suggestions and one wrong test doc i think. Otherwise looks good :)

signer/tests/integration/withdrawal_accept.rs Outdated Show resolved Hide resolved
signer/tests/integration/withdrawal_accept.rs Show resolved Hide resolved
signer/tests/integration/withdrawal_accept.rs Show resolved Hide resolved
signer/tests/integration/withdrawal_accept.rs Outdated Show resolved Hide resolved
Copy link
Member

@cylewitruk cylewitruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🥳

@djordon djordon merged commit 10b150d into main Sep 24, 2024
4 checks passed
@djordon djordon deleted the 477-validate-accept-withdrawal-request-contract-calls branch September 24, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sbtc bootstrap signer The sBTC Bootstrap Signer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Validate accept-withdrawal-request contract calls
3 participants