--- Log opened Wed Apr 29 00:00:06 2020 00:30 -!- jonatack_ [~jon@37.165.16.42] has joined #c-lightning 00:34 -!- jonatack [~jon@37.165.71.66] has quit [Ping timeout: 264 seconds] 00:46 -!- lxer [~lx@ip5f5bd723.dynamic.kabel-deutschland.de] has joined #c-lightning 00:59 -!- ghost43 [~daer@gateway/tor-sasl/daer] has quit [Remote host closed the connection] 01:00 -!- ghost43 [~daer@gateway/tor-sasl/daer] has joined #c-lightning 01:06 -!- midnight [~midnight@unaffiliated/midnightmagic] has quit [Ping timeout: 252 seconds] 01:08 -!- kristapsk_ [~KK@gateway/tor-sasl/kristapsk] has quit [Remote host closed the connection] 01:08 -!- kristapsk_ [~KK@gateway/tor-sasl/kristapsk] has joined #c-lightning 01:14 -!- midnight [~midnight@unaffiliated/midnightmagic] has joined #c-lightning 01:25 -!- zmnscpxj_ [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has quit [Ping timeout: 240 seconds] 03:18 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 03:19 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 03:41 -!- vasild_ [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 03:44 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 03:44 -!- vasild_ is now known as vasild 03:51 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Quit: Leaving.] 03:59 -!- kabaum [~kabaum@2001:9b1:efd:9b00::281] has quit [Quit: Leaving] 04:43 -!- sr_gi [~sr_gi@128.red-79-154-168.dynamicip.rima-tde.net] has joined #c-lightning 04:45 -!- jonatack_ [~jon@37.165.16.42] has quit [Read error: Connection reset by peer] 04:46 -!- jonatack [~jon@213.152.161.25] has joined #c-lightning 04:47 -!- jonatack [~jon@213.152.161.25] has quit [Read error: Connection reset by peer] 04:53 -!- jonatack [~jon@37.165.16.42] has joined #c-lightning 04:55 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Remote host closed the connection] 04:58 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 04:58 -!- jonatack [~jon@37.165.16.42] has quit [Ping timeout: 256 seconds] 04:59 -!- jonatack [~jon@109.232.227.149] has joined #c-lightning 06:03 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #c-lightning 06:18 -!- sr_gi [~sr_gi@128.red-79-154-168.dynamicip.rima-tde.net] has quit [Quit: Leaving...] 06:34 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 06:34 -!- vasild [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 06:35 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Ping timeout: 240 seconds] 06:36 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 06:55 -!- sr_gi [~sr_gi@128.red-79-154-168.dynamicip.rima-tde.net] has joined #c-lightning 06:55 -!- mdunnio [~mdunnio@208.59.170.5] has joined #c-lightning 06:56 < fiatjaf> ok, so here's a new dumb question: how will I know if the second byte is part of the first integer or the second integer? 06:56 < fiatjaf> or is that encoding in the level of bits and not bytes? 06:56 < fiatjaf> anyway the question remains 06:56 < fiatjaf> sorry, I'm not used to these low level thing 06:56 < fiatjaf> s 07:28 -!- sr_gi [~sr_gi@128.red-79-154-168.dynamicip.rima-tde.net] has quit [Quit: Leaving...] 07:33 -!- sr_gi [~sr_gi@128.red-79-154-168.dynamicip.rima-tde.net] has joined #c-lightning 08:17 < fiatjaf> I mean if there's a bitstring like 1111 is it T=3, L=3 or is it T=7, L=1? 08:17 < fiatjaf> what should I read to understand this? 08:39 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 265 seconds] 08:55 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 09:37 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:2576:934:d62b:3df0] has joined #c-lightning 10:38 -!- zmnscpxj_ [~zmnscpxj@gateway/tor-sasl/zmnscpxj] has joined #c-lightning 10:39 <@cdecker> fiatjaf: I'm not following, in which context are you trying to decode a bitstring? 10:39 <@cdecker> (got disconnected and lost my scrollback) 10:43 < fiatjaf> cdecker: trying to parse a TLV payload 10:43 < fiatjaf> each TLV record is supposed to be T:varint, L:varint, V 10:44 < fiatjaf> I'm trying to understand how can I know when T has ended and L has started 10:44 < fiatjaf> and when L ends and V starts 10:44 <@cdecker> Oh, I see, in that case you read the first byte, if it's below 252 you're done, if it's 253 you read two more bytes that are the real number, if it's 254 you read 4 bytes and that's the number, and if it's 255 you read 8 bytes and that's the number 10:45 <@cdecker> Your single nibble / 4 bits wasn't sufficient to decide that yet :-) 10:46 <@cdecker> And you do that for both T and L values. This for example is T=3 and L=7: 00000011 00000111 10:53 < fiatjaf> great, I should probably save that for the future, thank you very much 10:56 <@cdecker> (I hope I got the constants above right, but that's what I remember) 10:57 < fiatjaf> in the case of the 253 you ignore the first byte and the number is just the second and third bytes? 10:57 <@cdecker> Exactly 10:57 < fiatjaf> for all other cases the first byte is included 10:58 < fiatjaf> ? 11:00 < fiatjaf> (by the way, my bitstring example was just because I didn't know this minimal encoding was done at the level of bytes or bits) 11:00 <@cdecker> Nope, only in the < 252 case is the first byte taken into consideration, for all others it's just a signal on how big the encoding of the actual number is 11:01 < fiatjaf> ok, now it is maximally clear 11:01 < fiatjaf> thanks a lot 11:01 -!- mdunnio [~mdunnio@208.59.170.5] has quit [Remote host closed the connection] 11:02 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 11:03 <@cdecker> Anytime. It's heavily inspired by bitcoin's CompactSize, with the exception that we use big endian encoding for multi-byte ints :-) 11:22 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 11:22 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 11:30 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 11:30 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 12:17 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 12:20 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 12:33 -!- jonatack [~jon@109.232.227.149] has quit [Ping timeout: 244 seconds] 12:35 -!- jonatack [~jon@37.170.24.56] has joined #c-lightning 13:00 -!- kexkey [~kexkey@37.120.205.236] has joined #c-lightning 13:01 -!- kristapsk_ is now known as kristapsk 13:31 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 13:34 -!- jonatack [~jon@37.170.24.56] has quit [Quit: jonatack] 13:36 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has quit [Quit: jb55] 13:36 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 13:46 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #c-lightning 14:41 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:2576:934:d62b:3df0] has quit [Quit: Sleep mode] 14:43 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:2576:934:d62b:3df0] has joined #c-lightning 15:01 -!- lxer [~lx@ip5f5bd723.dynamic.kabel-deutschland.de] has quit [Ping timeout: 244 seconds] 15:21 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has quit [Ping timeout: 264 seconds] 15:21 -!- michaelfolkson [~textual@2a00:23c5:be01:b201:2576:934:d62b:3df0] has quit [Ping timeout: 272 seconds] 15:37 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 15:37 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 15:41 -!- vasild_ [~vd@gateway/tor-sasl/vasild] has joined #c-lightning 15:45 -!- vasild [~vd@gateway/tor-sasl/vasild] has quit [Ping timeout: 240 seconds] 15:45 -!- vasild_ is now known as vasild 16:09 -!- justanotheruser [~justanoth@unaffiliated/justanotheruser] has joined #c-lightning 16:10 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 16:22 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 16:56 -!- jb55 [~jb55@gateway/tor-sasl/jb55] has joined #c-lightning 19:58 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has left #c-lightning [] 19:58 -!- blockstream_bot [blockstrea@gateway/shell/sameroom/x-txhnryyccoeyadae] has joined #c-lightning 19:58 -!- midnight is now known as midnightmagic 19:59 -!- midnightmagic is now known as midnight 20:30 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 20:30 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #c-lightning 22:42 -!- bitdex_ [~bitdex@gateway/tor-sasl/bitdex] has quit [Ping timeout: 240 seconds] 22:50 -!- bitdex_ [~bitdex@gateway/tor-sasl/bitdex] has joined #c-lightning --- Log closed Thu Apr 30 00:00:08 2020