Delivery-date: Sun, 16 Feb 2025 03:59:04 -0800 Received: from mail-yb1-f184.google.com ([209.85.219.184]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tjdId-0006im-FW for bitcoindev@gnusha.org; Sun, 16 Feb 2025 03:59:04 -0800 Received: by mail-yb1-f184.google.com with SMTP id 3f1490d57ef6-e54da6701d2sf5128801276.0 for ; Sun, 16 Feb 2025 03:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1739707136; x=1740311936; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=EHdMKxUqntkM6rssIOcoMxJR87HKOGXzykRXBy1Wy6c=; b=FFCEUkFzo+ogLmNyZVWke92Uq18c4uVlvgy4FE5lx/S976MzZHliSGI9QvuX/JJngq grBd7WtnjGYLKPxW0eVgcTebVK3AXM7Hy1G8UITITAHyVpaFb9/xsMM3TXXxaIG2tCgr VF/HuLMkrS0Va/JwUsvuYgMRWKd659vYOJ/yvZiTcK7c0WilyUinBqr1M1wrbRQw4GTS XfThYi1nsGrWaKWKnbqRTjCFXBbjy+crBlA/evcpJKfYZRwY9jsMg69UTmBH0Tbw7p/+ mJP2X2iw71MAY+oG8ZtmTZ4NViXvKNaoNxkFkpMhH+hoQHnkO6zYgZs/Mq4uPu/L0+8p sp3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739707136; x=1740311936; darn=gnusha.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=EHdMKxUqntkM6rssIOcoMxJR87HKOGXzykRXBy1Wy6c=; b=O1+LK+1BhWaT7FeUEeYPpzgFOS6+ons27ykP0cGYTjhd7iQDJQJePKfQeKzDWos32p lxKcBMauxzgRipQVCNlZES8/UAeYKutVv6elMWvAUg0xFnlFMLNMAKiT74+ISJau4jod znj34+KN+tWPP9ZElImelLaxBTqqsGsCtCsCX+GKluL4CHv4YcyvY8L5yNQFIfckfrnV +sNDCzuobH4/UoOaCQbjp6Hr+oZQhkO5n32iljtHkZDzXPOnyW+4CHSXa3y/mTnXzx6p spzngT3wmODKUhzrSGojo795jHe/JaUou1bkKyhuGk+Zx9Yg7TrR/JdgdY/BeXeaFgHx AKgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739707136; x=1740311936; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=EHdMKxUqntkM6rssIOcoMxJR87HKOGXzykRXBy1Wy6c=; b=IJexXSo5OEink21U7MhDnNWvn5zS/+ij0KNBvMT70/kPjAPF82N90k5/cpQ34Tpcnu XvIKCQ2PU1DLtTTneqAv46jCwwrhZRoP6vmKvMHE1UjT8QsdEPBQjVwxcWSRidQ04o2c vG3YVpmzuDQ5jb14heBvLyhLRfGMs3BdSMzygZLiiHfTx/Tv0EHZF81wYkvkKc3Sb7G/ iSOvW11g/kLGDqlKCq36PPK2Ga2KZw6hnXEd5/g9J8X0s3Iu4SCb/g1h0cOxsaRQfqgx 6vS/HytJtFEBKgXERuts4rzV9y+D14xORtqWYY99Aqd3j+VhxkZvRPtvLW8j9GDS0OiS 4CKA== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=1; AJvYcCXaiy+3lhMJufQ6+VOHa/HOad17apRsSOD8MXbeOThm3DShgOHGuxk3U5ufkM2vySiRsBvDiO2HfZbl@gnusha.org X-Gm-Message-State: AOJu0YwetDJCd2YSw19PefhSvR8zgsuILBxo5xuNayswUt3RmwqMUtxy MxN5w8C+gW/Da6G0qr4XIcwuW3iQlCUnDsoEAuI9I4Y0hjYS5+C+ X-Google-Smtp-Source: AGHT+IEoEaCZ5C9iBX1klDX3ExFDv8Hxxheuhb58SVoaJxZ3a/dCETif/z9+0jzyaeGZO/B1+E35Eg== X-Received: by 2002:a05:6902:220f:b0:e57:8991:be4b with SMTP id 3f1490d57ef6-e5dc91ebcccmr3951059276.35.1739707136410; Sun, 16 Feb 2025 03:58:56 -0800 (PST) X-BeenThere: bitcoindev@googlegroups.com; h=Adn5yVFl6pDr8vrmrGdH6JGDBSdZewb4LwKIfXdIztwu+zZhDw== Received: by 2002:a25:d852:0:b0:e58:562:680 with SMTP id 3f1490d57ef6-e5da7920908ls535352276.0.-pod-prod-08-us; Sun, 16 Feb 2025 03:58:52 -0800 (PST) X-Received: by 2002:a05:690c:4c10:b0:6ef:820c:a752 with SMTP id 00721157ae682-6fb582b8af8mr52027527b3.20.1739707132453; Sun, 16 Feb 2025 03:58:52 -0800 (PST) Received: by 2002:a05:690c:4786:b0:6fb:3e32:1a09 with SMTP id 00721157ae682-6fb44927275ms7b3; Sat, 15 Feb 2025 13:13:26 -0800 (PST) X-Received: by 2002:a05:690c:25c5:b0:6ef:4a1f:36d6 with SMTP id 00721157ae682-6fb5831d609mr37671797b3.23.1739654005503; Sat, 15 Feb 2025 13:13:25 -0800 (PST) Date: Sat, 15 Feb 2025 13:13:24 -0800 (PST) From: Antoine Riard To: Bitcoin Development Mailing List Message-Id: <97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n@googlegroups.com> In-Reply-To: References: <53c78eb9-2050-46d5-a688-be82846135a4n@googlegroups.com> Subject: Re: [bitcoindev] Update on the Great Consensus Cleanup Revival MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_89316_1223663156.1739654004942" X-Original-Sender: antoine.riard@gmail.com Precedence: list Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com List-ID: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Score: -0.5 (/) ------=_Part_89316_1223663156.1739654004942 Content-Type: multipart/alternative; boundary="----=_Part_89317_867889912.1739654004942" ------=_Part_89317_867889912.1739654004942 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Peter, I'm talking about this check in VerifyScript as of commit 43e71f74 in=20 bitcoin core. ``` if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) !=3D 0 &&=20 !scriptSig.IsPushOnly()) { return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY); } ``` In my understanding, we never set SCRIPT_VERIFY_SIGPUSHONLY, neither in=20 MANDATORY_SCRIPT_VERIFY_FLAGS, nor in STANDARD_SCRIPT_VERIFY_FLAGS, and this sounds okay as it's a script= =20 check pertaining to BIP62 rule 2, and BIP62 was never activated. As far as I can tell, that's more a= =20 stale check just right=20 there in the interpreter code paths. We still return SCRIPT_ERR_SIG_PUSHONLY for P2SH spends, verifying the=20 scriptSig is push-only. All the unit tests (i.e `script_tests.cpp`) are manually setting the=20 SCRIPT_VERIFY_SIGPUSHONLY flag to verify the logic correctness, even it appears as never being set for=20 block validation. The original PR is there: https://github.com/bitcoin/bitcoin/pull/5065 Feel free to point me out if I'm missing something obvious here. Best, Antoine OTS hash: 42e2e614fea49ec876539e28b323718df3ef734b3a4b247fcc649f0704ea1b61 Le vendredi 14 f=C3=A9vrier 2025 =C3=A0 17:45:54 UTC, Peter Todd a =C3=A9cr= it : > On Fri, Feb 07, 2025 at 05:02:46AM -0800, Antoine Riard wrote: > > This might be a stylistic note, though I could point in bitcoin core=20 > code=20 > > today implemented > > check in the script interpreter right in the crux of consensus code=20 > paths=20 > > that is just stale > > due to a never-activated BIP (-- yes I'm starring at you SIGPUSHONLY). > > What specifically do you mean by this? You mean the > SCRIPT_ERR_SIG_PUSHONLY error condition? > > --=20 > https://petertodd.org 'peter'[:-1]@petertodd.org > --=20 You received this message because you are subscribed to the Google Groups "= Bitcoin Development Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoindev+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/= 97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n%40googlegroups.com. ------=_Part_89317_867889912.1739654004942 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Peter,

I'm talking about this check in VerifyScript as of com= mit 43e71f74 in bitcoin core.

```
=C2=A0 =C2=A0 if ((flags = & SCRIPT_VERIFY_SIGPUSHONLY) !=3D 0 && !scriptSig.IsPushOnly())= {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 return set_error(serror, SCRIPT_ERR_SIG= _PUSHONLY);
=C2=A0 =C2=A0 }
```

In my understanding, w= e never set SCRIPT_VERIFY_SIGPUSHONLY, neither in MANDATORY_SCRIPT_VERIFY_F= LAGS,
nor in STANDARD_SCRIPT_VERIFY_FLAGS, and this sounds okay as it'= s a script check pertaining to BIP62
rule 2, and BIP62 was never activ= ated. As far as I can tell, that's more a stale check just right
ther= e in the interpreter code paths.

We still return SCRIPT_ERR_SIG_= PUSHONLY for P2SH spends, verifying the scriptSig is push-only.

= All the unit tests (i.e `script_tests.cpp`) are manually setting the SCRIPT= _VERIFY_SIGPUSHONLY flag
to verify the logic correctness, even it appe= ars as never being set for block validation.

The original PR is = there: https://github.com/bitcoin/bitcoin/pull/5065

Feel free to= point me out if I'm missing something obvious here.

Best,
= Antoine
OTS hash: 42e2e614fea49ec876539e28b323718df3ef734b3a4b247fcc64= 9f0704ea1b61
Le vendredi 14 f=C3=A9vrier 2025 =C3=A0 17:45:54 UTC, Peter Todd a= =C3=A9crit=C2=A0:
On Fri, Feb 07, 2025 at 05:02:46AM -0800, Antoine Riard wrote:
> This might be a stylistic note, though I could point in bitcoin co= re code=20
> today implemented
> check in the script interpreter right in the crux of consensus cod= e paths=20
> that is just stale
> due to a never-activated BIP (-- yes I'm starring at you SIGPU= SHONLY).

What specifically do you mean by this? You mean the
SCRIPT_ERR_SIG_PUSHONLY error condition?

--=20
https://petertodd.org 'peter'[:-1]@petertodd.org

--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoind= ev/97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n%40googlegroups.com.
------=_Part_89317_867889912.1739654004942-- ------=_Part_89316_1223663156.1739654004942--