12017-04-30T00:15:08  *** BlueWolf33 has quit IRC
  22017-04-30T00:20:13  *** d_t has quit IRC
  32017-04-30T00:27:43  *** str4d has joined #bitcoin-core-dev
  42017-04-30T00:58:11  *** BlueWolf33 has joined #bitcoin-core-dev
  52017-04-30T01:17:06  *** justanotheruser has quit IRC
  62017-04-30T01:17:24  *** justanotheruser has joined #bitcoin-core-dev
  72017-04-30T01:24:02  *** justanotheruser has quit IRC
  82017-04-30T01:24:21  *** justanotheruser has joined #bitcoin-core-dev
  92017-04-30T01:24:58  *** justanotheruser has joined #bitcoin-core-dev
 102017-04-30T01:25:24  *** Madars_ has quit IRC
 112017-04-30T01:39:45  *** tw2006 has joined #bitcoin-core-dev
 122017-04-30T01:44:25  *** tw2006 has quit IRC
 132017-04-30T01:50:59  *** Ylbam has quit IRC
 142017-04-30T02:06:28  *** nu11p7r has joined #bitcoin-core-dev
 152017-04-30T02:50:49  *** belcher has quit IRC
 162017-04-30T03:10:44  *** cryptapus is now known as cryptapus_afk
 172017-04-30T03:28:43  *** tw2006 has joined #bitcoin-core-dev
 182017-04-30T03:33:16  *** tw2006 has quit IRC
 192017-04-30T04:20:10  *** kadoban has joined #bitcoin-core-dev
 202017-04-30T04:41:02  *** d9b4bef9 has quit IRC
 212017-04-30T04:44:08  *** d9b4bef9 has joined #bitcoin-core-dev
 222017-04-30T05:04:11  *** Giszmo has quit IRC
 232017-04-30T05:11:32  *** str4d has quit IRC
 242017-04-30T05:12:02  *** str4d has joined #bitcoin-core-dev
 252017-04-30T05:17:40  *** tw2006 has joined #bitcoin-core-dev
 262017-04-30T05:19:03  *** d_t has joined #bitcoin-core-dev
 272017-04-30T05:22:07  *** tw2006 has quit IRC
 282017-04-30T05:27:10  <bitcoin-git> [bitcoin] jameshilliard opened pull request #10301: Check if sys/random.h is required for getentropy. (master...getentropy-rand) https://github.com/bitcoin/bitcoin/pull/10301
 292017-04-30T05:48:21  *** RubenSomsen has joined #bitcoin-core-dev
 302017-04-30T06:00:10  *** dermoth has quit IRC
 312017-04-30T06:01:03  *** dermoth has joined #bitcoin-core-dev
 322017-04-30T06:20:55  *** aantonop has joined #bitcoin-core-dev
 332017-04-30T06:40:03  *** afk11 has quit IRC
 342017-04-30T06:40:24  *** afk11 has joined #bitcoin-core-dev
 352017-04-30T07:05:50  *** davec has quit IRC
 362017-04-30T07:06:32  *** tw2006 has joined #bitcoin-core-dev
 372017-04-30T07:07:33  *** davec has joined #bitcoin-core-dev
 382017-04-30T07:11:20  *** tw2006 has quit IRC
 392017-04-30T07:26:25  *** goksinen has joined #bitcoin-core-dev
 402017-04-30T07:44:02  *** aantonop has quit IRC
 412017-04-30T07:48:12  *** aantonop has joined #bitcoin-core-dev
 422017-04-30T07:59:25  *** Ylbam has joined #bitcoin-core-dev
 432017-04-30T08:35:20  *** aantonop has quit IRC
 442017-04-30T08:36:28  *** arowser has quit IRC
 452017-04-30T08:37:08  *** aantonop has joined #bitcoin-core-dev
 462017-04-30T08:37:53  *** arowser has joined #bitcoin-core-dev
 472017-04-30T08:38:18  *** str4d has quit IRC
 482017-04-30T08:42:13  *** btcdrak has quit IRC
 492017-04-30T08:42:28  *** btcdrak has joined #bitcoin-core-dev
 502017-04-30T08:42:39  *** btcdrak has quit IRC
 512017-04-30T08:44:23  *** btcdrak has joined #bitcoin-core-dev
 522017-04-30T08:53:20  *** aantonop has quit IRC
 532017-04-30T08:55:32  *** tw2006 has joined #bitcoin-core-dev
 542017-04-30T09:00:10  *** tw2006 has quit IRC
 552017-04-30T10:00:16  *** RubenSomsen has quit IRC
 562017-04-30T10:20:25  *** gm2051 has joined #bitcoin-core-dev
 572017-04-30T10:24:04  *** gm2053 has quit IRC
 582017-04-30T10:28:12  *** justanotheruser has quit IRC
 592017-04-30T10:28:28  *** justanotheruser has joined #bitcoin-core-dev
 602017-04-30T10:28:48  *** justanotheruser has joined #bitcoin-core-dev
 612017-04-30T10:30:34  <afk11> hey all. been looking at the MAST BIP and it got me wondering how jl2012 was able to do the hash-locked example. It's a good example for MAST (look what happens the DUP), and for parsing mutually exclusive execution pathways in general
 622017-04-30T10:31:23  *** justanotheruser has quit IRC
 632017-04-30T10:31:42  <afk11> anyways, I've come up with something that seems to allow one to produce the mutually exclusive branches for any script. Need to test it over more scripts 2bh, but it's coming along nicely
 642017-04-30T10:31:53  *** justanotheruser has joined #bitcoin-core-dev
 652017-04-30T10:32:00  <afk11> https://github.com/bitcoin/bips/blob/master/bip-0114.mediawiki#hashed-time-lock-contract
 662017-04-30T10:32:12  *** chjj has quit IRC
 672017-04-30T10:34:22  <afk11> keeping in mind most bitcoin libraries only sign scripts that don't have any degrees of freedom with the pathway that's executed.. I'm starting out by iterating over script opcodes and making a tree out of possible execution pathways as they come
 682017-04-30T10:35:50  <afk11> to do this, I start with a single node in the tree (the no logical ops case), and build up a vector of values of dependent ifs. for the above script, that's [true], [false, true], and [false, false] (same order jl2012 has them)
 692017-04-30T10:39:35  <afk11> next, you need all the opcodes under that pathway.. I decided to do this separately to building the tree. Basically copy EvalScript, remove all opcodes but IF/ELSE/ENDIF/NOTIF, strip away some checks, and log all logical operations and opcodes where fExec==true. The mainStack is now only operated on by IF/ELSE/ENDIF/NOTIF, so you can pass in the vector of vchs representing the list above, ie, "\x01" for true, "" for false..
 702017-04-30T10:40:29  <afk11> and that gets you a list of all opcodes in the script that you need to satisfy if you wished to sign it
 712017-04-30T10:42:03  <afk11> I've only gotten as far as normal scripts, ie, bare or P2SH. MAST requires checking for side effects of earlier operations, and stripping away any where the predicate was failed.
 722017-04-30T10:43:48  *** arowser has quit IRC
 732017-04-30T10:44:06  *** arowser has joined #bitcoin-core-dev
 742017-04-30T10:44:17  *** RubenSomsen has joined #bitcoin-core-dev
 752017-04-30T10:44:28  *** tw2006 has joined #bitcoin-core-dev
 762017-04-30T10:49:05  *** tw2006 has quit IRC
 772017-04-30T10:49:11  <afk11> if this should be in #bitcoin-dev please someone let me know
 782017-04-30T10:50:22  <afk11> the general motivation behind all this is to allow signing of arbitrary scripts. you can only do that once you know if there are logical operations.. after that, looking at the opcodes just under that branch tells you what you need to satisfy in order to redeem using that branch
 792017-04-30T10:53:15  <afk11> with the branch specific opcodes, you can then try to break up the script into pieces the signer can understand, and may support: hashlocks, csv/cltv checks (signer should know the current time), signature operations
 802017-04-30T10:57:46  *** vicenteH has joined #bitcoin-core-dev
 812017-04-30T10:59:15  *** chjj has joined #bitcoin-core-dev
 822017-04-30T10:59:44  <afk11> I think using the [true], [false,true], [false, false] could be a good way of relating to another party to your script/payment channel which branch you are expecting them to sign. Wallets like Copay work by creating a proposed spend from a multisig address, and requesting signatures from others, and atm there isn't really a way to specify branches in a script agnostic way. Hardware wallets also may also face the same thing in the future
 832017-04-30T11:01:20  *** goksinen has quit IRC
 842017-04-30T11:04:33  <afk11> anyway, I think if wallets come to deal with scripts with logical operators, the innermost Sign() function should really be checking that the user isn't accidentally working on the wrong branch, hence the need for to designate the branch in a way the software can verify against later.
 852017-04-30T11:06:04  *** RubenSomsen has quit IRC
 862017-04-30T11:07:31  <afk11> I don't want to use something like branch 1, 2, 3, because the allowed boolean values are specific to the script.
 872017-04-30T11:26:03  <bitcoin-git> [bitcoin] spencerlievens opened pull request #10302: [Makefile] Alphabetically Reorder addrdb.cpp (master...patch-2) https://github.com/bitcoin/bitcoin/pull/10302
 882017-04-30T11:34:27  <afk11> oh, forgot to post a gist showing steps to try and sign that hashlock script: https://gist.github.com/afk11/cb276f78b7407773e76e81f6d5b62d4f
 892017-04-30T11:38:48  *** tw2006 has joined #bitcoin-core-dev
 902017-04-30T12:09:58  *** gm2052 has joined #bitcoin-core-dev
 912017-04-30T12:12:38  *** belcher has joined #bitcoin-core-dev
 922017-04-30T12:14:09  *** gm2051 has quit IRC
 932017-04-30T12:14:55  *** gm2053 has joined #bitcoin-core-dev
 942017-04-30T12:17:25  *** sipa has quit IRC
 952017-04-30T12:17:47  *** sipa has joined #bitcoin-core-dev
 962017-04-30T12:18:11  *** gm2052 has quit IRC
 972017-04-30T12:22:08  *** sipa has quit IRC
 982017-04-30T12:23:47  *** sipa has joined #bitcoin-core-dev
 992017-04-30T12:25:24  *** chjj has quit IRC
1002017-04-30T12:27:58  *** chjj has joined #bitcoin-core-dev
1012017-04-30T12:28:06  *** SopaXorzTaker has joined #bitcoin-core-dev
1022017-04-30T12:28:47  *** sipa has quit IRC
1032017-04-30T12:29:01  *** sipa has joined #bitcoin-core-dev
1042017-04-30T12:29:04  *** hsmiths has quit IRC
1052017-04-30T12:29:04  *** jl2012 has quit IRC
1062017-04-30T12:29:05  *** Ylbam has quit IRC
1072017-04-30T12:29:05  *** limpkin has quit IRC
1082017-04-30T12:40:56  *** tw2006 has quit IRC
1092017-04-30T12:42:19  *** limpkin has joined #bitcoin-core-dev
1102017-04-30T12:48:57  *** GAit has quit IRC
1112017-04-30T12:49:51  *** GAit has joined #bitcoin-core-dev
1122017-04-30T12:51:27  *** hsmiths has joined #bitcoin-core-dev
1132017-04-30T12:51:43  *** Ylbam has joined #bitcoin-core-dev
1142017-04-30T12:52:20  *** jl2012 has joined #bitcoin-core-dev
1152017-04-30T12:56:21  *** justanotheruser has quit IRC
1162017-04-30T12:56:30  *** tw2006 has joined #bitcoin-core-dev
1172017-04-30T12:56:39  *** justanotheruser has joined #bitcoin-core-dev
1182017-04-30T13:05:56  *** NewLiberty has quit IRC
1192017-04-30T13:25:35  *** waxwing has quit IRC
1202017-04-30T13:33:17  *** Guyver2 has joined #bitcoin-core-dev
1212017-04-30T13:40:53  *** waxwing has joined #bitcoin-core-dev
1222017-04-30T14:14:52  *** Madars has joined #bitcoin-core-dev
1232017-04-30T14:18:38  *** justanotheruser has quit IRC
1242017-04-30T14:19:14  *** justanotheruser has joined #bitcoin-core-dev
1252017-04-30T14:19:42  *** harrymm has quit IRC
1262017-04-30T14:24:35  *** justanotheruser has quit IRC
1272017-04-30T14:24:56  *** justanotheruser has joined #bitcoin-core-dev
1282017-04-30T14:27:39  *** justanotheruser has quit IRC
1292017-04-30T14:28:00  *** justanotheruser has joined #bitcoin-core-dev
1302017-04-30T14:30:48  *** justanotheruser has quit IRC
1312017-04-30T14:31:18  *** justanotheruser has joined #bitcoin-core-dev
1322017-04-30T14:31:58  *** justanotheruser has joined #bitcoin-core-dev
1332017-04-30T14:40:08  *** BashCo has quit IRC
1342017-04-30T14:54:01  *** harrymm has joined #bitcoin-core-dev
1352017-04-30T15:01:10  *** justanotheruser has quit IRC
1362017-04-30T15:01:44  *** justanotheruser has joined #bitcoin-core-dev
1372017-04-30T15:03:16  *** justanotheruser has joined #bitcoin-core-dev
1382017-04-30T15:03:53  *** justanotheruser has joined #bitcoin-core-dev
1392017-04-30T15:04:34  *** justanotheruser has joined #bitcoin-core-dev
1402017-04-30T15:05:12  *** justanotheruser has quit IRC
1412017-04-30T15:05:43  *** justanotheruser has joined #bitcoin-core-dev
1422017-04-30T15:06:14  *** justanotheruser has joined #bitcoin-core-dev
1432017-04-30T15:06:37  *** justanotheruser has joined #bitcoin-core-dev
1442017-04-30T15:07:01  *** justanotheruser has joined #bitcoin-core-dev
1452017-04-30T15:09:01  *** justanotheruser has quit IRC
1462017-04-30T15:09:32  *** justanotheruser has joined #bitcoin-core-dev
1472017-04-30T15:10:27  *** SopaXorzTaker has quit IRC
1482017-04-30T15:10:40  *** justanotheruser has joined #bitcoin-core-dev
1492017-04-30T15:11:05  *** SopaXorzTaker has joined #bitcoin-core-dev
1502017-04-30T15:11:17  *** justanotheruser has joined #bitcoin-core-dev
1512017-04-30T15:12:38  *** justanotheruser has joined #bitcoin-core-dev
1522017-04-30T15:13:15  *** justanotheruser has joined #bitcoin-core-dev
1532017-04-30T15:14:20  *** justanotheruser has joined #bitcoin-core-dev
1542017-04-30T15:14:57  *** justanotheruser has joined #bitcoin-core-dev
1552017-04-30T15:22:23  *** decoy has joined #bitcoin-core-dev
1562017-04-30T15:34:10  *** gm2053 has quit IRC
1572017-04-30T15:38:46  *** laurentmt has joined #bitcoin-core-dev
1582017-04-30T15:41:13  *** d_t has quit IRC
1592017-04-30T15:47:43  *** laurentmt has quit IRC
1602017-04-30T15:48:10  *** bsm1175321 has joined #bitcoin-core-dev
1612017-04-30T16:01:39  *** justanotheruser has quit IRC
1622017-04-30T16:01:56  *** justanotheruser has joined #bitcoin-core-dev
1632017-04-30T16:02:33  *** Madars has quit IRC
1642017-04-30T16:07:05  *** justanotheruser has quit IRC
1652017-04-30T16:07:32  *** justanotheruser has joined #bitcoin-core-dev
1662017-04-30T16:08:10  *** justanotheruser has joined #bitcoin-core-dev
1672017-04-30T16:08:31  *** justanotheruser has joined #bitcoin-core-dev
1682017-04-30T16:08:51  *** justanotheruser has joined #bitcoin-core-dev
1692017-04-30T16:09:18  *** justanotheruser has joined #bitcoin-core-dev
1702017-04-30T16:11:22  *** justanotheruser has quit IRC
1712017-04-30T16:11:52  *** justanotheruser has joined #bitcoin-core-dev
1722017-04-30T16:14:32  *** justanotheruser has quit IRC
1732017-04-30T16:14:54  *** justanotheruser has joined #bitcoin-core-dev
1742017-04-30T16:15:37  *** justanotheruser has quit IRC
1752017-04-30T16:15:55  *** justanotheruser has joined #bitcoin-core-dev
1762017-04-30T16:16:45  *** justanotheruser has joined #bitcoin-core-dev
1772017-04-30T16:46:47  *** bsm1175321 has quit IRC
1782017-04-30T17:14:35  *** anthonyjd has quit IRC
1792017-04-30T17:27:25  *** vano1945 has joined #bitcoin-core-dev
1802017-04-30T17:28:38  *** vano1945 has quit IRC
1812017-04-30T17:30:48  *** Victorsueca has quit IRC
1822017-04-30T17:52:28  *** Giszmo has joined #bitcoin-core-dev
1832017-04-30T18:04:58  <NicolasDorier> is there a way in Bitcoin Core to get an unused address ? I am tempted to call getnewaddress everytimes, but doing so would create big gap in by BIP32 path, which would make rescanning fail
1842017-04-30T18:22:52  <sipa> bitcoin core doesn't support gaps or reconstruction from a seed at all
1852017-04-30T18:22:54  <sipa> (yet)
1862017-04-30T18:36:28  <SopaXorzTaker> dammit piqure
1872017-04-30T18:37:14  <SopaXorzTaker> banned me from #bitcoin for posting a malware link, explicitly marked like this and obsured: [https://]malware[.]coin.stealer
1882017-04-30T18:39:28  <NicolasDorier> sipa: I know, for now. jonasschnelli is working on it somewhere I saw recently. Anyway, do you know a way to get the latest unused address of the wallet ?
1892017-04-30T18:39:42  <NicolasDorier> or any unused address
1902017-04-30T18:40:31  <NicolasDorier> Another reason is that I provide a link to the user to send money to my address. And I don't want a user to generate a new address everytimes he hit F5 on my page
1912017-04-30T18:40:38  <NicolasDorier> other solutions to do it of course
1922017-04-30T18:40:50  <NicolasDorier> but if anything exist in core, would make life easier
1932017-04-30T18:41:49  <sipa> NicolasDorier: getnewaddress...
1942017-04-30T18:43:21  <sipa> NicolasDorier: or make your application cache a number of addresses ahead of time
1952017-04-30T18:46:23  <NicolasDorier> sipa: Imagine I want to show the QR code of an unused address of my wallet in the profile page of whatever social media service. If I use getnewaddress, then everytimes someone make a request to the QR code, a new address will bloat up my wallet, leading to DOS eventually.
1962017-04-30T18:46:51  <NicolasDorier> of course I can use the server generating the QR cache the latest created address and verify if not used
1972017-04-30T18:47:03  <sipa> NicolasDorier: yes, so cache addresses in your application, and remove them when used?
1982017-04-30T18:47:40  <sipa> there used to be a way in core get an unused address, which was only updated when a tx was seen to it
1992017-04-30T18:47:56  <sipa> but that's very hard to not make different RPC clients get in eachother's way
2002017-04-30T18:48:05  <NicolasDorier> ha ok I see
2012017-04-30T18:48:31  <NicolasDorier> well yes I will cache the address on the server side, and just make a request to bitcoin core to know if it was used before returning it to the server
2022017-04-30T18:48:35  <NicolasDorier> good enough
2032017-04-30T18:54:38  *** gm2051 has joined #bitcoin-core-dev
2042017-04-30T18:55:40  <afk11> *
2052017-04-30T18:58:53  *** SopaXorzTaker has quit IRC
2062017-04-30T19:01:17  *** Madars has joined #bitcoin-core-dev
2072017-04-30T19:02:55  *** niska has quit IRC
2082017-04-30T19:12:53  *** niska has joined #bitcoin-core-dev
2092017-04-30T19:12:58  *** dermoth_ has joined #bitcoin-core-dev
2102017-04-30T19:13:24  *** dermoth has quit IRC
2112017-04-30T19:13:26  *** dermoth_ is now known as dermoth
2122017-04-30T19:20:56  *** justanotheruser has quit IRC
2132017-04-30T19:21:41  *** d_t has joined #bitcoin-core-dev
2142017-04-30T19:22:03  *** justanotheruser has joined #bitcoin-core-dev
2152017-04-30T19:44:42  *** spinza has quit IRC
2162017-04-30T19:51:33  *** RubenSomsen has joined #bitcoin-core-dev
2172017-04-30T19:54:52  *** spinza has joined #bitcoin-core-dev
2182017-04-30T19:56:12  *** RubenSomsen has quit IRC
2192017-04-30T20:00:12  *** justanotheruser has quit IRC
2202017-04-30T20:00:30  *** justanotheruser has joined #bitcoin-core-dev
2212017-04-30T20:00:32  *** Madars has quit IRC
2222017-04-30T20:12:48  *** laurentmt has joined #bitcoin-core-dev
2232017-04-30T20:13:57  *** laurentmt has quit IRC
2242017-04-30T20:15:53  *** laurentmt has joined #bitcoin-core-dev
2252017-04-30T20:16:24  *** laurentmt has quit IRC
2262017-04-30T20:19:41  *** gm2051 has quit IRC
2272017-04-30T20:25:20  *** To7 has joined #bitcoin-core-dev
2282017-04-30T20:31:05  *** d_t has quit IRC
2292017-04-30T20:33:32  *** Dyaheon has quit IRC
2302017-04-30T20:34:47  *** Dyaheon has joined #bitcoin-core-dev
2312017-04-30T20:43:36  *** marcoagner has quit IRC
2322017-04-30T20:54:36  *** elkalamar has joined #bitcoin-core-dev
2332017-04-30T20:56:06  *** marcoagner has joined #bitcoin-core-dev
2342017-04-30T21:20:59  *** elkalamar has quit IRC
2352017-04-30T21:24:36  *** urand has joined #bitcoin-core-dev
2362017-04-30T21:24:56  *** urand has quit IRC
2372017-04-30T21:25:38  *** Guyver2 has quit IRC
2382017-04-30T21:25:58  *** elkalamar has joined #bitcoin-core-dev
2392017-04-30T21:31:56  *** tw2006 has quit IRC
2402017-04-30T21:34:20  *** goksinen has joined #bitcoin-core-dev
2412017-04-30T21:35:57  *** goksinen has quit IRC
2422017-04-30T21:36:24  *** goksinen has joined #bitcoin-core-dev
2432017-04-30T21:55:59  *** justan0theruser has joined #bitcoin-core-dev
2442017-04-30T21:56:53  *** justanotheruser has quit IRC
2452017-04-30T22:10:29  *** justan0theruser has quit IRC
2462017-04-30T22:11:04  *** justanotheruser has joined #bitcoin-core-dev
2472017-04-30T22:12:55  *** justanotheruser has joined #bitcoin-core-dev
2482017-04-30T22:13:43  *** justanotheruser has joined #bitcoin-core-dev
2492017-04-30T22:14:51  *** dodomojo has joined #bitcoin-core-dev
2502017-04-30T22:16:58  *** justanotheruser has quit IRC
2512017-04-30T22:17:29  *** justanotheruser has joined #bitcoin-core-dev
2522017-04-30T22:17:59  *** goksinen has quit IRC
2532017-04-30T22:18:16  *** justanotheruser has quit IRC
2542017-04-30T22:19:05  *** justanotheruser has joined #bitcoin-core-dev
2552017-04-30T22:23:09  *** dodomojo has quit IRC
2562017-04-30T22:23:38  *** goksinen has joined #bitcoin-core-dev
2572017-04-30T22:24:52  *** dodomojo has joined #bitcoin-core-dev
2582017-04-30T22:28:48  *** goksinen has quit IRC
2592017-04-30T23:04:52  *** amiller has quit IRC
2602017-04-30T23:06:12  *** afk11 has quit IRC
2612017-04-30T23:07:48  *** afk11 has joined #bitcoin-core-dev
2622017-04-30T23:08:24  *** Guest76863 has joined #bitcoin-core-dev
2632017-04-30T23:14:05  *** chatter29 has joined #bitcoin-core-dev
2642017-04-30T23:14:10  <chatter29> hey guys
2652017-04-30T23:15:11  *** chatter29 has quit IRC
2662017-04-30T23:18:52  *** altoz has quit IRC
2672017-04-30T23:21:00  *** tw2006 has joined #bitcoin-core-dev
2682017-04-30T23:21:04  *** justan0theruser has joined #bitcoin-core-dev
2692017-04-30T23:23:11  *** justanotheruser has quit IRC
2702017-04-30T23:25:22  *** tw2006 has quit IRC
2712017-04-30T23:49:44  *** dgenr8 has quit IRC
2722017-04-30T23:50:12  *** dgenr8 has joined #bitcoin-core-dev
2732017-04-30T23:51:38  *** d_t has joined #bitcoin-core-dev
2742017-04-30T23:51:56  *** elkalamar has quit IRC