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 transaction fee validation #552

Open
2 tasks
djordon opened this issue Sep 20, 2024 · 0 comments · May be fixed by #582
Open
2 tasks

[Feature]: Add bitcoin transaction fee validation #552

djordon opened this issue Sep 20, 2024 · 0 comments · May be fixed by #582
Assignees
Labels
sbtc bootstrap signer The sBTC Bootstrap Signer.

Comments

@djordon
Copy link
Contributor

djordon commented Sep 20, 2024

Feature - Add bitcoin transaction fee validation

1. Description

Whenever we validate a complete-deposit or withdrawal-accept Stacks transaction, we need to inspect an associated bitcoin transaction to verify that the "fee" used in the Stacks transaction matches what it should be. This is needed to make sure that every element in the Stacks transaction matches up what the signers think that it should be.

1.1 Context & Purpose

The validation code in #545 only checks that the fee is reasonable, not that it is computed correctly. We should add functionality that computes the fee associated with each input and output of a bitcoin transaction. This is also likely needed for validating for #286.

2. Technical Details:

2.1 Acceptance Criteria:

  • Add functionality that computes the fee associated with each input and output of a bitcoin transaction.
  • Use this functionality when validating Stacks complete-deposit or withdrawal-accept transactions.

3. Related Issues and Pull Requests (optional):

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 a pull request may close this issue.

1 participant