--- Log opened Wed Mar 13 00:00:26 2024 00:00 -!- reardencode [~reardenco@shrugged.reardencode.com] has joined #bitcoin-core-pr-reviews 00:15 -!- abubakarsadiq [uid602234@id-602234.hampstead.irccloud.com] has joined #bitcoin-core-pr-reviews 00:28 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 00:36 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 268 seconds] 00:45 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Read error: Connection reset by peer] 00:46 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 01:08 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 01:14 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 268 seconds] 01:29 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 01:38 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 255 seconds] 01:54 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 02:01 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 260 seconds] 02:03 -!- jonatack [~jonatack@user/jonatack] has quit [Ping timeout: 255 seconds] 02:04 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Read error: Connection reset by peer] 02:04 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 02:04 -!- jonatack [~jonatack@user/jonatack] has joined #bitcoin-core-pr-reviews 02:13 -!- reardencode [~reardenco@shrugged.reardencode.com] has quit [Ping timeout: 255 seconds] 02:15 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 02:20 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 268 seconds] 02:27 -!- b10c [~quassel@user/b10c] has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.] 02:29 -!- b10c [~quassel@static.33.106.217.95.clients.your-server.de] has joined #bitcoin-core-pr-reviews 02:29 -!- b10c [~quassel@user/b10c] has changed host 02:29 -!- b10c [~quassel@user/b10c] has quit [Client Quit] 02:30 -!- reardencode [~reardenco@shrugged.reardencode.com] has joined #bitcoin-core-pr-reviews 02:32 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 02:33 -!- b10c [~quassel@user/b10c] has joined #bitcoin-core-pr-reviews 02:38 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 255 seconds] 03:34 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 03:42 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 256 seconds] 03:48 -!- __gotcha1 [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 03:48 -!- vincenzopalazzo_ [~vincenzop@static.14.246.108.65.clients.your-server.de] has joined #bitcoin-core-pr-reviews 03:49 -!- vincenzopalazzo [~vincenzop@static.14.246.108.65.clients.your-server.de] has quit [Ping timeout: 252 seconds] 03:49 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Ping timeout: 252 seconds] 03:49 -!- __gotcha1 is now known as __gotcha 03:58 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 04:03 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 268 seconds] 04:17 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 04:22 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 260 seconds] 04:35 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 04:40 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 268 seconds] 04:52 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 04:56 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Remote host closed the connection] 04:56 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 04:58 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 272 seconds] 05:00 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 05:02 -!- cguida [~cguida@2806:2f0:55e1:f7b9:6084:b961:13bc:62e7] has quit [Ping timeout: 246 seconds] 05:37 -!- cguida [~cguida@apnlte.ht1.136.x.attmex.mx] has joined #bitcoin-core-pr-reviews 05:44 -!- cguida [~cguida@apnlte.ht1.136.x.attmex.mx] has quit [Ping timeout: 252 seconds] 06:05 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 240 seconds] 06:16 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 06:21 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 268 seconds] 06:31 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 06:33 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Remote host closed the connection] 06:36 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 07:02 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Remote host closed the connection] 07:20 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 07:22 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Ping timeout: 268 seconds] 07:25 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 07:25 -!- cygnet3 [~cygnet3@185.65.134.166] has joined #bitcoin-core-pr-reviews 07:27 -!- pablomartin [~pablomart@193.160.246.250] has joined #bitcoin-core-pr-reviews 07:33 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Remote host closed the connection] 07:34 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 07:36 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Remote host closed the connection] 07:36 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 07:53 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Read error: Connection reset by peer] 07:53 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 08:06 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Read error: Connection reset by peer] 08:06 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 08:16 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Read error: Connection reset by peer] 08:16 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 08:23 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Ping timeout: 268 seconds] 08:24 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 08:28 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Read error: Connection reset by peer] 08:29 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 08:45 -!- __gotcha [~Thunderbi@85.234.221.48] has quit [Ping timeout: 252 seconds] 08:48 -!- __gotcha [~Thunderbi@85.234.221.48] has joined #bitcoin-core-pr-reviews 08:54 -!- mehounme [~mehounme@137.255.26.42] has joined #bitcoin-core-pr-reviews 08:56 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Remote host closed the connection] 09:16 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 09:41 -!- cygnet3 [~cygnet3@185.65.134.166] has quit [K-Lined] 09:57 -!- Guest42 [~Guest42@212.129.83.202] has joined #bitcoin-core-pr-reviews 09:58 -!- mehounme34 [~mehounme@137.255.26.42] has joined #bitcoin-core-pr-reviews 09:59 -!- monlovesmango [monlovesma@gateway/vpn/protonvpn/monlovesmango] has joined #bitcoin-core-pr-reviews 09:59 < reardencode> If I understand UTC correctly, it's nearly time to talk about #LNHANCE for bitcoin inquisition (OP_CHECKSIGFROMSTACK(VERIFY) and OP_INTERNALKEY) :) 09:59 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Remote host closed the connection] 10:00 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 10:00 < mehounme> Yes 10:01 < reardencode> #startmeeting 10:01 < reardencode> Hi! 10:01 < mehounme> Hello 10:01 < glozow> hi 10:01 < Guest42> hi 10:01 -!- cguida [~cguida@APNLTE.FD3.26.x.attmex.mx] has joined #bitcoin-core-pr-reviews 10:02 < monlovesmango> hey 10:02 < cguida> h 10:02 < cguida> hi 10:02 -!- Naiyoma [~Naiyoma@196.207.134.149] has joined #bitcoin-core-pr-reviews 10:02 < emzy> hi 10:02 < reardencode> Links: https://bitcoincore.reviews/bitcoin-inquisition-45 https://github.com/bitcoin-inquisition/bitcoin/pull/45 10:03 < reardencode> I'll go through the questions in the notes, but feel free to drop other questions or comments throughout. 10:03 < reardencode> Did you review the PR? Concept ACK, approach ACK, tested ACK, or NACK? What was your review approach? 10:04 < cguida> Didn't do an official review yet! Meaning to soon :) 10:04 < monlovesmango> reviewed but no opinion... here to learn mostly 10:05 < cguida> Probably Concept ACK from me 10:05 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 272 seconds] 10:05 < emzy> did no review, so no opinion. 10:06 < reardencode> Bonus question: Have you read the BIPs, or delving thread about this effort? 10:07 < Guest42> no 10:07 < monlovesmango> read bip 119 and delving thread 10:08 < reardencode> https://delvingbitcoin.org/t/lnhance-bips-and-implementation/376 https://github.com/bitcoin-inquisition/binana/blob/master/2024/BIN-2024-0003.md https://github.com/bitcoin-inquisition/binana/blob/master/2024/BIN-2024-0004.md for reference 10:08 < cguida> Yes, I've read those 10:08 < reardencode> 2. What does OP_CHECKSIGFROMSTACKVERIFY leave on the stack? OP_CHECKSIGFROMSTACK? 10:10 < cguida> VERIFY fails the script if the signature fails, otherwise leaves nothing, without VERIFY it pushes 1 for success and 0 for failure 10:10 < cguida> same as CHECKSIG 10:10 < reardencode> cguida: close - hint: CSFSV repurposes a OP_NOP and CSFS repurposes an OP_SUCCESS 10:12 < cguida> ah. CSFSV leaves the 3 inputs on the stack 10:13 < reardencode> right! I've actually found that in practical scripts this behavior can be useful since CSFS(V) are often used to authorize arguments to other ops, eg. a pubkey for delegation, so leaving items on the stack can be desirable. 10:13 < reardencode> 3. In what case can OP_CHECKSIGFROMSTACK fail and terminate script execution? 10:14 < reardencode> cguida already told us that CSFSV does for any invalid signature, but there is also a case that terminates script execution for CSFS 10:14 < cguida> If there are fewer than 3 items on the stack 10:15 < cguida> or if the pubkey is the wrong size 10:15 < reardencode> pubkey the wrong size is a NOP 10:15 < monlovesmango> wrong sig version? 10:15 < cguida> sorry, if the pubkey is size 0 10:15 < reardencode> monlovesmango: close - somewhat more general 10:16 < reardencode> cguida: you're right I didn't account for all cases in writing the question! 0 pubkey, and small stack also fail. 10:17 < monlovesmango> SCRIPT_VERIFY_DISCOURAGE_CHECKSIGFROMSTACK flag? 10:17 < cguida> the sig needs to be a valid bip340 sig 10:18 < reardencode> as monlovesmango alluded, the case I was thinking of is any non-empty invalid signature terminates execution immediately; only a 0-length signature pushes 0 to the stack and continues execution 10:18 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 10:18 < reardencode> This is the same behavior as OP_CHECKSIG in tapscript. 10:19 < reardencode> 4. What will cause OP_CHECKSIGFROMSTACK to succeed without checking the signature? 10:19 < cguida> ok so i was wrong that a 0 is pushed to the stack if sig validation fails? 10:19 < reardencode> cguida already mentioned this one - non-0, non-32-byte pubkeys succeed without doing any sig validation 10:20 < reardencode> cguida: yeah, somewhat surprising, but useful behavior to avoid malleability. 10:20 < cguida> I believe CHECKSIG pushes 0 to the stack for invalid sig, correct? 10:20 < cguida> so this is different from that? 10:21 < reardencode> Honestly, I forget the exact semantics for legacy/witnessv0 checksig. This behavior is copied from Tapscript checksig. 10:21 < cguida> gotcha 10:21 < reardencode> As I mentioned in the notes, I was originally going to make CSFS follow the semantics of other sigops in respective script types, but that pretty quickly showed itself to be a poor path both in code clarity, and in terms of making new things in bitcoin better than old things. 10:21 < cguida> CSFS will succeed if the pubkey is length not in (0,32) 10:22 < reardencode> ^^ yep 10:22 < monlovesmango> what line in code is "non-0, non-32-byte pubkeys succeed without doing any sig validation"? 10:22 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has quit [Ping timeout: 260 seconds] 10:22 < reardencode> monlovesmango: interpreter.cpp:374 on the diff I'm looking at 10:23 < monlovesmango> thank you :) 10:23 < reardencode> 5. What length is the data argument to OP_CHECKSIGFROMSTACK(VERIFY)? 10:23 < reardencode> What length is the data argument to OP_CHECKSIGFROMSTACK(VERIFY)? 10:23 < reardencode> What length is the data argument to OP_CHECKSIGFROMSTACK(VERIFY)? 10:23 < reardencode> sorry, paste trouble. 10:24 < cguida> should be 0 to 520 bytes? 10:24 < reardencode> correct - there are no special limits applied to it beyond those enforced by script. 10:25 < cguida> +1 10:25 < reardencode> BIP340 mixes the message such that non-uniform messages or short messages do not compromise the signing protocol's unforgeability. 10:26 < reardencode> 6. How does OP_INTERNALKEY OP_CHECKSIG in Tapscript compare to key spend in weight? 10:27 < cguida> looks like it's 8 vBytes smaller? 10:27 < reardencode> in key spend, does the pubkey appear in the spend stack? 10:29 < cguida> ah right, this saves 32 bytes, because you don't need to input the pubkey 10:30 < reardencode> in a taproot key spend, the pubkey is taken from the scriptPubKey directly, so currently a tapscript single sig spend is 32 bytes + some overhead more costly. With OP_INTERNALKEY we can get rid of that extra 32 bytes, but we still have the overhead. So, what's the overhead? 10:31 -!- kevkevin [~kevkevin@2601:243:197e:8f10:1144:b419:2326:e2f1] has joined #bitcoin-core-pr-reviews 10:31 < reardencode> 2 additional witness item lengths, 1 leading controlblock byte, 2 script opcodes. - 5 extra WU 10:32 < reardencode> (open to having missed something here, but I _think_ that's right) 10:32 < cguida> ok so 32 - 5 = 27? 10:32 < reardencode> keyspend looks like this: 10:33 < reardencode> script spend looks like this: