public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Anthony Towns <aj@erisian•com.au>
To: Nadav Ivgi <nadav@shesek•info>,
	Bitcoin Protocol Discussion
	<bitcoin-dev@lists•linuxfoundation.org>
Subject: Re: [bitcoin-dev] CTV Signet Parameters
Date: Thu, 21 Apr 2022 12:36:00 +1000	[thread overview]
Message-ID: <20220421023600.GA6083@erisian.com.au> (raw)
In-Reply-To: <CAGXD5f3QmZvj0okeyNouGLRmBxJr_NyxOhJ9QfkegLnw=HKUbw@mail.gmail.com>

On Wed, Apr 20, 2022 at 08:05:36PM +0300, Nadav Ivgi via bitcoin-dev wrote:
> > I didn't think DROP/1 is necessary here? Doesn't leaving the 32 byte hash
> on the stack evaluate as true?
> Not with Taproot's CLEANSTACK rule. 

The CLEANSTACK rule is the same for segwit and tapscript though? 

For p2wsh/BIP 141 it's "The script must not fail, and result in exactly
a single TRUE on the stack." and for tapscript/BIP 342, it's "If the
execution results in anything but exactly one element on the stack which
evaluates to true with CastToBool(), fail."

CastToBool/TRUE is anything that's not false, false is zero (ie, any
string of 0x00 bytes) or negative zero (a string of 0x00 bytes but with
the high byte being 0x80).

Taproot has the MINIMALIF rule that means you have to use exactly 1 or 0
as the input to IF, but I don't think that's relevant for CTV.

Cheers,
aj



  reply	other threads:[~2022-04-21  2:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 21:58 Jeremy Rubin
2022-02-18 11:13 ` 0x0ff
2022-02-22  3:19   ` Jeremy Rubin
2022-04-20  2:31 ` Anthony Towns
2022-04-20 17:05   ` Nadav Ivgi
2022-04-21  2:36     ` Anthony Towns [this message]
2022-04-28 12:23   ` Jeremy Rubin
2022-04-20 17:13 Buck O Perley
2022-04-21  5:03 ` Anthony Towns
2022-04-21  6:16   ` Jeremy Rubin
2022-04-21  6:25     ` Jeremy Rubin
2022-04-21 13:22   ` Russell O'Connor
2022-04-21 15:05     ` Jeremy Rubin
2022-04-22  0:58       ` Anthony Towns
2022-04-22  1:10         ` Nadav Ivgi
2022-04-22  5:30         ` Jeremy Rubin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220421023600.GA6083@erisian.com.au \
    --to=aj@erisian$(echo .)com.au \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=nadav@shesek$(echo .)info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox