--- Log opened Tue Oct 26 00:00:14 2021
00:29 -!- Guyver2 [Guyver@guyver2.xs4all.nl] has joined #bitcoin-wizards
00:45 -!- db [uid18678@id-18678.helmsley.irccloud.com] has joined #bitcoin-wizards
01:02 -!- t-bast [~t-bast@user/t-bast] has joined #bitcoin-wizards
01:03 -!- t-bast [~t-bast@user/t-bast] has quit [Client Quit]
01:18 -!- Guyver2 [Guyver@guyver2.xs4all.nl] has quit [Remote host closed the connection]
02:00 -!- AaronvanW [~AaronvanW@71pc74.sshunet.nl] has joined #bitcoin-wizards
02:01 < darosior> ademan[m]: not really, at top level it's only informative. However the dissat property is used for non-top levels to determine validity/safety of upper nodes
02:06 < _aj_> ademan[m]: i think of it as two different languages, miniscript policy gives you an easy way of specifying things, and miniscript script is a clever way of describing a subset of bitcoin script, and you have a compiler to go from one to the other. if you want easy for people, you want policy; if you want easy for computers, you want the script part
02:55 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Quit: ZNC - http://znc.sourceforge.net]
02:56 -!- luke-jr [~luke-jr@user/luke-jr] has joined #bitcoin-wizards
03:53 -!- belcher [~belcher@user/belcher] has quit [Quit: Leaving]
04:09 -!- Guyver2 [~Guyver@guyver2.xs4all.nl] has joined #bitcoin-wizards
05:01 -!- CryptoDavid [uid14990@id-14990.uxbridge.irccloud.com] has joined #bitcoin-wizards
05:14 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Remote host closed the connection]
05:15 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #bitcoin-wizards
05:46 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Remote host closed the connection]
05:46 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #bitcoin-wizards
06:55 -!- yanmaani [~yanmaani@gateway/tor-sasl/yanmaani] has joined #bitcoin-wizards
07:01 -!- szarka [~szarka@24-124-20-18-static.midco.net] has joined #bitcoin-wizards
07:04 -!- szarkanet [~szarka@2001-48F8-9004-E05-1AF-A751-C2F-3A21-dynamic.midco.net] has quit [Ping timeout: 252 seconds]
07:06 -!- smartin [~Icedove@88.135.18.171] has joined #bitcoin-wizards
07:11 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Remote host closed the connection]
07:12 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #bitcoin-wizards
07:15 < ademan[m]> thanks!
07:16 < ademan[m]> My questions are just going to get worse, please let me know if they're "beneath" this channel.
07:19 < darosior> There is ##miniscript too
07:26 < ademan[m]> I know I'm probably wrong about this but the above policy compiled to the following script: ` OP_CHECKSIG OP_NOTIF OP_CHECKSIGVERIFY <6810> OP_CHECKLOCKTIMEVERIFY OP_ELSE OP_CHECKSIG OP_ENDIF` why are there both an ` OP_CHECKSIGVERIFY` and an ` OP_CHECKSIG` ?
07:26 < ademan[m]> I would *think* this would be better represented as ` OP_CHECKSIGVERIFY OP_CHECKSIG OP_DUP OP_IF <2a> OP_CHECKTIMELOCKVERIFY OP_ENDIF`
07:26 < ademan[m]> so that key A doesn't need to be repeated? if that first `OP_CHECKSIGVERIFY` fails, the whole script fails right?
07:33 < ademan[m]> the more I think about it *if* my version is even valid, there are plenty of valid reasons a policy might compile in a less-than-optimal way. So I guess my question is really "does my hand-written version accomplish what I think it does? does that first OP_CHECKSIGVERIFY behave like I think it does?"
07:35 < darosior> Before inspecting your script, note that there often (in complex scripts at least) exists more optimal script than the Miniscript ones
07:37 < darosior> Now, you are right that or(thresh(2,pk(A),pk(B)), and(pk(A),after(42))) could be compiled to a more efficient script starting with CHECKSIGVER. But this is not a valid policy as you have repeated keys
07:37 < ademan[m]> yeah that makes sense, miniscript has a lot to do with correctness and ability to reason about it
07:37 < darosior> You can however transform it into and(pk(A), or(after(42), pk(B)))
07:38 < ademan[m]> hah, yeah I sure could
07:38 < darosior> This should be compiled into an and_v() and therefore start with CHECKSIGVERIFY
07:38 < ademan[m]> is the no-repeated-keys constraint articulated somewhere? most of what I know so far I've gleaned from sipa's miniscript page, which doesn't really discuss policy descriptions
07:39 < darosior> It does indirectly, it's a property of Miniscript
07:39 < darosior> In theory the policy compiler could do what i just did and try to remove duplicated keys before compiling to Miniscript
07:39 < darosior> It just doesn't
07:40 < darosior> But it's weird you could compile this on the website, it's not a valid Miniscript
07:40 < darosior> (AFAICT)
07:41 -!- roconnor [~roconnor@host-45-58-217-8.dyn.295.ca] has joined #bitcoin-wizards
07:42 < darosior> Anyways to answer your question: yes. It is discussed on the website under the "Malleability" section (having duplicated keys across the script makes it really hard to reason about malleability).
07:42 < ademan[m]> if you feed it the compiled miniscript, it will error as you expected, but the policy compiles heh
07:43 < ademan[m]> translated miniscript*
07:43 < darosior> Interesting, thanks for reporting
07:44 < ademan[m]> also heh I just noticed miniscript correctly emitted `OP_NOTIF` where I used `OP_IF` one more good reason I shouldn't be hand-writing these 😂
07:56 -!- yanmaani [~yanmaani@gateway/tor-sasl/yanmaani] has quit [Ping timeout: 276 seconds]
08:01 -!- davterra [~davterra@143.198.56.186] has joined #bitcoin-wizards
08:06 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Remote host closed the connection]
08:07 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #bitcoin-wizards
08:20 -!- CryptoDavid [uid14990@id-14990.uxbridge.irccloud.com] has quit [Quit: Connection closed for inactivity]
08:52 -!- b10c [uid500648@id-500648.ilkley.irccloud.com] has joined #bitcoin-wizards
08:55 -!- db [uid18678@id-18678.helmsley.irccloud.com] has quit [Quit: Connection closed for inactivity]
09:16 -!- gene [~gene@gateway/tor-sasl/gene] has joined #bitcoin-wizards
10:49 -!- yanmaani [~yanmaani@gateway/tor-sasl/yanmaani] has joined #bitcoin-wizards
11:14 -!- meshcollider [meshcollid@user/meshcollider] has quit [Remote host closed the connection]
11:35 -!- meshcollider [meshcollid@jujube.ircnow.org] has joined #bitcoin-wizards
12:48 -!- smartin [~Icedove@88.135.18.171] has quit [Quit: smartin]
13:04 -!- lukedashjr [~luke-jr@user/luke-jr] has joined #bitcoin-wizards
13:07 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 260 seconds]
13:08 -!- lukedashjr is now known as luke-jr
13:12 -!- b10c [uid500648@id-500648.ilkley.irccloud.com] has quit [Quit: Connection closed for inactivity]
13:25 -!- lukedashjr [~luke-jr@user/luke-jr] has joined #bitcoin-wizards
13:26 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 260 seconds]
13:27 -!- lukedashjr is now known as luke-jr
13:56 -!- lukedashjr [~luke-jr@user/luke-jr] has joined #bitcoin-wizards
13:57 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 260 seconds]
13:57 -!- lukedashjr is now known as luke-jr
14:11 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has quit [Ping timeout: 276 seconds]
14:13 -!- bitdex [~bitdex@gateway/tor-sasl/bitdex] has joined #bitcoin-wizards
14:30 -!- Guyver2_ [~Guyver@guyver2.xs4all.nl] has joined #bitcoin-wizards
14:33 -!- Guyver2 [~Guyver@guyver2.xs4all.nl] has quit [Ping timeout: 264 seconds]
14:34 -!- Guyver2_ is now known as Guyver2
14:34 -!- Guyver2 [~Guyver@guyver2.xs4all.nl] has quit [Client Quit]
14:36 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 260 seconds]
14:37 -!- lukedashjr [~luke-jr@user/luke-jr] has joined #bitcoin-wizards
14:38 -!- lukedashjr is now known as luke-jr
15:39 -!- plank [~plankster@user/plankers] has quit [Ping timeout: 265 seconds]
15:41 -!- plankster [~plankster@user/plankers] has joined #bitcoin-wizards
15:46 < jeremyrubin> darosior imo the right answer would be to make miniscript support codesep for repeated keys
16:40 -!- db [uid18678@id-18678.helmsley.irccloud.com] has joined #bitcoin-wizards
17:15 -!- gene [~gene@gateway/tor-sasl/gene] has quit [Quit: gene]
18:54 -!- db [uid18678@id-18678.helmsley.irccloud.com] has quit [Quit: Connection closed for inactivity]
19:12 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 260 seconds]
19:13 -!- luke-jr [~luke-jr@user/luke-jr] has joined #bitcoin-wizards
19:15 -!- adiabat [~adiabat@63.209.32.102] has quit [Ping timeout: 264 seconds]
20:39 -!- adiabat [~adiabat@63.209.32.102] has joined #bitcoin-wizards
21:22 -!- plankster_ [~plankster@user/plankers] has joined #bitcoin-wizards
21:22 -!- plankster [~plankster@user/plankers] has quit [Ping timeout: 260 seconds]
21:26 -!- meshcollider [meshcollid@jujube.ircnow.org] has quit [Changing host]
21:26 -!- meshcollider [meshcollid@user/meshcollider] has joined #bitcoin-wizards
22:34 -!- Ademan [~ademan@47.185.115.221] has joined #bitcoin-wizards
22:38 < ademan[m]> I noticed another difference from my script (corrected): ` OP_CHECKSIGVERIFY OP_CHECKSIG OP_DUP OP_NOTIF <2a> OP_CHECKTIMELOCKVERIFY OP_ENDIF`
22:38 < ademan[m]> miniscript emitted this: ` OP_CHECKSIGVERIFY OP_CHECKSIG OP_IFDUP OP_NOTIF <2a> OP_CHECKLOCKTIMEVERIFY OP_ENDIF`
22:38 < ademan[m]> why `OP_IFDUP` before the `OP_NOTIF` instead of `OP_DUP`?
22:39 < ademan[m]> oh, multi-line messages (in matrix) come through as multiple messages, my bad.
22:39 -!- Ademan [~ademan@47.185.115.221] has quit [Quit: leaving]
23:05 -!- db [uid18678@id-18678.helmsley.irccloud.com] has joined #bitcoin-wizards
23:42 < _aj_> ademan[m]: OP_IFDUP OP_NOTIF == OP_DUP OP_NOTIF OP_DROP ; yours would have "0 2a" on the stack and fail if the CLTV path executed
--- Log closed Wed Oct 27 00:00:15 2021