--- Log opened Tue Nov 29 00:00:32 2022 03:58 -!- trev [~trev@user/trev] has joined #bitcoin-rust 04:23 -!- tibo_ [~tibo@fp5a950abc.tkyc110.ap.nuro.jp] has quit [] 12:03 -!- trev [~trev@user/trev] has quit [Remote host closed the connection] 13:31 -!- darosior [~darosior@194.36.189.246] has quit [Quit: Ping timeout (120 seconds)] 14:01 < stevenroose> I've been able to start looking at my bitcoincore-rpc refactor/rewrite again. It removes tons of re-allocations all over the place, enables sync and async support and adds real batching support. 14:02 < stevenroose> It also migrates to named arguments. And this seems to be causing some trouble with various bitcoind versions. Though I'm currently not easily able to test this locally :/ 14:03 < stevenroose> But it's starting to get into a good shape, I recently rebased to incorporate the new work that has been done on master since I started this effort over a year ago 14:06 < BlueMatt[m]> Nice! 14:12 < BlueMatt[m]> OOC are you using the http client from https://github.com/lightningdevkit/rust-lightning/blob/main/lightning-block-sync/src/http.rs 14:13 < BlueMatt[m]> Or are you using the existing one (which iirc doesn’t like nginx cause it wants explicit content length) 14:15 < stevenroose> BlueMatt[m]: so for now, I just ported the existing "simple http", "simple tcp" and "simple uds" "transports". 14:15 < BlueMatt[m]> Ah okay. 14:15 < stevenroose> I'm unsure if we should have a hyper one included in the jsonrpc crate behind a feature-gate 14:16 < stevenroose> Or if we should have a separate crate for it 14:16 < BlueMatt[m]> (I don’t want to shill my bags there, I don’t care about using that specific code, my only thing was I wanted one that supports streaming http output) 14:16 < BlueMatt[m]> I don’t see why we should want hyper 14:16 < BlueMatt[m]> It’s not going to materially change the performance 14:16 < BlueMatt[m]> Which is mostly bound by json and the server itself 14:16 < stevenroose> I had a bunch of box-dyn shenanigans to try avoid making the clients generic, but generic clients are kinda what is quite commonly done, so I eventually caved 14:17 < BlueMatt[m]> Yea, better than box dyn imo 14:17 < stevenroose> I don't use hyper either, but I guess it has a bunch of options when it comes to timeouts, encodings, compression and that kinda stuff 14:18 < BlueMatt[m]> I don’t think we really need any of that? 14:18 < BlueMatt[m]> Timeouts are easy 14:18 < BlueMatt[m]> Compression meh, there’s only two encodings that’s easy to support 14:18 < stevenroose> Yeah we (i.e. bitcoind users) don't really need that I think 14:18 < BlueMatt[m]> The ldk code is more than sufficient as long as you don’t want tls 14:19 < BlueMatt[m]> We did care about nginx as a proxy in front of bitcoind so we support the streaming encoding 14:19 < stevenroose> rust-lightning is MIT/Apache and rust-jsonrpc is CC0, not sure I can simply copy over the impl 14:20 < stevenroose> Not that I generally care about IP.. 14:20 < stevenroose> I could just copy over that impl for an async client 14:20 < BlueMatt[m]> We’ll I think it’s only been touched by Jeff and i 14:20 < BlueMatt[m]> So relicense is trivial 14:20 < stevenroose> BlueMatt[m]: valentine too 14:20 < stevenroose> But k yeah that's nice 14:21 < BlueMatt[m]> Still easy 14:31 < andytoshi> one 'benefit' of our simple_http vs matt's HTTP is that ours is 1.41-compatible, no async/await 14:31 < andytoshi> but like, BlueMatt[m] if your code is meaningfully better i'd really like to sychronize our efforts here 14:32 < andytoshi> and maybe abstract out a general-purpose zero-dep HTTP client that we can both use 14:32 < andytoshi> stevenroose: super cool about refactoring of bitcoincore-rpc! 14:33 < andytoshi> i was talking to tobin about this, and one thing that might be worth supporting is "translating" RPC calls and responses between different bitcoin core versions 14:33 < BlueMatt[m]> Ours is async optional, i thought it supported older for non-async I’d have to check though 14:33 < andytoshi> ah i see 14:33 < andytoshi> sorry, i just grepped for 'async' and decided it was async 14:34 < andytoshi> but i see, it's feature-gated on tokio 14:34 < BlueMatt[m]> Oh no it may be 1.45, i dunno if we’ve tried to build it 1.41 for non-async, but it probably works? 14:34 < andytoshi> ok, 1.45 is probably easy to make 1.41-compatible 14:35 < andytoshi> if it's not already 14:35 < BlueMatt[m]> Yea sadly you need a tcpstream type for async, tokio seems to basically be the winner there so that’s what it uses 14:35 < BlueMatt[m]> It’s 1.45 even for async 14:36 < andytoshi> hmmm i wonder if we should try to push rust-bitcoin toward 1.48 ... or at least rust-jsonrpc ... for this reason 14:37 < BlueMatt[m]> I thought that was relatively soon anyway 14:38 < BlueMatt[m]> But can also probably trivially do 1.48 for async and 1.41 for not 14:38 < andytoshi> that sounds good for now 14:38 < andytoshi> yeah, 1.48 is "soon" but i don't think any of us have a pressing need 14:38 < andytoshi> so it may be a long time in practice unless somebody pushes on it 14:38 < BlueMatt[m]> Yea 14:52 < stevenroose> yeah I'm basically doing 2018 and async versioning for this 14:52 < stevenroose> but async support can be entirely feature-gated if we want that 14:52 < stevenroose> but v1.45 isn't that new at this point 14:53 < BlueMatt[m]> up to you, imo. all I care about is a common http client we can use for bitcoin jsonrpc and bitcoind rest that is trivial and supports sync and (at least) optionally async 14:53 < BlueMatt[m]> and also supports the chunked encoding thing 14:53 < BlueMatt[m]> then we can drop our code (or you can use it, as you see fit) 15:39 -!- tibo [~tibo@fp5a950abc.tkyc110.ap.nuro.jp] has joined #bitcoin-rust 16:13 -!- appservicebot12 [~afilini-m@2001:bc8:1828:245::2] has quit [Ping timeout: 265 seconds] 16:26 -!- appservicebot12 [~afilini-m@2001:bc8:1828:245::2] has joined #bitcoin-rust 17:10 -!- appservicebot12 [~afilini-m@2001:bc8:1828:245::2] has quit [Ping timeout: 260 seconds] 17:17 -!- BlueMatt [~BlueMatt@ircb.bluematt.me] has quit [Ping timeout: 255 seconds] 17:21 -!- BlueMatt [~BlueMatt@ircb.bluematt.me] has joined #bitcoin-rust 17:24 -!- appservicebot12 [~afilini-m@2001:bc8:1828:245::2] has joined #bitcoin-rust --- Log closed Wed Nov 30 00:00:33 2022