-
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
[feature]: disallow creating on-chain transactions below mempoolminfee
#7512
Comments
Hi @guggero , I decided to look into this since I'd like to find areas where I can start contributing. I see that inside of However, I see that inside of I would be happy to attempt this fix if you can confirm :) Edit: threw together this quick commit in case it's easier to just see the code |
@shaurya947 nice investigation, I wasn't aware that we already pulled that value from I think it makes sense to fix the sweeper that it always creates transactions that can be added to the local mempool. But apart from the sweeper, which is part of the automated functionality of Also, while looking through the sweeper code, I also found this sentence: https://github.com/lightningnetwork/lnd/blob/master/sweep/sweeper.go#L367 ("Assume that this will not change from here on"). Which might hold true for pure dust calculations, but not for fee rate calculations (as the min mempool fee can rise and fall during the sweeper's lifetime). So we should probably check that assumption as well. |
Hey @guggero thanks for the feedback. My research is indicating that even though the code I edited is in the
For I would have suggested to replace the All that being said, what would you suggest? I can think of three options:
|
You are correct, it seems like using a conf target is already handled correctly everywhere. Though most users are more comfortable using I think a PR that does the following would be good:
We should then look through all |
Sounds good! I'll aim to have a PR up today 🙂 |
Gave it a shot here! |
Related to: #7505
In situations where the mempool of a node becomes full (e.g. exceeds the default 300 MB size),
bitcoind
starts to not accept new transactions into the mempool that are below themempoolminfee
threshold reported by thegetmempoolinfo
RPC call (introduced inbitcoind v0.21.0
.Because transactions with a fee that is too low cannot get into the mempool in the first place, they also cannot be fee bumped, as the CPFP transaction is seen as invalid if its parent isn't known to the node.
The solution is to increase the mempool size (
-maxmempool=XXXX
) of thebitcoind
node, but that is not practicable for most users, especially when running on low-end hardware.Instead we should make sure that
lnd
doesn't allow creating transactions below the currentmempoolminfee
.This should be a
bitcoind
specific fix, asbtcd
currently doesn't have a mempool size limit and Neutrino is dependent on the node it connects to and cannot ask it for its setting.The text was updated successfully, but these errors were encountered: