-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[bug]: coin selection uses "RBF"ed inputs #7971
Comments
Actually, I think this is a duplicate of #5959. Feel free to close. Sorry. |
So coin selection can't actually know what the transaction that spends an input looks like (nor what all the prior transactions look like, if replacements exist). A user could have spent it via the PSBT APIs, or manually otherwise. The issue here only arises when spending unconfirmed change. |
I agree, lnd can't know what users do outside of lnd. However, I believe that lnd should be able to skip inputs that are the result of internal "RBF"ing. And yes, it helps to wait for confirmation. |
In my case, when I restarted lnd v0.15.4, some INPUT txs of funding transactions(zero-conf channel) changed to UTXOs (they appeared in the output of |
@nayuta-ueno I suggest you create a new issue for this (with further information). My gut feeling is that zero-conf channels have issues unrelated to the issue I described here. |
fixed by #8545 |
See #5959 for a very related issue.
Background
An unconfirmed output that should not be used because it is double-spent as part of RBF is used as an input for a funding transaction (when allowing unconfirmed inputs).
My gut feeling is that this issue also affects sweep transactions, i.e. (important?) sweep transactions that are invalid because of a double spent input.
Your environment
lnd
: 0.16.4uname -a
on *Nix): Linux server 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 GNU/Linuxbtcd
,bitcoind
, or other backend: bitcoind v25Steps to reproduce
Have an unconfirmed transaction that has been "replaced by fee" (RBF), i.e. another transaction spending the same output also exists. Open a channel using "--min_confs 0".
Expected behaviour
The replacing version of the same transaction (paying a higher fee) should be regarded.
Actual behaviour
The replaced transaction is used, possibly even in conjunction with the replacement transaction.
The text was updated successfully, but these errors were encountered: