bitcoindevkit / bitcoindevkit/bdk-tx

Add CPFP Support with Multi-Parent Bumping and Ancestor-Aware Fee Calculation

Open
#14 3 comments 0 reactions 1 assignee Claimed by @aagbotemi View on GitHub
enhancement
Dominant language
Rust
Stars
13
Forks
17
Avg merge
17h 22m
Merged PRs (30d)
1

Description

## Objectives
Implement CPFP functionality to boost low-fee parent transactions by creating child transactions with high fee rates. This feature should support boosting multiple transactions with a single CPFP transaction and consider all unconfirmed ancestors in fee rate calculations.

## Proposed Implementation
- **Parent Output**: Use `CanonicalUnspents` to select the parent’s unconfirmed output as a `must_select` input.
- **High Fee Rate**: Set a high `target_feerate` in `SelectorParams` to make the package attractive to miners.
- **Anti-Fee-Sniping**: Disable it to avoid delays(do not add it).
- **API Extension**: Add a `CpFpParams` struct to encapsulate parent details and fee rate.

## Rationale
- Ensures the parent output is spent, linking the transactions.
- High fee rate incentivizes miners to include both.
- Disabling anti-fee-sniping avoids unnecessary delays.

Add `examples/cpfp.rs` to show CPFP boosting a stuck transaction.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.