GithubHelp home page GithubHelp logo

Comments (13)

daywalker90 avatar daywalker90 commented on June 16, 2024 1

These are my own channels, i should know their capacity.
The ones with 2471854x37x are all mine.

from lightning.

daywalker90 avatar daywalker90 commented on June 16, 2024 1

Also i dont see any capacity knowledge gained in the steps above, i see the same capacity for an errored channel in n and n+1

from lightning.

rustyrussell avatar rustyrussell commented on June 16, 2024 1

OK, spendable is an approximation. Ofc if could be actually buggy, but also it assumes it we add a single HTLC. Adding more than that can reduce the amount (since we have to pay more fees). Could that be the case here?

No, but to be fair, renepay doesn't even believe it will work right?

sendpay flow groupid=1, partid=7, delivering=187457000msat, probability=0.000
...
# Update chan knowledge scid=2471854x37x7, dir=1: [187457878msat,187457878msat]
...
# sendpay flow groupid=1, partid=12, delivering=187457000msat, probability=0.000

If it really believes the range to be 187457878msat - 187457878msat, it should give probability=1.000 surely?

What about this:

diff --git a/plugins/renepay/flow.c b/plugins/renepay/flow.c
index ed65beb93..47ce059a5 100644
--- a/plugins/renepay/flow.c
+++ b/plugins/renepay/flow.c
@@ -178,7 +178,15 @@ void chan_extra_cannot_send(
 		x = AMOUNT_MSAT(0);
 	}
 
-	ce->half[dir].known_min = amount_msat_min(ce->half[dir].known_min,x);
+	/* If we "knew" the capacity was at least this, we just showed we're wrong! */
+	if (amount_msat_less(x, ce->half[dir].known_min)) {
+		debug_paynote(p, "Expected scid=%s, dir=%d min %s, but %s failed!  Setting min to 0",
+			      type_to_string(tmpctx,struct short_channel_id,&scid),
+			      dir,
+			      type_to_string(tmpctx,struct amount_msat,&ce->half[dir].known_min),
+			      type_to_string(tmpctx,struct amount_msat,&x));
+		ce->half[dir].known_min = AMOUNT_MSAT(0);
+	}
 	ce->half[dir].known_max = amount_msat_min(ce->half[dir].known_max,x);
 
 	debug_paynote(p,"Update chan knowledge scid=%s, dir=%d: [%s,%s]",

from lightning.

rustyrussell avatar rustyrussell commented on June 16, 2024

We retry because this failure often means there's insufficient capacity, so we can try with less.

The assert fail shouldn't happen though...

from lightning.

Lagrang3 avatar Lagrang3 commented on June 16, 2024

It's weird that all of those local channels are failing. It shouldn't be for lack of liquidity. renepay always calls listpeerchannels at the moment of payment to fetch the exact spendable amount in local channels.

from lightning.

daywalker90 avatar daywalker90 commented on June 16, 2024

one of these channels (completely new and unused channel btw.):

"channels": [
      {
         "peer_id": "029001b22fe70b48bee12d014df91982eb85ff1bd404ec772d5c83c4ee3e88d2c3",
         "peer_connected": true,
         "channel_type": {
            "bits": [
               12
            ],
            "names": [
               "static_remotekey/even"
            ]
         },
         "ignore_fee_limits": true,
         "state": "CHANNELD_NORMAL",
         "scratch_txid": "42cc79af7274e9225e81ef434c87fa6658ca08b7e9a497281baae6b2426a9c43",
         "last_tx_fee_msat": 183000,
         "feerate": {
            "perkw": 253,
            "perkb": 1012
         },
         "owner": "channeld",
         "short_channel_id": "2471854x37x5",
         "direction": 1,
         "channel_id": "6e56fc1855e78736cc68088c686289d55ae2121f3c09474808678e5ae9ec9291",
         "funding_txid": "9492ece95a8e67084847093c1f12e25ad58962688c0868cc3687e75518fc566e",
         "funding_outnum": 5,
         "close_to_addr": "tb1pdzqy062yn69egy7d37292p9cqy6jlyjp3zl55mmnnfzsn8g64ncqj9umar",
         "close_to": "5120688047e9449e8b9413cd8f945504b801352f924188bf4a6f739a45099d1aacf0",
         "private": false,
         "opener": "local",
         "alias": {
            "local": "15921688x10432820x50382",
            "remote": "6512090x3128355x22491"
         },
         "features": [
            "option_static_remotekey"
         ],
         "funding": {
            "local_funds_msat": 200000000,
            "remote_funds_msat": 0,
            "pushed_msat": 0
         },
         "to_us_msat": 200000000,
         "min_to_us_msat": 200000000,
         "max_to_us_msat": 200000000,
         "total_msat": 200000000,
         "fee_base_msat": 0,
         "fee_proportional_millionths": 1200,
         "dust_limit_msat": 546000,
         "max_total_htlc_in_msat": 18446744073709551615,
         "their_reserve_msat": 2000000,
         "our_reserve_msat": 2000000,
         "spendable_msat": 197460000,
         "receivable_msat": 0,
         "minimum_htlc_in_msat": 1,
         "minimum_htlc_out_msat": 1,
         "maximum_htlc_out_msat": 198000000,
         "their_to_self_delay": 6,
         "our_to_self_delay": 6,
         "max_accepted_htlcs": 10,
         "state_changes": [
            {
               "timestamp": "2023-08-09T15:26:26.769Z",
               "old_state": "CHANNELD_AWAITING_LOCKIN",
               "new_state": "CHANNELD_NORMAL",
               "cause": "user",
               "message": "Lockin complete"
            }
         ],
         "status": [
            "CHANNELD_NORMAL:Reconnected, and reestablished.",
            "CHANNELD_NORMAL:Channel ready for use. Channel announced."
         ],
         "in_payments_offered": 0,
         "in_offered_msat": 0,
         "in_payments_fulfilled": 0,
         "in_fulfilled_msat": 0,
         "out_payments_offered": 18,
         "out_offered_msat": 584871019,
         "out_payments_fulfilled": 0,
         "out_fulfilled_msat": 0,
         "htlcs": []
      }
   ]

from lightning.

Lagrang3 avatar Lagrang3 commented on June 16, 2024

It looks that renepay is trying to send through that channel 2471854x37x5 as much flow as the spendable amount. It shouldn't be a problem, I tried that case in regtest.

from lightning.

daywalker90 avatar daywalker90 commented on June 16, 2024

on mainnet i sometimes do payments over a single channel and there i sometimes encounter this problem as well. I could only send (spendable_msat - X)msat (i usually use 1_000_000msat for X).

from lightning.

Lagrang3 avatar Lagrang3 commented on June 16, 2024

If it really believes the range to be 187457878msat - 187457878msat, it should give probability=1.000 surely?

Yes, it should be p=1, but we don't know what's the rest of the path.

from lightning.

rustyrussell avatar rustyrussell commented on June 16, 2024

OK, I'll slip this change into rc3 (I guess that's not shipping until later tonight now!). Let's see...

from lightning.

daywalker90 avatar daywalker90 commented on June 16, 2024

testnet updated to rc3:

tlcli renepay lntb9m1pjd7kd9pp56x60t38m8dud0t0lew8zh9z3tk39cm5vrq2qslaehr3lnfy6wcwsdql2djkuepqw3hjqsj5gvsxzerywfjhxuccqzynxqrrsssp5meqfxk8dmqyxtxsjlw3qv7n7224g0r5apgexvp4h3hkmtqgha8qq9qyyssqaacvpjsya88xhntjsy93ap4hz0u257ys65uad4s2ma2m46489p3ygxnpwhf4ruwwp5l2j73v4sg0hfsjsc6ktj7vq3r4xf6ygfarcjgq40slp8
# we have computed a set of 7 flows with probability 0.000, fees 132266msat and delay 467
# ...disabling channel 2194294x14x0: channel_update said it was disabled
# we have computed a set of 7 flows with probability 0.000, fees 38536msat and delay 385
# ...disabling channel 2193434x18x0: channel_update said it was disabled
# we have computed a set of 7 flows with probability 0.000, fees 38536msat and delay 385
# ...disabling channel 2192392x23x0: channel_update said it was disabled
# we have computed a set of 7 flows with probability 0.000, fees 40411msat and delay 385
# ...disabling channel 2136738x42x1: channel_update said it was disabled
# we have computed a set of 7 flows with probability 0.000, fees 40411msat and delay 385
# Shadow route on flow 0/7 added 0 block delay. now 147
# Shadow route on flow 1/7 added 0 block delay. now 147
# Shadow route on flow 2/7 added 0 block delay. now 147
# Shadow route on flow 3/7 added 0 block delay. now 147
# Shadow route on flow 4/7 added 0 block delay. now 147
# Shadow route on flow 5/7 added 0 block delay. now 147
# Shadow route on flow 6/7 added 0 block delay. now 147
# sendpay flow groupid=1, partid=7, delivering=187457000msat, probability=0.000
# sendpay flow groupid=1, partid=6, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=5, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=4, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=3, delivering=73896000msat, probability=0.993
# sendpay flow groupid=1, partid=2, delivering=2642000msat, probability=1.000
# sendpay flow groupid=1, partid=1, delivering=43625000msat, probability=0.000
# Update chan knowledge scid=2471854x37x7, dir=1: [187457878msat,187457878msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x7: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x15, dir=1: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x15: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x2, dir=0: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x2: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x5, dir=1: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x5: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x13, dir=1: [43625433msat,43625433msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x13: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 1620sat)
# we have computed a set of 5 flows with probability 0.000, fees 39338msat and delay 385
# Shadow route on flow 0/5 added 0 block delay. now 147
# Shadow route on flow 1/5 added 0 block delay. now 147
# Shadow route on flow 2/5 added 0 block delay. now 147
# Shadow route on flow 3/5 added 0 block delay. now 147
# Shadow route on flow 4/5 added 0 block delay. now 147
# sendpay flow groupid=1, partid=12, delivering=187457000msat, probability=0.000
# sendpay flow groupid=1, partid=11, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=10, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=9, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=8, delivering=43625000msat, probability=0.000
# Update chan knowledge scid=2471854x37x15, dir=1: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x15: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x2, dir=0: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x2: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x5, dir=1: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x5: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x13, dir=1: [43625433msat,43625433msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x13: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 1620sat)
# Update chan knowledge scid=2471854x37x7, dir=1: [187457878msat,187457878msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x7: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# we have computed a set of 5 flows with probability 0.000, fees 39338msat and delay 385
# Shadow route on flow 0/5 added 0 block delay. now 147
# Shadow route on flow 1/5 added 0 block delay. now 147
# Shadow route on flow 2/5 added 0 block delay. now 147
# Shadow route on flow 3/5 added 0 block delay. now 147
# Shadow route on flow 4/5 added 0 block delay. now 147
# sendpay flow groupid=1, partid=17, delivering=187457000msat, probability=0.000
# sendpay flow groupid=1, partid=16, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=15, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=14, delivering=197460000msat, probability=0.000
# sendpay flow groupid=1, partid=13, delivering=43625000msat, probability=0.000
# Update chan knowledge scid=2471854x37x15, dir=1: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x15: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x2, dir=0: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x2: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x5, dir=1: [197460000msat,197460000msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x5: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# Update chan knowledge scid=2471854x37x13, dir=1: [43625433msat,43625433msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x13: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 1620sat)
# Update chan knowledge scid=2471854x37x7, dir=1: [187457878msat,187457878msat]
# onion error WIRE_TEMPORARY_CHANNEL_FAILURE from node #0 2471854x37x7: failed: WIRE_TEMPORARY_CHANNEL_FAILURE (WIRE_TEMPORARY_CHANNEL_FAILURE: Capacity exceeded - HTLC fee: 226sat)
# we have computed a set of 5 flows with probability 0.000, fees 39338msat and delay 385

[*snip*]

# sendpay flow groupid=1, partid=209, delivering=187457000msat, probability=0.000
lightning-cli: Malformed response '"message","params":{"id":"cli:renepay#2609679","level":"info","message":"sendpay flow groupid=1, partid=209, delivering=18745700d=209, delivering=187457000msat, probability=0.000"}}":"message","params":{"id":"cli:renepay#2609679","level":"info","message":"sendpay flow groupid=1, partid=209, delivering=187457000msat, probability=0.000"}}":"message","params":{"id":"cli:renepay#2609679","level":"info","message":"sendpay flow groupid=1, partid=209, delivering=187457000msat, probability=0.000"}}":"message","params":{"id":"cli:renepay#2609679","level":"info","message":"sendpay flow groupid=1, partid=209, delivering=187457000msat, probability=0.000"}}":"message","params":{"id":"cli:renepay#2609679","level":"info","message":"sendpay flow groupid=1, partid=209, delivering=187457000msat, probability=0.000"}} 147"}}

{"jsonrpc":"2.0","method":"message","params":{"id":"cli:renepay#2609679","level":"info","message":"sendpay flow groupid=1, partid=209, delivering=187457000msat, probability=0.000"}}'

logs:

Aug 18 13:45:13  lightningd: 0x55b3bb567079 send_backtrace
Aug 18 13:45:13  lightningd:         common/daemon.c:33
Aug 18 13:45:13  lightningd: 0x55b3bb567101 crashdump
Aug 18 13:45:13  lightningd:         common/daemon.c:75
Aug 18 13:45:13  lightningd: 0x7fa921f8ffcf ???
Aug 18 13:45:13  lightningd:         ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
Aug 18 13:45:13  lightningd: 0x55b3bb54e6d3 pay_flow_finished_adding_gossip
Aug 18 13:45:13  lightningd:         plugins/renepay/pay_flow.c:675
Aug 18 13:45:13  lightningd: 0x55b3bb54af25 addgossip_done
Aug 18 13:45:13  lightningd:         plugins/renepay/pay.c:171
Aug 18 13:45:13  lightningd: 0x55b3bb558858 handle_rpc_reply
Aug 18 13:45:13  lightningd:         plugins/libplugin.c:871
Aug 18 13:45:13  lightningd: 0x55b3bb5589e1 rpc_read_response_one
Aug 18 13:45:13  lightningd:         plugins/libplugin.c:1048
Aug 18 13:45:13  lightningd: 0x55b3bb558a7f rpc_conn_read_response
Aug 18 13:45:13  lightningd:         plugins/libplugin.c:1072
Aug 18 13:45:13  lightningd: 0x55b3bb586ad7 next_plan
Aug 18 13:45:13  lightningd:         ccan/ccan/io/io.c:59
Aug 18 13:45:13  lightningd: 0x55b3bb586f5e do_plan
Aug 18 13:45:13  lightningd:         ccan/ccan/io/io.c:407
Aug 18 13:45:13  lightningd: 0x55b3bb586ff7 io_ready
Aug 18 13:45:13  lightningd:         ccan/ccan/io/io.c:417
Aug 18 13:45:13  lightningd: 0x55b3bb588854 io_loop
Aug 18 13:45:13  lightningd:         ccan/ccan/io/poll.c:453
Aug 18 13:45:13  lightningd: 0x55b3bb558cbc plugin_main
Aug 18 13:45:13  lightningd:         plugins/libplugin.c:1949
Aug 18 13:45:13  lightningd: 0x55b3bb54cd36 main
Aug 18 13:45:13  lightningd:         plugins/renepay/pay.c:1383
Aug 18 13:45:13  lightningd: 0x7fa921f7b1c9 __libc_start_call_main
Aug 18 13:45:13  lightningd:         ../sysdeps/nptl/libc_start_call_main.h:58
Aug 18 13:45:13  lightningd: 0x7fa921f7b284 __libc_start_main_impl
Aug 18 13:45:13  lightningd:         ../csu/libc-start.c:360
Aug 18 13:45:13  lightningd: 0x55b3bb549a50 ???
Aug 18 13:45:13  lightningd:         ???:0
Aug 18 13:45:13  lightningd: 0xffffffffffffffff ???
Aug 18 13:45:13  lightningd:         ???:0
Aug 18 13:45:13  lightningd[2609473]: INFO    plugin-cln-renepay: Killing plugin: exited during normal operation

from lightning.

rustyrussell avatar rustyrussell commented on June 16, 2024

Doh, that's me!

from lightning.

rustyrussell avatar rustyrussell commented on June 16, 2024

Worse, the previous logic I added is not firing at all, it's still looping. I've added a PR to try to give better output so we can see what's happening: #6593

from lightning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.