--- Log opened Fri Mar 05 00:00:47 2021 00:55 -!- jonatack_ [~jon@37.167.227.177] has joined #rust-bitcoin 01:25 -!- jonatack_ [~jon@37.167.227.177] has quit [Quit: jonatack_] 01:25 -!- jonatack [~jon@37.167.227.177] has joined #rust-bitcoin 03:55 -!- Kimi [~Kiminuo@141.98.103.196] has quit [Ping timeout: 245 seconds] 04:13 -!- tibo [~tibo@2400:4050:2a83:7000:8cd:b123:d189:b9a2] has joined #rust-bitcoin 04:17 -!- tibo_ [~tibo@2400:4050:2a83:7000:7c55:3f3a:3a85:d0ab] has quit [Ping timeout: 260 seconds] 04:35 -!- tibo [~tibo@2400:4050:2a83:7000:8cd:b123:d189:b9a2] has quit [Remote host closed the connection] 05:13 -!- jonatack [~jon@37.167.227.177] has quit [Ping timeout: 265 seconds] 05:54 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has quit [Remote host closed the connection] 06:10 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has joined #rust-bitcoin 07:21 -!- jonatack [~jon@37.167.227.177] has joined #rust-bitcoin 09:26 < valwal_> sgeisler: now i'm trying to get the `features` from an `Invoice`. I tried `let mut features_vec = Vec::::from_base32(&vecu5[4..]).unwrap();` and it's panicking with "Invalid padding". any clues here how to make this work? :) 10:35 < BlueMatt> ariard: any update on what wording you want for https://github.com/rust-bitcoin/rust-lightning/pull/808 ? I'd really like to land it asap. 10:55 < ariard> BlueMatt: land it, we can still update later when we find a better wording :) 10:55 < BlueMatt> plz2ack, then 10:59 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has quit [Remote host closed the connection] 11:01 < sgeisler> valwal_: this error happens if bits that are cut off due to not filling a complete next byte aren't 0 iirc, so my interpretation of BOLT 11 is that it isn't to be interpreted as bytes but as `u5`s 11:04 < ariard> BlueMatt: good to me 11:06 < valwal_> sgeisler: ah okay. i'm confused how to parse those as features then (bc there are exactly 24 features, so in theory the math should work out). is it not just that bit 0 of vec_u5[4] is feature bit 0, etc? 11:06 < valwal_> don't see anything about u5s in bolt 11 11:06 < sgeisler> valwal_: and it's big endian, so from my understanding if it has length 1 the layout is `(4,3,2,1,0)` and with 2 it would be `(9,8,7,6,5),(4,3,2,1,0)` so you probably just want to work on the `u5`s and calculate in which one the feature is and then extract it 11:07 < valwal_> sgeisler: great, so vec_u5[4] will be `4 3 2 1 0`, vec_u5[5] will be `9 8 7 6 5`, etc. that should work! 11:07 < sgeisler> https://github.com/lightningnetwork/lightning-rfc/blame/master/11-payment-encoding.md#L154 11:07 < valwal_> ah, i missed that ^ ty 11:08 < sgeisler> and the linked section describes it being big endian and I can only guess what that means in particular https://github.com/lightningnetwork/lightning-rfc/blame/master/11-payment-encoding.md#L292 11:08 < sgeisler> ist it the `u5`s that are BE or the whole array of `u5`s 11:09 < valwal_> oh sorry, just read your message more closely. so the bits are in descending order in the vec. so as you say, if there's 2 u5s of features, vec_u5[4] will be `9 8 7 6 5`, vec_u5[5] will be `4 3 2 1 0` 11:09 < sgeisler> most interestingly the feature array has arbitrary size, so if you only need low numbered features you just leave out `u5`s in the beginning 11:09 < valwal_> i don't quite get the order of the feature bits lol, was hoping you would know 11:10 < sgeisler> What you wrote last is my interpretation at least 11:10 < valwal_> ok, i'll give that a shot! ty 11:12 < sgeisler> but I haven't ever implemented it (on account of it not being in rust-ln-invoice xD) so I can only give you my best guess and refer you to the test vectors in the BOLT 11:13 < valwal_> lol my dislike for the opacity of the spec grows by the day (no offense to my protocol devs out there) 11:13 < sgeisler> also, are you sure your first feature `u5` is at data[4] and not data[3]? 11:14 < valwal_> no, i'm just going by what you told me -- that data[0] is the field identifier, the next 3 bytes are non-useful, so the value itself starts at data[4] 11:16 < sgeisler> I might have been mistaken or didn't articulate it clearly. 1st is the tag, next 2 are size, then useful data looking at the code. Sorry, haven't touched it in >2y, so might be a bit rusty 11:16 < valwal_> ahh, okay. very good to know 11:16 < valwal_> i may have misinterpreted 11:17 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has joined #rust-bitcoin 11:17 < sgeisler> it's probably best to look at the `FromBase32 for TaggedField` impl where this is handled 11:18 < valwal_> kk 11:20 < sgeisler> it's super annoying that the tag comes before the length, makes parsing non-straight-forward 11:45 -!- jonatack_ [~jon@37.170.241.200] has joined #rust-bitcoin 11:48 -!- jonatack [~jon@37.167.227.177] has quit [Ping timeout: 260 seconds] 12:47 -!- jonatack_ [~jon@37.170.241.200] has quit [Quit: jonatack_] 12:47 -!- jonatack [~jon@37.170.241.200] has joined #rust-bitcoin 13:42 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has quit [Ping timeout: 245 seconds] 13:42 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has joined #rust-bitcoin 14:46 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has quit [Ping timeout: 256 seconds] 15:23 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has joined #rust-bitcoin 15:41 -!- jonatack [~jon@37.170.241.200] has quit [Read error: Connection reset by peer] 17:15 -!- shesek [~shesek@unaffiliated/shesek] has quit [Remote host closed the connection] 18:28 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has quit [Ping timeout: 265 seconds] 19:06 -!- belcher_ [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 19:06 -!- belcher_ [~belcher@unaffiliated/belcher] has quit [Read error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number] 19:06 -!- belcher_ [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 19:09 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 260 seconds] 19:45 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has joined #rust-bitcoin 21:49 -!- jeremyrubin [~jr@024-176-247-182.res.spectrum.com] has quit [Ping timeout: 276 seconds] 22:49 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Remote host closed the connection] 22:49 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 23:27 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 23:28 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 268 seconds] --- Log closed Sat Mar 06 00:00:48 2021