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]: Get last fee for bitcoin transactions #541

Open
1 task
djordon opened this issue Sep 17, 2024 · 0 comments
Open
1 task

[Feature]: Get last fee for bitcoin transactions #541

djordon opened this issue Sep 17, 2024 · 0 comments
Labels
sbtc bootstrap signer The sBTC Bootstrap Signer.

Comments

@djordon
Copy link
Contributor

djordon commented Sep 17, 2024

Feature - Get Last Fee for bitcoin transactions

1. Description

Before we can replace-by-fee (RBF) a bitcoin transaction, we need to fetch the fee that was paid for the last transaction package that is currently in the mempool.

1.1 Context & Purpose

In order to RBF a transaction you need to know how much you paid both in total and per vbyte in order to know whether the new fee would be accepted. Since we could be replacing an entire package, we need to know the fees paid for all signer transactions in the mempool. Each of these transactions has their first input and output with a scriptPubKey that is in the dkg_shares table.

2. Technical Details:

Might be easiest to use the gettxspendingprevout and getmempooldescendants RPC calls on bitcoin-core since we know the previous signer UTXO once #538 is done.

2.1 Acceptance Criteria:

  • The BitcoinInteract::get_last_fee returns the fee paid for the current outstanding transaction package in the mempool.

3. Related Issues and Pull Requests (optional):

@djordon djordon added the sbtc bootstrap signer The sBTC Bootstrap Signer. label Sep 17, 2024
@djordon djordon added this to the sBTC MVP Code Complete milestone Sep 24, 2024
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
Status: Todo
Development

No branches or pull requests

1 participant