bitcoindevkit / bitcoindevkit/bdk-tx

RBF docs mix BIP 125 and Bitcoin Core policy

Open
#52 0 comments 1 reaction 0 assignees View on GitHub
discussion documentation
Dominant language
Rust
Stars
13
Forks
17
Avg merge
17h 22m
Merged PRs (30d)
1

Description

The RBF docs/comments currently mix BIP 125 rule numbers and Bitcoin Core's `mempool-replacements.md` wording as if they were the same spec.

Bitcoin Core's replacement policy has diverged from BIP 125 over time:

- **Rule 1:** Removed in Core policy: full RBF default in v28.0; `-mempoolfullrbf` removed in v29.0
- **Rule 2:** Removed in Core policy in v31.0.
- **Rule 3:** Unchanged.
- **Rule 4:** Changed in Core policy to use `-incrementalrelayfee`
- **Rule 5:** Changed in Core policy in v31.0.
- **Rule 6:** Core-only rule; changed in Core policy in v31.0.

This makes several comments ambiguous or factually wrong depending on which policy/version the reader assumes.

### Examples
- [`src/rbf.rs:81-93`](https://github.com/bitcoindevkit/bdk-tx/blob/8142a660a6ce210860f63da39ccd483b6b47edf5/src/rbf.rs#L81-L84): `candidate_filter` enforces BIP 125 rule 2; was removed from current Core policy.
- [`examples/synopsis.rs:99-100`](https://github.com/bitcoindevkit/bdk-tx/blob/8142a660a6ce210860f63da39ccd483b6b47edf5/examples/synopsis.rs#L99-L100): links to moving `master` Core policy and says all rules are followed.
- [`examples/synopsis.rs:122-123`](https://github.com/bitcoindevkit/bdk-tx/blob/8142a660a6ce210860f63da39ccd483b6b47edf5/examples/synopsis.rs#L122-L123): attributes removed rule 2 to Bitcoin Core policy.
- [`examples/synopsis.rs:133`](https://github.com/bitcoindevkit/bdk-tx/blob/8142a660a6ce210860f63da39ccd483b6b47edf5/examples/synopsis.rs#L133): says "mempool-replacement policy" without naming the policy/version.
- [`examples/synopsis.rs:147`](https://github.com/bitcoindevkit/bdk-tx/blob/8142a660a6ce210860f63da39ccd483b6b47edf5/examples/synopsis.rs#L147): says "rules 4 and 6" without naming Core/version.

### Possible fix
- Follow a specific Bitcoin Core policy version and link to tagged Core docs instead of `master`
- Document any behavior that intentionally differs from that pinned Core policy, e.g. stricter BIP 125 checks.

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.