--- Day changed Wed Aug 15 2018 15:47 -!- schmidty [~schmidty@unaffiliated/schmidty] has joined #rust-bitcoin 15:59 -!- elichai2 [uid212594@gateway/web/irccloud.com/x-ciuurxjaqnhvcwbm] has joined #rust-bitcoin 18:51 < dongcarl> andytoshi: fmt::Display implemented: https://0bin.net/paste/mw9pNw53QqyzAof2#0dM1VtThAn7Vxm3B2Jw5dHYTq1WbZy0uz7zJzADvA22 18:51 < dongcarl> andytoshi: not sure if we should make fmt::Display a trait bound here or for all PublicKeys 18:52 < dongcarl> a.k.a. `pub trait PublicKey: fmt::Display + Hash + Eq` 18:58 < andytoshi> well, secp256k1::PublicKey doesn't implement it 18:59 < andytoshi> it should i guess, it's quick and easy to hex-serialize keys 19:26 -!- elichai2 [uid212594@gateway/web/irccloud.com/x-ciuurxjaqnhvcwbm] has quit [Quit: Connection closed for inactivity] 20:20 < andytoshi> BlueMatt: sipa points out that if we forbid overflowing/0 messages we are technically violating the ECDSA spec 20:20 < andytoshi> which i think is fine for us, though i can understand upstream refusing to do it 20:22 < BlueMatt> oh? 20:22 < BlueMatt> I feel like upstream would want to forbid 0 messages... 20:22 < andytoshi> yeah, i thought so too 20:22 < andytoshi> but sipa thinks (i will check) that the ECDSA spec says nothing about this 20:22 < andytoshi> just that the message should be a hash 20:25 < andytoshi> yeah page 38 https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf 20:26 < andytoshi> but like, starting from a sane hash function there is < 2^-128 chance that the message hash would be rejected by us 20:27 < andytoshi> i don't really care if we violate the spec 2^-128 of the time, and as a consequence we save 100% of people who allow 0 message hashes 20:46 < BlueMatt> wholly agree 20:47 < andytoshi> so, i've got a few changes that i'd like to go into secp 0.11 .. the big one being that i dropped the context arguments from everything that takes a no-capabilities context, which saves a lot of boilerplate 20:47 < andytoshi> for not it just internally calls Secp256k1::without_caps() but i'll PR to upstream to give me a statically allocated one i can use 20:47 < andytoshi> to avoid that malloc ... and fixing that can go in a minor releas 20:47 < andytoshi> then i think i'll replace https://github.com/rust-bitcoin/rust-bitcoin/pull/113 (update rust-bitcoin to 0.10) with a new one that updates to 0.11 20:48 < BlueMatt> cool 20:48 < BlueMatt> sorry, I havent been at all useful so far this week :( 20:48 < andytoshi> then get jeandulouz to update his serde 1.0 PR, because he inexplicably squashed a secp version bump into it, and try to get that reviewed/merged .. and i think that'll be it for rust-bitcoin 0.14 20:48 < andytoshi> no worries 20:49 < andytoshi> it's a volunteer-run project and you've done lots 20:50 < andytoshi> however i'd like to get the new secp version, and serde, into rust-bitcoin ASAP because right now those are making it hard to start new projects (it forces you to use the old shitty version of rust-secp since that's all that rust-bitcoin supports) 20:51 < andytoshi> (BTW sorry i opened half a dozen PRs this morning on rust-secp, and also sorry that a bunch of them conflict with each other .. they're all very little things, i can rearrange them if you'd like) 20:51 < BlueMatt> yea, I've been fighting with fuzz failures in rust-lightning since I spent two mega-long flights writing manual fuzz test cases which generated lots of new paths now that I'm back 20:52 < BlueMatt> hopefully have most of those straightened out so can get back to review tomorrow 20:52 < BlueMatt> hopefully.... 20:53 < andytoshi> oo fun. fuzz test results are therapeutic 20:53 < andytoshi> though very time consuming 20:54 < BlueMatt> yea, got heaps of them, but some of it is just that I need to go back through and implement a bunch of handling in the channel management logic 20:54 < BlueMatt> oh well 20:55 < andytoshi> ah 20:57 < BlueMatt> but a few bugs I likely wouldnt have found otherwise 20:57 < BlueMatt> which is nice 20:57 < andytoshi> excellent 20:57 < BlueMatt> plus some super obnoxious integer overflows in route calculation 20:57 < andytoshi> been working on script parsing stuff with sipa .. the fuzzer has been invaluable 20:57 < BlueMatt> totaling fees along the route 20:57 < BlueMatt> yea, glad we got that stuff worked out 20:57 < BlueMatt> super mega nice 20:58 < BlueMatt> if you need some cpu time on a target just tell me 20:58 < BlueMatt> my old 20 core workstation is essntially a dedicated fuzz box now lol 20:58 < andytoshi> lol nice 20:58 < andytoshi> thanks, will do 21:02 < andytoshi> dongcarl: dpc makes an interesting observation here .. https://github.com/rust-bitcoin/rust-bitcoin/issues/134 .. that the consensus encodable/decodable traits could really just be single structs parameterized by an io::Write 21:03 < andytoshi> err, the encoder/decoder traits 21:03 < andytoshi> of course encodable/decodable needs to be a trait that each type would implement 21:04 < andytoshi> (all the encodable.rs stuff is basically a copy of serde 0.6 where i deleted usize/floats/strings/etc, it's not something i put a lot of deep thought into)