--- Log opened Tue Jan 12 00:00:13 2021 03:20 -!- DeanWeen [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 03:20 -!- DeanGuss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 04:44 -!- tibo_ [~tibo@2400:4050:2a83:7000:1865:a0f0:c0c4:130f] has quit [Remote host closed the connection] 05:17 -!- tibo [~tibo@2400:4050:2a83:7000:cdf0:dfbb:ddb:300] has joined #rust-bitcoin 05:17 -!- tibo [~tibo@2400:4050:2a83:7000:cdf0:dfbb:ddb:300] has quit [Remote host closed the connection] 05:24 -!- titanbiscuit [~tbisk@104.200.131.173] has quit [Ping timeout: 256 seconds] 05:28 -!- belcher_ is now known as belcher 05:41 -!- da39a3ee5e6b4b0d [~da39a3ee5@mx-ll-171.5.28-247.dynamic.3bb.co.th] has joined #rust-bitcoin 06:14 -!- belcher_ [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 06:16 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 264 seconds] 06:16 -!- belcher_ is now known as belcher 06:19 -!- jonatack [~jon@88.124.242.136] has quit [Ping timeout: 240 seconds] 06:21 -!- jonatack [~jon@88.124.242.136] has joined #rust-bitcoin 06:26 -!- jonatack [~jon@88.124.242.136] has quit [Ping timeout: 256 seconds] 06:26 -!- jonatack [~jon@134.19.179.235] has joined #rust-bitcoin 06:29 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 06:50 -!- belcher [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 08:53 -!- da39a3ee5e6b4b0d [~da39a3ee5@mx-ll-171.5.28-247.dynamic.3bb.co.th] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 08:55 -!- da39a3ee5e6b4b0d [~da39a3ee5@2403:6200:8876:255c:8c1d:42fb:24ab:a8e9] has joined #rust-bitcoin 08:59 -!- da39a3ee5e6b4b0d [~da39a3ee5@2403:6200:8876:255c:8c1d:42fb:24ab:a8e9] has quit [Ping timeout: 246 seconds] 09:12 -!- jeremyrubin [~jr@2601:645:c200:14:91a5:d8cb:fe32:d136] has joined #rust-bitcoin 09:37 < stevenroose> byteorder dep fix for base64-compat: https://github.com/stevenroose/rust-base64-compat/pull/1 09:38 < stevenroose> I wonder if that would cause problems for downstream users. In principle it should be able to work without problems. I think it only causes problems if there's a byteorder 2.0 at some point. 09:42 < stevenroose> rebased the io::Error PR: https://github.com/rust-bitcoin/rust-bitcoin/pull/494 10:42 < BlueMatt> yay, its now actually supported to link rust and C code when targeting wasm :)https://github.com/rust-lang/rust/pull/79998 10:43 < BlueMatt> (not if you're using wasm-bindgen, but it is for wasm32-wasi or wasm32-unknown-emscripten) 11:16 < jeremyrubin> What would we think about changing/adding a new API for SigHashCache where scriptcode is a struct wrapped script that can only be made by calling a function where you have to specify that it is wpkh / the last codeseparator position or None? 11:18 < andytoshi> can i have a second ack for https://github.com/rust-bitcoin/rust-bitcoin/pull/494 11:18 < andytoshi> sanketcell: sgeisler: 11:19 < andytoshi> jeremyrubin: this sounds good in principle 11:19 < andytoshi> though i'm not sure how you specify "the last codeseparator position", i guess you just give a byte index 11:19 < andytoshi> this will run into a problem we have now though which is that there is no script slice type 11:20 < jeremyrubin> i just finished a big goose chase where I was like "why can't my psbt return a witness_script for this input" 11:20 < jeremyrubin> when in fact, because it was wpkh there was no witness_script 11:21 < andytoshi> heh interesting 11:21 < jeremyrubin> so making the API a bit more direct about converting a script to scriptcode would improve the straightforwardness of the api 11:21 < andytoshi> i don't fully follow .. how is scriptcode and "wpkh has no witness script" connected? 11:21 < jeremyrubin> ah 11:21 < andytoshi> lol holy shit elichai2 that was fast 11:21 < jeremyrubin> say I have a psbt 11:22 < andytoshi> ok lemme rebase the 0.26 PR and we'll have a release :) 11:22 < jeremyrubin> and I want to sign it using some custom signing code 11:22 < jeremyrubin> i need to generate a SigHashCache for that output 11:23 < jeremyrubin> I can detect it is a witness output by looking for the witness_utxo 11:23 < sanket1729> looks it elichai2 got it in. Are we ready for a release? 11:23 < jeremyrubin> and then, in most cases, the scriptcode is just the witness_script 11:24 < andytoshi> sanketcell: yeah 11:24 < andytoshi> jeremyrubin: ah! interesting 11:24 < andytoshi> yeah that's an interesting footgun 11:24 < jeremyrubin> well "most cases" 11:24 < andytoshi> i'm alllmost tempted to say "the witness script for wpkh is the pubkey" 11:24 < andytoshi> though i suppose that'd be differently wrong if you use it as a scriptcode 11:24 < jeremyrubin> except for P2WPKH 11:24 < jeremyrubin> yeah 11:24 < jeremyrubin> the scriptcode is something else 11:24 < jeremyrubin> honestly 11:25 < andytoshi> but like, rust-miniscript has a .script_code method that does the right thing here 11:25 < jeremyrubin> PSBT should just have a scriptcode field maybe heh 11:25 < andytoshi> maybe it doesn't, in the released version 11:26 < jeremyrubin> Anyways... scriptcode is definitely a different "type of thing" from a script, so it does probably make sense to make sure you can't just plug a script in without properly blessing it 11:28 < andytoshi> yeah agreed 11:29 < andytoshi> this may be a rust-bitcoin 0.27 thing 11:29 < andytoshi> we could make two new ScriptRef and ScriptCode types which are slices into Script 11:30 < andytoshi> https://github.com/rust-bitcoin/rust-bitcoin/pull/533 release PR for 0.26 11:31 < elichai2> andytoshi: I haven't even seen it here lol, I accidentally opened github at the right time hehe 11:31 < jeremyrubin> it's hard to get exactly right 11:31 < jeremyrubin> ideally, e.g., SigHashCache would take in whatever raw data 11:31 < jeremyrubin> and then whenever you actually ask for a sighash you need to provide the codesep value 11:32 < jeremyrubin> Maybe instead of taking scriptcode it should take witness_script : option