Skip to content
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]: Cannot send coins with 1 sat/vB #8704

Closed
Impa10r opened this issue Apr 27, 2024 · 6 comments
Closed

[bug]: Cannot send coins with 1 sat/vB #8704

Impa10r opened this issue Apr 27, 2024 · 6 comments
Labels
bug Unintended code behaviour needs triage

Comments

@Impa10r
Copy link

Impa10r commented Apr 27, 2024

Background

Describe your issue here.

Your environment

  • version of lnd 0.18.0-beta.rc1
  • which operating system (uname -a on *Nix) ubuntu
  • version of btcd, bitcoind, or other backend Bitcoin Core version v26.0.0
  • any other relevant environment details testnet3

Steps to reproduce

lncli sendcoins --addr tb1p6phwhqxsykfu0rhsnye0mvscamrfjderawlwq4mxls6k8y0dut0q39ck4s --amt 1000 --sat_per_vbyte 1
Amount: 1000
Destination address: tb1p6phwhqxsykfu0rhsnye0mvscamrfjderawlwq4mxls6k8y0dut0q39ck4s
Confirm payment (yes/no): yes
[lncli] rpc error: code = Unknown desc = fee preference too low: got 253 sat/kw, minimum is 287 sat/kw

Expected behaviour

should send

Actual behaviour

does not let me use such a fee

@Impa10r Impa10r added bug Unintended code behaviour needs triage labels Apr 27, 2024
@Impa10r
Copy link
Author

Impa10r commented Apr 28, 2024

today even 2 sats/vB does not work. same build, same address:

vlad@vlad-VirtualBox:~$ lncli sendcoins --addr tb1p6phwhqxsykfu0rhsnye0mvscamrfjderawlwq4mxls6k8y0dut0q39ck4s --amt 1000 --sat_per_vbyte 2
Amount: 1000
Destination address: tb1p6phwhqxsykfu0rhsnye0mvscamrfjderawlwq4mxls6k8y0dut0q39ck4s
Confirm payment (yes/no): yes
[lncli] rpc error: code = Unknown desc = fee preference too low: got 500 sat/kw, minimum is 697 sat/kw

blocks mine empty:
image

@alexbosworth
Copy link
Contributor

If your peers won't relay too-low chain fee transactions then publishing the transaction wouldn't work right?

@Impa10r
Copy link
Author

Impa10r commented Apr 28, 2024

This is not a problem on testnet. Fee estimation is wrong. How do I calculate the new floor? If we censor low fee transactions the fees won't go down.

@guggero
Copy link
Collaborator

guggero commented Apr 29, 2024

What value do you get for mempoolminfee when you run bitcoin-cli getmempoolinfo? That should match up with the minimum fee rate you get in the error message.

@Impa10r
Copy link
Author

Impa10r commented Apr 29, 2024

Thanks. Today lncli sendcoins worked with 1 sat/vB, but it bumped the fee slightly internally:

$ journalctl -fu lnd
...
abr 29 10:09:42 vlad-VirtualBox lnd[682]: 2024-04-29 10:09:42.867 [INF] SWPR: Manual fee rate input of 250 sat/kw is too low, using 253 sat/kw instead
abr 29 10:09:42 vlad-VirtualBox lnd[682]: 2024-04-29 10:09:42.883 [INF] RPCS: [sendcoins] addr=tb1p6phwhqxsykfu0rhsnye0mvscamrfjderawlwq4mxls6k8y0dut0q39ck4s, amt=0.00001000 BTC, sat/kw=253, min_confs=1, send_all=false

minimum was 1 sat:

$ bcli getmempoolinfo
{
  "loaded": true,
  "size": 86,
  "bytes": 16417,
  "usage": 127856,
  "total_fee": 0.00476236,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00001000,
  "minrelaytxfee": 0.00001000,
  "incrementalrelayfee": 0.00001000,
  "unbroadcastcount": 0,
  "fullrbf": true
}

@guggero
Copy link
Collaborator

guggero commented Apr 29, 2024

Starting with v0.18.0, lnd will not let you create a transaction that will not make it into your local bitcoind's mempool. So lnd uses the mempoolminfee as the absolute minimum fee rate it will allow you to use. Otherwise you won't be able to broadcast it.
Since you are using the default mempool size of 300 MB, I assume that value was lower when you tried yesterday.

Closing the issue, as this is expected behavior.

@guggero guggero closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour needs triage
Projects
None yet
Development

No branches or pull requests

3 participants