--- Log opened Sun Jan 06 00:00:13 2019 00:34 -!- Amperture [~amp@24.136.5.183] has quit [Ping timeout: 250 seconds] 01:04 -!- Kevin__6 [~quassel@194.59.249.20] has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.] 01:30 -!- CubicEarth [~CubicEart@c-73-181-185-197.hsd1.wa.comcast.net] has quit [Ping timeout: 246 seconds] 01:37 -!- melvster [~melvin@ip-86-49-18-190.net.upcbroadband.cz] has joined #lightning-dev 02:14 -!- JackH [~laptop@host86-175-127-233.range86-175.btcentralplus.com] has quit [Quit: Leaving] 02:22 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 02:26 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 250 seconds] 02:51 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 02:55 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Client Quit] 04:48 -!- riclas [~riclas@148.63.37.111] has joined #lightning-dev 06:11 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #lightning-dev 06:40 -!- richcollins [~richcolli@c-76-103-74-240.hsd1.ca.comcast.net] has joined #lightning-dev 06:46 -!- Amperture [~amp@24.136.5.183] has joined #lightning-dev 06:48 -!- Amperture [~amp@24.136.5.183] has quit [Read error: Connection reset by peer] 06:48 -!- Amperture [~amp@24.136.5.183] has joined #lightning-dev 06:54 -!- richcollins [~richcolli@c-76-103-74-240.hsd1.ca.comcast.net] has quit [Quit: richcollins] 07:53 -!- melvin_ [~melvin@ip-86-49-18-190.net.upcbroadband.cz] has joined #lightning-dev 07:53 -!- melvster [~melvin@ip-86-49-18-190.net.upcbroadband.cz] has quit [Read error: Connection reset by peer] 08:12 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 08:15 -!- freerk [5c747b81@gateway/web/freenode/ip.92.116.123.129] has joined #lightning-dev 08:17 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 272 seconds] 08:41 -!- freerk [5c747b81@gateway/web/freenode/ip.92.116.123.129] has quit [Quit: Page closed] 08:41 -!- freerko [5c747b81@gateway/web/freenode/ip.92.116.123.129] has joined #lightning-dev 08:48 -!- Tralfaz [~none@104.248.145.220] has joined #lightning-dev 08:51 -!- CubicEarth [~CubicEart@c-73-181-185-197.hsd1.wa.comcast.net] has joined #lightning-dev 09:09 -!- farmerwampum [~farmerwam@184.75.210.234] has quit [Quit: farmerwampum] 09:09 -!- farmerwampum [~farmerwam@184.75.210.234] has joined #lightning-dev 09:13 -!- farmerwampum [~farmerwam@184.75.210.234] has quit [Client Quit] 09:13 -!- farmerwampum [~farmerwam@184.75.210.234] has joined #lightning-dev 09:22 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Quit: = ""] 09:28 -!- freerko [5c747b81@gateway/web/freenode/ip.92.116.123.129] has quit [Quit: Page closed] 09:41 -!- laurentmt [~Thunderbi@94.242.228.174] has joined #lightning-dev 09:47 -!- laurentmt [~Thunderbi@94.242.228.174] has quit [Quit: laurentmt] 10:20 -!- sstone [~sstone_@185.186.24.109.rev.sfr.net] has joined #lightning-dev 10:21 -!- sstone [~sstone_@185.186.24.109.rev.sfr.net] has quit [Client Quit] 10:59 -!- farmerwampum [~farmerwam@184.75.210.234] has quit [Quit: farmerwampum] 10:59 -!- farmerwampum [~farmerwam@184.75.210.234] has joined #lightning-dev 11:08 -!- farmerwampum [~farmerwam@184.75.210.234] has quit [Quit: farmerwampum] 11:08 -!- farmerwampum [~farmerwam@184.75.210.234] has joined #lightning-dev 11:41 -!- laurentmt [~Thunderbi@94.242.228.174] has joined #lightning-dev 11:57 -!- laurentmt [~Thunderbi@94.242.228.174] has quit [Quit: laurentmt] 12:03 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 12:08 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has joined #lightning-dev 12:08 < Chris_Stewart_5> Do any of the lightning implementations display what the sighash is for the invoice before signing via rpc? 12:09 < Chris_Stewart_5> i'm having issues recovering a public key from an invoice: https://github.com/bitcoin-s/bitcoin-s-core/issues/277 12:11 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 12:17 < lndbot> `03fad6c016f998e85d03ce0b7358b3b6a38ebc7fd60030340d0245fea0d95c8c12` is the recovered pubkey for that request 12:31 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 13:13 -!- enemabandit [~enemaband@bl17-168-123.dsl.telepac.pt] has quit [Ping timeout: 240 seconds] 13:25 < Chris_Stewart_5> exit 13:25 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has quit [Quit: WeeChat 1.9.1] 13:25 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has joined #lightning-dev 13:34 < Chris_Stewart_5> Yes, i have a divergence in my implementation which i'm trying to debug. Do you happen to have easy access to the sigHash (or the pre-image which would be much more useful) 13:37 < lndbot> 48d081533db834a32d6b44785b902e79decb67b52ec1a96eb12d13f21e0f2aac and 00f469f9abb10d678eff29ed1cc2d082e9e3f1d7e3688f84b0601556b5df401c2d30bc4fb60fc8727f8df3fb891cea4487e38094c0ef0533995aea35bd2ad046 13:38 < lndbot> sorry preimage is `6c6e74623130306e0b851aec410d1ae02e6dcc82f0480d4d39e3e1ada8ca5170d6ad19391d7b403a4b1ee61d57e741a72bd91323ab930ba34b7b7111d1898181818161131b430b73732b6111d113a3930b232b991161132bb32b73a111d1139bab139b1b934b1329116113abab4b2111d111818189899191999969a1a1a9a969b1b1b9b969c1c1c9c96b0b0b13131b1b23232b2b33311161132bc31b430b733b2911d113134ba3334b732bc11161139bcb6b137b6111d11212a21aaa9a2113e8c018e100` 13:39 < lndbot> the other guy is the sig 13:41 < lndbot> what’s your preimage look like? 13:41 < Chris_Stewart_5> Thank you alex! Just a sec 13:44 < Chris_Stewart_5> so it appears i am missing the last '00' byte 13:48 < Chris_Stewart_5> yep, if i "hard core" that last byte, my unit test passes. Now I just have to hunt down what tag i am forgetting to pad/ not serialization correctly 13:48 < Chris_Stewart_5> hard code* 13:49 < lndbot> when converting all the non-signature words to bytes that is the exception to trimming the final byte 13:50 < Chris_Stewart_5> words? as in the description in the invoice? 13:52 < lndbot> the special bip 173 values 13:59 < lndbot> when converting the uint5 values to uint8, leave the 00 padding on for the signature digest to use 14:06 < Chris_Stewart_5> so the size of the uint5 and uint8 byte arrays should be the same? 14:07 < lndbot> normally when you convert the uint5s to a byte array you evaluate trimming off the last padding byte but in the case of the digest you don’t 14:14 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #lightning-dev 14:18 < Chris_Stewart_5> i don't understand where this last padding byte is even coming from? when we convert from uint5 to uint8 our array should shrink in size. Why is it assumed there is only one padding byte? What are we padding that requires an *entire* byte? I understand padding bits but not a entire byte? 14:19 < Chris_Stewart_5> i.e. 45 bits -> 8 bytes, 5 bits. So pad another 3 bits 14:20 < lndbot> they don’t always cleanly translate so you sometimes are left with a padding byte 14:20 < Chris_Stewart_5> but an entire byte? That doesn't seem to make sense to me 14:20 < lndbot> Normally it’s trimmed off 14:22 < Chris_Stewart_5> how do i draw the distinction? is it only when our uint5s.length % 8 == 0? 14:22 < Chris_Stewart_5> i.e. the length of the uint5 vector is a multiple of 8? 14:26 < lndbot> yes when there’s no remainder 14:27 < Chris_Stewart_5> so your saying in the case we have 40 bits, we convert that to uint8s (5), we need to pad another byte? 14:29 < lndbot> if it’s 40 in the normal case then you’d trim off the last byte 14:29 < lndbot> in the sighash case you’d never trim 14:47 < Chris_Stewart_5> ok, i've got things working but i would like to link to documentation about this. Is there anywhere i can link to besides this conversation? 14:49 < lndbot> I think it should be in the bolt 11 rfc 14:52 < Chris_Stewart_5> maybe this? It isn't entirely clear to me "A writer MUST set timestamp to the number of seconds since Midnight 1 January 1970, UTC in big-endian. A writer MUST set signature to a valid 512-bit secp256k1 signature of the SHA2 256-bit hash of the human-readable part, represented as UTF-8 bytes, concatenated with the data part (excluding the signature) with zero bits appended to pad the data to the next 14:52 < Chris_Stewart_5> byte boundary, with a trailing byte containing the recovery ID (0, 1, 2 or 3)." 14:54 < lndbot> yeah 14:56 < Chris_Stewart_5> so to make this more clear, I should add "next byte boundary EVEN IF THE DATA ALIGNS WITH A BYTE BOUNDARY" ? 15:10 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 15:10 < Chris_Stewart_5> My patch: https://github.com/bitcoin-s/bitcoin-s-core/pull/285/files#diff-d21c25c6796fb08c461867a538aaa771R245 15:10 < Chris_Stewart_5> Thanks for the help Alex. I really appreciate it. 15:12 < lndbot> np 15:15 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has left #lightning-dev ["WeeChat 1.9.1"] 15:16 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has joined #lightning-dev 15:30 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 250 seconds] 15:41 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 16:21 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 16:21 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 16:35 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 16:39 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 16:47 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has joined #lightning-dev 17:00 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 258 seconds] 17:16 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 17:21 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 272 seconds] 17:28 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has joined #lightning-dev 17:33 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 17:37 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 246 seconds] 17:40 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 17:48 -!- Chris_Stewart_5 [~chris@unaffiliated/chris-stewart-5/x-3612383] has quit [Ping timeout: 250 seconds] 18:07 -!- riclas [~riclas@148.63.37.111] has quit [Ping timeout: 268 seconds] 18:11 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 18:11 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 18:27 -!- melvin_ [~melvin@ip-86-49-18-190.net.upcbroadband.cz] has quit [Ping timeout: 258 seconds] 18:28 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 18:52 -!- BryanWB [~BryanWB@61-90-143-130.static.asianet.co.th] has joined #lightning-dev 18:54 -!- BryanWB [~BryanWB@61-90-143-130.static.asianet.co.th] has quit [Client Quit] 18:59 -!- unixb0y [~unixb0y@p5B029B18.dip0.t-ipconnect.de] has quit [Ping timeout: 246 seconds] 19:00 -!- unixb0y [~unixb0y@p5B029CFE.dip0.t-ipconnect.de] has joined #lightning-dev 19:02 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 19:07 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 250 seconds] 20:09 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 20:37 -!- TD-Linux [~Thomas@about/essy/indecisive/TD-Linux] has quit [Ping timeout: 250 seconds] 20:40 -!- TD-Linux [~Thomas@about/essy/indecisive/TD-Linux] has joined #lightning-dev 20:54 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Remote host closed the connection] 21:29 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 21:34 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 240 seconds] 22:10 -!- thomasanderson [~thomasand@172.83.40.67] has joined #lightning-dev 22:15 -!- thomasanderson [~thomasand@172.83.40.67] has quit [Ping timeout: 258 seconds] --- Log closed Mon Jan 07 00:00:13 2019