--- Log opened Thu Jun 11 00:00:47 2020 00:00 -!- devcarrot [~devcarrot@pike.ops.ski] has quit [Ping timeout: 252 seconds] 00:01 -!- devcarrot [~devcarrot@pike.ops.ski] has joined #rust-bitcoin 00:02 -!- windsok [~windsok@unaffiliated/windsok] has quit [Ping timeout: 256 seconds] 00:05 -!- windsok [~windsok@rarepepe.cash] has joined #rust-bitcoin 00:05 -!- windsok [~windsok@rarepepe.cash] has quit [Changing host] 00:05 -!- windsok [~windsok@unaffiliated/windsok] has joined #rust-bitcoin 01:16 < ariard> BlueMatt: I still think we're talking past each other on #577 https://github.com/rust-bitcoin/rust-lightning/pull/577#discussion_r438618052 01:17 < ariard> seen you approved the PR, will review the whole a last time tmrw 01:20 -!- Kareem28Purdy [~Kareem28P@static.57.1.216.95.clients.your-server.de] has quit [Ping timeout: 260 seconds] 01:43 -!- windsok [~windsok@unaffiliated/windsok] has quit [Ping timeout: 272 seconds] 01:44 -!- windsok [~windsok@unaffiliated/windsok] has joined #rust-bitcoin 02:45 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 02:50 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 256 seconds] 02:50 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 02:55 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 265 seconds] 02:56 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 03:01 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 256 seconds] 03:01 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 03:06 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 246 seconds] 03:06 -!- Rhianna64Luettge [~Rhianna64@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 03:07 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 03:11 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 260 seconds] 03:12 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 03:16 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 256 seconds] 03:18 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 03:22 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 258 seconds] 03:46 -!- vindard [~vindard@190.83.165.233] has quit [Ping timeout: 246 seconds] 03:48 -!- vindard [~vindard@190.83.165.233] has joined #rust-bitcoin 03:53 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 03:56 -!- randyb_ [~randyb@110.54.155.110] has joined #rust-bitcoin 03:57 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 264 seconds] 04:01 -!- randyb_ [~randyb@110.54.155.110] has quit [Ping timeout: 256 seconds] 04:01 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 04:06 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 246 seconds] 04:08 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 04:13 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 256 seconds] 04:14 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 04:19 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 256 seconds] 04:20 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 04:24 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 240 seconds] 04:28 -!- randyb [~randyb@110.54.155.110] has joined #rust-bitcoin 04:31 -!- randyb_ [~randyb@110.54.155.110] has joined #rust-bitcoin 04:32 -!- Rhianna64Luettge [~Rhianna64@static.57.1.216.95.clients.your-server.de] has quit [Ping timeout: 264 seconds] 04:32 -!- randyb [~randyb@110.54.155.110] has quit [Ping timeout: 260 seconds] 04:35 -!- randyb_ [~randyb@110.54.155.110] has quit [Ping timeout: 246 seconds] 04:42 -!- Kiminuo [~mix@141.98.103.180] has joined #rust-bitcoin 04:58 -!- belcher [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 05:32 -!- prusnak [sid403625@gateway/web/irccloud.com/x-hkezqmmeoszcbmgq] has quit [Read error: Connection reset by peer] 05:32 -!- junderw [sid43070@gateway/web/irccloud.com/x-tkxsrlstezttqtoj] has quit [Ping timeout: 240 seconds] 05:32 -!- prusnak [sid403625@gateway/web/irccloud.com/x-vuyreppzkftfuwkk] has joined #rust-bitcoin 05:32 -!- schmidty [sid297174@gateway/web/irccloud.com/x-nngxwkzqbkdnzwpw] has quit [Read error: Connection reset by peer] 05:33 -!- jkczyz [sid419941@gateway/web/irccloud.com/x-cmdidozedoxkrfli] has quit [Read error: Connection reset by peer] 05:33 -!- schmidty [sid297174@gateway/web/irccloud.com/x-jmabqekawstlkbtw] has joined #rust-bitcoin 05:33 -!- junderw [sid43070@gateway/web/irccloud.com/x-qdljdmhlrqqacyxe] has joined #rust-bitcoin 05:33 -!- jkczyz [sid419941@gateway/web/irccloud.com/x-tvumzoynjieujdzb] has joined #rust-bitcoin 06:34 -!- randyb [~randyb@110.54.151.99] has joined #rust-bitcoin 06:38 -!- randyb [~randyb@110.54.151.99] has quit [Ping timeout: 246 seconds] 07:20 -!- Kiminuo [~mix@141.98.103.180] has quit [Ping timeout: 246 seconds] 07:34 -!- Kiminuo [~mix@141.98.103.180] has joined #rust-bitcoin 07:37 -!- real_or_random [~real_or_r@173.249.7.254] has quit [Quit: ZNC 1.7.5 - https://znc.in] 07:38 -!- real_or_random [~real_or_r@2a02:c207:3002:7468::1] has joined #rust-bitcoin 07:51 -!- vindard [~vindard@190.83.165.233] has quit [Ping timeout: 264 seconds] 07:57 -!- fiatjaf1 [~fiatjaf@2804:7f2:2a84:fb44:ea40:f2ff:fe85:d2dc] has quit [Ping timeout: 260 seconds] 07:57 -!- fiatjaf1 [~fiatjaf@179.187.182.70.dynamic.adsl.gvt.net.br] has joined #rust-bitcoin 08:22 -!- midnight [~midnight@unaffiliated/midnightmagic] has quit [Ping timeout: 272 seconds] 08:47 -!- midnight [~midnight@unaffiliated/midnightmagic] has joined #rust-bitcoin 09:44 -!- guest534543 [~mix@193.9.112.244] has joined #rust-bitcoin 09:45 < BlueMatt> ariard: hmm, I'm failing to parse your comment. 09:46 < BlueMatt> ariard: note that the if let ...(NONE) part checks that the resolution is in their favor 09:47 < BlueMatt> oops, uh, our favor 09:47 < BlueMatt> ariard: https://github.com/rust-bitcoin/rust-lightning/pull/577#discussion_r438927829 09:48 -!- Kiminuo [~mix@141.98.103.180] has quit [Ping timeout: 240 seconds] 10:03 -!- icota[m] [icotamatri@gateway/shell/matrix.org/x-hmlapeyzopliczrv] has joined #rust-bitcoin 10:25 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 10:25 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #rust-bitcoin 10:43 < BlueMatt> andytoshi: at some point in the next week or two, can you cut a release of bitcoin_hashes and merge https://github.com/rust-bitcoin/rust-secp256k1/pull/219 / cut a release of secp with it? I'm gonna start cleaning up our C/C++ bindings generation code for rust-lightning, but it relies on both of those for now. 10:54 < BlueMatt> also, we're pretty close to having a thing to map the full rust-lightning API into C++, which has been a month or two of work, but I'm super, super excited about it! 11:13 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has joined #rust-bitcoin 11:16 -!- guest534543 [~mix@193.9.112.244] has quit [Quit: Leaving] 11:16 -!- Kiminuo [~mix@193.9.112.244] has joined #rust-bitcoin 11:22 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 11:29 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 11:33 < BlueMatt> oh cool. cargo tree is now baked into cargo. 11:34 < BlueMatt> dependency visibility++ 12:07 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 12:09 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #rust-bitcoin 13:36 -!- Kiminuo [~mix@193.9.112.244] has quit [Ping timeout: 264 seconds] 14:23 < ariard> BlueMatt: okay with the (NONE) meaning resolution is in their favor it makes sense to account AwaitingRemoteRevokeToRemove/AwaitingRemovedRemoteRevoke in their balance 14:23 < ariard> but still why a committed outbound in our commitment transaction is accounted as their even if don't know if it's going to be a success or failure? 14:24 < ariard> I think that's an asymmetry wrt to inbound HTLCs (get_inbound_pending_htlc_stats) because there a Committed is always accounted in our balance 14:24 < ariard> even if don't know future success or failure 14:28 < BlueMatt> ariard: all we care about is "what will the value of to_remote be on our next local commitment tx" - this means we should count everything as "to us" unless its going to be removed in favor of our counterparty in the next commitment_signed they send us 14:29 < BlueMatt> eg, look at pending_value_to_self_msat - its *only* use in that fn is to calculate pending_remote_value_msat 14:50 < ariard> BlueMatt: Why we don't count OutboundHTLCState::Committed as part of "what will the value of to_remote be on our next local commitment tx" as the same that we count InboundHTLCState::Committed 14:50 < ariard> in "what will be the value of to_local be on our next local commitmenttx" 14:51 < ariard> anyway this PR doesn't change that, but I think that the way we account HTLC based on their in-flight state maybe a trouble if other implems do their accounting differently 14:54 < BlueMatt> hmm, we shouldnt be counting either, but I dont think we are - IIRC (and I may be wrong, but IIRC) - the way we keep track of balance is "htlc-less". ie self.value_to_self_msat always pretends all the htlcs are just gone. that is to say, any HTLCs from us are deducted from value_to_self_msat when creating the commitment tx, but HTLCs which are to us are deducted from (channel_value - value_to_self) when creating the commitment transaction 14:54 < BlueMatt> its just the way we track it. 15:01 < ariard> yes I got the part "htlc-less" when counting pure balance, but for in-flight HTLCs, for which resolution is unknown, how do we allocate them? Like "This inbound HTLC, we don't know if it gonna be a success or failure but as it's likely gonna be a success allocate it to local" 15:02 < ariard> "This outbound HTLC, we don't know if it gonnaa be a success or failure but as it's likely gonna be a success allocate it to_remote" 15:02 < BlueMatt> you have to deduct it 15:02 < BlueMatt> because its its own output 15:02 < BlueMatt> and separate otuputs obviously cant be included in the to_remote value 15:03 < BlueMatt> so the only htlcs we care about are the ones which are going to be resolved/gone in the next local commitment tx/their next commitment_signed 15:06 < ariard> hmmm, but that's where I'm choking, we should also care to deduce from pending_value_to_self_msat any OutboundHTLCState::Committed 15:13 -!- randyb [~randyb@110.54.192.101] has joined #rust-bitcoin 15:14 < BlueMatt> right, OutboundHTLCState::Committed is removed from value_to_self_msat when constructing the htlc, but its not included in pending_remote_value_msat 15:15 < BlueMatt> (but we're not calculating local value to_self in update_add_htlc - only care about to_remote) 15:15 < BlueMatt> like, maybe we should drop "pending_value_to_self_msat" because thats not *really* what it is 15:22 < ariard> wait it's implicitly included in pending_remote_value_msat as it's not removed from pending_value_to_self_msat ? 15:22 < BlueMatt> well only in update_add_htlc - pending_valu_to_self_msat is *only* sed in the pending_remove_value_msat calcuation 15:22 < ariard> and by removing AwaitingRemoteRevokeToRemove/AwaitingRemovedRemoteRevoke from pending_value_to_self_msat, don't we count them twice? 15:22 < BlueMatt> (which is "self.channel_value_satoshis * 1000 - pending_value_to_self_msat;") 15:23 < ariard> yes I'm talking about update_add_htlc 15:24 < ariard> like any outbound htlcs value is in fact implicitly account by substracting from channel_value_satoshis? 15:29 < BlueMatt> right - outbound htlcs are subtracted from value_to_self_msat, inbound htlcs are subtracted from (channel_value - value_to_self) 15:29 < BlueMatt> so when calculating the value, all we care about is (channel_value - value_to_self) - (inbound htlcs) - (outbound htlcs which are resolved to them) 15:31 < BlueMatt> (again, please go check my logic by looking at build_commitment_transaction :p) 15:31 -!- randyb [~randyb@110.54.192.101] has quit [Remote host closed the connection] 15:32 < ariard> well in update_add_htlc, we don't - (outbound htlcs which are resolved to them), we do (value_to_self) + (inbound htlcs) - (outbound htlcs which are resolved to them) 15:32 < ariard> hmmm haven't check yet if accounting is coherent acrosss update_add_htlc/build_commitment_transaction 15:34 < ariard> update_add_htlc sounds wrong to me on this, like by substracting resolved outbound htlcs from local_balance, and then subtracting local_balance from channel_value we wrongly inflate remote_balance 15:34 < ariard> because their value (resolved outbound htlcs) is still part of channel_value 15:35 -!- randyb [~randyb@110.54.192.101] has joined #rust-bitcoin 15:44 < BlueMatt> hmmmmmmmm, no, you may be right....is removed_outbound_total_msat supposed to be negative? 15:44 < BlueMatt> I think the Committed handling is right, though? 15:45 < BlueMatt> but, worth looking at build_commitment_signed and trying to log/print the results 15:45 < BlueMatt> ariard: any objections to posting this in an issue and merging 577, though? 15:45 < BlueMatt> since its not a regression? 15:52 < ariard> it's cleary not a regression, so will open an issue and we can look at this latter 15:52 < ariard> yeah the Committed handling seems good to me 15:52 < ariard> still see https://github.com/rust-bitcoin/rust-lightning/pull/577#discussion_r436492814 15:52 < ariard> which sounds like a spec deviation, it's okay to me but if so should be noted 15:53 < BlueMatt> ariard: I think val's right https://github.com/rust-bitcoin/rust-lightning/pull/577#discussion_r439111616 15:53 < ariard> but it's a requirement on the _sender_ ? 15:53 < ariard> and we're the _receiver_ here 15:53 < BlueMatt> hmm? but that line isnt checking anything related to fee spikes 15:54 < BlueMatt> its purely "can you afford the fee at all on the current tx/htlc" 15:54 < BlueMatt> which I think is a requirement, period, not a new thing 15:54 < ariard> ah you're right, but without comment it's hard to map which check is tied to which requirement 15:55 < BlueMatt> right, fair. ask val for a new comment? 15:55 < ariard> okay finishing review in like ~15 15:55 < ariard> min 15:55 < BlueMatt> no rush. 15:55 < ariard> well I have a commit commenting the whole update_add_htlc, but we agreed with val to do it as a follow-up 15:57 < BlueMatt> ah, ok, cool 17:28 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 17:58 -!- fiatjaf1 [~fiatjaf@179.187.182.70.dynamic.adsl.gvt.net.br] has quit [Ping timeout: 256 seconds] 17:59 -!- randyb [~randyb@110.54.192.101] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 18:17 -!- randyb [~randyb@110.54.192.101] has joined #rust-bitcoin 18:25 -!- randyb [~randyb@110.54.192.101] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 18:30 -!- randyb [~randyb@110.54.192.101] has joined #rust-bitcoin 18:31 -!- fiatjaf1 [~fiatjaf@2804:7f2:2a84:fb44:ea40:f2ff:fe85:d2dc] has joined #rust-bitcoin 18:31 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 18:31 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 18:31 -!- randyb [~randyb@110.54.192.101] has quit [Remote host closed the connection] 18:33 -!- randyb [~randyb@110.54.211.66] has joined #rust-bitcoin 18:38 -!- randyb [~randyb@110.54.211.66] has quit [Remote host closed the connection] 18:41 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 18:42 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 18:45 -!- randyb [~randyb@193.36.225.51] has joined #rust-bitcoin 19:18 -!- randyb [~randyb@193.36.225.51] has quit [Read error: Connection reset by peer] 19:30 -!- randyb [~randyb@110.54.211.66] has joined #rust-bitcoin 19:50 -!- randyb [~randyb@110.54.211.66] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 19:55 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 19:56 -!- randyb [~randyb@110.54.211.66] has joined #rust-bitcoin 19:58 -!- randyb [~randyb@110.54.211.66] has quit [Remote host closed the connection] 20:00 -!- randyb [~randyb@112.198.69.168] has joined #rust-bitcoin 20:04 -!- randyb_ [~randyb@112.198.69.168] has joined #rust-bitcoin 20:05 -!- randyb [~randyb@112.198.69.168] has quit [Ping timeout: 246 seconds] 20:09 -!- randyb_ [~randyb@112.198.69.168] has quit [Ping timeout: 265 seconds] 20:09 -!- randyb [~randyb@112.198.69.168] has joined #rust-bitcoin 20:14 -!- randyb [~randyb@112.198.69.168] has quit [Ping timeout: 256 seconds] 20:15 -!- randyb [~randyb@112.198.69.168] has joined #rust-bitcoin 20:19 -!- randyb [~randyb@112.198.69.168] has quit [Ping timeout: 258 seconds] 20:20 -!- randyb [~randyb@112.198.69.168] has joined #rust-bitcoin 20:24 -!- randyb [~randyb@112.198.69.168] has quit [Ping timeout: 246 seconds] 21:00 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 21:01 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 21:16 < junderw> If anyone has any time to do a quick review, I would appreciate it. 21:16 < junderw> https://github.com/junderw/tiny-secp256k1-wasm/blob/feature/implement/src/lib.rs 21:17 < junderw> Implementing this interface: https://github.com/junderw/tiny-secp256k1-wasm/blob/feature/implement/bin/tiny_secp256k1_wasm.d.ts 21:18 < junderw> I am using two patches: one is currently open as a pull request, addition to rust-secp256k1 of the private negate and public negate 21:19 < junderw> one is removing the Message::from_slice check for all-0x00 hash. (Currently the original JS implementation of this tiny-secp256k1 allows for all-0x00 inputs... so until I can get a new version out, I need to remove that check to pass all the test cases we have (which include all-0x00 hashes as edge cases) 21:20 < junderw> I will restore the check once I get upstream to reject it. 21:20 < junderw> anywho. This was my first dabble in rust, so I expect a lot of things to be wrong. But currently the WASM I'm producing is blazingly fast. 22:17 -!- randyb [~randyb@110.54.177.184] has joined #rust-bitcoin 23:12 -!- yancy [~root@2400:8902::f03c:92ff:fe70:a5ac] has quit [Quit: WeeChat 2.3] 23:15 -!- randyb [~randyb@110.54.177.184] has quit [Remote host closed the connection] 23:18 -!- randyb [~randyb@110.54.195.218] has joined #rust-bitcoin 23:21 -!- randyb [~randyb@110.54.195.218] has quit [Remote host closed the connection] 23:21 -!- randyb [~randyb@110.54.177.235] has joined #rust-bitcoin 23:40 -!- randyb [~randyb@110.54.177.235] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] --- Log closed Fri Jun 12 00:00:47 2020