--- Log opened Mon Jul 27 00:00:31 2020 00:36 -!- jonatack [~jon@213.152.162.69] has quit [Ping timeout: 256 seconds] 01:18 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 01:46 < stevenroose> sgeisler: ah I see your point in the bip34 commit. Well adding a panic is not an option because then someone could trigger the panic by sending a bad block. 01:47 < stevenroose> And anything over 4 bytes don't fit in an u32. Since block heights are u32 usually, I don't think there's a better option than just returning None. Unless perhaps have a special Error type to discriminate different None's. 01:49 < sgeisler> I see, yeah. I didn't think of evil miners that moment. 01:49 < stevenroose> Like `WrongVersion`, `PushTooBig`, `NoCoinbase`, `EmptyScriptSig` and perhaps `NoCoinbaseInput`. But I thought those are all so niche/specific that I'm not sure it makes sense. 01:53 < sgeisler> My node tells me it's locked in, so new blocks should always contain the block height. So at least one could treat all `None`s after the point of no return block as errors when using the API. 01:58 < sgeisler> I thought for a moment that given it's a consensus rule now we actually don't expect longer block heights for the foreseeable future, but the BIP doesn't specify minimal encoding. So miners could screw us by padding with 0s 01:59 < sgeisler> So maybe we actually want to decode 8 byte wide block heights too and downcast to 4 bytes. 02:03 < sgeisler> Does this make sense to you? `08 EA C7 09 00 00 00 00 00` would be valid according to the spec if I'm not mistaken but would lead to `None` in rust-bitcoin. 02:55 < stevenroose> Yeah we could also manually do the LE decoding on arbitrary sized arrays and just None when it overflows. 02:55 < stevenroose> (Also probably wise to check the Core impl, I'll do that. They might have some other restrictions not in the BIP..) 03:05 -!- Marcia49Mante [~Marcia49M@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 03:53 -!- belcher_ [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 03:57 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 256 seconds] 06:44 -!- Marcia49Mante [~Marcia49M@static.57.1.216.95.clients.your-server.de] has quit [Remote host closed the connection] 06:46 -!- Leanne30Langwort [~Leanne30L@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 10:11 -!- esotericnonsense [~esotericn@unaffiliated/esotericnonsense] has quit [Ping timeout: 240 seconds] 10:25 -!- esotericnonsense [~esotericn@unaffiliated/esotericnonsense] has joined #rust-bitcoin 16:03 -!- vindard [~vindard@190.83.165.233] has quit [Quit: No Ping reply in 180 seconds.] 16:05 -!- vindard [~vindard@190.83.165.233] has joined #rust-bitcoin 17:52 -!- valwal_ [sid334773@gateway/web/irccloud.com/x-skdjatjtpmrtqhqb] has quit [Ping timeout: 240 seconds] 17:53 -!- vindard [~vindard@190.83.165.233] has quit [Quit: No Ping reply in 180 seconds.] 17:54 -!- vindard [~vindard@190.83.165.233] has joined #rust-bitcoin 17:54 -!- valwal_ [sid334773@gateway/web/irccloud.com/x-klnweyxemextthwx] has joined #rust-bitcoin 20:09 -!- notmandatory [~textual@cpe-72-134-225-83.natsow.res.rr.com] has joined #rust-bitcoin 20:09 -!- vindard [~vindard@190.83.165.233] has quit [Quit: No Ping reply in 180 seconds.] 20:11 -!- vindard [~vindard@190.83.165.233] has joined #rust-bitcoin 20:14 -!- thunderbiscuit_ [uid457112@gateway/web/irccloud.com/x-finzhyytlysgtjdz] has joined #rust-bitcoin 20:14 < notmandatory> test 20:14 < thunderbiscuit_> Yep 20:15 -!- thunderbiscuit[m [thunderbis@gateway/shell/matrix.org/x-zngstxzjencbsmvd] has joined #rust-bitcoin 20:15 < thunderbiscuit[m> from matrix 20:17 -!- notmandatory[m] [notmandato@gateway/shell/matrix.org/x-rxjucpxtdewksqkj] has joined #rust-bitcoin 20:20 -!- notmandatory [~textual@cpe-72-134-225-83.natsow.res.rr.com] has quit [Quit: notmandatory] 20:25 -!- thunderbiscuit_ [uid457112@gateway/web/irccloud.com/x-finzhyytlysgtjdz] has left #rust-bitcoin [] 21:19 -!- notmandatory [~Steve@cpe-72-134-225-83.natsow.res.rr.com] has joined #rust-bitcoin 21:27 -!- notmanda_ [~textual@cpe-72-134-225-83.natsow.res.rr.com] has joined #rust-bitcoin 21:28 -!- notmanda_ [~textual@cpe-72-134-225-83.natsow.res.rr.com] has quit [Client Quit] 21:46 -!- notmandatory [~Steve@cpe-72-134-225-83.natsow.res.rr.com] has quit [Remote host closed the connection] 21:52 -!- notmandatory [~steve@cpe-72-134-225-83.natsow.res.rr.com] has joined #rust-bitcoin 21:57 -!- notmandatory [~steve@cpe-72-134-225-83.natsow.res.rr.com] has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in] 22:03 -!- notmandatory [~steve@cpe-72-134-225-83.natsow.res.rr.com] has joined #rust-bitcoin --- Log closed Tue Jul 28 00:00:32 2020