Lightning: Payment problem

Created on 21 Jun 2018  路  5Comments  路  Source: ElementsProject/lightning

Issue and Steps to Reproduce

I tried to move funds between my two nodes. From A to B.

'A' node is 035ac00f3bfe7fd991ec7cd9b5fcad0bdaa338c343895e56f4ada7df181bc43622@46.101.114.3:9735
'B' node is
02b0de5dece2ae1c6cf62dba60e584268b8f27babb936a849e998c2170802efc9b@5.9.72.48:9735

First I made an invoice on 'B' node with the full amount available on 'A' node (150000 satoshi), but it didn't worked like the second time, when I calculate already the fees into the transaction, so I requested an invoice with 147900 satoshis.

The second invoice I made with the 'B' node:

 "label": "1",
      "bolt11": "lnbc1479n1pdjhq49pp5ugns9an0xzuw0sw62j3ussdfcx8jaz30pgmcypqz8gf65areqtvsdqjd4hhv6twvan82mnywvcqp2pwrkfg40mltqse3hthxu8h4cut5w8gv3puvykkxu427hj958q7kzgwccg2h967dfyl068s2d652v3pu6cwv58d7s6h345w7utjw3mgsqkq6xr5",
      "payment_hash": "e22702f66f30b8e7c1da54a3c841a9c18f2e8a2f0a378204023a13aa747902d9",
      "msatoshi": 147900,
      "status": "unpaid",
      "expiry_time": 1529581749,
      "expires_at": 1529581749

I tried to pay with the 'A' node:

root@LightningN:~/c-lightning/lightning# cli/lightning-cli pay lnbc1479n1pdjhq49pp5ugns9an0xzuw0sw62j3ussdfcx8jaz30pgmcypqz8gf65areqtvsdqjd4hhv6twvan82mnywvcqp2pwrkfg40mltqse3hthxu8h4cut5w8gv3puvykkxu427hj958q7kzgwccg2h967dfyl068s2d652v3pu6cwv58d7s6h345w7utjw3mgsqkq6xr5
{ "code" : 206, "message" : "Fee 2001 is 1.352941% of payment 147900; max fee requested is 0.500000%.", "data" :
{
  "msatoshi": 147900,
  "fee": 2001,
  "feepercent": 1.352941,
  "maxfeepercent": 0.500000,
  "delay": 312,
  "maxdelay": 500,
  "getroute_tries": 6,
  "sendpay_tries": 0,
  "route": [
    {
      "id": "02f6725f9c1c40333b67faea92fd211c183050f28df32cac3f9d69685fe9665432",
      "channel": "527929:1112:1",
      "msatoshi": 149901,
      "delay": 312
    },
    {
      "id": "02ad6fb8d693dc1e4569bcedefadf5f72a931ae027dc0f0c544b34c1c6f3b9a02b",
      "channel": "528371:1680:1",
      "msatoshi": 148900,
      "delay": 298
    },
    {
      "id": "025e77156e4c5e1ed62f9ad113ac2115a981ee99fa05d95be9e43add7f785a9b4d",
      "channel": "514137:241:0",
      "msatoshi": 148899,
      "delay": 154
    },
    {
      "id": "02b0de5dece2ae1c6cf62dba60e584268b8f27babb936a849e998c2170802efc9b",
      "channel": "528515:2266:1",
      "msatoshi": 147900,
      "delay": 10
    }
  ],
  "failures": [
  ]
} }

Nothing happened. The funds didn't move. What's wrong?

getinfo output

{
  "id": "035ac00f3bfe7fd991ec7cd9b5fcad0bdaa338c343895e56f4ada7df181bc43622",
  "port": 9735,
  "address": [
    {
      "type": "ipv4",
      "address": "46.101.114.3",
      "port": 9735
    }
  ],
  "binding": [
    {
      "type": "ipv4",
      "address": "46.101.114.3",
      "port": 9735
    }
  ],
  "version": "v0.5.2-2016-11-21-2796-g27a186b",
  "blockheight": 528526,
  "network": "bitcoin"
}
cli question

All 5 comments

This question would be much better suited at a user support forum like https://bitcoin.stackexchange.com/ since this is not really a development issue.

The first failure is due to the reserve value and the fee for the payment which limit the maximum amount that can actually be transferred over the channel. The reserve is there in order to prevent you from having no funds in play, thus making a cheating attempt free for you. The fee, as you discovered, is levied by the forwarding nodes and is added on top of the transferred amount.

The second failure is due to the fee being larger than the fee percentage that lightningd will attempt without asking you for more fee:

Fee 2001 is 1.352941% of payment 147900; max fee requested is 0.500000%.

This is so that lightningd doesn't happily pick a route with a huge fee, because it reattempts multiple times. You can increase the fee you are willing to pay by using the following:

lightning-cli pay -k maxfeepercent=5 bolt11=[invoice-string]

This would allow up to 5% fee. This is necessary for these really low value transfers because nodes will ask for a fixed as well as a proportional fee, and in these cases the fixed fee of 1 satorshi per hop dominates the proportional part.

Sorry, for asking at the wrong place. Next time I will ask were you said. I haven't known that site.

I tried what you wrote, but it's not working:

root@LightningN:~/c-lightning/lightning# cli/lightning-cli -k maxfeepercent=5 bolt11=lnbc1479n1pdjh26mpp56lmfspgvrs6zq6s5eha7as9mwfll6te6sn0jdkneeum75ygv7mvqdqjd4hhv6twvan82mnywvcqp283lsvfjjexjnggw46c33grhm4vlyn0mllpct3fvfe065hr86vvdz9uwet5rtea7yrzst7r8guk2ktwmahwctcdz8en45xvdrz46vuncp5jmq0u
{ "code" : -32601, "message" : "Unknown command 'maxfeepercent=5'" }

I made a new invoice (deleted the old one). Tried to modify a little and I came with this:

root@LightningN:~/c-lightning/lightning# cli/lightning-cli pay maxfeepercent=5 lnbc1479n1pdjcqdlpp5c5w69zecga6c5rcxtgv7qvz08dz9smx4wjqqu9jqxjd7kwefa4aqdqjd4hhv6twvan82mnywvcqp2mal8jh3qlcyqhn97akeg9qhyvaajep47yy4gas6w3ysfpzg93nd5hy2rpzn0lnfa9hsfk40tm33tl4w54s4364ckur54q5vr4v8qe2cp2tw8x9
lightning-cli: Expected key=value in 'lnbc1479n1pdjcqdlpp5c5w69zecga6c5rcxtgv7qvz08dz9smx4wjqqu9jqxjd7kwefa4aqdqjd4hhv6twvan82mnywvcqp2mal8jh3qlcyqhn97akeg9qhyvaajep47yy4gas6w3ysfpzg93nd5hy2rpzn0lnfa9hsfk40tm33tl4w54s4364ckur54q5vr4v8qe2cp2tw8x9': Success

Still nothing happens. :(

The correct command is the following:

cli/lightning-cli pay -k maxfeepercent=5 bolt11=lnbc1479n1pdjh26mpp56lmfspgvrs6zq6s5eha7as9mwfll6te6sn0jdkneeum75ygv7mvqdqjd4hhv6twvan82mnywvcqp283lsvfjjexjnggw46c33grhm4vlyn0mllpct3fvfe065hr86vvdz9uwet5rtea7yrzst7r8guk2ktwmahwctcdz8en45xvdrz46vuncp5jmq0u

Sorry about that :wink:

Thanks for your help, with my other problems I moved to stackexchange. :)

Was this page helpful?
0 / 5 - 0 ratings