--- Day changed Sun Sep 09 2018 00:39 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has joined #rust-bitcoin 08:58 -!- wumpus [~wumpus@pdpc/supporter/professional/wumpus] has joined #rust-bitcoin 09:40 -!- nickler [~nickler@185.12.46.130] has joined #rust-bitcoin 11:26 < dongcarl> Hi all, my PSBT PR has been rebased and is ready to merge: https://github.com/rust-bitcoin/rust-bitcoin/pull/103, however, https://github.com/rust-bitcoin/rust-bitcoin/pull/156 should be merged first. I'd like to get both into the codebase as soon as possible. 11:29 < dongcarl> I'm also wondering about the state of P2P messaging in rust-bitcoin right now. wumpus and I discussed the (exciting) possibility of writing a standalone P2P server in Rust and interoperating with bitcoind, and perhaps merging this into bitcoind in the distant future. 12:21 < andytoshi> BlueMatt: all good 12:22 < andytoshi> dongcarl: sorry, i need https://github.com/rust-bitcoin/rust-bitcoin/pull/159 first so i can release 0.14.2 .. but stevenroose hasn't added a unit test (and meanwhile i've been busy with other work) 12:23 < andytoshi> the state of p2p messaging should be "about half of the 2014 version of the protocol works" ;) 12:23 < andytoshi> i'd love to extend that to the full protocol 12:47 < andytoshi> BlueMatt: lolol this can be used to trigger panics in rust-secp https://github.com/rust-bitcoin/rust-secp256k1/blob/master/src/key.rs#L51 17:07 -!- itaseski [~itaseski@213.135.176.135] has joined #rust-bitcoin 18:03 < dongcarl> andytoshi: ah okay, no worries 18:04 < dongcarl> We don't have anything close to a stateful standalone server right now right? 18:04 < dongcarl> It's just structs that encapsulate the protocol? 18:05 < dongcarl> If I were to do this, I'm guessing it'd be in a separate repo? 18:12 < BlueMatt> andytoshi: lol 18:12 < BlueMatt> just remove it, I guess 18:12 < BlueMatt> why do we even have those constants? 18:12 < BlueMatt> andytoshi: that wont casue panics that'll cause libsecp asserts, no? 18:13 < andytoshi> BlueMatt: no, it'll just cause rust asserts to trigger 18:13 < BlueMatt> ah, well still 18:13 < andytoshi> BlueMatt: i think we have those constants to make contracthash tweaking easier..but the proper solution is for contracthash tweaks to not be SecretKeys 18:14 < andytoshi> having said that, it is useful in general to have Default impls for secret key and public key 18:14 < andytoshi> so that people can make unitialized structures containing those things 18:14 < andytoshi> and it would even be nice if the default secret key would cause a panic! if it were ever actually used 18:14 < andytoshi> dongcarl: correct on all counts 18:15 < andytoshi> dongcarl: rust-bitcoin should be able to deserialize and serialize all p2p messages, but the network transport is out of scope 20:30 < dongcarl> andytoshi: So... rust-bitcoin/rust-bitcoin-server ? What would you name it? 20:32 < andytoshi> maybe -node 20:34 < dongcarl> andytoshi: cool, what'd be the process to get a repo started in the rust-bitcoin org? 20:36 < andytoshi> get a working project with fuzz tests that travis runs on rust 1.14, then ask me or matt :P 20:36 < dongcarl> andytoshi: roger 20:37 < andytoshi> i'd rather not directly start anything on rust-bitcoin org (though i know i did that with bitcoin_hashes, sorry) until we know it's doable under the restrictions that rust-bitcoin projects have 20:41 < dongcarl> andytoshi: very fair 20:51 < dongcarl> andytoshi: w/re argument parsing, would it be okay to use a library like clap.rs? 20:55 < andytoshi> are you making a binary? 20:57 < dongcarl> andytoshi: yes, although I guess a library would also work? Like a wrapper around std::net? 20:58 < dongcarl> I think rust-bitcoin-node should be a binary... rust-bitcoin-network could be a lib? 21:00 < dongcarl> wumpus: any thoughts? 21:11 < andytoshi> dongcarl: i'd have to think about binaries living in rust-bitcoin org, that's not something i'd ever really considered. probably we'd be more lax about their compiler requirements and dependency minimization 21:11 < andytoshi> clap seems fine to me, it only has a couple deps and there's a lot of bang for the buck 21:14 < dongcarl> andytoshi: awesome 21:56 -!- nickler [~nickler@185.12.46.130] has quit [Ping timeout: 252 seconds] 22:05 -!- nickler [~nickler@185.12.46.130] has joined #rust-bitcoin 23:40 < dongcarl> Looks like the magic field of bitcoin::network::message::RawNetworkMessage should be a bitcoin::network::constants::Network instead of a u32? 23:46 < andytoshi> yeah 23:46 < dongcarl> andytoshi: cool, will fix. Have you taken a look at tokio vs. mio for async I/O? 23:57 < andytoshi> i have not looked at any of them