-
Notifications
You must be signed in to change notification settings - Fork 23
Inconsistent checking of RBF rules #192
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
Comments
I think we can kinda ignore rule 3 at the moment, since we don't support merging multiple unconfirmed transactions, so this:
For us basically means that we should just pay at least the previous fee. I agree on rule 4 though, the And now that I think about it, it's kind of a chicken-and-egg problem: rule 4 says that we should pay at least the size of the new transaction, but at this point we don't know it yet. So even the part above where |
Bump rust-bitcoin dependency to v0.27
Coin selection algorithms should take
|
We discussed it in the call and decided to close this issue. Please comment if you think it should be re-opened |
Per discussion in dev call today this doesn't seem to be fixed yet. |
Per @evanlinjin we can fix this issue by using the new |
More notes from @evanlinjin from discord chat: Therefore, it is possible that our new transaction may be larger in weight than the old one |
I volunteer to try and fix RBF API with |
Thanks @LLFourn , if you can fix with integration of |
@LLFourn Since we're not going to have have a |
Yes I'd like to make the extracted |
Sorry ACK I haven't had time to do this work so yes you can push it to 2.0.0. Thanks. |
We can wait until we have the |
This commit adds RBF policy based on BIP125 and Bitcoin Core's Replacement Policy. More specifically replacement transactions should: - Have a higher absolute fee than the original transaction (incentivizes miners). - Pay enough for their bandwidth (prevents DoS). - Have a higher feerate than conflicting transactions (BitcoinCore policy, incentivizes miners) The old implementation was checking bip125 rules partially based on the fee policy chosen in txbuilder, and also was following a wrong assumption that feerate >= previous_feerate + BROADCAST_MIN Also fixes a test based on the above assumption. Fixes: bitcoindevkit#192
I realize I should've probably checked in before starting to work on this, I hope this was up for grabs as Rob mentioned this in his list of possible things to work on! |
BIP125 rules 3 and 4 are not being checked properly according to my understanding:
https://github.com/bitcoindevkit/bdk/blob/c2b2da7601fb570952cfd858f3821b3a4fd87ec9/src/wallet/mod.rs#L730-L746
It should be checking rules 3 and 4 regardless of the fee policy chosen in txbuilder.
The text was updated successfully, but these errors were encountered: