--- Day changed Thu Jul 26 2018 00:04 < andytoshi> dongcarl: easy to access and initialize and modify 00:04 < andytoshi> when you're building a transaction you're constantly adding and removing inputs and outputs, replacing scripts, etc 00:05 < andytoshi> and the docs are wrong - that should say "witness script" rather than "redeem script" 00:06 < dongcarl> haha okay cool, makes more sense 00:06 < andytoshi> "redeem script" is a p2sh term 00:06 < andytoshi> yeah, my bad 00:07 < dongcarl> I'll PR 00:08 < andytoshi> thanks 00:11 < dongcarl> https://github.com/rust-bitcoin/rust-bitcoin/pull/109 02:24 -!- treyzania [~treyzania@paphos.tr3y.io] has quit [Ping timeout: 264 seconds] 02:25 -!- treyzania [~treyzania@paphos.tr3y.io] has joined #rust-bitcoin 14:06 < andytoshi> BlueMatt: https://github.com/rust-bitcoin/rust-secp256k1/pull/39 bumps the version number of rust-secp and adds CHANGELOG.md to document the changes (i'm planning to do the same thing for rust-bitcoin on the next major version) 14:06 < andytoshi> can you ack it? 14:51 < BlueMatt> andytoshi: dongcarl I'm very confused 14:52 < BlueMatt> "redeemscript" is *definitely* the term used in segwit, too 14:52 < BlueMatt> "witness script" refers to the whole set of stack pushes in the witness 14:52 < BlueMatt> *not* the redeem script part that is being hashed there 15:11 < andytoshi> but bip141 says "The witnessScript (≤ 10,000 bytes) is popped off the initial witness stack. SHA256 of the witnessScript must match the 32-byte witness program." 15:12 < andytoshi> we have been using this terminology internally at blockstream (at least gwillen instagibbs nickler and myself, and surely sipa has noticed us doing so) and nobody has ever commented on this 15:13 < andytoshi> and only the top element if the witness stack is a script 16:03 -!- elichai2 [uid212594@gateway/web/irccloud.com/x-jbpgyhistpbhqcza] has joined #rust-bitcoin 16:08 -!- savil_ [~savil@2604:a880:2:d0::2119:6001] has quit [Quit: ZNC 1.7.1 - https://znc.in] 16:11 -!- savil[m] [savilmatri@gateway/shell/matrix.org/x-rhajeqmfmgutpydc] has joined #rust-bitcoin 16:19 < BlueMatt> andytoshi: funny I've never seen it, anyway, #bitcoin-core-dev seemed to agree it was at least confusing, even if accepted by some people 16:19 < BlueMatt> and given there are other options, best to use the non-confusing one 16:20 < BlueMatt> andytoshi: given there is *also* a scriptWitness 16:20 < BlueMatt> which refers to the whole witness 16:24 < andytoshi> yes, the scriptwitness is the witness to the script 16:24 < andytoshi> a witnessscript is a script that appears in the witness 16:24 < andytoshi> and a redeemscript has a meaning as per bip16 for many years 16:26 < andytoshi> i have a ton of source code that uses these terms the way bip141 does, i had never encountered any other interpretation until this morning 16:28 < andytoshi> i'm happy to use "witness redeem script" in docs, but there are variables all over liquid and icboc and probably rust-bitcoin called witness_script and redeem_script which have the bip141 meanings 16:35 < savil[m]> BlueMatt: I'm looking at your suggestion to remove the "hex" dependency in https://github.com/rust-bitcoin/rust-bitcoin/pull/107. Both hex::encode and hex::decode are used in non-test code. The only way to make the dependency test-only, is to basically pull in the implementation into some utility file. What does that gain us, over referencing the original library? 16:36 < andytoshi> savil[m]: it means that the code is under our control and our review 16:37 < savil[m]> andytoshi: right, but its currently pegged to a commit number, so it won't be changing without us deciding to do so? 16:37 < andytoshi> i think a dep that pinned a git commit would be ok, except that git hashes are not collision-resistant, and it's still a review difficulty (an extra dep distracting people in Cargo.lock and teh build output) 16:38 < savil[m]> andytoshi: I don't have a strong opinion here. Should I just copy-pasta the implementation into a utility file? I can try to whittle it down but have to look deeper into that 16:39 < andytoshi> no, you can't copy and paste it, the licenses are incompatible 16:39 < andytoshi> you have to rewrite it (i'm pretty sure there is existing code somewhere in the codebase, or maybe in rust-jsonrpc or strason) 16:40 < savil[m]> andytoshi: hmm I see. Would you be opposed to landing this as is, and making a separate task to remove the hex-dependency? 16:41 < andytoshi> no, i think that's reasonable. i can remove the hex dependency later in a serde cleanup commit 16:41 < andytoshi> i'll post on the PR 16:41 < savil[m]> incremental steps and all that 16:41 < savil[m]> cool 16:49 < BlueMatt> savil[m]: my suggestion was that it was only used in non-test code in serde stuff 16:49 < BlueMatt> so if serde is made optional (which I think we wanted to do anyway) then you could make hex optional at the same time 16:54 < savil[m]> BlueMatt: ah, I see. And that is done by making a "serde" feature in Cargo.toml, and specifying that the hex-dependency only applies when that feature is enabled? 16:54 < andytoshi> we'll probably do that, yeah 16:55 < andytoshi> i'm not sure how to make cargo do that (making a dep optional based on a separate feature) but i assume it's easy 16:58 < andytoshi> oh, i figured it out 16:59 < savil[m]> yeah, https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section talks about it 17:18 < savil[m]> andytoshi: something like this I think https://gist.github.com/savil/1fafb6f4ab909f4e0264ceaf8ad33b97 (with a better name for "serde_feature". It can't be "serde", because that's the name of a dependency). 17:20 < savil[m]> anyway, I'll defer to you and pick up something else 17:37 < andytoshi> thanks! 17:37 < andytoshi> i think i might need a separate "serde_feature" anyway because i need to also turn on the rust-secp serde feature when serde is enabled for rust-bitcoin 18:40 < BlueMatt> andytoshi: https://github.com/rust-bitcoin/rust-secp256k1/pull/39#issuecomment-408195295 18:47 < dongcarl> andytoshi, BlueMatt: I'm happy to change the term to whatever is least confusing... 18:47 < BlueMatt> dongcarl: probably best to have this discussion more broadly (#bitcoin-core-dev and or the bitcoincore.org issue) 18:48 < BlueMatt> we need a standard here, cause it seems several have developed 18:50 < dongcarl> True 18:51 < BlueMatt> actually, bitcoin core irc meeting in 10 minutes 18:51 < BlueMatt> I'll bring it up then 18:51 < BlueMatt> not exactly the right venue, but whatever 20:16 < andytoshi> BlueMatt: re 1.0, :D 20:16 < andytoshi> but i think we should do 0.10.0 for now, make sure that we can upgrade rust-bitcoin and at least one actual project (icboc or liquid) to it 20:16 < andytoshi> then i'd be happy to publish 1.0 with no changes 20:17 < BlueMatt> yea, ok, fair 20:20 < andytoshi> rust-lightning would also count as an "actual project", though liquid has the nice property of actually using the serde feature 20:21 < BlueMatt> yea, I think I'm gonna be a bit to upgrade to it, sadly 20:21 < BlueMatt> the new api will take me a bit to check all the callsites 20:21 < andytoshi> yeah, ditto 20:21 < andytoshi> fortunately they changed in a way that you can't really do the wrong thing 20:26 < andytoshi> is there a way i can make crates.io use my yubikey instead of whatever it does now (i think it has a fixed token somewhere in my ~/.cargo?) 20:26 < BlueMatt> well, except use a too-large ctx :p 20:27 < andytoshi> heh, yes 20:27 < andytoshi> though arguably it's easier now to use the right size, since the compiler will bitch at you if you go too small 20:27 < andytoshi> anyway published 20:28 < BlueMatt> yes, totally agreed 20:28 < BlueMatt> really excited to do it 20:29 < andytoshi> ditto, it'll be fun, esp since some error paths actually went away 20:29 < andytoshi> like, `.unwrap()s` can be deleted 21:02 -!- savil [~savil@c-71-202-1-72.hsd1.ca.comcast.net] has joined #rust-bitcoin 21:02 -!- savil [~savil@c-71-202-1-72.hsd1.ca.comcast.net] has left #rust-bitcoin ["Textual IRC Client: www.textualapp.com"] 21:20 -!- savil[m] [savilmatri@gateway/shell/matrix.org/x-rhajeqmfmgutpydc] has left #rust-bitcoin ["User left"] 21:23 -!- elichai2 [uid212594@gateway/web/irccloud.com/x-jbpgyhistpbhqcza] has quit [Quit: Connection closed for inactivity] 21:29 -!- savil[m]2 [savilmatri@gateway/shell/matrix.org/x-rhajeqmfmgutpydc] has joined #rust-bitcoin