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: implement validation of deposit fees #803

Merged
merged 9 commits into from
Nov 12, 2024

Conversation

djordon
Copy link
Contributor

@djordon djordon commented Nov 9, 2024

Description

Closes #802.

Changes

  • Add a function for validating the fees of a deposit that is used in a sweep transaction.
  • Add a new FeeAssessment trait to make it easy to assess fees when we have other types.
  • Add the max-fee to the DepositRequestReport.

Testing Information

This PR adds unit tests and updates the integration tests to make sure that we've updated the query correctly.

Checklist:

  • I have performed a self-review of my code

@djordon djordon added the sbtc signer binary The sBTC Bootstrap Signer. label Nov 9, 2024
@djordon djordon added this to the sBTC: Deposit ready milestone Nov 9, 2024
@djordon djordon self-assigned this Nov 9, 2024
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.

Looks fine, just had a few suggestions

signer/src/bitcoin/utxo.rs Outdated Show resolved Hide resolved
signer/src/bitcoin/utxo.rs Outdated Show resolved Hide resolved
signer/src/bitcoin/utxo.rs Show resolved Hide resolved
signer/src/bitcoin/validation.rs Show resolved Hide resolved
@djordon djordon merged commit 831f8a1 into main Nov 12, 2024
4 checks passed
@djordon djordon deleted the 802-implement-validation-of-deposit-fees branch November 12, 2024 13:51
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: Done
Development

Successfully merging this pull request may close these issues.

[Feature]: Implement validation of deposit fees in bitcoin transactions
3 participants