--- Day changed Mon Dec 12 2016 00:03 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Remote host closed the connection] 00:03 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 00:05 -!- JackH [~laptop@79-73-186-159.dynamic.dsl.as9105.com] has joined #lightning-dev 00:08 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 250 seconds] 00:25 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 01:27 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-jmntxozuayuobkqa] has quit [Quit: Connection closed for inactivity] 01:30 -!- sstone [~sstone@3.46-14-84.ripe.coltfrance.com] has joined #lightning-dev 01:43 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 02:14 -!- AaronvanW [~ewout@unaffiliated/aaronvanw] has joined #lightning-dev 02:18 -!- droark [~droark@c-24-22-123-27.hsd1.or.comcast.net] has quit [Ping timeout: 268 seconds] 02:34 -!- Grouver [~grouver@53535FBF.cm-6-4b.dynamic.ziggo.nl] has joined #lightning-dev 02:43 -!- shesek [~shesek@bzq-84-110-57-94.red.bezeqint.net] has quit [Ping timeout: 260 seconds] 02:46 -!- laurentmt [~Thunderbi@80.215.178.205] has joined #lightning-dev 02:47 -!- laurentmt [~Thunderbi@80.215.178.205] has quit [Client Quit] 02:52 -!- aakselrod [~alex@c-75-70-229-204.hsd1.co.comcast.net] has quit [Ping timeout: 268 seconds] 02:52 -!- aakselrod [~alex@c-75-70-229-204.hsd1.co.comcast.net] has joined #lightning-dev 02:53 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has quit [Ping timeout: 246 seconds] 02:57 -!- shesek [~shesek@bzq-84-110-53-9.cablep.bezeqint.net] has joined #lightning-dev 03:06 -lightningrfc:#lightning-dev- [lightning-rfc] pm47 pushed 1 new commit to master: https://git.io/v1KiA 03:06 -lightningrfc:#lightning-dev- lightning-rfc/master abe0e8c pm47: fixed toc inconsistency 03:14 -!- warren [~warren@fedora/wombat/warren] has quit [Ping timeout: 265 seconds] 03:16 -!- warren [~warren@fedora/wombat/warren] has joined #lightning-dev 03:19 -!- laurentmt [~Thunderbi@80.215.178.205] has joined #lightning-dev 03:20 -!- laurentmt [~Thunderbi@80.215.178.205] has quit [Client Quit] 03:23 -!- AaronvanW [~ewout@unaffiliated/aaronvanw] has quit [Remote host closed the connection] 04:11 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Read error: Connection reset by peer] 04:14 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 04:22 -!- AaronvanW [~ewout@207pc74.sshunet.nl] has joined #lightning-dev 04:22 -!- AaronvanW [~ewout@207pc74.sshunet.nl] has quit [Changing host] 04:22 -!- AaronvanW [~ewout@unaffiliated/aaronvanw] has joined #lightning-dev 04:25 -!- BashCo_ [~BashCo@unaffiliated/bashco] has joined #lightning-dev 04:28 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 264 seconds] 05:39 -!- laurentmt [~Thunderbi@80.215.178.205] has joined #lightning-dev 05:41 -!- laurentmt [~Thunderbi@80.215.178.205] has quit [Read error: Connection reset by peer] 06:24 -!- lclc__ [~lclc__@pub212004089088.dh-hfc.datazug.ch] has quit [Quit: This computer has gone to sleep] 06:35 -!- laurentmt [~Thunderbi@80.215.178.205] has joined #lightning-dev 06:35 -!- laurentmt [~Thunderbi@80.215.178.205] has quit [Client Quit] 06:45 -!- JackH_ [~laptop@79-73-191-181.dynamic.dsl.as9105.com] has joined #lightning-dev 06:47 -!- JackH [~laptop@79-73-186-159.dynamic.dsl.as9105.com] has quit [Ping timeout: 258 seconds] 06:54 -!- laurentmt [~Thunderbi@80.215.178.205] has joined #lightning-dev 06:55 -!- laurentmt [~Thunderbi@80.215.178.205] has quit [Client Quit] 06:56 -!- arubi [~ese168@gateway/tor-sasl/ese168] has quit [Remote host closed the connection] 06:57 -!- arubi [~ese168@gateway/tor-sasl/ese168] has joined #lightning-dev 07:02 -!- wraithm [~textual@205.197.160.100] has joined #lightning-dev 07:29 < cdecker> Darn I keep forgetting to check IRC, sorry about that 07:32 < cdecker> Yeah, I punted the actual format of the message since I wanted to keep the OR stuff as generic as possible, i.e., not unique to Lightning 07:33 < cdecker> That's also why I put the associated data spec into BOLT02 instead of BOLT04, but I may abandon this OCD if it complicates specs too much :-) 07:38 -!- jtimon [~quassel@77.224.94.35] has joined #lightning-dev 07:38 -!- btcdrak [uid165369@gateway/web/irccloud.com/x-hljdvudwsfpdpgdq] has quit [Quit: Connection closed for inactivity] 08:31 -!- btcdrak [uid165369@gateway/web/irccloud.com/x-leeroqkafbzszchg] has joined #lightning-dev 08:43 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-krlodiviuodonbpv] has joined #lightning-dev 09:02 -!- Anduck [~Anduck@unaffiliated/anduck] has quit [Ping timeout: 246 seconds] 09:03 -!- Anduck [~Anduck@unaffiliated/anduck] has joined #lightning-dev 09:13 -!- laptop__ [~laptop@79-73-185-34.dynamic.dsl.as9105.com] has joined #lightning-dev 09:15 -!- JackH_ [~laptop@79-73-191-181.dynamic.dsl.as9105.com] has quit [Ping timeout: 250 seconds] 09:38 -!- BashCo_ [~BashCo@unaffiliated/bashco] has quit [Remote host closed the connection] 09:44 -!- sstone [~sstone@3.46-14-84.ripe.coltfrance.com] has quit [Quit: Leaving] 09:47 -!- JackH_ [~laptop@79-73-185-145.dynamic.dsl.as9105.com] has joined #lightning-dev 09:49 -!- laptop__ [~laptop@79-73-185-34.dynamic.dsl.as9105.com] has quit [Ping timeout: 265 seconds] 09:57 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 09:58 -!- laurentmt [~Thunderbi@80.215.178.0] has joined #lightning-dev 09:58 -!- laurentmt [~Thunderbi@80.215.178.0] has quit [Client Quit] 09:58 -!- Grouver [~grouver@53535FBF.cm-6-4b.dynamic.ziggo.nl] has quit [Quit: Leaving] 10:23 -!- jtimon [~quassel@77.224.94.35] has quit [Ping timeout: 250 seconds] 10:53 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 10:59 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #lightning-dev 10:59 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Client Quit] 11:12 -!- jtimon [~quassel@77.224.94.35] has joined #lightning-dev 11:43 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has quit [Read error: Connection reset by peer] 11:43 -!- rusty21 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 11:46 -!- rusty21 [~rusty@pdpc/supporter/bronze/rusty] has quit [Read error: Connection reset by peer] 11:46 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 11:55 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 12:13 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 12:14 -!- rusty21 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 12:26 -!- rusty21 [~rusty@pdpc/supporter/bronze/rusty] has quit [Ping timeout: 252 seconds] 12:59 -!- wasi [~wasi@gateway/tor-sasl/wasi] has quit [Remote host closed the connection] 13:01 -!- wasi [~wasi@gateway/tor-sasl/wasi] has joined #lightning-dev 14:18 -!- btcdrak [uid165369@gateway/web/irccloud.com/x-leeroqkafbzszchg] has quit [Quit: Connection closed for inactivity] 14:58 -!- belcher [~belcher@unaffiliated/belcher] has joined #lightning-dev 15:22 -!- JackH_ [~laptop@79-73-185-145.dynamic.dsl.as9105.com] has quit [Quit: Leaving] 15:37 -!- jtimon [~quassel@77.224.94.35] has quit [Ping timeout: 264 seconds] 15:43 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 15:44 -!- wraithm [~textual@205.197.160.100] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 15:45 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell closed pull request #52: Bolt 7 cleanups (master...bolt-7-cleanups) https://git.io/v1KIR 15:45 -!- jtimon [~quassel@77.224.94.35] has joined #lightning-dev 15:54 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell opened pull request #55: BOLT 7: fix 21-byte limit typo, allow alias to use all characters. (master...alias-fix) https://git.io/v1i5C 15:55 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell pushed 1 new commit to master: https://git.io/v1i5B 15:55 -lightningrfc:#lightning-dev- lightning-rfc/master 3f1948e Rusty Russell: BOLT 4, BOLT 8: use libsecp256k1-style ECDH.... 17:31 -!- crescendo [~mozart@unaffiliated/crescendo] has quit [Ping timeout: 246 seconds] 17:38 -!- wasi [~wasi@gateway/tor-sasl/wasi] has quit [Remote host closed the connection] 17:39 -!- wasi [~wasi@gateway/tor-sasl/wasi] has joined #lightning-dev 17:42 -lightningrfc:#lightning-dev- [lightning-rfc] Roasbeef opened pull request #56: BOLT04: specify per-hop-payload format (master...payload) https://git.io/v1PeE 17:50 < roasbeef> cdecker: ended up including the payload format solely in BOLT04 17:57 < roasbeef> hmm, seems as though the ID for htlc's within the update_add_htlc doesn't need to be expliclity specified. as both sides can just keep running counters incrementing each with each update message sent/recv'd 17:58 < roasbeef> only within fail/settle messages do the htlc ID's really need to be fully specified 17:58 < rusty2> roasbeef: indeed, and we discussed that at Milan. It was decided to keep them, though redundant. 17:58 < rusty2> roasbeef: actually, no. Needed for re-xmit. 17:59 < roasbeef> hmmm, but aren't we assuming nodes forget all pending changes between restarts? 17:59 < rusty2> roasbeef: add add add commit add add .... 17:59 < rusty2> roasbeef: if you haven't got revoke-and-ack yet, you need to re-xmit all that. 18:00 < rusty2> roasbeef: and if other side sent revoke-and-ack, it doesn't know if you got it or not. 18:00 < rusty2> roasbeef: in particular, we need to allow adding of same R value twice, to avoid trivial snooping attacks. 18:07 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-krlodiviuodonbpv] has quit [Quit: Connection closed for inactivity] 18:12 < roasbeef> ah yeah, restarting mid commitment update 18:16 -!- btcdrak [uid165369@gateway/web/irccloud.com/x-qiamnxvpqmwdkehg] has joined #lightning-dev 18:16 < roasbeef> so currently expiry everywhere is assumed to be in blocks, but since we're using the full 4 bytes in most areas, we can instead move to bitcoin style interpretation: below 5e8 is block-based, above 5e8 is timeout based 18:17 < roasbeef> as with cross-chain, block height is consistent 18:17 < roasbeef> although in a few areas expiry is 2-bytes 18:17 < roasbeef> or I guess where it's 2-bytes it's assumed to be a "delta" 18:19 < roasbeef> or this can be punted till later 18:21 < roasbeef> i'm gonna modify spew to skip the curve paramters, adds so much noice, gotta sroll for days 18:21 < roasbeef> ehh wrong chan ^ :p 18:23 < roasbeef> implementing the spec's state machine stuff now, ideally I should just need to delete some code from my current version and it'll just....work :p 18:24 < roasbeef> also convinced myself that current scheme still works when exteended to multiple unrevoked commitment transactions, just need to store some additonal state (a queue really) so you know which updates to apply 18:25 < rusty2> roasbeef: yeah, if you want multiple outstanding you need a queue of the future revocation hashes, rather than just the N+1'th. 18:31 -!- jtimon [~quassel@77.224.94.35] has quit [Ping timeout: 252 seconds] 18:40 < roasbeef> mhmm, there's that, but was referring specifically to the additional state you need to retain as a result of the index being dropped from the commit_sig messages. with the indexes I knew explicilty wich changes you'd recieved, wihtout em (as is now), I need to remember how many revoke's you've sent and remember the counter value I used for each of the updates I sent out 18:41 < rusty2> Ah, yeah. 18:41 < roasbeef> then there's still the unsettled aspect of how'd we'd handle re-syncing after a reconnect with multiple unrevoked 18:41 < roasbeef> so the single enough for now :) 18:42 < rusty2> roasbeef: presumably you'd replay them all... 18:48 < roasbeef> hmm, yeah can't recall why atm but in the past I convinced myself that a simple replay was insufficient...¯\_(ツ)_/¯ 18:57 < roasbeef> is fabrice on IRC? 18:57 < rusty2> roasbeef: I've not seem him... also, bad timing for them. 20:51 -!- warren [~warren@fedora/wombat/warren] has quit [Quit: QUIT] 20:56 -!- rgrant [~rgrant@gateway/vpn/privateinternetaccess/rgrant] has joined #lightning-dev 20:57 < roasbeef> in the initial funding messages, what's the use of `first-per-commitment-point`? it isn't described anywhere. seems it should be removed as the "next" points are advertised in the funding_lcoked messag?Es 20:57 < rusty2> roasbeef: you need it to generate first signatures, IIRC. 20:57 < rusty2> roasbeef: I'm tracing this HKDF differnce now, got it in the debugger. 21:00 < roasbeef> rusty2: commitment signatures? From my understanding you get that point in the funding_locked message, so you can't even create a new state until they other side agrees the funding tx has reached a sufficient depth. Seems like it's left over from before the points were moved to the funding_locked message? 21:00 < roasbeef> rusty2: nice, it totally could be something on my side since the vectors seemed to match up for fabrice 21:02 < rusty2> roasbeef: OK, dumped a crapload of intermediate values in https://github.com/lightningnetwork/lightning-rfc/pull/42 21:02 < rusty2> roasbeef: and looked at your code, it seems completely straightforward. 21:05 < rusty2> roasbeef: hmm, we could defer to to `fundng_created`, but responder needs it for `funding_signed` 21:06 < rusty2> (look for per-commitment-point in BOLT #3) 21:15 -!- rgrant [~rgrant@gateway/vpn/privateinternetaccess/rgrant] has left #lightning-dev [] 21:23 -!- rhett [~rhett@c-73-223-86-218.hsd1.ca.comcast.net] has joined #lightning-dev 21:23 < roasbeef> rusty2: I think I found the culprit! In your implementation of rfc5869, if the salt is undefined (zero length), do you set it to 0x00*32? 21:24 < roasbeef> rusty2: our PRK values differ 21:24 < rusty2> roasbeef: ah, no... 21:24 < roasbeef> rusty2: https://tools.ietf.org/html/rfc5869#section-2.2 21:24 < rusty2> I suspected something like that, let me re-read RFC. 21:24 < rusty2> Ah, "not provided" 21:24 < roasbeef> rusty2: at that point my PRK is 0x554a8974f1e19cfcf31198ebef02c6d4f8a43b84383e556252718f275a243811 21:24 < rusty2> roasbeef: looks like test vectors proved their worth... nasty. 21:25 < rusty2> roasbeef: note their test vectors don't cover that :( 21:26 < rusty2> Hmm, actually, thyey do. Let me dig further. 21:26 < rusty2> roasbeef: OK, so Test Case 3 in that RFC explicitly tests with 0-lenngth salt. 21:27 < rusty2> roasbeef: as separate from "undefined" salt. 21:27 < rusty2> roasbeef: I think if you want that behaviour, we need to change the BOLT: 21:32 < rusty2> actually, salt is defined. your *IKM* is zero here. 21:33 < rusty2> roasbeef: HKDF() is ill-defined, but I took it as HKDF(salt,ikm)? 21:37 < rusty2> roasbeef: https://gist.github.com/rustyrussell/cba542949737494ed08ced3b724ef172 ? 21:39 * rusty2 reads noise spec... 21:40 < rusty2> Yep, that matches. 21:41 < rusty2> Weird that they use an empty ikm. But I think your HKDF implementation is wrong. 21:42 < rusty2> roasbeef: yep, your code is buggy: 21:44 < rusty2> - h := hkdf.New(sha256.New, b.chainingKey[:], empty, empty) 21:44 < rusty2> + h := hkdf.New(sha256.New, empty, b.chainingKey[:], empty) ? 21:44 < rusty2> But I'd need to find the definition of hkdf() I think. 21:44 < rusty2> Yep. func New(hash func() hash.Hash, secret, salt, info []byte) io.Reader 21:45 < rusty2> secret and salt are backwards from BOLT 8's HKDF() function. 21:49 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell opened pull request #57: BOLT 8: clarify the hkdf args. (master...bolt8-clarify-hkdf-args) https://git.io/v1PO8 22:32 -githubby:#lightning-dev- [lightning] rustyrussell created rusty-tmp-wirehacks (+27 new commits): https://git.io/v1P3j 22:32 -githubby:#lightning-dev- lightning/rusty-tmp-wirehacks 6fbaf71 Rusty Russell: lightningd_state: move invoices into separate structure.... 22:32 -githubby:#lightning-dev- lightning/rusty-tmp-wirehacks f2701d5 Rusty Russell: lightningd_state: move option and config code into its own file.... 22:32 -githubby:#lightning-dev- lightning/rusty-tmp-wirehacks a5e7f64 Rusty Russell: type_to_string: move pretty printing of types from log... 22:37 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has quit [Ping timeout: 265 seconds] 22:49 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-yodmonhptjwiatto] has joined #lightning-dev 23:08 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 23:09 -!- rhett [~rhett@c-73-223-86-218.hsd1.ca.comcast.net] has quit [Ping timeout: 252 seconds] 23:11 -!- moli [~molly@unaffiliated/molly] has quit [Read error: Connection reset by peer] 23:12 -!- moli [~molly@unaffiliated/molly] has joined #lightning-dev 23:52 -!- rhett [~rhett@c-73-223-86-218.hsd1.ca.comcast.net] has joined #lightning-dev 23:53 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Remote host closed the connection] 23:54 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 23:59 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 268 seconds]