--- Log opened Tue May 26 00:00:31 2020 00:09 -!- kristapsk_ is now known as kristapsk 00:10 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has quit [Remote host closed the connection] 00:42 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 01:01 -!- sr_gi [~sr_gi@31.4.243.160] has joined #c-lightning 01:19 < m-schmoock> cdecker: I'm trying write a backwards compat plugin test where I need to have my RPC API response to a certain call (i.e. listpeers) modified to look like an old server. I havent found a working way to acomplish that from within testcase, as the plyn.client.lightning.LightningRPC objects in the test are different instances than for the tested plugin itself. otherwise I coul override and hook the 01:19 < m-schmoock> method and forge the response I need to test for 01:19 < m-schmoock> Do you know a good/better/proper way for something like this? 01:28 < m-schmoock> Something like this in the test: https://pastebin.com/3zhhswkq 01:38 -!- sr_gi [~sr_gi@31.4.243.160] has quit [Remote host closed the connection] 01:44 -!- sr_gi [~sr_gi@31.4.243.160] has joined #c-lightning 01:44 -!- jonatack [~jon@37.170.134.59] has quit [Ping timeout: 260 seconds] 01:46 -!- jonatack [~jon@184.75.223.195] has joined #c-lightning 01:46 -!- queip [~queip@unaffiliated/rezurus] has joined #c-lightning 01:53 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has quit [Remote host closed the connection] 02:17 -!- jonatack [~jon@184.75.223.195] has quit [Ping timeout: 240 seconds] 02:20 -!- jonatack [~jon@37.173.167.96] has joined #c-lightning 02:20 -!- k3tan [~pi@unaffiliated/k3tan] has quit [Ping timeout: 265 seconds] 02:22 -!- k3tan [~pi@unaffiliated/k3tan] has joined #c-lightning 02:32 -!- sr_gi [~sr_gi@31.4.243.160] has quit [Remote host closed the connection] 02:38 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has joined #c-lightning 02:45 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has quit [Remote host closed the connection] 02:45 -!- kristapsk [~KK@gateway/tor-sasl/kristapsk] has joined #c-lightning 03:15 -!- sr_gi [~sr_gi@47.61.117.157] has joined #c-lightning 03:17 -!- sr_gi [~sr_gi@47.61.117.157] has quit [Read error: Connection reset by peer] 03:17 -!- sr_gi_ [~sr_gi@47.61.117.157] has joined #c-lightning 03:23 <@cdecker> m-schmoock: you could use the `rpc_method` hook in a plugin to intercept the RPC method call and return a mocked result, together with the monkey-patching of the pyln-client library you found, that's probably the easiest solution 03:25 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 03:39 -!- mrostecki [~mrostecki@gateway/tor-sasl/mrostecki] has quit [Quit: leaving] 03:40 -!- mrostecki [~mrostecki@gateway/tor-sasl/mrostecki] has joined #c-lightning 03:45 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 04:17 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 04:19 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 04:19 -!- sr_gi_ [~sr_gi@47.61.117.157] has quit [Remote host closed the connection] 04:28 < m-schmoock> cdecker: am i correct that this would require me to have test code in the plugin (not the test) 04:28 < m-schmoock> i was trying to get around this 04:33 <@cdecker> We could create a generic mock plugin that has RPC calls that can set or remove mock responses. It'd still be an extra plugin, but you could drive it from the test itself, keeping the logic in one place 04:58 -!- b42 [~mmilata@b42.cz] has quit [Ping timeout: 260 seconds] 06:01 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has joined #c-lightning 06:07 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has quit [Remote host closed the connection] 06:20 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has joined #c-lightning 06:21 -!- sr_gi_ [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has joined #c-lightning 06:25 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has quit [Ping timeout: 260 seconds] 06:31 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has joined #c-lightning 06:34 -!- sr_gi_ [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has quit [Ping timeout: 256 seconds] 06:34 -!- sr_gi_ [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has joined #c-lightning 06:35 -!- mdunnio [~mdunnio@208.59.170.5] has joined #c-lightning 06:37 -!- sr_gi [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has quit [Ping timeout: 258 seconds] 07:13 < fiatjaf> will the rpc_command plugin intercept rpc methods that don't exist? 07:13 < fiatjaf> I wanted to do a plugin that would intercept a method if it existed or create it if it didn't 07:14 <@cdecker> Good question, I don't think it would, but if there's a good use-case it might be worth adding that support 07:14 < fiatjaf> maybe I can call the `"help"` method before registering the plugin and see if it exists? 07:14 < fiatjaf> maybe not 07:15 < fiatjaf> well, I won't go ahead and say my use-case is "good", I don't want to give you people more work, it's nothing urgent, and just a vague idea for the future :P 07:16 <@cdecker> Hehe, sounds interesting, do you mind sharing what you're implementing? 07:16 < m-schmoock> cdecker: that sounds useful for testing. I have a tiny cleanup PR for drain, but the code coverage was bad so i wanted a test for it. but I cant to it without something like that 07:16 < m-schmoock> so I will finish the PR without that and we keep something like that in mind 07:17 < m-schmoock> theres still a another bug so dont merge it right away 07:24 -!- liberliver1 [~Thunderbi@x590eb21b.dyn.telefonica.de] has joined #c-lightning 07:25 -!- liberliver [~Thunderbi@144.49.211.130.bc.googleusercontent.com] has quit [Ping timeout: 260 seconds] 07:25 -!- liberliver1 is now known as liberliver 07:27 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 07:27 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 07:32 -!- liberliver [~Thunderbi@x590eb21b.dyn.telefonica.de] has quit [Ping timeout: 256 seconds] 07:33 -!- liberliver [~Thunderbi@x590eb21b.dyn.telefonica.de] has joined #c-lightning 07:35 -!- queip [~queip@unaffiliated/rezurus] has quit [Ping timeout: 264 seconds] 07:37 -!- queip [~queip@unaffiliated/rezurus] has joined #c-lightning 07:49 <@cdecker> Ok, if a PR isn't ready either publish it as a draft (triangle dropdown next to green create pull request button) or prefix with "WIP" and I won't merge it, but we can already start discussing on the PR ^^ 07:49 -!- liberliver1 [~Thunderbi@x4dbf7df8.dyn.telefonica.de] has joined #c-lightning 07:50 < fiatjaf> cdecker: on that issue you said you attempt a mutual close even if there are HTLCs hanging 07:51 < fiatjaf> how can that be even possible? 07:51 < fiatjaf> I fail to understand completely 07:51 < fiatjaf> if you can negotiate a mutual close shouldn't you also be able to negotiate a new channel state and keep the channel open? 07:51 -!- liberliver [~Thunderbi@x590eb21b.dyn.telefonica.de] has quit [Ping timeout: 265 seconds] 07:51 -!- liberliver1 is now known as liberliver 07:52 < fiatjaf> help me clarify this: if there's an HTLC `h` in the channel `A-h->B` and it's stuck 07:53 < fiatjaf> after a while A should close the channel if B doesn't show up with the preimage 07:53 < fiatjaf> and A should only do that because otherwise B may close the channel and redeem `h` after its expiry time 07:54 < fiatjaf> and that may cause A to lose money (if A was routing that from another channel, like: Z-->A-->B) 07:56 < fiatjaf> now if A and B can negotiate and remove `h` from their channel and go onchain in a mutual close to which party does the HTLC amount go? 07:57 <@cdecker> No, the HTLC forces the channel to close, because there is no safe way to removing the HTLC from the current state we really can't make any progress 07:58 <@cdecker> It's independent from our ability to negotiate a new state, it basically means that we'll need to drop to chain in the hopes of getting the preimage from downstream, otherwise we could end up in a situation where the HTLC timeout expires, we just got the preimage, and now it's a race between timeout and success 07:59 <@cdecker> This is common to all off-chain protocols: if whatever we build on top of the update mechanism (LN-penalty or eltoo) has an absolute deadline that is to be enforced on-chain, we need to drop on-chain before the absolute timeout expires, otherwise we cannot enforce the timeout safely 08:21 -!- b42 [~mmilata@b42.cz] has joined #c-lightning 08:30 -!- grubles [~blockhash@unaffiliated/grubles] has joined #c-lightning 08:32 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 08:37 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 260 seconds] 08:37 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 08:41 -!- cltrbreak_MAD2 [~ctrlbreak@159.2.182.106] has quit [Remote host closed the connection] 08:42 -!- cltrbreak_MAD2 [~ctrlbreak@159.2.182.106] has joined #c-lightning 08:43 -!- liberliver [~Thunderbi@x4dbf7df8.dyn.telefonica.de] has quit [Ping timeout: 240 seconds] 08:54 -!- jonatack [~jon@37.173.167.96] has quit [Ping timeout: 240 seconds] 08:55 -!- jonatack [~jon@137.63.71.51] has joined #c-lightning 09:01 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 09:17 -!- cltrbreak_MAD2 [~ctrlbreak@159.2.182.106] has quit [Remote host closed the connection] 09:18 -!- cltrbreak_MAD2 [~ctrlbreak@159.2.182.106] has joined #c-lightning 09:21 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has quit [Read error: Connection reset by peer] 09:23 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 09:25 -!- vasild [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 09:49 -!- Letze [sid63391@gateway/web/irccloud.com/x-nwhrqykzfjqebyji] has quit [Read error: Connection reset by peer] 10:00 -!- queip [~queip@unaffiliated/rezurus] has quit [Quit: bye, freenode] 10:02 -!- queip [~queip@unaffiliated/rezurus] has joined #c-lightning 10:04 -!- Letze [sid63391@gateway/web/irccloud.com/x-wewbinccpvgccayq] has joined #c-lightning 10:06 -!- Letze [sid63391@gateway/web/irccloud.com/x-wewbinccpvgccayq] has quit [Max SendQ exceeded] 10:16 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has joined #c-lightning 10:17 -!- Letze [sid63391@gateway/web/irccloud.com/x-eadykpujquhkfhwd] has joined #c-lightning 10:20 -!- Letze [sid63391@gateway/web/irccloud.com/x-eadykpujquhkfhwd] has quit [Max SendQ exceeded] 10:21 -!- Letze [sid63391@gateway/web/irccloud.com/x-whloonpjsvvcxmzb] has joined #c-lightning 11:47 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 240 seconds] 12:20 -!- mdunnio [~mdunnio@208.59.170.5] has quit [Remote host closed the connection] 12:21 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 12:35 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has quit [Remote host closed the connection] 12:50 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 13:07 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has joined #c-lightning 13:54 < fiatjaf> so the closing transaction would have, say, 3 outputs? one to node A, other to node B and a third to an HTLC (in case there's only one in-flight HTLC)? 14:18 -!- jonatack [~jon@137.63.71.51] has quit [Ping timeout: 260 seconds] 14:20 -!- jonatack [~jon@37.166.165.158] has joined #c-lightning 15:07 -!- sr_gi_ [~sr_gi@183.red-83-34-186.dynamicip.rima-tde.net] has quit [Quit: Leaving...] 15:43 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 15:43 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 15:58 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 265 seconds] 16:07 -!- PaulTroon [~paultroon@h-5-150-248-150.NA.cust.bahnhof.se] has quit [Remote host closed the connection] 16:19 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 16:22 < zmnscpxj> fiatjaf: yes, that is correct. 16:23 < zmnscpxj> that applies to all unilateral close transactions 16:23 < zmnscpxj> for mutual close, our policy is to wait for in-flight HTLCs to either resolve or fail offchain, and prevent adding new HTLCs while waiting 16:24 < zmnscpxj> so that mutual closes are "clean" and involve just the "main" output(s) 16:24 < fiatjaf> zmnscpxj: then I'm confused again 16:24 < zmnscpxj> why? 16:25 < fiatjaf> I had channels mutual-closed without any command from me or from the other node 16:25 < fiatjaf> then cdecker told me they were closed because of stuck HTLCs 16:25 < zmnscpxj> *were* those mutual? 16:25 < fiatjaf> then I said: "but they were mutual closed!" 16:25 < zmnscpxj> that would be very strange 16:26 < fiatjaf> lightningd classifies them as mutual closed 16:26 < zmnscpxj> because the code path never enter closingd in that case 16:26 < zmnscpxj> hmmmmmmm 16:26 < fiatjaf> and they don't have OP_CSV outputs 16:26 < zmnscpxj> anyway have to go afk 16:26 < zmnscpxj> but that needs analysis 16:26 < fiatjaf> ok 16:26 < fiatjaf> analysis is all I desire 16:44 -!- cltrbreak_MAD2 [~ctrlbreak@159.2.182.106] has quit [Remote host closed the connection] 16:44 -!- cltrbreak_MAD2 [~ctrlbreak@159.2.182.106] has joined #c-lightning 16:45 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 16:48 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 16:58 -!- jonatack_ [~jon@37.170.255.11] has joined #c-lightning 17:01 -!- jonatack [~jon@37.166.165.158] has quit [Ping timeout: 240 seconds] 17:48 < rusty> fiatjaf: they're unilateral in that case. We never start a mutual close unless instructed (eg. by a plugin?) 18:07 < fiatjaf> well, now I think I was misled by two different source without actually checking 18:07 < fiatjaf> I checked now and indeed they weren't mutual-closed 18:07 < fiatjaf> I think 18:08 < fiatjaf> sorry for the confusion 18:09 < fiatjaf> but cdecker did say mutual-closes can happen with stuck HTLCs: https://github.com/ElementsProject/lightning/issues/3743#issuecomment-633968658 18:10 < fiatjaf> or maybe this is just more confusion and misunderstanding 18:14 < fiatjaf> now I'm thinking there could be a way to mutual-close even when there's an in-flight HTLC, or perhaps a way to just expel that HTLC without closing the channel 18:14 < fiatjaf> which would be odd 18:14 < fiatjaf> ok, better not think about that now 18:29 < rusty> fiatjaf: commented on issue. I think he's wrong. 19:30 < fiatjaf> thank you 21:20 -!- vasild_ [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 21:23 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 21:23 -!- vasild_ is now known as vasild 21:28 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Quit: WeeChat 2.7.1] 21:29 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 21:46 -!- instagibbs [~instagibb@pool-71-178-191-230.washdc.fios.verizon.net] has quit [Quit: ZNC 1.7.4+deb7 - https://znc.in] 21:48 -!- instagibbs [~instagibb@pool-71-178-191-230.washdc.fios.verizon.net] has joined #c-lightning 22:32 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 272 seconds] 22:38 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 23:44 -!- treehug88 [~textual@pool-71-105-170-196.nycmny.fios.verizon.net] has quit [Quit: Textual IRC Client: www.textualapp.com] 23:54 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 23:55 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 23:59 -!- Amperture [~amp@65.79.129.113] has joined #c-lightning 23:59 -!- Amperture [~amp@65.79.129.113] has quit [Client Quit] --- Log closed Wed May 27 00:00:32 2020