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 gettxout and getmempoolentry endpoints + tests #858

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

cylewitruk
Copy link
Member

@cylewitruk cylewitruk commented Nov 15, 2024

Description

Related to (prerequisite) #759

Changes

Adds implementation and tests for Bitcoin-core's gettxout and getmempoolentry RPC endpoints.

While gettxout proved to be unreliable when trying to calculate fees for an unknown potential mixture of confirmed/unconfirmed transactions, if you know whether or not its confirmed or not then it works fine (see tests). So it's not going to be used in #759 but I decided to leave it in as it can be useful.

Reverts bitcoin core to 25.1 in docker compose files.

Testing Information

Added a number of tests testing both methods.

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@cylewitruk cylewitruk added the sbtc signer binary The sBTC Bootstrap Signer. label Nov 15, 2024
@cylewitruk cylewitruk added this to the sBTC: Deposit ready milestone Nov 15, 2024
@cylewitruk cylewitruk self-assigned this Nov 15, 2024
@cylewitruk cylewitruk linked an issue Nov 15, 2024 that may be closed by this pull request
1 task
Copy link
Contributor

@djordon djordon left a comment

Choose a reason for hiding this comment

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

Not done looking it through, thought I'd share my thoughts so far.

signer/src/bitcoin/rpc.rs Outdated Show resolved Hide resolved
signer/src/bitcoin/rpc.rs Outdated Show resolved Hide resolved
signer/src/bitcoin/rpc.rs Outdated Show resolved Hide resolved
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: In Review
Development

Successfully merging this pull request may close these issues.

[Feature]: Use mempool for transactions spending the signers' UTXO
2 participants