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: impl bitcoin-core's gettxspendingprevout and getmempooldescendants RPCs (#759 part 1) #834

Merged

Conversation

cylewitruk
Copy link
Member

Description

Part 1 of: #759 (part of #758)

These two methods are a prerequisite for being able to pull sweep transaction information from the mempool.

Changes

  • Adds support and tests for bitcoin core (v27+) gettxspendingprevout and getmempooldescendants RPC calls
  • It's been bugging me for a while so I took the opportunity to consolidate errors which originate from the bitcoin module to its own error variant.
  • Bitcoin core updated to v27 in docker compose files.

Testing Information

Three new integration tests in bitcoin_rpc.rs testing these two 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

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.

Largely looks good, I'm not sure how I feel about the added BitcoinError variant though.

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
signer/src/bitcoin/rpc.rs Outdated Show resolved Hide resolved
signer/tests/integration/bitcoin_rpc.rs Outdated Show resolved Hide resolved
signer/tests/integration/bitcoin_rpc.rs Outdated Show resolved Hide resolved
signer/src/bitcoin/rpc.rs Outdated Show resolved Hide resolved
signer/src/bitcoin/error.rs Outdated Show resolved Hide resolved
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.

Looks good 🙏🏽

signer/tests/integration/bitcoin_rpc.rs Outdated Show resolved Hide resolved
@cylewitruk cylewitruk merged commit a93ab6d into main Nov 13, 2024
4 checks passed
@cylewitruk cylewitruk deleted the 758-feature-use-bitcoin-core-for-sweep-transaction-information branch November 14, 2024 09:20
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]: Use mempool for transactions spending the signers' UTXO
2 participants