--- Log opened Thu Jan 23 00:00:17 2020 00:01 -!- dpc [dpcmatrixo@gateway/shell/matrix.org/x-ifiuskcsykrtixdz] has quit [Ping timeout: 246 seconds] 00:03 -!- Netsplit over, joins: nothingmuch, real_or_random, raj_ 00:45 -!- wumpus [~ircclient@pdpc/supporter/professional/wumpus] has joined #rust-bitcoin 00:45 -!- philbw4 [~znc-admin@157.245.253.12] has joined #rust-bitcoin 00:45 -!- stevenroose [~steven@vps.weuste.club] has joined #rust-bitcoin 01:39 < elichai2> damn it 01:39 < elichai2> serde-json just released a breaking MSRV change 01:39 < elichai2> tests no longer work in 1.22.0 :( 01:40 < elichai2> it seems like it requires at least 1.32.0 now 01:49 < elichai2> https://github.com/rust-bitcoin/rust-bitcoin/pull/398 02:27 -!- felixweis [sid154231@gateway/web/irccloud.com/x-dwybcsuvqtnhdgjd] has joined #rust-bitcoin 02:34 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 265 seconds] 02:55 -!- belcher [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 03:04 -!- Carlotta34Collin [~Carlotta3@ns334669.ip-5-196-64.eu] has joined #rust-bitcoin 03:29 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 272 seconds] 03:37 < stevenroose> orlovsky: do you have a concrete reason why you want the script templates taken out of address.rs? 03:37 < stevenroose> Do you want to use the templates themselves? 03:38 < orlovsky> stevenroose: yes, I use them a lot outside of the address scope (not a wallet software, Layer2/3 stuff). 03:42 -!- Carlotta34Collin [~Carlotta3@ns334669.ip-5-196-64.eu] has quit [Ping timeout: 240 seconds] 03:54 < stevenroose> orlovsky: kay, then it makes sense to have them out. I made a bunch of comments, though. 04:22 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 04:23 -!- dpc [dpcmatrixo@gateway/shell/matrix.org/x-oblqxmzrlekggvfm] has joined #rust-bitcoin 04:44 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 246 seconds] 05:21 -!- jonatack [~jon@213.152.162.79] has joined #rust-bitcoin 05:37 -!- sobot [~textual@c-76-120-79-82.hsd1.co.comcast.net] has joined #rust-bitcoin 06:48 -!- sobot [~textual@c-76-120-79-82.hsd1.co.comcast.net] has quit [Quit: My MacBook has gone to sleep. ZZZzzz...] 07:10 -!- jonatack [~jon@213.152.162.79] has quit [Ping timeout: 268 seconds] 07:19 <@andytoshi> elichai2: thanks fork catching this 07:19 <@andytoshi> thankfully it's only a dev-dependency 07:20 <@andytoshi> orlovsky: does miniscript cover your usecase? 07:27 -!- jonatack [~jon@54.76.13.109.rev.sfr.net] has joined #rust-bitcoin 07:28 < elichai2> Andytoshi well my code didn't compile this morning ;) 07:40 -!- jonatack [~jon@54.76.13.109.rev.sfr.net] has quit [Ping timeout: 240 seconds] 07:51 -!- notmandatory [~textual@cpe-76-169-37-102.socal.res.rr.com] has joined #rust-bitcoin 07:55 <@andytoshi> heh 07:55 <@andytoshi> thanks for actually testing with 1.22 i guess 07:55 <@andytoshi> it's so slow and annoying 08:08 -!- sobot [~textual@c-76-120-79-82.hsd1.co.comcast.net] has joined #rust-bitcoin 08:10 -!- sobot [~textual@c-76-120-79-82.hsd1.co.comcast.net] has quit [Client Quit] 08:12 -!- notmandatory [~textual@cpe-76-169-37-102.socal.res.rr.com] has quit [Quit: notmandatory] 08:33 -!- sobot [~textual@c-73-153-29-162.hsd1.co.comcast.net] has joined #rust-bitcoin 08:42 -!- sobot [~textual@c-73-153-29-162.hsd1.co.comcast.net] has quit [Quit: Textual IRC Client: www.textualapp.com] 09:00 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has joined #rust-bitcoin 09:23 < elichai2> BlueMatt: just wanted to say that while it might seem I'm aggressively pushing for a MSRV bump, I'm not, I'm just trying commenting there any relevant information for future reference because when we will discuss it I won't remember :) 11:23 < dpc> Is it me not being versed with scripts, or is https://docs.rs/bitcoin/0.23.0/bitcoin/blockdata/script/struct.Script.html not very helpful making a good distinction between the script on the output, script on the input, script in the witness and whatever else (as I said - I'm not very versed)? Would it make sense to have distinct types for different places where script is used so an user like me could just "follow the 11:23 < dpc> types"? 11:53 < stevenroose> dpc: Bitcoin doesn't make a distinction between those. Any "script" aka Script can be used for inputs and outputs. What is a valid script for one will be a valid script for the other. (Only req. IIRC is formatting of opcodes & pushes.) 11:54 < stevenroose> There is one requirement that input scripts can only have pushes, though. Not entirely sure if that is consensus or standard. Might be consensus. That would mean that in principle every input script can be used as an output script, btu not vice versa. But really what makes a "script" is just the fact that it's formatted correctly. 12:23 < orlovsky> andytoshi: it does! Actually it simplifies a lot the task and makes it more robust/deterministic 12:24 -!- orlovsky [~dr-orlovs@194.230.155.171] has quit [Quit: Textual IRC Client: www.textualapp.com] 12:24 -!- dr-orlovsky [~dr-orlovs@194.230.155.171] has joined #rust-bitcoin 12:38 < dr-orlovsky> dpc: & stevenroose: I had a lot of pain with particularities of bitcoin scripting recently and had even made a custom script type system for my particular use case - which is probably for the bitcoin layer 1, but is quite useful above. Interestingly, working with miniscript yesterday has reminded of exactly the same problem: let's assume we need to find all _full_ public keys (not hashes) in the script. But with usual script you will never 12:38 < dr-orlovsky> know do you have all necessary information for that or not! While being the same valid Bitcoin script, scripts from `scriptPubkey` P2(W)PK output will not work, when P2PK will do; with P2(W)SH you even don't have the script itself - and with Taproot the problem even deepens! So while it is the same type semantically, there are different types _logically_: Bitcoin script has the property to be committed into some other bitcoin script -- 12:38 < dr-orlovsky> in several layers! And these layers do distinguish on the information they contain. 12:38 < dr-orlovsky> > which is probably *not* for bitcoin layer 1 12:43 < dr-orlovsky> So my solution was to introduce Script subtype system with wrapper types; and define a script type that is always at the bottom layer, containing no other script or pubkey commitments (in form of their hashes). I have named it `LockScript`. I have also defined a few types above on it: `PubkeyScript` (for whatever is there in `pubkeyScript`), `RedeemScript` and `TapScript`. Then, there will be a conversion functions, which for instance can 12:43 < dr-orlovsky> analyse `PubkeyScript` and if it is a custom script or P2PK return a LockScript type - or otherwise fail with the error. So with this type system I am always sure which information it does contain (public keys, their hashes etc) 12:44 < dr-orlovsky> I was thinking about doing PR with this to rust-bitcoin, but actually was unsure is it useful for anything in bitcoin layer itself 13:18 -!- Netsplit *.net <-> *.split quits: tbisker8, jkczyz, gribble 13:20 -!- warren_ [~warren@fedora/wombat/warren] has quit [Ping timeout: 268 seconds] 13:24 -!- warren [~warren@fedora/wombat/warren] has joined #rust-bitcoin 13:25 -!- jkczyz [~jkczyz@135.84.132.250] has joined #rust-bitcoin 13:31 -!- gribble [~gribble@unaffiliated/nanotube/bot/gribble] has joined #rust-bitcoin 13:36 < dpc> Neat. 13:43 < stevenroose> dr-orlovsky: would the Address::from_script constructor help you at all? 13:46 < stevenroose> It gives some instrospection in common scriptPubkey types. 13:47 < stevenroose> But I guess more generally the rust-miniscript parser should be very helpful 13:50 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 248 seconds] 13:58 -!- jonatack [~jon@213.152.161.138] has joined #rust-bitcoin 14:01 -!- tbisker8 [~tbisk@152.89.163.20] has joined #rust-bitcoin 15:15 < dr-orlovsky> stevenroose: It's exactly why I use miniscript: to parse the public keys out in a deterministic way. However you still need to find out that the proper type of script is used (i.e. "LockScript" as the source). Address::from_script would not help, since I need the original public key, not the address (it's hash or a hash of some script) 18:45 -!- notmandatory [~textual@76.169.37.102] has joined #rust-bitcoin 19:15 -!- notmandatory [~textual@76.169.37.102] has quit [Quit: notmandatory] 20:15 -!- notmandatory [~textual@cpe-76-169-37-102.socal.res.rr.com] has joined #rust-bitcoin 22:39 -!- notmandatory [~textual@cpe-76-169-37-102.socal.res.rr.com] has quit [Quit: notmandatory] --- Log closed Fri Jan 24 00:00:19 2020